Navigating the Coding Odyssey
Why you should code the shortest path from point A to point B first, before abstractions, tooling or splitting up the work, told through a sailing analogy.
p.s: Lookout for XKCD-gallore in links below.
TL;DR: The key takeaway is to prioritize coding the shortest path first, especially when dealing with new and uncertain problems!
// the_early_days
In my journey from being a rookie engineer to being a seasoned engineer, I have observed an intriguing phenomenon: As a novice engineer, you’re typically handed a task or come up with an idea, and then you go ahead and execute it in the most straightforward way.
Essentially, it’s like travelling from point A to B through the simplest route.
Your code might not be a masterpiece, but it works. As you grow, you accumulate knowledge – you get acquainted with object-oriented programming, algorithms, design patterns, frameworks, abstractions, higher-order functions, monads, and [everything] [in] [between] that you stumble upon. You begin new projects, convinced that you must employ these newfound skills, but somehow, things don’t always go as planned…
// keeping_it_simple
Suddenly, you find yourself amongst a group of engineers where it feels like the team is accomplishing less compared to when you were a [lone newbie].
What often slips through the cracks here is the realization that for any new task, no matter how intricate, the core idea remains the same - code the most direct route from point A to B. Here, it’s beneficial to deliberately avoid getting entangled in thoughts about the perfect abstraction or the golden standard of execution. That’s for later!
If you’re working on a completely new project, consider it “prototyping”, and if it’s part of an ongoing project, think of it as laying down a “guideline thread”. Imagine you’re navigating a maze, and you’re using a thread to mark your path from the entrance to the exit. The essence remains – focus on the fundamental work needed to connect points A and B.
where:
- POINT A signifies the existing condition of the code
- POINT B marks the code fulfilling the intended functionalities
The code might lack elegance, but as long as it meets the objectives, you’ve effectively navigated the maze.
Do not obsess over optimizing your code prematurely!
// dealing_with_distractions
👉 This principle in the last point may sound like something simple that everyone should know, but when you’re in a busy team, it’s easy to forget. Often, team members will suggest pausing the project to spend time on things like setting up tools, trying out fancy new libraries, or cleaning up the code to make it [better].
While these suggestions aren’t inherently bad, they aren’t always the priority.
What’s crucial is to question whether the requirements call for these steps and if the central challenge has been addressed. If not, steer clear of distractions!
// adapting_and_refining
The rationale behind this approach is that you may end up investing time in refactoring or setting up environments only to realize that your entire strategy was flawed. This means starting afresh, rendering the initial efforts [futile].
It’s pivotal to initially approach the task as a whole – resisting the urge to segregate the workload prematurely, which may lead to arbitrary divisions.
The best ways to split up the work so that everyone knows what they should do might not be clear at first. It’s smarter to figure them out by working on the problem several times. So, it helps to be in a small team initially that really focuses on what it’s doing, because working on the issue over and over helps find the best ways to handle it.
// refining_for_deployment
However, this approach may have some pitfalls. 👉
You might end up with a rudimentary piece of code that meets the bare minimum requirements. You might even demonstrate it to the product team. But is it ready to be deployed? Not quite. Now, it’s time to allocate resources to refine the coarse aspects, security tests, and more.
This transformation phase morphs your initial prototype ---> deployable product.
Handling this stage effectively, particularly when liaising with Product teams, varies depending on the dynamics. It’s important to keep the Product in the loop regarding the uncharted territories of the problem, elucidate what you aim to discern, or categorize the task as a “prototype” without much elaboration.
One must not let the pressure from product teams with stringent timelines undermine or neglect the crucial facets of the SDLC.
After all, if it’s a software product meant for [deployment], it warrants prod-readiness, tests, CI/CD, and possible refactoring for clarity and maintainability!
// a_matter_of_judgement
As with most things, this comes down to making a [wise decision]!
There might be instances where the problem you’re dealing with is not all that complex, and you have a clear understanding of the best way to divide the work, meaning the decisions you make are well-thought-out. In such scenarios, you can work simultaneously on different parts and follow a set plan.
However, when you’re tackling a fresh, uncharted problem where there’s a significant chance of things not going as planned,
Always opt for coding the shortest path first!
Keep reading
Mafia, Bugs, and Logs: A tale about "The Sopranos" & Atlassian values!
I finally started The Sopranos, tweeted a joke about a bug in the JioCinema app, and got a call from their tech director, an ex-Atlassian. A lesson in customer obsession.
Elevating Trust: Atlassian's Journey to HIPAA Eligibility Expansion!
How Atlassian expanded HIPAA eligibility by replacing a manual BAA process with a self-serve flow and a new service integrating IronClad with Admin Hub.
Our Journey with Multi-region Cloud Architecture and Data Residency
How Atlassian built its multi-region cloud architecture for data residency, covering region creation, service hydration, tenant migration and self-serve moves.
Comments
No comments yet. Start the conversation.
Comments couldn't load right now.