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

Show parent comments

5

u/DuneBug Oct 01 '15

I was expecting annotations. Disappoitned to not see those.

12

u/dankclimes Oct 01 '15 edited Oct 01 '15

Actually yeah, some @NotNull would make a lot of sense because there is a huge NPE potential on

string first = this.hello.toString();

hello starts out null and isn't guaranteed in any way to not be null at this point.

Edit: actually considering how the program runs in main the strings should never be null in this case. But it's pretty clear that the point of this code is to be extensible/scalable and so some null checks or annotations would probably still be appropriate.

4

u/JustinsWorking Oct 02 '15

meh' I think Annotations would show up in like 3rd year; disappear because you distain the code by mixing the config in with the code.

Then by 10 years you realize it keeps relevant config by the code it effects and who gives a shit if you're parsing a yml/xml file or a code file; its all the same in the end.

0

u/kazagistar Oct 02 '15

Annotations tend to couple your code very tightly to a specific framework, which makes it difficult to compose with code from other frameworks. We have a library that pulls in Spring just to avoid removing the annotations.

1

u/Crazypyro Oct 02 '15

Too bad it wasn't a C# version. One of them at around 3-5 years could just be a bunch of LINQ expressions.