[-] CatPoop@lemmy.world 1 points 3 weeks ago

I have a script that runs every 5 mins that does a robocopy for each local repo to OneDrive, excluding all the git system files. I don’t really like the idea of pushing half-finished / broken code.

Rarely need to actually copy stuff back out of onedrive, but it’s good enough on the few occasions I forget to push before changing machines.

[-] CatPoop@lemmy.world 5 points 7 months ago

Maybe also look ip a good component library, for C# I use MudBlazor, which has great documentation that helps a lot to pick the right component for the job, and a lot of the hard work is already done in terms of styles/themes.

For my apps I use the MVVM pattern and write all the backend logic first, then that helps me narrow down the right way to display it.

[-] CatPoop@lemmy.world 5 points 8 months ago

It’s not that bad, you might have a couple of moments where you suddenly second guess yourself, particularly on smaller country roads, or car parks. Just remember you the driver should be nearest to the center of the road and you’ll be fine. If you pre book you might have a chance of renting an automatic to make things even easier.

[-] CatPoop@lemmy.world 1 points 10 months ago* (last edited 10 months ago)

10GPa is about 2 billion footballers piled on top of a football field.

[-] CatPoop@lemmy.world 12 points 1 year ago

Assuming this is C#, you could just make Reservation a record type, which can be defined with a one line primary constructor, is immutable and has value type equality. Second example is an insane amount of boilerplate.

[-] CatPoop@lemmy.world 7 points 1 year ago

“This just in, a new study has shown AI poses not material threat to society, go about your business fellow humans”

[-] CatPoop@lemmy.world 4 points 1 year ago

Misleading description, it’s only a brief summary about Agile/Scrum.

Can’t say I’m a fan of the methodology either..

12
Kitsune (i.imgur.com)
submitted 1 year ago by CatPoop@lemmy.world to c/foxes@lemmy.world
[-] CatPoop@lemmy.world 9 points 1 year ago

For my sins I spend a significant part of my time maintaining smalltalk, and it most definitely is not productive.

The syntax is ugly and cumbersome when you start chaining messages. Any advantages the evangelists tout are available in modern languages without the baggage of this dead one.

Today if you want something ‘simple, flexible, interactive’ (interpreted, GC and likely faster) python would almost certainly be a better choice.

[-] CatPoop@lemmy.world 43 points 1 year ago

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.

3
The posse (lemmy.world)
submitted 1 year ago by CatPoop@lemmy.world to c/foxes@lemmy.world
[-] CatPoop@lemmy.world 0 points 1 year ago* (last edited 1 year ago)

I really like nullable types, they can be very effective for writing safer code.

Sometimes there are good reasons to separate object construction and initialization (e.g. composite / loosely coupled objects, or encapsulation of 3rd party libraries) so there can be properties/fields that do not yet have valid values, and using separate queries for this is error prone.

I write a lot of communication interfaces for sensors/actuators and if the communication drops, nullables are a good way to represent invalid readings.

Being able to convey the value and validity in one variable can be more thread-safe and easier to write pure-functions, and show intent.

I occasionally use a nullable for singleton patterns if I’m not 100% convinced there can never be multiple instances, rather than painting myself into a corner with a static class. e.g.

public static MyClass Instance => _instance ??= new();
private static MyClass? _instance; 
4
Sausage (lemmy.world)
submitted 1 year ago by CatPoop@lemmy.world to c/foxes@lemmy.world
view more: next ›

CatPoop

joined 1 year ago