Live data from Hacker News

Ask HN: Is average code getting worse?

news.ycombinator.com

11–20 of 86 posts

Re: Ask HN: Is average code getting worse?

#11
I also find that this varies by the ecosystem.

In PHP I would not assume that an external dependency is without flaws. In fact, I'd assume that it's mostly buggy simply due to the lack of a type system, but fine if I navigate the happy path.

In Haskell I would assume that I'm using the library in a wrong way. In Haskell I also find that I can categorize libraries by quality and that, in the most cases, I'm not running into bugs, but rather lack of good examples or lack of pushing the dependency bounds to Stackage (the package distro on top of Hackage), either because the author doesn't use Stackage or because they've become too busy.

---

Comparing code 10 years ago and now:

I find that there are much more libraries in almost every ecosystem.

That means: More stale packages, more low-grade packages, more critical selection required, but also more opportunities! Hopefully you also experience that you can do a lot more with packages than you were able to 10 years ago.

This, in some ways, has shaped modern software development a lot.

Re: Ask HN: Is average code getting worse?

#12
I don't think it's the code necessarily. It's the feature creep. It used to be that we just supported monitors - now it's touchscreens, tablets, watches, keyboards, mouse. It's LCD screens, plasma, TV, and so on.

I find that code become exponentially more costly the more features you add in, because of the number of architectural layers you have to add on. And if you haven't planned for that, well, now you have to deal with the pain of adding another architectural layer.

HN is likely in the sweet spot of good architecture, but it also means that it's not supporting things like infinite scrolling and reddit-like awards.

Re: Ask HN: Is average code getting worse?

#14
post #5
post #3

Have you vetted the vendors of the library? Is it something that a reputable company offers that you /payed/ for? Or is it some side-project of some rando?

These metrics don't matter. Almost every library you care to pull for a popular (read: widely used and written) language will be trash. Yes, even if you pay for it. Even if it was a "reputable" company making it.

Never thought about it in that way about majority of .NET libs, even those made by 3rd party and most popular ones

Re: Ask HN: Is average code getting worse?

#15
Yes, but this is always the case when more people are doing something. The less gated something is, the worse the quality will, in general, get. When writing was the privilege of the few, written words carefully curated and edited and survive for ages. When everybody could write, there was a lot of trash, along with a lot of great stuff. The average will usually decline in such cases, because most people will not have the drive and resources to become excellent at it.

In the same way, when we are pushing coding at kids barely above kindergarten, there is going to be lots of crap code, but also much more excellent code, in general though, the amount of crap will overwhelm the amount of excellence so average will trend down. If you applied some kind of cutoff at the base, removing the absolute worst, the average might trend up. This is the case with anything that gets more democratized.

Re: Ask HN: Is average code getting worse?

#16
Extended pool of engineers, as the field has grown, has diluted the quality of software.

Post "Social Network" (the movie), and the economic downturn of 2008-2012 there is a new generation of engineers that started programming/entered the field because that's where the money is....

There is also proliferation of the code-academies, who often encourage trainees to create a 'github portfolio', often with low quality libraries.

2001 tech bust acted like a great filter. During the 2001-2012, a lot of people that remained in the field were there because general passion towards it, and had the skills to be employed after the bust.

People that couldn't cut it, did leave the field. Hence, the software was often more of a work of passion, or craft. A lot of the open source libraries that we use today, were created during this times (and the 90s, for the databases, and Linux), also a lot of the culture of startups (good and bad), was cemented during this time.

I think the field massively expanded after 2012, and people started doing engineering because that's where the money was/became trendy. Hence you will naturally have a dilution of overall quality.

Re: Ask HN: Is average code getting worse?

#17
post #12

I don't think it's the code necessarily. It's the feature creep. It used to be that we just supported monitors - now it's touchscreens, tablets, watches, keyboards, mouse. It's LCD screens, plasma, TV, and so on. I find that code become exponentially more costly the more features you add in, because of the number of architectural layers you have to add on. And if you haven't planned for that, well, now you have to de…

Interesting that you should mention device support as a cause of more complex code, as the best way to support the devices you list is generally to use LESS code.

Bare HTML is supported by pretty much everything...

Re: Ask HN: Is average code getting worse?

#19
post #3

Have you vetted the vendors of the library? Is it something that a reputable company offers that you /payed/ for? Or is it some side-project of some rando?

It does not seem to matter. Paid things, if anything, seem to be more likely to be trash than the free ones, but the free things are certainly not blameless.

Re: Ask HN: Is average code getting worse?

#20
It's a mix.

I think that average or high quality code has increased in quality over time, because CI/CD is a lot more widespread. Increased computing power has improved tools such as IDEs, compilers, linters, testing tools, etc. So the ceiling is generally higher, I'd say.

However there are a ton more newbies in the field, because there's a need for more people, so there is also a lot more garbage and that garbage is even worse.

Plus, there are a ton of programming-adjacent folks which can now publish their stuff. Since their focus and background are not related to programming, their libraries and apps are generally of lower quality.

TL;DR: There is more of everything, and since 80% of everything is crap, there is more crap. It's also harder to find the gems, since we have to wade through crap. But good stuff is still out there.

Post reply on HN