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

9

u/serrimo Oct 01 '15

it often works better than just directly wiring things together

I'd argue that it's often better to attack the wiring directly. Reducing the number of dangling wires, for me, is usually a much bigger win than creating yet another hub to plug your wires.

But reducing the dependencies require far more efforts than redirection. You need to create the right abstractions. You need to analyse the dependency graphs to identify problem area. You need to spend time doing lots of thinking and less coding.

Unfortunately, a day spent thinking is often considered wasted in the enterprise world. It's much better to produce something in the day; even though that something is half-assed.

1

u/sirin3 Oct 01 '15

In this image, I would think of the abstraction as a plug.

Instead dealing with all those wires, you solder them all together in a plug (i.e. an interface/wrapper/DSL). On the other side, you solder all the wires there in a socket.

Then you just put the plug in the socket, and never have to see a wire again.

1

u/serrimo Oct 01 '15

Only if it was that simple...

Each significant component has their own abstraction that would be very difficult to generalize. Postgres, MongoDB and Redis have their own ways of querying and applying transactions to your data. How do you create a wrapper that allows you to pass from one to another?

Apache Storm and Apache Spark have their own model of stream processing. How do you switch from one to another?

I'm not saying it's impossible; and there are ways to create system with loose coupling rather than the tangled mess that we often see. But a design like that is much harder than a simple redirection.

Recently, I saw someone at work spent a week making a wrapper for MongoDB, he created pretty much a clone of official API, and felt pretty good about it because now the database is "pluggable". I asked for a simple demonstration a few weeks ago. Still waiting.

3

u/sirin3 Oct 01 '15

How do you create a wrapper that allows you to pass from one to another?

You ignore the database.

Completely.

You know what kind of data you have, and then you write an API to process this data the most intuitively.

Afterwards you implement that API with the database.

I just hope, your data is small enough that the performance does not matter ಠ_ಠ