41 points

bonus points if you’re using a statically typed language but the library uses extensive metaprogramming seemingly for the sole purpose of hiding what types you actually need

permalink
report
reply
14 points

It’s still crazy to me that Django doesn’t have type hints.

permalink
report
reply
5 points

They’ve explained why

permalink
report
parent
reply
2 points

Will you share the source?

permalink
report
parent
reply
4 points

The django-stubs package is decent though

permalink
report
parent
reply
2 points

Flask does - maybe a reason to switch? Lol

permalink
report
parent
reply
1 point

I have been meaning to try it

permalink
report
parent
reply
2 points

Kubernetes as well…

permalink
report
parent
reply
1 point

I hate kubernetes so much

permalink
report
parent
reply
2 points

One more reason to add to my hate list for kubernetes

permalink
report
parent
reply
63 points

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.

permalink
report
reply
60 points

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!

permalink
report
parent
reply
26 points

What took you so long?

permalink
report
parent
reply
10 points

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

permalink
report
parent
reply
2 points

Lol also the importing of lpad and iseven

permalink
report
parent
reply
23 points

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…

permalink
report
parent
reply
4 points

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?

permalink
report
parent
reply
4 points

It’s one of the macro_rules!

permalink
report
parent
reply
1 point

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

permalink
report
parent
reply
10 points

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

permalink
report
parent
reply
15 points

That’s why they named the shell like that

permalink
report
parent
reply
4 points

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.

permalink
report
parent
reply
2 points

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

permalink
report
parent
reply
9 points

you should learn Rust. the type system is so comprehensive that half the time you can guess what a function does (or at the very least what you’re supposed to pass to it) without a single line of human written documentation.

permalink
report
reply
1 point

My problem with Rust is that I find refactoring really painful.

permalink
report
parent
reply
11 points

Rust crates have the second and third problems.

Rust at least has type annotation.

The type has private fields. There’s no constructor. There’s no implementation of the From trait except on itself. You can’t find a function anywhere that returns the type.

permalink
report
reply
9 points

I find Rust crates generally have pretty good docs. Docs.rs is a major time saver

permalink
report
parent
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

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

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 1.9K

    Monthly active users

  • 1.1K

    Posts

  • 39K

    Comments