6 ms·
Clever scripts tend to be easy to understand only for the author. Heck, even the author sometimes will have difficulty understanding the cleverness of their own
by yedava 8y ago
Clever scripts tend to be easy to understand only for the author. Heck, even the author sometimes will have difficulty understanding the cleverness of their own old code.
Since Java enterprise applications can easily live on for a decade or more, it is important that they not be "clever" and be easy to maintain. Developers can come and go. New team members should be able to dive into and grok the code right away.
- freedomben 8y agoIf we were talking about "what I would do at work" then I would agree with you. Fortunately however the awk scripts that I hack in my down time are not even usually saved. It would be much like criticizing people who play regex golf because the regexes can be hard to understand. That code is never meant to be used for anything other than the immediate satisfaction it brings. If anyone ever did see them, it would be because they either hacked me, or I showed it to them related to some conversation about awk scripts. However I also disagree on the definition of the word clever wrt workplace. I often consider the simplest and most straightforward implementation to be the most clever. Anyone can write impenetrable code that confuses people. Not many people can solve the problem at hand in an elegant, simple fashion.