Hacker News new | ask | show | jobs
by johannessjoberg 490 days ago
> We are destroying software trying to produce code as fast as possible, not as well designed as possible.

Legacy systems are born from rushing into implementation to feel productive rather than understanding the problem. Slow is smooth. Smooth is fast.

2 comments

Though it's not the only way to create legacy systems. Sometimes they are of sound design which deteriorates over time. Or the requirements shifted such that the design is no longer adequate. Or as the article mentions, rewrites for no good reason.

When I do a git blame of something coherent, that worked well in production, that I wrote years ago, almost none of my original code survived, every line is now written by a different person. That's the entropy of software systems left unchecked. It was not really rushed, there was a ton of time debating design before a single line was written.

Also, simple is evident, smooth, maintainable, and fast.

If asked to implement a templated dictionary type, many C++ programmers will write a templated class. If they want to be responsible, they’ll write unit tests. But the simplest way is:

template<typename Key, typename Value>

using Dictionary = std::vector<std::pair<Key, Value>>;

It is trivially correct and won’t have any edge cases which the tests may or may not catch.

Some programmers would consider this implementation beneath them. In just 800 lines, they could build the type from scratch and with only a few months’ long tail of bugs.