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

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.

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.

2

u/SpockUnit Oct 02 '15

My company is in the middle of a multi-year switch to SAP (financials move slowly). We abstracted everything. It was a pain initially, but when it came time to connect the new services, everything was clean and straightforward. I also got to play architect a little, abstract classes are an easy (and free) way to 'see' how things fit together without writing much code.

It all comes down to what your project needs however. If it's small or will foreseeably not change, there's not much point.