• 0 Posts
  • 12 Comments
Joined 4 months ago
cake
Cake day: February 14th, 2025

help-circle


  • If the file is just a class I usually put example usage with some default arguments in that block by itself. There is no reason for a “main” function. It’s a nice obvious block that doesn’t run when someone imports the class but if they’re looking at the class there is a really obvious place to see the class usage. No confusion about what “main()” is meant to do.

    if __name__ == '__main__':
        # MyClass example Usage
        my_object = MyClass()
        my_object.my_method()
    


  • Decentralized currencies will only actually make sense when the material incentives of our economic system would benefit from them. Capitalism is literally all about concentrating the control of capital and the means by which we produce things. Sadly, decentralized currencies will never be allowed to decouple themselves from these economic systems. There is too much material power to prevent that. And by material power I mean literally the enforcement of these concentrations of wealth through the use of violence.

    The tech is cool. But it doesn’t magically solve the problem by simply being invented. It’s why no one is actually paying with these cryptocurrencies on anything but an extremely small scale.

    A currency that cannot be manipulated by capitalist for their benefit has no place in our world. So, it will never reach any meaningful real use until those structures are dismantled. It will just continue to be a speculative asset that rich people dump their extra wealth into and poor people play as the lottery.



  • This sadly excludes the majority of bad UX decisions that are done entirely to maximize users time inside of the app as well as display advertising.

    So many functional apps are destroyed by these incentives. There is literally a “skill issue” but in the opposite direction. The design is either purposely malicious in a subtle way with “dark patterns” (something Amazon is insanely guilty of. Literally just go try and return and item.) or is purposely annoying trying to ensure the user purchases the “free trial” to actually make the app functional. Knowing a lot of users will be charged at least once for the free trial.

    I guess my point is that there is so so so so much wrong with UX design today. But for the majority of people that’s not because of a bad programmer with no design knowledge. It’s on purpose in most cases.




  • LeninOnAPrayer@lemm.eetoProgrammer Humor@programming.devparseInt(5)
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 month ago

    People give JS a lot of shit. And I do too. But it’s meant to continue running and not fail like C code would. It’s meant to basically go “yeah, sure I’ll fuck with that” and keep trucking.

    So you can always make it do stupid shit when you use it a stupid way.

    Is this bad? Maybe. Was it the intention of the language? Absolutely.

    Typescript fixes a lot of these headaches. But I feel like JS is doing exactly what it was meant to do. Keep trucking even when the programmer asks it to do stupid shit.

    If you’re using JS and don’t understand this then it’s your fault and not the languages fault.

    Do we all want to live in a world of typedefs as strict as C and have our webpages crash with the slightest unexpected char input? Probably not.

    We don’t notice all the time JS goes “yeah I can fuck with that” and it works perfectly. We only notice the times it does that and it results in something silly.

    TLDR: JS does what it was made to do. And because of that it looks absolutely ridiculous sometimes.



  • I work for Microsoft. When I had a kid they sent a “care package” with some items. But literally every item had “Microsoft” or “Met Life” (our employee life insurance I think) all over everything.

    I ripped the “met life” shirt off of the snoopy plush and trashed everything else.

    It’s not just limited to backpacks. They try to turn everything, even a kids blanket, into a fucking ad. It’s so gross.

    You can’t send some cheap items to your employee without branding it with an ad.

    I don’t work for MetLife. Why the fuck would that even be on there? I guess they want to keep reminding me to get life insurance because I’m a kid. Like, holy fuck, I hate this shit.

    Fuck Microsoft. Fuck their support of genocide. I didn’t even choose to work here. They bought my startup company for pennies on the dollar during Covid.