• 0 Posts
  • 58 Comments
Joined 10 months ago
cake
Cake day: March 21st, 2024

help-circle




  • If you go back to my example, you’ll notice there is a UserUniqueValidator, which is meant to check for existence of a user.

    Oops, right, I just glanced over the code and obviously missed the text and code had different class names. Another smell in my opinion, choosing class names that only differ in the middle. Easily missed and confusion caused.

    I don’t think our opinions are too far off though. You’re just scaling the validation logic to realistic levels and I warn that in practice coders extrapolate too quickly and too often, which results in too much generic code which is naturally harder to understand and maintain than specific code.


  • I would argue that the validate routines be their own classes; ie UserInputValidator, UserPasswordValidator, etc.

    I wouldn’t. Not from this example anyway. YAGNI is an important paradigm and introducing plenty of classes upfront to implement trivial checks is overengineering typical for Java and the reason I don’t like it.

    Edit: Your naming convention isn’t the best either. I’d expect UserInputValidator to validate user input, maybe sanitize it for a database query, but not necessarily an existence check as in the example.









  • It’s extremely unconvincing to say “Sure it was horrible last time, but next time it’ll be different.” Trotskyists and ultraleftists compensate by prettying up their picture of socialism and picking more obscure (usually short-lived) experiments to uphold as the real deal. But this just gives ammunition to those who say “Socialism doesn’t work” or “Socialism is a utopian fantasy.” And lurking behind the whole conversation is Stalin, who for the average Westerner represents the unadvisability of trying to radically change the world at all. No matter how much you insist that your thing isn’t Stalinist, the specter of Stalin is still going to affect how people think about (any form of) socialism — tankies have decided that there is no getting around the problem of addressing Stalin’s legacy. That legacy, as it stands, at least in Western public opinion (they feel differently about him in other parts of the world), is largely the product of Cold War propaganda.

    That’s the gist. Then he goes on with another paragraph of whataboutism but of course not a single mention of the tens of millions of dead both, Stalin and Mao, were responsible for.

    Of course he’s also an western armchair socialist. People that actually lived in the Sowjet Union (and not in today’s Russia) draw quite a different picture.