this post was submitted on 01 Apr 2025
128 points (100.0% liked)

Programmer Humor

22950 readers
948 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
all 20 comments
sorted by: hot top controversial new old
[–] [email protected] 62 points 1 month ago (2 children)

When I worked on OpenStack for a few years, 80% of the bugs I fixed were type errors that could have been prevented by Python being staticly typed.

[–] [email protected] 45 points 1 month ago (1 children)

Yeah strong disagree with this meme. 15 years into my career and everything gets a data type.

The only engineers I know who still don't like strong types are engineers who haven't lost a weekend due to a stupid type issue. Once you have one or a few of those, you start to like types again.

[–] [email protected] 13 points 1 month ago (1 children)

I remember a javascript library where the was a function that returned, according to the documentation, "a color". Did it return an object with 3 fields? Were those fields RGB or some other color scheme? Is it a string encoding a color? What format is that string? None of these questions could be answered without just running the code, and analyzing the object you got back.

[–] [email protected] 1 points 4 weeks ago

{ r, g, b}, hex code, rgb encoded in some stupid format, types are just helpful. I don't know why people don't like them. 30 seconds of creating a class for your type saves you hours of debugging later

[–] [email protected] 10 points 1 month ago

This describes literally every python contract job I've ever had.

[–] [email protected] 21 points 1 month ago

ASM doesn't care about your variable types, because it doesn't care about your variables. What's a variable, anyway? There is only address space.

[–] [email protected] 16 points 1 month ago (2 children)
[–] [email protected] 3 points 1 month ago (2 children)

Nah I think this is fine for all of the software engineers working on 1-person projects at the place they intend to stay the rest of their career.

[–] [email protected] 5 points 1 month ago

the hell of their own creation

[–] [email protected] 1 points 1 month ago* (last edited 1 month ago)

And that's why I don't use smart pointers.


Well...
I actually did make a logical flow diagram describing all conditions for pointer deletion. They just don't care to read it.

[–] [email protected] 11 points 1 month ago* (last edited 1 month ago) (2 children)

Lately my approach to dev is “I don’t care about your language feautures, I’m going to treat it like lua and just stuff objects with data and write bare functions to process them”

Unless I need to engineer something complex, everything is dict[any:any].

[–] [email protected] 35 points 1 month ago (1 children)

Cool. Where do you work again? Just so I can make sure never to end up there to clean that shit up.

[–] [email protected] 4 points 1 month ago

I'm mostly joking, but most of what I code lately is integrations and data tools where 90% of the thing is configuration and lining up different tools.

It's a lot of load data form yaml, build json, throw that into a tool and the build a report kind of glue. I'll use pydantic and stuff where it makes sense, but I've been spending a lot of time lately between lua and python and javascript.

I used to do more system and engineering stuff which actually required a lot of planning, but that's just not what has paid the bills for me the last few years.

[–] [email protected] 6 points 1 month ago

Man, I love lua, but after switching to a different job on typescript I feel like lua could only benefit with a similar type system. So many bugs avoided just because I know for a fact what a function returns and expects.

[–] [email protected] 9 points 1 month ago
[–] [email protected] 6 points 1 month ago

As long as your byte consists of 8 bits.

[–] [email protected] 5 points 1 month ago

pydantic goes brrrrr!

[–] [email protected] 5 points 1 month ago

Like any newb, the nuance is lost.

Data types don’t matter, the interface matters.

[–] [email protected] 1 points 1 month ago* (last edited 1 month ago)

Elixir and Clojure are awesome languages and don't need no types. Elixir is getting them though, so you weird static type absolutists can finally look at it soon. I even use Haskell and OCaml and Rust which has stricter types than the languages y'all write in and I never complain about the lack of types in languages.

I'm the guy on the right, typescript devs are in the middle