• 2 Posts
  • 27 Comments
Joined 1 year ago
cake
Cake day: July 17th, 2023

help-circle






  • unzip && strip && touch && finger && grep && mount && fsck && more && yes && fsck && fsck && umount && clean && sleep

    Edit: and yes, this joke is older than the gods as evidenced by the presence of finger, and I’m not sure clean is a thing in modern UN*X distros. Not in FreeBSD at any rate




  • hydroptic@sopuli.xyztoProgrammer Humor@programming.devYou wouldn’t get it
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    edit-2
    3 months ago

    If you want to be able to eg. (de)serialize non-public fields of a type for any reason, you’ll need some way to get around the access restriction. Mocking is another use case – although it’s a philosophical discussion whether you should be mocking non-public fields.

    And this isn’t just a Java thing, the comment you’re responding to has an example in C#, and you can do something similar in a lot of languages that support runtime reflection. Barring runtime reflection support you can do pointer math if the language supports it. Access restrictions on fields are there to stop casual misuse of private fields, but sometimes you actually may want to be able to step over those restrictions if you really know what you’re doing.










  • Java was such a fractal of stupid design choices in its early years, and a lot of it is still there. OOP except when it’s not (int vs Integer, [] arrays but also List et al), no unsigned number types, initially no way to do closures or pass methods around so everything had to be wrapped in super verbose bullshit, initially absolutely dogshit multiparadigm support and very noun-oriented, initally no generics either meaning everything’s an Object, when it did get generics they had to do type erasure for backwards compatibility, etc etc etc


  • She was an asshole who wanted me to redo work for free because she believed her son over someone who actually knew what they were doing, and after tens of minutes of wrangling I just went “fuck it” and obliged her request to sanitize the peripherals. The sum wasn’t all that big to begin with, so it’s not like she was on the hook for hundreds of euros – probably got a 50€ bill instead of a 20€ one. Not knowing any better obviously wasn’t the problem here, but if that’s your takeaway then I really don’t know what to tell you.

    So yes, I did it.
    No, I’m not sorry.
    Yes, I’d do it again.