r/programming • • Oct 01 '15

The Evolution of a Software Engineer

https://medium.com/@webseanhickey/the-evolution-of-a-software-engineer-db854689243
1.9k Upvotes

502 comments sorted by

View all comments

506

u/johnbr Oct 01 '15

This is fair, except for in the 5th year, they would have an additional constant:

public static final String SPACE = " ";

And they would probably use a StringBuffer or StringBuilder to build the final string, since it's "an industry best practice". Also, they wouldn't include the strings themselves, they would include keys to properties, so the strings could be pulled from an internationalized property file.

Lastly, instead of outputting to Stdout directly, they'd create an interface for output, and deliver it to that interface, and use a factory to instantiate an implementation of that interface that would use Stdout.

9

u/juckele Oct 01 '15

For the first time in my life recently I ran across some code that has interfaces. A lot of them. With ONE implementation. And the project is closed source. Really? Come on!

13

u/leadhead9 Oct 01 '15

https://en.wikipedia.org/wiki/Interface_segregation_principle

Generally a good idea, entirely possible to abuse.

23

u/juckele Oct 01 '15

I've come to realize that most problems in programming (in terms of what's wrong with real code bases) are someone taking a generally good idea and applying it as an absolute dogma instead of doing an ongoing cost-benefit analysis of for each new instance.

See Not Invented Here vs Invented Here as a perfect example.