Hacker News new | ask | show | jobs
by goto11 1720 days ago
Almost any advice is useless if you write code purely for your own enjoyment. This is why the context is so important. If you enjoy writing convoluted unmaintainable useless code then who is to stop you? Just understand most advice does not apply to your context.

Most software development advice tacitly assume you want to write code which works and is long-term maintainable (potentially by someone other than yourself) and which fulfills some purpose beyond just the fun of writing the code.

1 comments

> If you enjoy writing convoluted unmaintainable useless code then who is to stop you?

Does anyone actually do this? I think it's the opposite.

I've spent truly absurd amounts of time thinking about how to do things properly. I read books, read other people's code, read programming language implementations, I just read and learn as much as I possibly can before I even start doing anything. I want my code to be right. I want it to represent the truth of how the world works.

In a professional context where people actually have deadlines, working code is usually enough to satisfy them. How complex and maintainable it is tends to be a lesser concern, to be addressed at a later time or never.

> > If you enjoy writing convoluted unmaintainable useless code then who is to stop you?

> Does anyone actually do this? I think it's the opposite.

Code style, structure, and design are more of an art than a science, so different people will have wildly different opinions (extreme examples notwithstanding).

I don't think anyone deliberate writes unmaintainable code except as a joke. Hard to maintain code happen when some other objective takes priority - performance, abstractions, architectural purity, DRY or whatever else a developer might enjoy focusing on.

The most maintainable code tend to be the least clever. But developers enjoy being clever, so without any outside pressure to deliver maintainable code, developers will tend towards less maintainable code.