• 0 Posts
  • 83 Comments
Joined 3 years ago
cake
Cake day: July 5th, 2023

help-circle

  • I presume that the code was tested for various cases where there was at least one previous password on record, but everyone forgot about new users with no previous passwords. However I’m having trouble imagining what the code could actually be doing.

    I can only imagine a dynamically typed language, and a “checkedPasswords” variable being declared but uninitialized, then a loop incrementing that variable for each non-similar password pulled from the records, and finally a check to see if checkedPasswords equals the number of stored previous passwords.

    The execution environment could type and initialize the variable by default after the first increment, but in the case of the user having no previous passwords on record that wouldn’t happen, and the final equivalency check would be comparing an integer to some internal “NaN” state, thus failing.









  • You reminded me of a story I recently read, where the author highlighted just how much awesome programming someone had done by describing how their hands were cramping up.

    It’s like estimating how well an artist paints by looking at how much paint is on their clothes, or judging how good a cook is by how many cuts and burns they have. The actions that cause those things are incidental to the process, not central, and an excessive amount points to incompetence, not hard and skillful work.


  • Frieren (Sousou no Furiren, "Frieren and the Funeral). It’s about what happens after the quest is finished. The elven mage Frieren was part of a band of adventurers that defeated the big bad many years ago. Before the party splits up and she goes off to travel the world studying magic, the group all agree to meet again in the future, after many years.

    This is where the main story starts. Due to her elven heritage, Frieren has hardly aged at all. When she comes back, she’s just in time to see the human leader of the old party one last time before he dies, and she attends his funeral. She goes searching for the other old party members, and along the way she accidentally picks up some new friends and becomes the leader of a new party, having various adventures and run-ins with new bad guys.





  • The problem I find with many games made for Win95/98/XP is that the game uses one or more third-party libraries that were only “valid” for a year or two. After that, updates to the OS closed loopholes that the poorly-written old versions of the libraries relied on, but the poorly-written newer versions of the libraries released to deal with those issues then break compatibility with the previously-released game, which was never updated or patched.




  • Seriously, the best option is whatever matches the brightness of your screen to its surroundings. I read about this decades ago and it eliminated screen fatigue for me.

    If switching to dark mode works for you, great. When I worked on a PC in a well-lit office all day, I would open a program with a white background, hold up a blank white piece of paper next to the screen, and adjust the screen brightness until it looked about the same as the paper. I did this once or twice a week because I was near a set of picture windows and I was affected by weather and the seasons, but in a room with more artificial light it would be “set and forget”.

    It seemed very dim at first, and several of my coworkers commented on it. It took a few days of resisting the urge to turn the brightness back up, but I got used to it and never went back.

    My PC at home is currently set up in a partially shaded corner of a well-lit room, so I put a dim little light bar behind the screen to make the wall match the brightness of the screen and the rest of my desk/room.


  • A couple of other commenters have given excellent answers already.

    But on the topic in general I think that the more you learn about the history of computing hardware and programming, the more you realise that each successive layer added between the relays/tubes/transistors and the programmer was mostly just to reduce boilerplate coding overhead. The microcode in integrated CPUs took care of routing your inputs and outputs to where they need to be, and triggering the various arithmetic operations as desired. Assemblers calculated addresses and relative jumps for you so you could use human-readable labels and worry less that a random edit to your code would break something because it was moved.

    More complex low-level languages took care of the little dances that needed to be performed in order to do more involved operations with the limited number of CPU registers available, such as advanced conditional branching and maintaining the illusion of variables. Higher-level languages freed the programmer from having to keep such careful tabs on their own memory usage, and helped to improve maintainability by managing abstract data and code structures.

    But ignoring the massive improvements in storage capacity and execution speed, today’s programming environments don’t really do anything that couldn’t have been implemented with those ancient systems, given enough effort and patience. It’s all still just moving numbers around and basic arithmetic and logic. But a whole lot of it, really, really fast.

    The power of modern programming environments lies in how they allow us to properly implement and maintain a staggering amount of complex minutiae with relative ease. Such ease, in fact, that sometimes we even forget that the minutiae are there at all.