This article supplements an episode of the This Dot Labs Podcast on Abstractions with Rob Ocel, Frederik Prijck, Jarrod Overson, Director at Shape Security, and James Snivey, Director of Engineering at Shutterstock.
As developers who use frameworks, we are constantly expanding a balloon of abstractions. We do as much as we can to understand the inner workings of how our code operates, but the truth is that our code often hides a much more intricate and complicated system. Our primary job, therefore, as developers using frameworks, is to hone the art and science of breaking down these complex processes into much more easily understood parts. These parts are what we refer to as “abstractions”.
This Dot Senior Developer Rob Ocel helps us better visualize this concept by comparing an abstraction to operating a car. A driver can press the gas pedal, and understand that doing so will cause the car to go forward, without having to know a single thing about a car’s engine or the mechanical process that links pressing the gas pedal, and a car moving forward. Similarly, when we think of abstractions, we should think of them as digestible representations of concepts that one doesn’t need to fully understand, but needs to be aware of in order to work within a codebase.
Many developers interact with abstractions by virtue of the fact that they work with frameworks. The great thing about these modern tech tools is that they allow developers to leverage powerful, complex systems without having to know too much about how they actually work. These technologies function as force multipliers for thousands of devs, allowing them to utilize diverse, complex assets quickly, and with only the amount of training and education necessary to grasp the general idea of how they work.This is not only great for developers, but also for businesses since this degree of simplification allows developers to get ideas to market more quickly.
Some argue that relying on abstractions either cheapens the developer title, or will leave new developers without the context to understand the language within which they’re working. While Shape Security Director Jarrod Overson does agree that an over reliance on abstractions can leave more complex projects open to security risks, he also disagrees that a developer’s ability to write great code is contingent on whether they understand ideas that would otherwise be abstracted away. Director of Engineering at Shutterstock, James Spivey also adds that understanding every commit and update added to a particular technology would be a full-time job in and of itself, proving how futile it is to want to completely understand the inner workings of a framework. He also adds that, by starting with a framework rather than learning a language, a prospective developer is able to more quickly begin creating powerful applications and programs, helping spark their enthusiasm, and keeping them going through the often arduous process of learning how to code.
Ocel and This Dot Labs Senior Developer Frederik Prijck don’t staunchly disagree with Overson and Spivey’s points, but also feel that new developers should put time into learning fundamentals about their chosen language. They believe that doing so may help them better identify, and address, problems that arise from complex interactions taking place outside of the scope of the abstractions.
All agree, however, that with all of the benefits that using abstractions provides, there come some drawbacks. One of the major issues that an overreliance on abstractions can cause is premature abstraction. This can be loosely defined as abstracting away elements of code without fully understanding how that abstraction might impact other elements of code. This can lead to disjointed codebases with which it is difficult to work. Overson encourages junior and mid level developers to refrain from abstracting their code until a product is finished and they can understand their entire codebase. Of course this doesn’t apply to battle-tested abstractions, such as those provided by a framework.
On the other hand, companies are encouraged to understand that issues with abstraction are bound to occur. They therefore need to budget for the fact that abstractions will fail from time to time, and that teams will have to backtrack on certain directional decisions. These issues, however, can be mitigated by strengthening communication among senior and junior level developers, the latter of whom should seek guidance from their more senior coworkers when approaching issues arising from premature or nonoptimal abstractions.
Need JavaScript consulting, mentoring, or training help? Check out our list of services at This Dot Labs.
This Dot Inc. is a consulting company which contains two branches : the media stream and labs stream. This Dot Media is the portion responsible for keeping developers up to date with advancements in the web platform. In order to inform authors of new releases or changes made to frameworks/libraries, events are hosted, and videos, articles, & podcasts are published. Meanwhile, This Dot Labs provides teams with web platform expertise using methods such as mentoring and training.
Top comments (0)