Skip Navigation
How do you handle UX Design?
  • 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.

  • 10x Stronger Than Kevlar: Amorphous Silicon Carbide Could Revolutionize Material Science
  • 10GPa is about 2 billion footballers piled on top of a football field.

  • Help - Memmy not loading
  • I also had this issue, and I think it was because I used my email address instead of username, which works initially but breaks later. Deleting app and logging in with username fixes it.

  • Typing is not a programming bottleneck
  • 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.

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

  • Computer Science | Domesticated Brain
  • Misleading description, it’s only a brief summary about Agile/Scrum.

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

  • ...
  • 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.

  • Connect PC to a TV?
  • Should have no problems. Couple of things to check on the TV settings menu, make sure the zoom is set to ‘fit’ so that there is no border/overscan, if there is a ‘game’ or ‘low latency’ mode enable it; otherwise turn off all picture enhancements (e.g. LG clear view / image smoothing) as they are no bueno for gaming.

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

  • Resources for getting better at debugging?
  • If you haven’t already done so i’d recommend enabling nullable types, at the very least it should make your code more robust against this particular error, and may help narrow down where exactly the null is set. I’ve only seen one null reference exception since I turned this feature on, and it was because I mis-used the null-forgiving operator..

    The debugger is important in the immediate stage of coding, but high quality logs will make your life much easier through all stages of the software development lifecycle.

    Regarding real-time / system software, all IO and new threads must always be wrapped in exception handlers, and every handler must do something in the catch block, if nothing else log the exception, I usually dump the stack trace as well if I’m not really expecting it to reach a particular block, most of the time the stack trace makes the debugging trivial.

    If you are working with sensors/devices, it’s good practice to write a driver, and also a device simulator down to the byte/protocol level, then you can inject faults and ensure your app can handle them. Don’t be afraid to throw exceptions, e.g. if your sensor message parser doesn’t understand the format, throw a FormatException; then you’ll safely walk back up the stack and combined with good logs the issue should be straightforward to diagnose.

    Multithreading is a minefield, but you can eliminate a whole class of errors (race conditions) by embracing async/await. Avoid side effects at all costs and try to write pure functions only; never use ‘flags’. Use the concurrent collections, and try to avoid locks where you can; if you must, get in and out of the critical section as fast as you can, or you will degrade performance and increase the possibility of deadlocks.

  • *Permanently Deleted*
  • Might have better luck getting meat from a local butcher, the supermarkets are notorious for pumping up the weight with water.

    I was walking down one of the isles today and shocked how small the condiment jars have become. (What is this? mint sauce for ants?)

  • Alternatives to iCloud (iOS/Mac OS/Windows)
  • Also recommend OneDrive, iOS app works great for automatically syncing photos, and has a decent document scanning/pdf feature I use a lot.

  • 🌀 Dealing with Nothing in C# - Nullable
  • 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; 
    
  • CatPoop CatPoop @lemmy.world
    Posts 3
    Comments 14