• 2 Posts
  • 420 Comments
Joined 2 years ago
cake
Cake day: August 9th, 2023

help-circle
  • A lot of it was fair criticism at the time. Linux fixed some of what was wrong. Having a good sudo config mostly resolves the problem of having one superuser account, and big, multiuser systems are a lot less common now, anyway. X’s network transparency features aren’t that useful in modern computing contexts, either, though I have found a few over the years.

    But mostly, it’s because the landscape changed from a hundred Unix vendors vs a bunch of other OSen, to now where it’s Windows vs Linux vs OSX. By that comparison, the two with Unix-derived history look well thought out.

    (This also implies that NextStep was the one old Unix vendor that has survived in a meaningful way. I don’t think anyone would have guessed that 30 years ago.)




  • When handling things that are serialized over the wire, you have to do it this way. Yes, you can use typed serialization formats, but in a string-based serializer, there’s nothing stopping the other system from sending “0.0000005” on a field that should be an int. If you don’t validate that it’s an int, you would just pass that value to your equivalent of parseInt().

    If you do validate that it’s an int, then it still didn’t matter if the language has static typing or not. You’re doing that at runtime or you’re not.

    In Rust, doing "0.00005".to_string().parse::<i32>().unwrap() causes a panic on the unwrap() from an invalid digit. However, that’s runtime. It’s not something the type system can handle statically. The real benefit here, I think, is that it at least forced you to consider that the invalid input could have unexpected results. This is a pretty good reason to be careful about putting unwrap() on everything. The compiler isn’t going to save you here.



  • I understand the motivated reasoning of upper management thinking programmers are done for. I understand the reasoning of other people far less. Do they see programmers as one of the few professions where you can afford a house and save money, and instead of looking for ways to make that happen for everyone, decide that programmers need to be taken down a notch?


  • That might be the underlying problem. Software project management around small projects is easy. Anything that has a basic text editor and a Python interpreter will do. We have all these fancy tools because shit gets complicated. Hell, I don’t even like writing 100 lines without git.

    A bunch of non-programmers make a few basic apps with ChatGPT and think we’re all cooked.



  • I know it because I’ve actually implemented RSA as an exercise and know how it works.

    What you’re talking about with hashes is an implementation detail. It’s an important one, because using exactly the same algorithm for signing and encryption has some security pitfalls, and it will usually be slower. However, the function you call is exactly the same. The hash is encrypted with the private key. It can be verified by generating the same hash, decrypting with the public key, and matching the two hashes.

    See also: https://cryptobook.nakov.com/digital-signatures/rsa-signatures

    Signing a message msg with the private key exponent d:

    • Calculate the message hash: h = hash(msg)
    • Encrypt h to calculate the signature: s = hd (mod n)

    The operation “hd (mod n)” is just RSA encryption, but with the private key.



  • if you can solve logic puzzles, you’ll make a decent programmer.

    I mean, that’s what Google did several years ago. They stopped because data showed it didn’t mean anything.

    That said, debugging existing code is a more realistic test of what you’ll be doing on any programming job, as opposed to writing anything from scratch.









  • I also started with GTA V in the last few years. I sometimes describe it as an interactive movie rather than a game.

    That’s not meant to be insulting. It’s a very well told story with perfect social satire. The characters are excellent. If you judge it the way a movie is judged, it’s very good. The one thing is that the story should have finished with the big three-way shootout instead of Franklin’s choice. Otherwise, very well put together.

    As a game, though, it’s mid. There are several mechanics where they teach you to do a thing, but it never comes up again. Money is no longer a limitation after the first heist is done. Owning a business isn’t likely to be profitable for the length of a likely playthrough.

    I accepted most of the morally questionable stuff. It comes with the series, and you’ll either have to accept it or not play. It’s balanced out with obvious social satire; it’s aware that this is not how people should act in real life. It’s a game for mentally mature players who understand that none of these are good people. That mental maturity doesn’t necessarily come with age.

    However, I drew the line at the paparazzi storyline. Just felt too sleezy. The FIB torture bit also came close to me, but in-game, even Trevor didn’t feel comfortable with that, and he’s a monster.

    Only other part I skipped was that damn yoga bit. Glad the game let you skip it while still progressing, because I don’t know what it wanted me to do.

    I’m a little surprised it got so many 10 out of 10 reviews at launch. I guess the draw distances are impressive for a game that worked on the Xbox 360, and it uses those draw distances for important artistic effects. It makes it feel like a real city. But there are bugs that prevent progression years after release (albeit with workarounds most of the time), and some of the mechanics are bolted on. It’s a 9/10 movie and a 7/10 game that averages to 8/10.