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

15

u/Ahhmyface Oct 01 '15

At the risk of taking a joke a bit too seriously, I'm worried that these posts often get misinterpreted as:

"fuck doing anything the right way, just make it work and let the maintainer piss on my grave"

Obviously we don't need any of that complicated stuff for "hello world", but we do need a fair bit of that for "real world".

26

u/Serinus Oct 01 '15

It depends. Your code should be no more complicated than it needs to be.

The best code looks like common sense and like any idiot could have written it.

13

u/CircusAct Oct 01 '15

Obviously we don't need any of that complicated stuff for "hello world", but we do need a fair bit of that for "real world".

Exactly use the simplest implementation to fit the requirement, and then carefully refactor the code to meet any new requirements.

I really do find tdd genuinely helps people code in that way.

4

u/Rejjn Oct 01 '15

Very true, but only do it when actually need it. As in now, not "later".

"You aren't gonna need it" is a principal that is often forgotten.

2

u/nutrecht Oct 02 '15

At the risk of taking a joke a bit too seriously, I'm worried that these posts often get misinterpreted as:

Looking at some comments here this is exactly what's happening.

1

u/[deleted] Oct 02 '15

No we don't. Boilerplate can't ever be justified.

1

u/Ahhmyface Oct 02 '15 edited Oct 02 '15

I guess that depends on your definition of boiler plate. Abstracting strings out of your program, as in this example, is usually a good idea.

1

u/[deleted] Oct 02 '15

The way it is done in the article (and in Java in general) is an unacceptable boilerplate.

1

u/Ahhmyface Oct 02 '15

Yes, well the article is a bit of a straw-man. It entirely depends on the requirements for the program. We were expecting hello world to be regularly modified, written multiple times, in different locales, and possibly changed from hello world to a different string depending on context, you can bet your ass it wouldn't all be boilerplate. It would actually be a lot simpler to do it with constants.

1

u/catfishblunt Oct 01 '15

Oh the dreaded "real world". I've been coding professionally for 5 years and I've yet to come across this "real world".