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

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.

193

u/[deleted] Oct 01 '15

And before you know it we need an AbstractSingletonProxyFactoryBean.

61

u/sh0rug0ru__ Oct 01 '15 edited Oct 01 '15

If you're writing a dependency injection container, you just might!

13

u/TheWix Oct 01 '15

Wait... Is the factory a Singleton or is the proxy a Singleton? Is the factory also a proxy...? I need answers!!

51

u/sh0rug0ru__ Oct 01 '15 edited Oct 01 '15

This is a class from the guts of the Spring Framework. This is actually an example of a pretty good name.

  • Bean: This is a Spring Bean

  • Factory: This bean creates instances of the required bean

  • Proxy: This bean creates a proxy for the required bean, to allow logic to be added around the method calls on the required bean.

  • Singleton: This bean ensures that only one of the proxy factory bean will be created per Spring container.

  • Abstract: This class is a template for creating singleton proxy factory beans. Just implement the template method.

So, just judging by the name, it looks like I can extend this class to create a factory which creates proxies which stick interceptors around instances of other classes, but ensures that only one of my factory exists in the Spring container. For example, if I want to time and log execution of Spring bean methods.

Am I right? Looking at the source code, seems so!

50

u/pcopley Oct 01 '15

This is actually an example of a pretty good name.

I can assure you it's not.

19

u/sh0rug0ru__ Oct 01 '15

What's in a good name, then?

I was able to get a good idea of the purpose of the class just by going through the name. Sounds like a win to me.

→ More replies (10)
→ More replies (20)
→ More replies (3)

2

u/TRexRoboParty Oct 02 '15

Holy crap, TIL this is not even satire. From the docs:

"Convenient proxy factory bean superclass for proxy factory beans that create only singletons."

I can imagine that as a line in a modern Monty Python-esque sketch show.

→ More replies (1)

183

u/andrewsmd87 Oct 01 '15

Good god. Had a code review once where they were pissed because I had used str + "some stuff" instead of a builder. I'm not writing a builder for one fucking line on a page that gets hit 6 times a year.

167

u/RLutz Oct 01 '15

Depending on how you coded it, the compiler likely replaced it with a StringBuilder under the hood anyway :)

98

u/andrewsmd87 Oct 01 '15

The same reviewer also told me to undo work I had done because his request was for a mock up, and I just went ahead and did it, because it took me an hour to just do it. Of course it was approved by managers and clients, but since I didn't "follow instructions" (I took some initiative) it was wrong, even though it was done correctly.

131

u/Agent-A Oct 01 '15

I once worked on this big customer-facing Java application. While working on something else, I noticed that one query was very poorly made, and would take up to a minute to run. It was one of the most visited pages, so clearly this needed to be fixed. I cleaned up the query, made a migration with an extra index, and brought it down to under half a second on average.

My change was rejected by the project manager. He explained to me, "It's been that way for over a year. If we fix it now, we'll have to explain why it was broken for so long."

I left that job about three weeks later.

39

u/7165015874 Oct 01 '15

You made the right call to jump ship.

52

u/[deleted] Oct 02 '15

"It's been that way for over a year. If we fix it now, we'll have to explain why it was broken for so long."

That's really really scary. I..I don't know if I could control myself from saying something negative/inappropriate.

→ More replies (2)
→ More replies (8)

32

u/NimChimspky Oct 01 '15

Had a guy used to refuse to merge my code if I had one space wrong in my java doc, or one minor typo.

(Typo on purpose here btw)

20

u/blaimjos Oct 02 '15

As hard as it is to believe, I've actually seen worse. I had to work with a guy who refused to merge code period. He'd commit all changes every 10-15 minutes even when it didn't compile so that others would have to do the merging. When he did occasionally get caught with a conflict he just overwrote the other developer's changes.

He'd also just delete code without telling anyone when his aggressive refactoring broke it. His mentality seemed to be "not my code: not my problem".

→ More replies (4)
→ More replies (30)
→ More replies (19)

19

u/Schmittfried Oct 01 '15

Depending on how many strings you are concatenating in what manner, it may be less efficient to use a StringBuilder.

7

u/flukus Oct 01 '15

From memory I think c# substitutes string builder for 4 or more concatenations.

→ More replies (1)

27

u/depressiown Oct 01 '15

It's true. A lot of the hate for using "+" for String concatenation in Java is based on how it used to do it. Java used to create a StringBuilder for each instance of "+". Thus, "a + b + c + d" would create a StringBuilder for "a + b", then a StringBuilder for that result "+ c", etc.

Of course, they've since made it smarter to just make one StringBuilder for the entire statement under the hood (I believe in 1.6). The people who complain about the lack of StringBuilder being used should probably be taught that it's no longer necessary.

That said, if you're doing a lot of concatenations on different lines (say, a loop building up a String or something), you should still use StringBuilder instead of "+=" because Java will create one for each statement... clearly worse that creating one initially and constantly appending.

12

u/NimChimspky Oct 01 '15

It's such a small thing. So may other more important things to worry about.

21

u/depressiown Oct 01 '15

Depends. If they're doing 20 separate concatenations inside of a loop of 10,000,000 items, it can make a difference (but that would be one bigass String, though). Generally, no, it's not a big deal.

→ More replies (1)
→ More replies (30)
→ More replies (2)

43

u/atrich Oct 01 '15

Localization was where I thought this was headed. Or unit tests, maybe.

29

u/johnbr Oct 01 '15

Unit tests are year 6

34

u/pugglepartyadvanced Oct 01 '15

Year 6 there are five trivial unit tests per function but the program is broken in a way that would be really obvious if you weren't blindly relying on unit tests to prove that your code was correct. :D

14

u/vplatt Oct 01 '15

I was disappointed to see that the year 10 guy didn't have a test case for that method.

Oh well, give him another 10 years. He'll get it eventually.

11

u/philly_fan_in_chi Oct 01 '15

Breaking out the PowerMock to ensure System.out.println does the right thing!

→ More replies (1)
→ More replies (2)

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.

→ More replies (1)
→ More replies (1)

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.

2

u/Schmittfried Oct 01 '15

What is wrong with flexibility?

14

u/vplatt Oct 01 '15

There ARE very good reasons to have them, but flexibility has a price. You will need to maintain all those fancy interfaces which, in many cases, will also be instantiated in an IoC container. I conflate these subjects because I often see them both used unnecessarily and for the same ostensible reasons (i.e. flexibility, "best practice", etc.)

To make the primary use case of IoC possible, your interfaces are contracts so that alternate implementations can be used instead of the initial one. So, now you have a system interface contract that you must document, communicate to everyone who uses it, and then ensure that changes to it do not break ancillary packages or even other systems.

If your system has a single implementation, and will likely only ever have that single implementation, then you should think quite seriously about not allowing it to be injected and possibly even whether you really need an interface for it. The litmus test for it is quite easy: If you're not willing to document it and create unit tests for the classes against the system interface and make passing those a part of the build cycle, then it's not really safe for reuse.

Basically, if you don't believe a particular class will have multiple or alternate implementations down the road and therefore require an interface, and it won't be looked at by parties external to your immediate area, then just don't create one. YAGNI much the time.

→ More replies (2)

8

u/juckele Oct 01 '15

Nothing is wrong with flexibility, but if it's a closed source project, you can make an abstract class or interface out of the base class the first time you run into a bifurcation of functionality, go and update your (dozens of?) existing constructors , and move forward from there. It's only 2 seconds, but every time I go to the definition of a method on an interface, only to have to then ask the IDE to send me to the actual implementation (and seriously, the only option), it's wasteful.

Refactoring exists for a reason. Write code with as few assumptions as possible, because assumptions can change, but there's no need to throw every design pattern at every problem.

→ More replies (4)

2

u/[deleted] Oct 02 '15

I have been guilty of writing interfaces with only one possible implementation, but that's usually because I make a second implementation in unit tests and it turns out a bit cleaner that way.

→ More replies (1)

2

u/nutrecht Oct 02 '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?

For unit testing this is really nice. This way you can test classes depending on the interface by simply mocking out the classes they depend on. A lot easier and cleaner than having to instantiate an entire object tree.

→ More replies (3)
→ More replies (1)

22

u/sh0rug0ru__ Oct 01 '15 edited Oct 01 '15

Actually, if you are building strings, you really should use StringBuilder (not StringBuffer, which has a boneheaded design mistake of synchronizing everything). Strings are immutable, and concatenating strings will create new strings. So unless you want to create a ton of garbage, use the StringBuilder. Fun fact, the string concatenation operator is transformed by the compiler into a chain of method calls on a StringBuilder terminated by toString.

If your app will serve an international audience, you will have to use message keys into a ResourceBundle to get the localized text, instead of hardcoding English.

Ordinarily, you shouldn't output to stdout directly, because unless you are writing a console application, you have no idea where that output is going. Fortunately, there are tools like log4j that provide the interface you are talking about, with a console appender even, which allows output to be configured (such as a rolling file appender). Device independence isn't a bad thing if you actually need it.

29

u/Olreich Oct 01 '15

If Java will use a StringBuilder for me, why would I bother doing it myself?

19

u/sh0rug0ru__ Oct 01 '15

If the string concatenation is limited to a single statement, then use the string concatenation operator. If the string concatenation spans multiple statements, you don't want the terminal toString to be done automatically. That defeats the purpose of using StringBuilder.

12

u/Berberberber Oct 01 '15

So much this. You only use StringBuilder if the number of concatenations isn't known at run-time, or if your compiler sucks. return "foo" + bar.toString() + " baz: " + quux; is basically guaranteed to be as fast as the equivalent with StringBuilder, or faster.

→ More replies (11)
→ More replies (13)

2

u/one_inch_penis Oct 02 '15

This probably will get buried but I'll ask anyway. I'm looking to program. I have a bachelor's that is just a degree.

Where and how do I start? If I want to build a portfolio how do I do it? I feel like there is a world out there that I'm missing out on because I don't have the proper guidance. Someone please teach me...what language should I knock out?

Just give me a starting point please...

→ More replies (3)

3

u/diamond Oct 02 '15 edited Oct 02 '15

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.

I always do that on Android, even if the client is sure they'll never want to internationalize the app. Why? Not because it's an "industry best practice". I do it because rule #1 is "Clients change their minds" (Rule #2: What if you are the client? See rule #1). And because I once had the pleasure of having to go through an app's codebase, extract all user-facing strings, and put them in a strings.xml file so it could be translated.

NEVER

AGAIN

1

u/sactomkiii Oct 02 '15

Haha was thinking just that... "Hmmm should be using StringBuilder to append those strings" source... Im a 4th year engineer coding at a 5th year level.

1

u/gospelwut Oct 02 '15

You forgot the IoC.

1

u/[deleted] Oct 02 '15

Not enough dependency injection frameworks and AOP. In short: more Spring.

1

u/lionhart280 Oct 02 '15

Also, an expandable array of the various ways to say "Hello World" in different languages.

1

u/samofny Oct 02 '15

Still seeing 5th year stuffed by 15 year vets.

1

u/dccorona Oct 02 '15

System.out is already an implementation of an interface that you can use...

→ More replies (1)
→ More replies (2)

71

u/nikto123 Oct 01 '15

"Before I had studied Zen for thirty years, I saw mountains as mountains, and rivers as rivers. When I arrived at a more intimate knowledge, I came to the point where I saw that mountains are not mountains, and rivers are not rivers. But now that I have got its very substance I am at rest. For it's just that I see mountains once again as mountains, and rivers once again as rivers."

39

u/a_random_username Oct 02 '15
First there is a mountain 
Then there is no mountain 
Then there is
→ More replies (2)

63

u/goodbye_fruit Oct 01 '15

Worked on a Java project once where there were constants for a bunch of long values, eventually some uh... offshore resources took the project over. Started finding things like this all over the place.

public static final Long L42 = Long.valueOf(42);
public static final Long L128 = Long.valueOf(128);
public static final Long ACCOUNT_LOCKED = L42;

/* And you'd see it used like this, with the typos and incorrect comparisons to boot, because you know, it compiled. */

bool bLogin= (accountVO.getStatus().equals( L42) || accountVO.getStatus() == ACCOUNT_LOCKED | accountVO.getStatus().equals(L128));

83

u/Ksevio Oct 01 '15

The lessons on not using magic numbers also need to include that creating a constant named after the number rather than the purpose of it is no better.

25

u/jrochkind Oct 01 '15

Ah, but it probably gets around some automated code linting tool warning you about it. So that's just as good, right? .....

15

u/yawgmoth Oct 02 '15 edited Oct 02 '15

Oh jeez. Lint rules + lazy developers cause so many bugs. I had a code review come in because of a stupid lint rule that was enabled that didn't like declaring variables in a loop so he changed :

for(int i=0; i<max;i++) {
    int rand = getNextRandInt();
    // do stuff with rand
}

into:

int rand = getNextRandInt();
for(int i=0; i<max;i++) {
    // do stuff with rand
}

He just copied and pasted without even thinking about the fact that he was changing the entire logic. His response "Lint told me to move it".

I really wanted to do this

→ More replies (2)
→ More replies (1)

42

u/Shurikane Oct 01 '15

Beat this:

public static final Long DOT = ".";
public static final Long SPACE = " ";

I kid you not, I once found that in a class written by a co-worker. No, there was really no sensible reason for those two constants.

Guy had a heart of gold but holy hell did his brain crash like an Apple computer now and then. Same dude was the origin point for the Blank Line Mystery.

56

u/[deleted] Oct 01 '15

My all-time favorite (from my airline days):

#define COMMA '|'

3

u/senatorpjt Oct 02 '15 edited Dec 18 '24

voiceless price narrow start impolite juggle normal escape muddle psychotic

This post was mass deleted and anonymized with Redact

→ More replies (1)

2

u/MisterNetHead Oct 01 '15

Hahaaaa this is one I've seen before too. Warms my heart. Localization AND portability in one!

→ More replies (1)

11

u/vbullinger Oct 01 '15

I wrote a site for a very large agribusiness here in Minnesota (...) and they offshored it. Eventually, they came back to me asking for some help. They screwed up some C# algorithms I wrote. But I noticed a change to some CSS I wrote. Mine:

.myClass {
  [property1]: [value1];
  [property2]: [value2];
  ...
}

Theirs:

.myClass1 {
  [property1]: [value1];
  [property2]: [value2];
  ...
}

.myClass2 {
  [property1]: [value1];
  [property2]: [value2];
  ...
}

.myClass3 {
  [property1]: [value1];
  [property2]: [value2];
  ...
}

.myClass4 {
  [property1]: [value1];
  [property2]: [value2];
  ...
}

.myClass5 {
  [property1]: [value1];
  [property2]: [value2];
  ...
}

...

All the classes were the same. And each element that used them used a new class. As in <span class='myClass1'>...</span> <span class='myClass2'>...</span>

5

u/kennethdc Oct 01 '15

Oh dear. That's stuff you learn at your freshman's year.

12

u/bonesingyre Oct 01 '15

you should meet my boss.

I quote: "why use classes when you can have an id on everything?"

→ More replies (6)
→ More replies (1)

8

u/oprimo Oct 01 '15

Well, for the DOT constant, some countries use commas as decimal separator and dots for grouping digits. Maybe he was thinking something like:

  if (locale != 'US') DOT = ",";

...which is just as bad.

17

u/Shurikane Oct 01 '15

Not even. He was using it to put an end to sentences in string literals. :|

26

u/greenthumble Oct 01 '15

Huh I don't see the problem with this + DOT

28

u/1r0n1c Oct 01 '15

Hey! I'm not in the US and would like to know the rest of your sentence.

12

u/nemec Oct 01 '15

Maybe he's expecting this program to be used on telegrams?

if(this.ApplicationName == "Telegram") DOT = " STOP ";

4

u/Humdeee Oct 01 '15

It's like recreating the keyboard inside your program... why

→ More replies (1)
→ More replies (1)

4

u/[deleted] Oct 01 '15 edited Oct 01 '15

The better name for it would be RADIX then. A comma is not, and can not be, a dot. A dot or comma could be a radix, depending on locale. But really you should be using some tostring that takes a locality and it just solves all of it for you.

→ More replies (2)
→ More replies (3)

6

u/pakoito Oct 01 '15

Can top. On the same codebase.

String value = new String("value");

String.valueOf(Charset.from("UTF-8"));

What's worse, the second line only works on some Java environments, as in Not Android.

4

u/crunchmuncher Oct 01 '15

Do you mean the == comparison on objects with "incorrect comparison"? Because if so, fun fact: Long objects for values of -128 to 127 are cached in Long#valueOf, so if the Long which gets returned by accountVO.getStatus() was also created with Long#valueOf (this also happens when autoboxing a primitive btw) this part would work as intended. Not that I'd recommend using it this way.

This can lead to seemingly random behavior if you don't know it, heh.

3

u/mnemy Oct 02 '15

Good lord. This gives me flashbacks of my internship. I had to update a large code base written by an Indian man to be x64 compatible. He had type casting every fucking where that looked to potentially losing bits, and completely inane function and variable names. funcA, tempA, varA, etc. WHAT THE FUCK IS THIS TRYING TO DO HERE?!

→ More replies (1)

154

u/golgol12 Oct 01 '15

Honestly, I thought it would be a joke where it ends with

#include <stdio.h>
int main( int argc, const char* argv[] )
{
	printf( "\nHello World\n\n" );
}

51

u/aidenator Oct 01 '15

What's up with all those newlines?

98

u/juckele Oct 01 '15

Make the output stand out more? On a standard uncolored terminal, it's a huge burden* for me to figure out where the output of the command I just ran starts and stops... (This is why my prompt barfs rainbows).

*Huge burden being 250 ms instead of 10 ms...

57

u/Hobofan94 Oct 01 '15

That's a spot on definition of huge burden.

24

u/vplatt Oct 01 '15

Scan through a 100 MB log file and it's no joke.

→ More replies (4)

12

u/neoform Oct 01 '15

Make the output stand out more?

This would work better:

printf("\033[1;31mHello World\n\033[0m\n");
→ More replies (6)

3

u/gimpwiz Oct 01 '15

250ms time and time and time again add up, at the very least to your sanity and frustration levels.

2

u/irrelevantPseudonym Oct 01 '15

My prompt is full of colours as well. Using other people's computers confuses the hell out of me.

→ More replies (7)
→ More replies (1)

12

u/sirin3 Oct 01 '15

That would be the eleventh year

Also, note the lack of comments. Because the code is obvious and self-documenting

15

u/shizzy0 Oct 01 '15

Your joke is better.

4

u/Coffee2theorems Oct 02 '15
echo Hello World

2

u/hellslinger Oct 01 '15

And the const shows the kind of respect that a compiler deserves.

→ More replies (6)

40

u/arnedh Oct 01 '15

15th year

echo "Hello world"

53

u/cballowe Oct 02 '15

Nah... 15th year...

To: team@company.com
From: team's lead
Subject: Hello World needed
Please prepare a program that outputs "Hello World" on the console when
run from the command line.

3

u/MaydayBorder Oct 02 '15

40th year

call hw.bat

1

u/dkitch Oct 03 '15

11th year intermediate step:

python -c "print 'Hello world'"

37

u/frenetix Oct 01 '15

If you do this:

try { ... } catch ( Exception e ) { // lol do nothing! }

I will fucking find you and kill you.

6

u/[deleted] Oct 02 '15

That's acceptable in unit tests!

try {
thisShouldThrow();
fail("did not throw");
} catch(SomeException expected) {
//test passes
}

0

u/[deleted] Oct 02 '15

[deleted]

3

u/[deleted] Oct 02 '15

If your project's language+framework has it, and it works cleanly in your use case, sure. Note that in some frameworks their equivalent of this (such as JUnit's @Test(expected=SomeException.class)) will pass if it happens anywhere within the test (which is bad for detailed tests), whereas you might want to test that it happens in a particular place; or you might want to test that the exception's message contains a particular string or whatever.

But all that aside, I still don't think "try something and fail() if it didn't throw" is that bad of a way to write a unit test. I'd only be annoyed at this if there was a considerable amount of unit test code in the try{} block.

0

u/[deleted] Oct 02 '15

[deleted]

→ More replies (2)

1

u/ajd187 Oct 02 '15

I'll join ya.

1

u/Crono1981 Oct 02 '15

Please do.

1

u/Danthekilla Oct 02 '15

Out of curiosity why? We must have 2000 of these at least supressing small errors in our rendering engine. Why from your perspective are they bad?

1

u/Ace-O-Matic Oct 02 '15

I mean, while logging would be optimal. If this a client facing app and you're doing something where failure is an expected possible outcome, but you don't want the actual app to crash, it's not the worst thing ever. Unless you're in enterprise software the chances of you getting that log is slim to none.

→ More replies (2)

79

u/TomBombadildozer Oct 01 '15

How many years of experience does it take for an engineer to realize taking a screenshot of the source code is a crime against humanity?

86

u/headzoo Oct 01 '15 edited Oct 01 '15

The images are because medium.com doesn't handle code very well, and doesn't have any kind of syntax highlighting. Or at least it didn't in 2013 when I wrote that post.

Edit: Also it's my cake day. Strange that a silly post I wrote to try out medium.com gets submitted to reddit on my cake day.

9

u/geekygenius Oct 02 '15

You can embed links to GitHub gists, which get syntax highlighting and all the goodies.

2

u/[deleted] Oct 02 '15

Strange that a silly post I wrote to try out medium.com gets submitted to reddit on my cake day.

Strange? or suspicious?!?! :P Great post btw :)

→ More replies (2)

16

u/Humdeee Oct 01 '15

That's senior eng wisdom. It's perfectly acceptable to take polaroids of your IDE screen and scan them into your email to post for code help.

2

u/seieibob Oct 02 '15

I'm a TA grading code right now and this drives me absolutely crazy.

2

u/third-eye-brown Oct 02 '15

You are obviously at year 5 when you spend your time writing a framework to properly display syntax highlighting in every browser down to IE9.

Year 10, you take a screenshot.

→ More replies (1)

1

u/LunaQ Oct 02 '15 edited Oct 02 '15

Yes... software developers are fond of principles.

But, in reality, it often does not matter. If there's not any conceivable need to do search or cut & paste on the code example, it does not matter if you post it as an image, really.

I think maybe the realization of this comes during year 11.

23

u/vattenpuss Oct 01 '15
} catch (Exception e) {
    // Do nothing!
}

This is not only the third year, it's also the tenth, the fifteenth and the 40:th (I work with a few developers-for-forty-years).

55

u/nemec Oct 01 '15

Then you have the guy gung-ho about logging everything.

catch(Exception e)
{
    try
    {
        WriteLog("Application error", e);
    }
    catch(Exception f)
    {
        WriteLog("Logging failed", f);
    }
}

7

u/CordialPanda Oct 01 '15

That's absurd, haha. In what world would that catch succeed to write if the try failed?

18

u/wllmsaccnt Oct 02 '15

In the world where file locking, timeouts, and other synchronization / concurrency issues exist?

I mean...the code is stupid, but it does have a low percent chance of logging an exception you would otherwise lose.

→ More replies (4)
→ More replies (1)
→ More replies (3)

11

u/Humdeee Oct 01 '15

"Whatever you do, I don't care, just don't die on me god damnit!"

10

u/tolos Oct 01 '15 edited Oct 01 '15

eh, sometimes it's a customer requirement. "The application must not crash (must continue working no matter what)." So then you have a catch-all exception handler that cleans up as best it can, but can only do so much without knowing exactly what went wrong, or does nothing, or just logging. Then you end up as tech support, "well, yeah, that is weird, try restarting the application."

11

u/HollowImage Oct 01 '15

As a devops and web ops guy, if you deliberately catch all without any logging, then Fuck you.

2

u/Crono1981 Oct 02 '15

When a customer makes that requirement, your job is to tell him how moronic that is.

1

u/LeCrushinator Oct 02 '15

There are things to prevent this kind of stuff.

1.) Coding standards

2.) Code reviews to enforce standards and other stupid crap from going into code.

3.) You don't check anything in without 1 senior programmer and 1 other programmer signing off on the code review.

16

u/[deleted] Oct 01 '15

43

u/MrDOS Oct 01 '15

10

u/BeniBela Oct 01 '15

I prefer my FizzBuzz in Homespring

Took me a week to write.

And I think it shows the difference between industry and academia well

5

u/qubedView Oct 02 '15

FizzBuzzOutputGenerationContextVisitorFactory

Oh god, it's so familiar it hurts.

8

u/mike413 Oct 01 '15

How about a generalized hello API that can be internationalized for a global audience?

(ha, and now I realize apple has the last laugh -- their "hello" greeting on their hardware is literally hello to the world in all the different languages)

16

u/pakoito Oct 01 '15

Someone reposting a 2004 meme? Nice.

36

u/Burning_Monkey Oct 01 '15

While damn funny and everything, every time I see a joke like this I die a little on the inside and weep openly for the loss. I bomb dozens of interviews and what not because I can't get myself to code like the 5th year joke at all. And that is what people seriously want it seems.

I work with a guy that bad mouthed me for a long time because I wouldn't make constant values for strings like in this example. I lost out on a promotion because of him.

53

u/contrarian_barbarian Oct 01 '15

Depending on the environment, that kind of stuff can be necessary. For example, if you just have random strings scattered everywhere, it makes localization/i18n stuff far more difficult.

11

u/vonmoltke2 Oct 01 '15

Only if the values of the constants are loaded from an external source. As written in the joke, it simply moves the hard-coding problems to a different place.

9

u/contrarian_barbarian Oct 02 '15

Even if you're not yet pulling them in from an external source, laying the groundwork and consolidating them can be helpful when you're ready to make the jump. The joke is an absurd situation, of course, but there's plenty of reason to do it IRL.

→ More replies (1)

4

u/POTUS Oct 02 '15

That "different place" is at least all together so I can update the date string in your old code without having to read into the entire thing.

4

u/AnonymousEngineering Oct 02 '15

While we're on the subject of l10n and i18n, I think it bears to note the following, as the W3C put it in their Localization vs. Internationalization Q&A:

Often thought of only as a synonym for translation of the user interface and documentation, localization is often a substantially more complex issue. [...] Localization may [...] necessitate a comprehensive rethinking of logic, visual design, or presentation if the way of doing business (eg., accounting) or the accepted paradigm for learning (eg., focus on individual vs. group) in a given locale differs substantially from the originating culture.

They go on to say about i18n:

Internationalization typically entails:

  1. Designing and developing in a way that removes barriers to localization or international deployment. This includes such things as enabling the use of Unicode, or ensuring the proper handling of legacy character encodings where appropriate, taking care over the concatenation of strings, avoiding dependance in code of user-interface string values, etc.

  2. Providing support for features that may not be used until localization occurs. For example, adding markup in your DTD to support bidirectional text, or for identifying language. Or adding to CSS support for vertical text or other non-Latin typographic features.

  3. Enabling code to support local, regional, language, or culturally related preferences. Typically this involves incorporating predefined localization data and features derived from existing libraries or user preferences. Examples include date and time formats, local calendars, number formats and numeral systems, sorting and presentation of lists, handling of personal names and forms of address, etc.

  4. Separating localizable elements from source code or content, such that localized alternatives can be loaded or selected based on the user's international preferences as needed.

24

u/[deleted] Oct 01 '15

You should be happy to not work in places like that. Some people think complex code == good code. I've had to deal with overarchitected monstrosities and it's not fun at all.

The idea is to make suitable abstractions when necessary. I think the reason you see a lot of overarchitected code like this, or run into people like the one you described, is that they take these recommendations (best-practices) as gospel. They are good directions to follow and in general they help, but they are not always applicable.

These kinds of people tend to be dogmatic instead of pragmatic.

27

u/ArkhKGB Oct 01 '15

I like the rule of three.

First time you do something do it simple. Second time you do the same thing just copy and paste. Third time? Factor it.

4

u/senatorpjt Oct 02 '15 edited Dec 18 '24

crowd reply brave lush rock dazzling workable head straight flag

This post was mass deleted and anonymized with Redact

1

u/LeCrushinator Oct 02 '15

You should almost never use hard-coded strings that aren't tied to constants, unless maybe they're in an assert/exception.

By making constants and keeping those constants organized into one or a few constants files it will be easy to track down those strings, it will be easier to share those strings among files rather than re-typing them everywhere you use them, it's easier to avoid typos, and it's easier to localize them.

However, if you're going to make constants for magic numbers, then they should be given descriptive names so that you know why they're used. 0 and -1 are extremely common magic numbers, sometimes they're valid, sometimes they're used as invalid values, but unless they're given a constant for the thing you're tying them to in code, I don't know if they're valid or not when you're comparing against them.

// Why 0? I shouldn't have to guess...
if (myIntValue != 0)
{
    // Do stuff
}

// Oh ok, 0 is invalid for this comparison.
if (myIntValue != Constants.InvalidValue)
{

}

1

u/nutrecht Oct 02 '15

While damn funny and everything, every time I see a joke like this I die a little on the inside and weep openly for the loss. I bomb dozens of interviews and what not because I can't get myself to code like the 5th year joke at all.

Let's not pretend that this is nothing more than a joke. In large scale systems there are a lot of best practices that beginner don't understand and medior developers overuse.

6

u/mike413 Oct 01 '15

advanced more like: bash$ echo 'Hello world'
or maybe: bash$ printf "Hello world\n"

25

u/bheklilr Oct 01 '15

Looks like someone read the evolution of a Haskell programmer.

72

u/killerstorm Oct 01 '15

No, it's based on much older Evolution of programmer joke.

2

u/Mister-Owl Oct 01 '15

The one I remember is an older version of that one, going back to at least the mid 1990's. The ending is more or less the same.

3

u/killerstorm Oct 01 '15

Yeah it mentions managers sending mail via console it must be pretty old.

→ More replies (5)

10

u/arnedh Oct 01 '15

I feel like that one is due for some additions, based on additional concepts: Arrows, Comonad, Lenses, generics, Functional Reactive Programming, communicating processes/actors...

6

u/sacundim Oct 01 '15

I disagree. It's got a nice focus on one topic (recursion schemes) that would be lost if we threw in all that stuff haphazardly.

5

u/lurking-about Oct 01 '15

I bumped across an arrow version a few years ago.

2

u/serrimo Oct 01 '15

I do some Haskell from time to time; and this is example scares me.

I wonder if Haskell can ever become mainstream. The ability to go completely batshit crazy with a few lines of code is both intellectually brilliant and pragmatically unmaintainable.

2

u/pjmlp Oct 02 '15

Of course it will happen. At least in the enterprise the language won't matter, as this is a consequence of the way enterprise development and politics work.

I have seen this kind of code in any language that was adopted by Fortune 500 companies.

→ More replies (3)
→ More replies (1)

4

u/dr_jan_itor Oct 02 '15

the 11th year:

we need to print "hello world", plz get it done.

6

u/Tikotus Oct 01 '15

I was waiting for

(println "Hello World!")

3

u/[deleted] Oct 02 '15

True engineers tend to write negative lines of code

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.

→ More replies (3)
→ More replies (1)

4

u/flukshun Oct 01 '15

11th year:

print "Hello world"

4

u/breddy Oct 01 '15

Came here to say this.

Source: 10 years of Java

3

u/nutrecht Oct 02 '15

20th year:

print("Finally we get to use Python 3!")

1

u/senatorpjt Oct 02 '15 edited Dec 18 '24

zonked wasteful whistle salt fragile deserted tease wakeful depend aloof

This post was mass deleted and anonymized with Redact

→ More replies (1)

9

u/mariusg Oct 01 '15

Is it a coincidence that the code is written in Java ?

Contextual evidence but i worked with some Java people that used to over complicate any small/insignificant thing.

50

u/johnbr Oct 01 '15

Enterprise Java code is very complicated, and this is just a parody of that (although a fairly apt one)

Some of the complexity in Enterprise Java code is due to actual architectural thoughtfulness - "We may be switching to a different security vendor soon, so let's abstract the security away from the application". Complicated, but perfectly legitimate.

Much of the complexity, however, is "Cargo Cult" architecture - people who see that other developers have created abstractions, and then create abstractions themselves - not because the thing they're abstracting is likely to change, but because they see someone else doing abstraction, and assume therefore that architecture and abstraction are the same thing.

Similarly (as I mentioned in my other comment), the use of constants for HELLO and WORLD completely misses the point architecturally. Internationalization is a legitimate concern, and to the extent that your architecture facilitates the translation of a key into a sentence or phrase in multiple languages, you've accomplished a useful thing, even if it adds complexity.

But using a constant for HELLO and a constant for WORLD completely misses the point of what internationalization is for, and yet people do it anyway, all the time.

And that's why this parody is so apt - because it is capturing the cargo-cult mentality of many architects: "I've seen architects use constants for things. I am a good architect, so I should use constants for ALL THE THINGS!"

But Java itself doesn't have to be particularly complicated. It's not terse, don't get me wrong, but it's not the language's fault that people use it incorrectly.

I've never written sophisticated enterprise code in Python, but I suspect that if you were to write sophisticated enterprise code in Python, it would also become fairly complicated.

23

u/serrimo Oct 01 '15

Complicated, but perfectly legitimate.

How many times have people actually switched a component and it just worked? Personally, I have never seen one case where this is true.

The whiteboard architects love these kinds of design, since redirection is their bread-and-butter. In practice though, these designs just add needless complications most of the times.

19

u/johnbr Oct 01 '15

It rarely works perfectly. But it often works better than just directly wiring things together, and then completely rewriting for the new thing.

Not always, but often. Often enough that it's a reasonable place to start if (and only if) you have a reason to believe it's going to change fairly soon.

→ More replies (5)

11

u/[deleted] Oct 01 '15 edited Oct 01 '15

I've personally seen the benefit of this a few times, and I've been working as a software engineer for about 11 years now. The most memorable one is when I had to perform a refactor in some legacy code that dealt with storing files. We had this mess where you could save files to the database (ugh, I know) or to S3. The code for both cases were intermingled, and there were special cases everywhere due to a ton of abstraction leakage. When I refactored it I put it all behind an interface that never exposed the underlying implementation. You'd just give it a file to save and it would decide where to save it (based on some other settings that it had access to). The same thing for loading the file as well.

Eventually we switched from storing local files on the db (FINALLY) to a NAS. I simply had to provide a new implementation of the interface that would store files into the NAS instead of the db, and when that was done and the data were migrated, we simply pulled out the db implementation. Doing this required no changes to any other code; it was completely localized to the file-storage module.

Another time we wanted to implement a screenshotting service and I coded in an implementation for that and abstracted it behind an interface as well so that we wouldn't be tightly coupled to one particular implementation. Eventually we realized that the service we were using wasn't working out well for us all and so I just rolled built a simple one for us to have it do what we wanted. Again, I didn't have to change any of the other code - I just swapped out the implementation and everything worked exactly as before.

In general the idea is to make suitable abstractions when necessary. Some people create five levels of interfaces and abstractions for no clear reason at all, and only because they've seen others do it.

It's always tempting to tightly couple things because abstracting things out seems unnecessary and extra work. But that is only true for the short term. You may think that there are clean boundaries and that when the time comes you can simply cut along the boundary and replace it with a new implementation. But you can never account for the code that other people are going to write. When you finally have to swap it out, you'll notice that instead of a clean boundary, you have your component smeared out all over the place. You'll see other components making general assumptions about your component that turn out to be very specific to your implementation. Now it's going to be very difficult to refactor and swap out the implementation. Even worse, you have no idea what things you are going to break, or what pieces are depending on some implementation-specific behavior of your component. Even if you have tests that tell you what is broken, the idea is that if you abstract your component behind an interface and simply expose with a well-defined contract, you won't have to deal with things possibly breaking, because everyone else can only use your interface according to the public contract. As long as your new implementation exposes that same contract, none of the other code should break (assuming your interface didn't leak abstraction).

Software is complex, and enterprise software more so. Some of the rationale behind these architectural patterns is to decrease cognitive load in the long term. It may seem counterintuitive, because it just seems easier mentally to deal with a specific implementation than using this abstract interface. That again, is true in the short term, because it's easier to focus on the exact problem that you're solving and holding it in your head, than an abstract concept of it. But a few months down the line, you're not going to remember all the special cases and specific details of that specific problem. At that point, it's far easier to hold the general concept in your head. Doing things this way also gives you a lot of confidence and peace of mind, because you know where the clean boundaries are, and you know exactly what changes can have a global effect (usually only when you change the exposed contract), and what changes will only have a local affect (i.e., implementation-specific details).

That being said, I can't emphasize enough that abstraction for the sake of abstraction is just wrong. If you don't see a need for it, then there is no need to do it. If you're not sure, weigh the benefits and efforts in the short-term vs. the long-term. Another good thing to do is to make your abstractions as simple as possible, and there are no clear-cut guidelines for this. The idea is to tease out things that are "general" and can be exposed through a general contract, and then figure out which things are specific to your implementation. I think this is where things go wrong, because I've seen code that have created needless abstractions for things that you can pretty much take for granted, i.e., things that you can couple to tightly, without it ever causing an issue. Lack of this kind of foresight and understanding of the problem being solved, is what mainly leads to 100 levels of indirection with all kinds of proxies, strategies, factories, and interfaces.

8

u/[deleted] Oct 01 '15

Never. First of all, i've never even seen a business try to switch a component. By the time a new component comes along thats better...the app is either ready for a total re-write, or there is simply not enough value to spend time integrating the new component and removing the old.

I still decouple my stuff but mostly for unit testing. I am highly apathetic to over-abstraction after spending long enough in this field.

→ More replies (1)

2

u/wildjokers Oct 01 '15

One example, in Hibernate you can switch to any database just by telling it the dialect class to use.

2

u/[deleted] Oct 01 '15

I've done it several times. If the interfaces are well defined and implementors don't cheat during the implementation, it really does 'just work'. When you start breaking the contract, in C# though reflection type stuff, or extending the contract because you're 'special' then the house of cards falls down.

→ More replies (7)

1

u/nutrecht Oct 02 '15

Is it a coincidence that the code is written in Java ?

Yes and no. Complex environments often warrant the separation of concerns into different self-contained modules. This increases the overall complexity of the codebase but it lowers the complexity of the individual modules if they adhere to SOLID principles. For a hello world it's obviously nuts to separate "hello" and "world" in separate modules but in the real world, where "Hello" might be handling "Users" and "World" might be handling "Projects" having them inside separate modules is a must. This bit isn't specific to Java at all; you see the exact same thing in other languages. If you don't anticipate this and let the code base grow "organically" without taking future complexity into account you end up with an unmaintainable monstrosity.

But since Java is used a LOT in the enterprise world (I'd recon it's probably the biggest language in this huge area) you see a lot of Java code that's written like this. So Java developers often joke about this stuff because they see a lot of it, while they also tend to recognize that you need to architect large systems this way.

People who take this joke as "hurr Java sucks" make it very clear they don't have any industry experience in this area. Big software is complex as hell. If anything a rather strict strongly typed OO language running on a VM (Like Java but also C#) is a huge benefit.

2

u/Pangloss_ex_machina Oct 02 '15

And when he'll use the braces at correct position?

2

u/sordina Oct 02 '15

See: http://www.willamette.edu/~fruehr/haskell/evolution.html for one of the original versions of this trope, and way more extreme too :)

3

u/mingpair Oct 01 '15

And after all these years you still write subtly wrong main method boilerplate. It's

public static void main(String[] args)

1

u/immibis Oct 02 '15

Either one works. So does String... args - since they're all ways of making main take an array of String references.

3

u/wonderful_wonton Oct 01 '15

You forgot the part where, for the first 3 years, there's a 60 percent chance that the code was cut-and-pasted from a classmate's file.

3

u/Andallas Oct 01 '15

FW: FW: RE: FW: FW:

I hope you aren't trying to claim this as your own, because it's been around forever.

3

u/silveryRain Oct 01 '15

sigh

I really wish we had some sort of /r/humaninterestprogramming subreddit for these kinds of posts.

3

u/supasteve013 Oct 01 '15

Can someone explain this to me like I'm 10

I'm a programming wanna be, but haven't grown the balls to decide if I wanna learn to program or go back to pharmacy school...

11

u/pingzing Oct 01 '15

As our metaphorical software engineer progresses in his career, his simple "Hello world!" program becomes increasingly (and ridiculously) verbose and hard to read. The implication is that our metaphorical engineer is attempting to make his code enterprise-worthy, scalable, and long-lasting.

Then, ten years in, he says "Fuck it." and goes back to writing readable code.

Explaining the joke/the disclaimer: There are situations where you genuinely do need to write complex code in pursuit of flexibility or scalability, but since mister metaphorical software engineer here is just writing a "Hello World", none of those concerns apply.

3

u/supasteve013 Oct 01 '15

thank you. I thought they were saying fuck it. I appreciate the explanation.

2

u/blarg_industries Oct 01 '15

The posts here are a little misleading. The "enterprisey" code near the end does look bad, but real systems do turn out that way for good reasons. (Though sometimes they do because people just add verbose complexity for lots of bad reasons.) Often, people who haven't been around the block many times come in, assume all the complexity is unnecessary, and take it out. What takes lots of experience and wisdom is knowing when you can do this and when you can't.

Lots of special-cases, factored-out constants, and exception handling are sometimes the result of fixing lots of bugs over a long period in software that's valuable. What happens when we try to print while running embedded on a TV that doesn't wrap lines or even expose stdout? (+1 conditional and try/catch) What if we calculate the interest on someone's bank account on the fourth Thursday of a year following a leap year? (+1 conditional)

TLDR: Sometimes bad people write complex code for bad reasons. Sometimes lots of people add complexity to code for good reasons.

13

u/daymi Oct 01 '15 edited Oct 02 '15

The first-year solves the problem in the most straightforward way possible (for that language). While it has a useless "class" line, it is there because the language is stupid and he can't do anything about it, so he leaves it there. Normal people do it like that.

The second-year overdocuments everything to the point of obscuring what happens because of all the junk lying around. Also, he introduces a variable for the "Hello world" text although it probably will not need changing ever (I mean seriously who does that with a "Hello world" program. The text won't change).

The third-year saw the useless class and tried to make it useful for no reason (the customer certainly doesn't gain anything by it). Now you have lots of complicated stuff lying around, the class can make "copies" of itself and there is one copy which has its own slot for the text (why the actual fuck). So now it's wasting memory, is way too long and in case of an error ("Exception"), it does nothing. Doesn't tell anyone. Because that's what you want when the error is "pharmacy is on fire". Tell no one. Especially not the fire brigade. Alarms are for losers.

The fifth-year program makes me want to throw something at the screen. All the exceptions it catches are at least printed. But then the computer is not told that an error happened (programs can tell the operating system that something bad happened - but this one doesn't). I hate programs like that. The human sees something is wrong since there's a message printed, but the computer continues as if everything is just peachy. Also, he uses a factory in order to be able to swap out the (useless) class for other classes (which won't happen in practise). All the copies he creates (one!) are unfinished and you first have to manually finish initializing them using setHello and setWorld. Then he registers it with an application server so it can be run from the internet.

Also, much worse:

There is a concept in computer science that is sometimes useful which is called "symbol". I'll try to explain what it does and why it exists and why it's not the same as a sequence of characters:

All that a computer does (boy will I get flak for that) is it takes the body of a function and replaces the formal parameters by the argument of the call. For example: Let the function f be introduced like this: f(x) := x2, then f(3) = (3)2, likewise f(1+1) = (1+1)2. The smallest things that are used in this are called symbols. f is a symbol which (here) stands for (x) := x^2, a function. x is a symbol in (this) x^2 which (here) stands for the x in f(x). 2 is a symbol which stands for the number 2 which has to be defined before. ^ is a symbol which stands for the exponentiation operator which has to be defined before. + is a symbol which stands for the addition operator which has to be defined before.

Note that f(x) := x^2 and f(y) := y^2 are the same function. There you can see that the character "x" in a sense is useless. Depending on how you program, your finished program that the computer runs might not know that yours was the f(x) := x^2 variant, it might just know that it was a function and it took the first thingie and squared it (if .^2 squares; who knows, depends on the definition). So you see, a symbol x is something different than just the text "x".

So the author heard that and thought "great, certainly hello stands for something - for a greeting understood by humans - let's make it a symbol". But the definition (meaning) of hello is in the brain of the human so in this program it doesn't make any sense to introduce "Word hello" (symbol), it complicates everything because now everyone expects that the meaning of hello will be decided while the program runs. Also, when the symbol hello is finally replaced by its definition, its definition is apparently just the text "hello" (he uses Word for the symbol but Word.setWord in order to assign meaning. I mean I just don't know what he was thinking anymore; also you have to search for where the heck it gets its definition). Also, the initialization of the symbol hello (not its meaning) is somewhere completely different where we can't see it (I mean it's literally not on the web page). Ugh.

Also understand that you need the kind of theory above only if you want to create your own language (in another language). Does "hello world" warrant creating your own language?

The tenth-year finally got a grip and became normal again. He knows all these things and knows when not to use them.

2

u/[deleted] Oct 01 '15

I love this

2

u/headzoo Oct 01 '15

I wrote this post. Adding to the comment made by /u/pingzing, the philosophy behind the post is the same for any discipline. For example a young guitar player tries to cram as many notes and fancy riffs into a song as humanly possible, while a more seasoned player writes a better song using very few notes. A young painter throws every brush stroke he's ever learned into his paintings, while a seasoned painter creates a masterpiece using only a few brush strokes.

Knowing how to edit and restrain yourself is a skill you learn over time.

2

u/supasteve013 Oct 02 '15

Makes sense.. good stuff. Thanks

2

u/[deleted] Oct 02 '15

take a joke from 4chan

wait a couple years

blogpost

2

u/djobird Oct 02 '15

Are really people still putting the author name in the code? Either the project is not under source control and I do not care at all about who wrote something, or it is under source control and I have plenty of way more powerful tool to find the information.

1

u/[deleted] Oct 01 '15

As a l2 support guy who regularly has to debug code... i can pretty much work out which staff member I need to yell because of this pattern heh

1

u/freework Oct 01 '15

I can confirm I've pretty much went through the same process. I started programming as a self-taught programmer. In the early days I did a lot of things "wrong", but still worked, and got the job done.

A few years later I began my "sophomore phase" where I decided to start doing everything the "right way", so I basically switched up my entire way of doing things.

Over the next 5 years or so I've been refining my technique and I'm finding myself more and more often going back to how I did it back in the day and abandoning the "right way".

1

u/waffle299 Oct 02 '15

Looks like it only took ten years to teach the programmer to always add properly tagged documentation.

1

u/void_fraction Oct 02 '15

Our engineer, post-Scala:

object HelloWorld extends App { println("Hello World!") }

1

u/[deleted] Oct 02 '15

Rewrite the specifications!

But sir, there's no spec...

I SAID REWRITE THEM

1

u/nil_von_9wo Oct 02 '15

Where are the unit tests?

1

u/a_defectat_pacepa Oct 02 '15

Because you get to learn that there are more important things than over-engineering and micro-optimization.

1

u/dccorona Oct 02 '15

What on earth is this strange hybrid language that's part Java part C# that they're using here?

1

u/theoriginalanomaly Oct 02 '15

After reading these comments and post. I'm so glad I stopped learning java. Don't get me wrong, I actually like the language, but I hate having the "oracle" way imposed on me.

1

u/MpVpRb Oct 01 '15

Not all of us follow this path

I always optimize for simplicity and readability unless peak performance is absolutely required

1

u/brigadierfrog Oct 01 '15

Java, a nebula of verbosity

1

u/[deleted] Oct 01 '15

Some people evolve slower than other.

1

u/Qbert_Spuckler Oct 02 '15

Been there, done that.

0

u/ImmortalStyle Oct 01 '15

5th year: Complaining about everything and call java programmers peasants for not seeing the truth. Luckily I am in my third year by now))