4 ms·
Here are my 2 cents, after 25 years of development in several companies. If you want to do the next developer a favor, your codebase should be simple to underst
by misja111 3y ago
Here are my 2 cents, after 25 years of development in several companies.
If you want to do the next developer a favor, your codebase should be simple to understand. Period, that's it.
Simple to understand means:
1. Don't use fancy design patterns, FP constructs, performance optimizations etc. Unless the use case specifically requires it.
2. Code should do whatever it needs to do to fulfill its business requirements. Nothing less and preferably also nothing more.
3. Readable code beats documentation: only document the 'why', and only when it is non obvious. If you find you're documenting the 'how', have a second look if you can write your code in such a way that it explains itself.
4. Explain how to build the project, run tests and whatever else is non obvious in a Readme file in your project.
Documentation anywhere else, such as on Confluence, will not be maintained or read.
- The_Colonel 3y agoWhere "fancy" is relative. There was a time when Java 8 streams were fancy for many devs, today it's the default way to manipulate collections. I think the code should be "optimized" for the expected audience (of other devs). If you're a single rock star in a mediocre dev shop, you need to code differently than when you're part of a team of MIT PhDs.
- kaba0 3y agoThat’s actually a very good point!