Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)B
Posts
3
Comments
488
Joined
3 yr. ago

  • That is awesome

  • Looking at the Rust docs, it looks like it's not much more than a difference in implementation under the hood.

    It would be clunky, but in C# you could duct tape this: make a static abstract method in an interface that takes an object named 'self', then an extension method that extends the class and just casts then runs the function with Unsafe.As<TFrom, TTo>(ref obj), or an explicitly aligned struct with overlapping values.

    I don't expect any such implementation anytime soon though :/

    ps: Typescript can go take a hike, it's a superset for a language that was never designed for this

  • That makes sense. In an earlier climate conference some oil billionaires had a similar idea, but instead to create artificial scarcity and drive energy prices up by moving the power plant to the highest bidder

  • Oh great, this terrible idea is actually going into works

  • use an interface?

  • You gotta know how to use it properly

  • To preface, I think it's best to focus on what the right approaches are. Not on what to avoid. And when you see a student making a mistake, showing them how a different approach is handier (if possible) is what I suggest you do.

    Having something to point at doesn't help much

    vertical separation

    This one argues against organizing your code in a way that shares variables are in one place. There are arguments to be made either way, but normally you'd scope your variables in a way that the ones specific to a particular bit of code are not accessible from elsewhere.

    null check

    Suggest writing a custom class to do what most languages can solve with inheritance or even better: the ? syntax.

    inconsistent names / styles

    Yes, it can be annoying. No, clarity is more important than insisting on removing that extra underscore.

    complicated Boolean expression

    They're advocating the use of a function to replace an expression. Sometimes this works, but the task of a boolean expression is not always easily expressed in a couple words. And so you can end up with misleading function names. Instead, just put a comment in the code.

    callback hell

    Not even a code smell. It's an issue from back when languages like JavaScript didn't support promises yet, but callbacks were popular. Cose got hard to read with a little complexities.

  • writing code on my phone on the train with three minutes of time, let's go and think of the worst possible solution!

     c
        
    
    int i = 1337;
    
    for (byte x = 0; x < 32; x++) {
        if (i & (1 << x) == 1) {
            i &= 0xFFFFFFFF ^ ( // dangit I'm out of time
        } else {
            i |= 1 << x;
            break;
        }
    }
    
    
    
      

    Instead of a loop, you'd use 32 of these copy-pasted if statements and a goto :p

  • And focussing on what not to do is not the best way to get things right

  • Good job! I don't see another comment

  • Ahh, yep that one is rather important and often overlooked

  • Software security or copilot training dataset security?

  • Get a vpn to europe and try to claim your newfound right to be forgotten?

  • I didn't get that in school, perhaps we're in a different country or something. It's not about being engaging or following a guideline. It's about setting goals and checking if you achieved them.

    Every audience is different, every student learns at their own way and pace. A one size fits all solution doesn't exist. Some presentations may be awesome, but that takes more than just a good script and slideshow

  • It does, about 42000 of them just in the patent holding company alone

  • That's probably got more to do with the sugar high often associated. Chocolate, tea, cola, and more contain caffeine. I just have simple caffeine tablets on my desk.

    Zolpidem* and others are not over the counter medications, at least not here. You need a prescription to get them, it's kinda sad thinking how many people depend on medication to then run into situations like this.

    *Ambien is just expensive Zolpidem with a brand name on it

  • ...and the evil rowboat

  • I'm not, it's not a secret. As for deleted comments, they're mostly just stuff I deleted because I forgot to double check a fact and realised I was wrong after posting

  • A high on caffeine does not make you less alert. Sleep deprivation might though