Hacker News new | past | comments | ask | show | jobs | submit login

Does Tesler’s law apply to lines of code or architecture?

I have absolutely seen complex code that was created (often for perceived “best practices” like DRY) which could be removed by simplifying the code.




I think it applies to problems, not solutions. The complexity of a given problem cannot change. If you try to ignore part of the inherent complexity of a problem (also called essential complexity) in your solution, it does not disappear but someone else must solve it somewhere else, or the problem is not really solved. If you build a solution that is more complex than the problem itself (in other words, if you add incidental complexity), this does not increase the complexity of the problem either, only the complexity of the solution.

I think a good solution to any problem needs to match it in complexity. I regularly use this comparison as a benchmark for solutions.

Of course, you can also see it this way: The complexity you remove from the code by making it cleaner is added to your team communication because you now have to defend your decision. (Only half joking.)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: