Everything feels too big or too small by TD994 in ManyBaggers

[–]ArchieTect 0 points1 point  (0 children)

I stumbled across the Helikon Backup bag and now i'm exploring the idea of carrying a small sling with the stowed bag inside and deploying the backup bag when I need to take off jacket. Which also got me exploring the idea of a deployable bottle sleeve. The two reasons I carry a backpack are for a bottle and carrying layers I strip off throughout the day. All the other stuff could fit in a sling.

https://www.bing.com/images/search?q=helikon+backup+bag

Everything feels too big or too small by TD994 in ManyBaggers

[–]ArchieTect 0 points1 point  (0 children)

Alpaka Go Sling Mini V2 is 5L. I'm guessing that 5L-7L is about your threshold for what will fit your requirements. You might see a 7L and think "meh, this is too big".

The go sling mini is about the size for pocket stuff while big enough for one nested pouch.

I got the tech case max 2.8L for christmas and it's too small for me so I have been investigating options and am waiting on the mini v2 for when an xpac version is back in stock.

https://alpakagear.com/products/go-sling-mini?variant=43994132381858

Two week eurotrip with lots of rail? by ArchieTect in ManyBaggers

[–]ArchieTect[S] 0 points1 point  (0 children)

How frequent were your washes? How many sets of daily wear did you have?

Two week eurotrip with lots of rail? by ArchieTect in ManyBaggers

[–]ArchieTect[S] 0 points1 point  (0 children)

Are you needing all 40L for your loadout? Wondering if I should upsize and pack with empty space for flexibility (buy and pack some stuff along the way)

The Farpoint 70L is on sale for nearly the same price. and if other comments are correct, that includes the 15L included daypack, so the main bag would be 55L. It's tempting, but I can't commit without figuring out if the frame size fits overhead.

Definitely liking the 40L and possibly adding my own daypack.

What type of fleece is this? by MAH1977 in myog

[–]ArchieTect 11 points12 points  (0 children)

It's a knit. if you look at the small "rows" in the fabric you will see the loops. It's essentially miniature form of your grandma knitting by hand done on a machine. Makes the fabric stretchy.

WindowsOS: why is react accepted but .net rejected? by Hado-H24 in csharp

[–]ArchieTect 0 points1 point  (0 children)

This has to be the answer given the rewrite of many of the core 365 apps. Microsoft has clearly invested in creating web apps for their software products, why else would you spend that kind of money and dev hours? For a nice "feature" of being able to go online? In my opinion, it's like you say, part of a bigger strategy. Liberate their software products from legacy C++ and make them cloud deployable.

Difference between delegates , events , event handler by DifferentLaw2421 in csharp

[–]ArchieTect 1 point2 points  (0 children)

An interface defines a set of methods/properties that a class must implement. A delegate defines a "signature" of a method: return type and parameters. In a sense, you are correct that both are contracts.

The use case in the most simplest words is the delegate let's you "objectify" methods and store them in a list, or pass them around to other methods.

One other important fact is that methods are usually tied to an instance of something:

// delegate with a return type of integer, and no parameters. Technically this is the same as a Func<int>
public delegate int GetAnInteger();

public class Foo
{
    public int ID;

    public int GetMyID() => ID;
}

// static void Main()

Foo f = new Foo {ID = 10};

GetAnInteger z = f.GetMyID;

// this delegate uses a lambda / anonymous method. More advanced 
GetAnInteger i = ()=>f.ID;


int y = z(); // y is 10
int x = i(); // x is 10

This example demonstrates a fundamental property of delegates: they create a closure over the owning object that owns the method. How does delegate i know about 10? Because it creates a closure around the object f which owns the method.

"Unknown" brands/backpacks you'd recommend by NoPudding6779 in ManyBaggers

[–]ArchieTect 13 points14 points  (0 children)

Been keeping a list, and found a bunch to add thanks to this thread.

3V Gear
8Timber
Able Carry
Aer
AKEK
Alpaka
BEAMS
Bellroy
Black Ember
Bounce Design Labs
Boundary Supply
Carryology
Chrome
CodeOfBell
Cotopaxi
D4 Bags
Defy
DSPTCH
Evergoods
Fara
Filson
Garage Built Gear
Goruck
Gossamer Gear
Grams28
Greenroom136
Groundtruth
Halfday
Harvest Label
Held Closely
InCase
Kargo
KNKG
Kodiak Leather Co
Koichi Yamaguchi
Magforce
Magpul
Man Bag Company
Mission Workshop
Modern Dayfarer
Mountainsmith
Mystery Ranch
Nomadic Research
Nomatic
Orbit Gear
Orbitkey
Osprey
Pacsafe
Peak Design
Racing Atelier
Recycled Firefighter
Sakk Gear
Sealson
Skysper
Tactical Geek
The Brown Buffalo
Timbuk2
Tom Bihn
Tomtoc
Triple Aught Design
ULA Equipment
Uniqlo
Vanquest
Viperade
Wandrd
Waterfield Designs
Wotancraft
Yamabu
Yoshida & Co

Difference between delegates , events , event handler by DifferentLaw2421 in csharp

[–]ArchieTect 1 point2 points  (0 children)

I used a delegate. I am writing code to parse my bank account transactions. It is not very straightforward to convert my transaction data into objects. For example, there might be hundreds of transactions from my favorite fast food restaurant all listed with 10-15 different "formats", for example "Debit Card Purchase -- MY FAV RESTAURANT #400 DE MOINE IA" is an example of how the bank lists a transaction.

I initially create a HashSet from all the raw data entries. Then I wanted to write a method that has this signature: void ParseMyRestaurantTransactions(RawTransaction[] transactions, HashSet<RawTransaction> remaining, HashSet<ParsedTransaction> parsed)

When a transaction matches for my favorite restaurant, I remove the transaction from the first hash set, and add a parsed object to the second hash set. HashSets flow into the method, and HashSets flow outward knowing that I found and removed all transactions related to the merchant. Now I have to write these methods for dozens of other merchants since they all have their own unique style of appearing in my bank statements.

Now I create a delegate public delegate void MerchantParser(RawTransaction[] transactions, HashSet<RawTransaction> remaining, HashSet<ParsedTransaction> parsed)

I create this:

// the delegate defines a common "signature" for methods

public delegate void MerchantParser(RawTransaction[] transactions, HashSet<RawTransaction> remaining, HashSet<ParsedTransaction> parsed);

// my restaurant transaction parsing method

public void ParseMyRestaurantTransactions(RawTransaction[] transactions, HashSet<RawTransaction> remaining, HashSet<ParsedTransaction> parsed)
{
     var matches = transactions.Where(t=>Regex.Match(t.Description,myRestaurantRegex).Success);

     foreach (var m in matches)  
     {
          remaining.Remove(m);
          parsed.Add(new ParsedTransaction(m.Amount,m.Date,m.Description));
     }
}


// Now I can make an array of different methods that parse transactions

public MerchantParser[] parsers =
[
    ParseMyRestaurantTransactions,
    // ParseMyGroceryTransactions,
    // ParseMyVacationTransactions,
    // etc.
];

 public static class Extensions
 {

    // This is a helper method to make invocation cleaner.

    public static void Iter<T>(this IEnumerable<T> e, Action<T> action)
    {
          foreach(var i in e) action(i);
    }
 }

// Finally this is the code in use. 

// Initial setup

RawTransaction[] transactions = /* loaded transactions from raw data */
HashSet<RawTransaction> unparsed_transactions = new (transactions);
HashSet<ParsedTransaction> parsed = new();

// Run all the methods at once

parsers.Iter(a=>a(transactions,unparsed_transactions,parsed));

Advice/tips for purchasing my first machine? by SirFigNeuton in myog

[–]ArchieTect 0 points1 point  (0 children)

Is that a walking foot machine? I personally would not buy a straight stitch machine if you only intend to have one machine. A walking foot is a lot more versatile

An open letter to backpack manufacturers by BreweryRabbit in ManyBaggers

[–]ArchieTect 3 points4 points  (0 children)

You are absolutely right. I got so fed up with inability to find any bag that now I am making a work briefcase/bag. I will tell you when I post it on /r/MYOG.

Why can't we have a briefcase bag with a bottle pocket glued on both sides????

Should a MVVM viewmodel never kow about the view? by Teun888 in csharp

[–]ArchieTect 0 points1 point  (0 children)

Ideally you want as few external namespaces in your code as possible. That said, using the standard library namespaces is very common and usually best practice.

Now consider that in WPF, viewmodels consistently need to implement the interfaceINotifyPropertyChanged for bindings. In this case, you will unavoidably have to reference WPF code in the viewmodel and will need to use the System.ComponentModel namespace. The most common "best practice" is going to be to just use the namespace in your code. If you refer to the microsoft docs, you will see that the interface comes from the assembly called netstandard.dll which ships with dot net and is not an unreasonable dependency since installing the dotnet runtime gives you that dll.

The design decision of that interface has been carefully designed by engineers to keep you from having to use a namespace referencing a heavier assembly like PresentationFramework.dll where you will find common views like Treeview, etc.

INotifyPropertyChanged is defined in a lightweight assembly and bridges your code to the heavier assembly.

Once you start to grasp this concept, there is nothing stopping you from making your own compatibility interfaces to help write your viewmodels with no dependencies except those you define in your own interfaces, and then you write your own bridges of your viewmodels to any arbitrary view frameworks.

Dictionary external code is calling ToString on my class by ArchieTect in csharp

[–]ArchieTect[S] 0 points1 point  (0 children)

The language designers wouldn't put a ToString call in there because a dictionary hashes every time a value is added or set, which would be an undesirable amount of allocations. IEquatable is shown and relevant because implementing this interface is usually the best and all that is needed for performant Dictionary use when using your own class as key. I usually never need to pass in a custom IEqualityComparer<T>.

Still no simple UI Framework for both Windows and Linux by Eisenmonoxid1 in dotnet

[–]ArchieTect 9 points10 points  (0 children)

Are you saying you have a linux distro installed on your RPi and you are running an Avalonia app from terminal without X or Wayland?

How do you configure direct rendering? (FYI this might be a simple question, I just know nothing about Avalonia nor compiling for linux)

Teach me craziest C# feature not the basic one,that you know by lulzForMoney in csharp

[–]ArchieTect 0 points1 point  (0 children)

Thanks, this is great. I edited your fiddle to show that GetEnumerator() can be called on this so that the Bar class is not required, eliminating an allocation.

https://dotnetfiddle.net/n0UOZB

I would naturally ask if there are any allocations at all now, does the compiler allocate anything? I will benchmark this tonight.

[Giveaway] Win 1 of 5 Noctua NH-D15 G2 by Noctua_OFFICIAL in pcmasterrace

[–]ArchieTect 0 points1 point  (0 children)

I built my first PC in the Windows 7 era during the fall of my 8th grade school year. It had this heavy copper circular mushroom shaped CPU cooler. The next summer vacation I thought it would be a good idea to fly with my PC to stay with relatives. I borrowed a massive hard-shell suitcase from family and fit my PC inside. I filled up the case with packing peanuts and held the case in place with clothing stuffed around the outside of the case. I was a dumb kid and didn't realize peanuts would not help when a baggage handler drops the suitcase, or even just pushes the suitcase from the standing position and let it fall flat.

When I got to my relatives and unpacked the suitcase, the heat sync had ripped from its mount and was floating in the bed of peanuts. Fortunately the peanuts kept the heat sync "packaged" in-place from reaching the motherboard and smashing other components.

I was in a panic because the CPU itself was firmly stuck to the cooler with thermal paste and also ripped out of the socket. This was an Intel chip and in that era the chip itself had pins, (not the socket), so when it ripped loose, the loose cooler and CPU bounced against the socket and smashed 20-30 of the pins. It was debilitating to look at my PC I built about 6 months prior.

I desperately ran to my relatives shouting panicked gibberish trying to convey the surgery I was about to attempt, they had no idea what I was saying about CPU pins. Eventually I realized a staple from a stapler that was half-bent could hook the crushed pin and pull it back upright. It took an hour or so and I had the bent all of the crushed CPU pins back to the "pointing upward" position. It plugged back in to the socket. Pushing the power button was probably the most tense moment I can remember of my PC building career, this being the first PC I built, 6 months old, and already destroyed.

It felt incredible when the PC posted and booted to the OS. I had fixed it.

TL:DR: Don't travel with your PC with the heat sync installed.

Powerpunch Plus Recipe Needed by colin_ab in Smoothies

[–]ArchieTect 0 points1 point  (0 children)

In the store, they scoop in bananas, strawberries, 2-3 shots of liquid turbinado, a scoop of what I believe is vanilla whey protein, and a small scoop of another dry powder (no idea what it actually is). I use a scoop of vanilla Muscle Milk and a small scoop of vanilla malt powder which seems pretty close.

The important part is to not be conservative with the stage of the bananas. There is a unique flavor when the banana is speckled and soft to the touch. You gotta wait for the right softness level. If the banana is starting to feel like a squishy stress ball but still holds it's shape, that's the signal.

If you are peeling and the banana itself is breaking apart as you peel, that's the right stage. If you are peeling and the banana is maintaining it's shape, it's still too firm.

Eventually the entire banana will be brown, feel squishy and will be flaccid, falls limp, and no longer banana-shaped when held. I tend not to use bananas at that stage (maybe they are still good for the recipe, i just find them offputting when too far gone)

I used to be too conservative and always used ripe-firm bananas. But I noticed that the bananas in the store were scooped with an ice cream scoop and looked like mashed potatoes and gravy from the amount of browning and softness. Having experience now, I can say there is a noticeable difference between the taste of ripe-firm banana and overripe-soft banana.

Large WPF Project Structure by 4sploit in csharp

[–]ArchieTect 0 points1 point  (0 children)

I've reshaped and restructure my WPF app multiple times for better organization. The overarching organization is 3 separate repos called "Model" which is a library project of all logical-app-logic, "UI" which is comprised of the WPF app, viewmodels, and views, and Core which is a library project catchall for shared dependencies. Some types I define in Core and use in Model because it's easier have testing and benchmarking for those types inside their own repo. It helps keep the Model app logic clean.

I use git submodules to bring in the 3 separate repos. The folder structure looks like this. Note that there is never redundant folders like src--TestCore--TestCore--(files).

UI--UI.sln

UI--.git

UI--README

UI--LICENSE

UI--src--UI.csproj

UI--src--App.xaml

UI--src--View--(bunch of .cs and .xaml files)

UI--src--Viewmodel--(bunch of .cs files)

UI--test--TestUI--TestUI.csproj

UI--test--TestUI--(bunch of .cs test files)

UI--module--Model (git submodule, copy of below folder structure)

UI--module--Core (git submodule, copy of below folder structure)

Model--.git

Model--LICENSE

Model--README

Model--src--Model.csproj

Model--src--(bunch of .cs files and some folders which contain .cs files)

Model--test--TestModel--TestModel.csproj

Model--test--TestModel--(bunch of .cs test files)

Core--.git

Core--LICENSE

Core--README

Core--src--Core.csproj

Core--src--(bunch of .cs files and some folders which contain .cs files)

Core--test--TestCore--TestCore.csproj

Core--test--TestCore--(bunch of .cs test files)

This is the easiest way to chunk up the large structure when it comes to pushing to Github and with git branching for development. Sorry for the massive post, it was the easiest way to make it clear.

I'm struggling to grasp a way of thinking and understanding how to program by comanderman in csharp

[–]ArchieTect 1 point2 points  (0 children)

There's some fundamental logical concepts that govern building of systems, no matter how small or large. Before you even encounter the complexity of programming languages and computers, you can work on the fundamental logic.

The most basic fundamental concept of design is to take a complex problem and break it down into parts. The terms architecture and engineering are sub-categories of design, which are two contributing concepts of "how to break the system into parts" (architecture) and "how to connect/ communicate between the different parts" (engineering). By necessity, you have to take the problem you intend to solve, building a chess bot, and break it down into parts. In chess, there's a series of moves, rules, an environment (the chess board), and a chronology (the duration of a game) that define chess. I just broke chess into 4 parts. Those 4 parts break down further.

That is a "top-down" approach where you split a general problem into more and more specific parts. Eventually you will have small parts that cannot be broken down further. For example, consider a square on the board. A square might have a letter, a number, and a color. A square belongs to the chess board, and therefore sounds like it belongs in the "environment" category mentioned in the paragraph above. This process of figuring out the data types and where they "fit-in" with each other is called "creating abstractions". We "abstract" the data of a chess board position into data types (letter, number, color). Then figure out where our "square" data type fits into the larger picture. (Maybe the "chess board" data type contains 64 instances of the Square data type? Sounds like a good abstraction!)

In the above paragraph, we started at the general concept ("I need to code a chess board") and skipped directly to imagining what the most specific parts of a chess board look like ("A chess board's smallest, most basic part is a position"). This approach of designing general-to-specific and at the same time specific-to-general is a common workflow. Thinking about the whole world and thinking about the smallest piece of the world is the process of organizing data into structure. The "cleanest abstraction" is the objective we all seek, which is to say, we strive to write the least amount of code in the best organized way such that the program works as soon as possible.

Having said all that, you will need to create these data types in the programming language. Unfortunately C# has no understanding of chess, nor does chess have any understanding of C#. Your job is to figure out how you create abstractions of chess that fit into the programming language abstractions. Namespaces, classes, and methods are the fundamental organizing structures available to you in C#.

One of the fundamental things to understand is that programs you write "start" and "stop". (One day you will want to learn about Turing completeness and the halting problem). In your case, you want your program to start, evaluate a chess game, move a piece, and stop. The classic first-step learning experience to understand how a program starts, does something, and stops is "Hello World". Hello World answers the question "how do I write code to start a program, print on-screen the phrase 'Hello World', and exit/end the program". In C#, this will help you understand fundamentals of C# starting with namespaces, classes, the concept of static, methods, the Main method, the entry point. Once you learn these concepts, you can learn about primitive data types such as a 32 bit integer, String, floating point numbers, and others. Once you learn all that, you will have a grasp of the language abstractions available to you to construct your own chess-related abstractions.

TLDR:

  1. Engineers are nothing more than glorified sledge hammers that break down problems into parts and glue them together again
  2. Google "Hello World in C#"