[–] 2 points 11 months ago

just to be clear since you said both again in different sentences, GUID and UUID are two names for the same thing.

I think that spec predates uuid4, it only mentions the time based/node based variants. 122 bits of auth token should be plenty, right?

the sheer unlikeliness of guessing that large a number, the original post is fake or something else is going on.

  • source
  • parent
  • context
  • [–] 1 point 11 months ago (1 child)

    I've worked at several places that didn't have formatters when I started. they did by the time I left. you can incrementally adopt them and if it's automated most people at worst don't care. advocate for things you want

    reassignment and hoisting are the significant ones. behavior around this does just seem more intuitive than otherwise when it comes up, so I think telling especially new devs to use const arrow fn everywhere but classes is a reasonable rule

    hate to break it to you but it behaves like a variable either way. function just behaves closer to a var variable. const fns are less like variables since no assignment. intellisense/devtools all show them just fine. it really is just a minor aesthetic difference on the definition

  • source
  • parent
  • context
  • [–] 2 points 11 months ago (9 children)

    semicolons? quotes? use a formatter and don't think about it. I think js world has basically done this already.

    const is simpler. why would I declare an array as let if I'm not reassigning? someone can look at it and know they don't have to think about reassignment of the reference, just normal mutation. ts has the further readonly to describe the other type of mutation, don't abuse let to mean that.

    const arrow over named function? gets rid of all the legacy behaviors and apis. no arguments, consistent this, and no hoisting or accidental reassignment. the 2 places you should ever use named fn are generator or if you actually need this

  • source
  • parent
  • context
  • [–] 37 points 1 year ago

    they're different files generally, the only client that will automatically request them is a debugger.

    you turn them off because you don't want to expose your full source code. if you would be ok making your webpage git repo public then making sourcemaps available is fine.

  • source
  • parent
  • context
  • [–] 2 points 1 year ago

    most things should have an alternate implementation, just in the unit tests. imo that's the main justification for most of SOLID.

    but also I've noticed that being explicit about your interfaces does produce better thought out code. if you program to an interface and limit your assumptions about implementation, you'll end up with easier to reason about code.

    the other chunk is consistency is the most important thing in a large codebase. some of these rules are followed too closely in areas, but if I'm working my way through an unfamiliar area of the code, I can assume that it is structured based on the corporate conventions.

    I'm not really an oop guy, but in an oop language I write pretty standard SOLID style code. in rust a lot of idiomatic code does follow SOLID, but the patterns are different. writing traits for everything instead of interfaces isn't any different but is pretty common

  • source
  • [–] 1 point 1 year ago

    all of their examples are pre ai anyway. it's almost impossible to change a core data model thing without ai too.

    all the legacy codebases I've worked in have very much been shaped by the original abstractions they decided on. as much as I wanted to change them, there wasn't really a way to do so because of the scale and backwards compatibility requirements

  • source
  • parent
  • context
  • [–] 1 point 1 year ago (2 children)

    some things are easier to change than others. it's easy to slop on new features, rewrite them etc. changing core models after you've built a ton on them isn't easy, even with ai. the odds it comes up with the perfect data model aren't great, but for isolated features that doesn't matter since it's easy to throw them away and rewrite

  • source
  • parent
  • context
  • [–] 1 point 1 year ago (1 child)

    I love btrfs and have a similar partition setup, but I'm not sure if the rest of the setup that'd be required to install into this is going to be good for someone wanting assistance with moving their home directory. in particular likely not being able to use any graphical installers since I don't know any that support installing into subvolumes

  • source
  • parent
  • context
  • view more: ‹ prev next ›