Most recently, I was tasked with retrieving a CSV file from a remote Secure File Transfer Protocol(SFTP) server, extract certain fields from the file containing at least 5000 rows and save each of the rows as a record in PostgreSQL. Here is a summary of how I was able to pull that off :)
I broke down the task into the following chunks:
If you want to debate about
promises, kindly, do it on this blog post instead as this tutorial refrains from any attempts to differentiate/contrast the two. However, I should mention that they are not mutually exclusive but rather complementary:
async/await builds on
The approved syntax for async functions is placing…
What is Joi?
Joi in play
Reassigning the value of an argument variable mutates the
arguments object. Mutation is the act of changing the source or the original element. Misuse of mutability can cause side effects to your software. In light of this fact, senior developers have across the globe found themselves opting for persistent data structures or Facebook’s immutable-js as a way to avoid mutation.
How do we avoid mutation?
Since mutation alters the original object and returns it, this gives us the idea of copying/cloning the original object.
An update shouldn’t change the original object, instead create a…
Knowing the usage of resources would go a long way in helping identify parts of your system that need to be optimized.
event loop is germane to the story, let’s decipher it first.
Node’s architecture is mainly composed of two major components:
libuv, the library that provides event loop to Node.js. Also, of importance is the fact that in a Node application, everything goes through the event loop.
Node.js is an event-based platform, which means that everything happens as a reaction to an event. In any given event-driven application…
In computer programming, variables are used to store information to be referenced and manipulated in a computer program. Their sole purpose is basically to
store data in memory.
You should know that naming variables is known as one of the most difficult tasks in computer programming, so think hard about the names.
There are two known ways of variable assignment namely;
New’s come, let go of the old! Technologies evolve over time, with very smart people behind the wheel in bringing these changes home. Newer versions of a framework, or a library, or any piece of software, in most cases is always an improvement of the previous version. Bugs fixed, issues raised by the user (tech) community addressed in subsequent releases.
CHRISTMAS, a time when Christians commemorate and celebrate the birth of their Saviour, and everyone, including atheists, get a break from work, is celebrated differently across the world. In Kenya, this season inevitably causes heavy traffic in most of our roads as a large number of excited kins rush into malls to make last-minute shopping, while others load up their baggage into public service vehicles en route to villages. At this time, almost everyone seems willing to wait in traffic, no hooting on the traffic controllers.
Having lived in the capital city for almost a decade, I have seen street…
Earlier today, I had spent most of my morning trying to solve a bug whose logs were pretty confusing.
The logs weren’t looking pretty, I know. As it stood, I had the following code:
From the logs, the error was pointing to line 1. In other words, what the interpreter is telling me is OrderGatewayClient is undefined! But it’s there; see line 7. The problem here is simple: scoping
A software engineer, mentor, and a writer