• 0 Posts
  • 41 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()
    

  • 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.





  • I would say politicians are using the rise in anti American sentiment to solidify their positions in more nationalist forms of government. I would warn my comrades in the west. This rise in nationalism can be dangerous. Even if it is directed at being against America (which is good) it can also be leveraged to build fascist policies in your own country. Be wary of your “liberal” politicians and parties. They likely do not have your best interest at heart. They know material conditions will decline with the fall of the American empire. They will do everything they can to keep their power. And they’ll do it off the backs of your working class.

    Do not substitute class solidarity for Nationalism. Tarrifs are a direct attack on the working class of the world. We pay those. No matter what country we reside in.



  • 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.









  • LeninOnAPrayer@lemm.eetoProgrammer Humor@programming.devCorporate Branding
    link
    fedilink
    English
    arrow-up
    25
    arrow-down
    3
    ·
    edit-2
    2 months ago

    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.


  • Yep. Which is why there were a disproportionate number of small business owners, landlords, and other nonwage “workers” on January 6th. The people that could actually afford to fly out and storm the capital are people already in a very financially sound and privileged position. They either do not do actual work or have a job they can easily take time off for and not fear being fired.

    And these people are the base of the Republican party and the MAGA movement. It’s why it’s so mucher harder to get leftist organized in places like this. There are just not as many of us that can afford to do something like that.