this post was submitted on 17 Sep 2024
396 points (97.6% liked)

Programmer Humor

19570 readers
1262 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 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 63 points 2 months ago (6 children)

I love shitting on Python, but I feel like all those problems are present in libraries for other languages as well. There's a tonne of that crap for JS/TS.

Similarly, I find a fair number of Rust crates (that I want to use) have virtually no doc or inline examples, and use weird metaprogramming that I can't wrap my head around.

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

I feel like there's a very fine balance for the effort required to publish a package.

Too easy and you get npm.

Too hard and you get an empty repo.

I feel like Java is actually doing a relatively good job here. Most packages are at least documented a bit, though obviously many are outdated.

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

Uh, there are an absolute fuckload of Java libs out there with nothing more than auto-generated garbage Javadocs.

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

You should look at some old Perl or C code. I have even seen some shell code that makes me want to bash my head in till death with an IBM Model M Keyboard

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

That's why they named the shell like that

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

Similarly, I find a fair number of Rust crates (that I want to use) have virtually no doc or inline examples, and use weird metaprogramming that I can’t wrap my head around.

Is it really a true rust crate if it doesn't contain at least one inscrutable macro?

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

It’s one of the macro_rules!

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

Not even one full day after posting this and here I am debugging one of my own inscrutable macros for a version upgrade lmao.

[–] [email protected] 23 points 2 months ago

I mean, if we're talking about all those problems, the no-type-annotations issue is rather specific for Python, JS/TS and Ruby.

But in general, I feel like there's somewhat of an old world vs. new world divide, which happened when package registries started accepting libraries from everyone and their cat.

In C, for example, most libraries you'll use will be quite well-documented, but you'll also never hear of the library that Greg's cat started writing for the niche thing that you're trying to do.

Unfortunately, Greg's cat got distracted by a ball of yarn rolling by and then that was more fun than writing documentation.
That's the tradeoff, you get access to more libraries, but you just can't expect all of them to be extremely high-quality...

[–] [email protected] 2 points 2 months ago

Lol also the importing of lpad and iseven

[–] [email protected] 58 points 2 months ago (2 children)

Are we living in a world in which the JS/TS ecosystem is the yardstick by which we measure well written code? I mean... Wait a minute! I figured it out! This is the Bad Place!

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

Every time I have a problem, I throw a regex on it, and BOOOOM, right away I have a different problem

[–] [email protected] 24 points 2 months ago

What took you so long?