Optimizing code for humans, not servers

Godson Ukpere
3 min readFeb 20, 2017

--

Every engineer makes a fuss about how optimized their sh!t is, and how it can scale 8 times over that of a fish’s integumentary system.

Well, that’s probably nice, but nowadays, everything is optimized, relatively. We have a ton of front-end frameworks that claim to be faster than their predecessors e.g PREACT >>> REACT. BS or not (probably BS) how often do our machines get to hit the thresholds were these optimizations are visible? Have you ever seen a web page written in Angular 1 and go like “Oh If they used REACT, the logout button would clear my active session from localStorage and redirect me back to the landing page 2-times faster” guess not.

[MDA] Enough about that, my point is — most developers are trigger happy with creating new technologies and throwing a social media party to make sure everyone npm installs their sh!t. They end up creating technologies that complicate the already complicated dev ecosystem. We grew from abstracting HTML, CSS and JS scripts, into different files and referencing them in our webpages yeah? but nooo!, that’s old school, let’s do it all in one script so it modular as f#$k 😂, oh, and give it a new extension too, so no one can judge our BS. Add an x to your js, and get jsx 💀

Ok so the previous paragraph was just shade on REACT, I like REACT, I Promise, see my other post, but come-on).

Now the real deal here is Code Quality. Imagine an ideal world where code was super optimized you never have to worry about load balancing or the cost of scaling, what do you think will be a boulder to the development? CQ

[Another MDA] In the last couple of weeks I’ve worked on some projects, all started by ex-developers on the team, allegedly senior, the goons that live-in and rule Silicon Valley — San Fran. A common trend among all 3 projects was shitty and unreadable code. I saw bad practices I didn’t know existed, like I was surprised webpack and gulp built the projects. I wouldn’t give examples here but these were done by Senior Devs, top devs that junior and mid-level devs all over the world would look up to.

Of course as a boss I did my part to clear up most of the technical debt, to-be-honest mostly because of my ego / reputation. I can’t have anyone see BS code written by me, it’ll haunt me forever. Can’t imagine an Andela developer I coached in the past seeing some BS O(n)² code running on my PC, how do I explain myself, after all the scrutiny I’ve preached in the past. Even worse is having my kid see some horrible double SQL query in a controller and go like “Paps, you was bullshitting in your OAuth Service, with the double, no foreign key referencing ass queriesNah son.

The real point, for real.

To wrap up, for real now, in the future, a.k.a next month, when OpenShift launches their currently beta dev platform (sponsored content alert). We might not be concerned with the cost of cloud hosting or scaling or whatever, the biggest problem will be maintaining and adding new features to existing applications. Imagine we gave Code Quality some priority, it’ll take any junior or mid-level developer O(n) to work on an existing code base which means less time to read, understand, implement changes, refactor or add new features to an existing project.

In an Agile ecosystem, we point tasks or stories based on the complexity and duration. This is super important to the PM as it helps him match/update the Project Plan and manage expectations accordingly to the client. Time being the major factor here (assuming the client is RackCity 💵💵💵).

What’d we learn?

If you optimize your code so it runs efficient in the head as it does on servers, then we’re making progress in the dev community by cutting time and reducing the -ve effect of code divorce (changing devs on a team). If this doesn’t draw attention from all them Technical PMPs, then I don’t know what will, cos technically we’ll be saving time == money (== not ===).

Software Development is an art, write pretty not shitty.

[MDA — Minor Deviation Alert]

--

--