Quantifying Your Accomplishments as a Software Engineer

It is important that you keep a track record of the impact you make in your career (including accomplishments outside your daily job). Why? The record serves as a reference for you to measure your career growth helps you to evaluate yourself to know how much value you have contributed through the work that you have done (at work, in open source, wherever else) keeps a record of your impact for your next salary raise or promotion negotiation, or job search motivates you to do more because when you know that you keep a track record of your impact, you will want to do more to add to it Developer Efficiency All the work that we do (as software engineers) boils down to two main impact categories...

July 2, 2024 · 4 min · Orim Dominic Adah

A Guide to Understanding Binary Search

In working with collections (lists, queues, maps) of data, we usually have to perform one or more of the following operations on the collection: accessing, searching, appending, inserting, replacing/swapping, deleting and sorting Binary search is one of the most popular algorithms for searching for a number within a sorted list of numbers. It has a time complexity of O(log N) which means that its ability to find a number in a sorted list is minimally affected by the length of numbers in the list....

June 1, 2024 · 7 min · Orim Dominic Adah

Single-Letter Identifiers in Loops

I recently developed a practice of using single-letter identifier names in code I write. This practice is quite contrary to my principle for writing clean code. I aim to make readers understand the code I write without thinking too hard. However, I have two points of view to support this practice. identifier is the generic term for variable names and names of constants. I use the term identifier and not variable name because identifier encompasses variable names and constant names....

March 24, 2024 · 1 min · Orim Dominic Adah

Why I Write Tests and Documentation and Why You Should Too

In November 2023, I was at the API Conf Lagos meetup. One of the speakers, Toni Alaribe, asked members of the audience to signify by show of hands if they write tests for HTTP APIs they build. Myself and a couple of other people raised hands. He asked members of the audience to signify again by show of hands if they write API documentation, update the documentation with the latest changes for the APIs and also keep a changelog of the changes....

March 2, 2024 · 6 min · Orim Dominic Adah
A Guide to Handling Cross-Currency Transfers With Flutterwave

A Guide to Handling Cross-Currency Transfers With Flutterwave

I experienced challenges in understanding the documentation on Flutterwave cross-currency transfers. After a long-running discussion with her staff on Slack, I was able to understand how it works. I have put this guide here for anyone (including future me) who may be going through this challenge. The Challenge I was tasked with the responsibility of implementing a feature that involved a transfer of funds from a Flutterwave USD account (the source account) to a recipient bank account (the destination account) that holds funds in (probably) a different currency from the USD....

November 26, 2023 · 3 min · Orim Dominic Adah

A Guide to Interfaces in Programming for Beginners

What is an Interface? An interface is a component that another component can interact with to perform one or more operations. Most beginners in programming encounter the term interface when they dive into object-oriented programming or clean code principles like SOLID. This article will help you understand what an interface is, irrespective of the programming language that you use. It will also cover the concept of programming to an interface, not an implementation....

November 25, 2023 · 5 min · Orim Dominic Adah
Set Custom Types for docs items in mongoose-paginate-v2 wit TypeScript

Set Custom Types for docs items in mongoose-paginate-v2

What is mongoose-paginate-v2? mongoose-paginate-v2 is a pagination library for mongoose. With mongoose-paginate-v2, you can fetch a list of documents from a MongoDB collection and get a paginated response. Paginated responses are useful for cases where UI clients needs to query and display only a section of data at a time. UI Table Pagination - ui.shadcn.com The mongoose-paginate-v2 documentation provides a code snippet for how to use the library with TypeScript. 1...

September 19, 2023 · 3 min · Orim Dominic Adah
You Don't Need to Know It All to Contribute to Open Source

You Don't Need to Know It All to Contribute

How it started I was working on a project recently where I used mongoose-paginate-v2 to retrieve paginated data from the database. The challenge was, I was trying to type my output because I deselected some fields from the documents returned, but I could not do it because the library did not provide that functionality. I had experienced this in a couple of other projects that I was working on. This time, the inability to achieve this got me frustrated....

September 17, 2023 · 2 min · Orim Dominic Adah
URL validation JavaScript header image

How I Validated for Specific URLs in JavaScript

In a pet project that I worked on recently, one of the requirements was to allow users to submit the URL to their Facebook social media profile. This article describes how I ensured that only Facebook profile URLs were submitted. JavaScript was used but it does not matter as much as the algorithm used; and that algorithm is described here. function validateUrl(url, expectedOrigin) { const urlObject = new URL(url); const originPattern = new RegExp(expectedOrigin....

August 18, 2023 · 2 min · Orim Dominic Adah
Dependency Injection in JavaScript blog header image

Dependency Injection in JavaScript

In building a house, after the architecture of the house has been drawn and accepted, everything built must fit the drawn architecture. A major change along the way may result in a complete tear-down and rebuild from scratch process. Once the building has been built with cement, it cannot be changed to wood. Building physical structures is a rigid process. Building software is different. Software, unlike physical structures, is expected to be flexible....

February 22, 2023 · 5 min · Orim Dominic Adah