News for hackers. Stuff that matters.
Re:Ask HN: What do you consider as “bad” code? by usrbinbash on Wednesday January 26, 2022 @03:01AM (#30082979)
Houses are a great analogy, especially when it comes to my argument about pointless abstractions.

A house where the floorplan is decided before the needs of the tenants are even clear, will likely have to be reshaped later. The same happens in overarchitectured codebases, eg. a dependency injection for some subsystem set up which will never have more than one type to depend on, making the code less obvious, less readable, and harder to maintain.

Re:Ask HN: What do you consider as “bad” code? by mbrodersen on Wednesday January 26, 2022 @05:09AM (#30083693)
> pointless abstractions

Of course anything that is "pointless" is indeed pointless. And "great abstractions" are indeed great. What's your point? And what has that got to do with your origial low level list?

> A house where the floorplan is decided before the needs of the tenants are even clear, will likely have to be reshaped later

Yes obviously. And a well thought out floorplan that takes into account the needs of the tenants is great. Again, what's your point? And what does that have to do with your original low level list?

Re:Ask HN: What do you consider as “bad” code? by usrbinbash on Wednesday January 26, 2022 @05:35AM (#30083851)
My point is: "Basics matter, Readbility counts."

And how is my list "low level"? It concerns both "low level" issues like missing comments or inconsistent naming, and "high level" architectural problems, like introducing pointless abstractions.

Both are code smells , and thus a valid answer to the topic.