3 Steps To Avoid Technical Debts.
WORK EVERY TIME!

Tew Tawan.
CodeX
Published in
3 min readJun 14, 2022

All junior developers must understand this issue before taking yourself into the coding phase in every software product. In my experiences of mentoring junior developers, you’re most like to jump into the code without proper planning. To become a pro sooner, please take one step back.

But wait, what are Technical Debts exactly?

In short, technical debts are

“Technical debt (also known as tech debt or code debt) describes what results when development teams take actions to expedite the delivery of a piece of functionality or a project which later needs to be refactored. In other words, it’s the result of prioritizing speedy delivery over perfect code.” Read more https://www.productplan.com/glossary/technical-debt/

In this article, I would like to show you my thinking process whenever I start working on any software product.

#1 Get an understanding of the business growth howto.

It’s important that you must understand your industry. Most of the time when you got the requirements/tasks from your project lead or manager, they’ll explain to you what they want as a final result of the “feature” you’re going to work on. It’s your chance to think about the bigger picture of the feature. Think about now, and in the future.

At this point, you can start by getting an understanding of how features can impact the business overall. You better go crazy with questions/ideas. For example; what if I added this and that, what if this feature can do x and y. And validate your ideas with the team if those ideas could work/nice to have in the future. Communicate proactively with your team members. If you don’t tell them what you’re doing, they might not know you’re doing it at all.

#2 Plan for Scale.

Once you know and understand the features and the future features ideal which is obviously out of scope. But at least, those ideas gave your some sense of what you should cover in your code at an early stage. At this point, you can make plans for scalability. The simplest way to start is to make room for those future tasks in your code. eg; Imagine if you have to make the frontend interact with different web3 wallets, rather than making it work with only one wallet as per requirement, you can prepare for connecting with multiple wallets at an early stage to minimize the creation of debt in the first place.

An example implementation ideal

✅ const yourWallet = new WalletConnection(walletSource)❌ const yourMetaMaskWallet = new MetaMask()❌ const yourBSCWallet = new BSCWallet()

#3 Follow Patterns

Design Patterns are one of the most popular in software development. Most of the software problems have been discovered and resolved by someone somewhere. So as the software becomes more complex, you can find help easier. Choose the right technical practices for your solutions to problems.

✨ Bonus: Here are my top technical practices in every frontend project I’ve worked on.

🐳Self-Contained-Systems = Container patterns

📡 React contexts = Provider pattern

💉React hooks/HOC = Dependency injections.

👂Redux/Saga = Observer patterns

👆Reselector = Selector patterns

Useful Links

The best place to learn about Design Patterns is https://refactoring.guru/design-patterns

--

--

Tew Tawan.
CodeX
Writer for

I'm a self-taught fullstack developer. I hope to help others by sharing my knowledge, learning processes and aspiring others.