Coding conventions are the style guidelines for programming. Programming best practices and principles are included in this. Here we will discuss some coding conventions.
“Clean code is simple and direct. Clean code reads like well-written prose. Clean code never obscures the designer’s intent but rather is full of crisp abstractions and straightforward lines of control.” — Robert C. Martin
A magic number means we are assigning a number with no clear meaning. Sometimes we use a value for a specific purpose, and we don't assign the value in…
Job interviews are not entirely predictable, but we often still see commonly asked tricky questions. Let’s take a look at ten of them.
Object.assign and the spread operator both do a shallow copy. That means we copied the first-level object.
The code we used before can be written like this with
Predict the output of the code below:
The output of the code snippets is not
Cron is a kind of scheduler program for UNIX-based operating systems. Cron is used to executing a program/script after a certain period. Suppose we have a program that we want to execute every night at 12 AM, or we need to back up necessary files every week once. These things can be done perfectly by a script that is executed by a cronjob.
Cron is a
daemon. Now the question is, what is a daemon? Daemon is a program that always runs in the background, and users don't have direct access over daemon. Cron checks the crontab (crontab is the…
As a technical person, I fetch some regular basis tasks. There are tasks that we can solve in several ways. Many tools, open-source programs, coding, or anything can be helpful in these cases.
Work smarter, Not harder
But one thing I believe in that I mentioned above. If there is a way to do it easily then I am not going to do it by myself in another way. Here I will mention some websites like these that I use in my everyday life and skip my hassles.
Security checking tools used to scan and check the safety of websites…
Programmers always do something new, but some basic and regular things exist that every project must include. Here I mentioned some code snippets from where you will find something new. I swear you are going to bookmark this. Hope this will be helpful.
Loop over an object is a regular basis need of every programming language. Sometimes it can be a complex object with multiple keys and values. Going through this kind of pair is a little confusing. Here I am going to describe two possible ways.
Finding into an array is the most needed task of everyday development…
If you develop your REST API without following good practice, your consumer or developers who are using your API may find this difficult to use. If you provide an API service to your customers, you might lose some customers just because of this. So let's learn about some best practices of REST API.
In REST API, we can serve data in many formats like XML, JSON, CSV, HTML, Plain text, or any other you want. But the most and widely used format is JSON. For human visualization, plain text is much better, but our main purpose is to make it…
In this article, we will get to know all the clean code principles from the book “Clean Code” by Robert C. Martin. Here, we will learn how to produce readability, reusability, and write refactorable code. Try to follow the whole article. This will help you to improve your programming. Here is an overview of the topics we will discuss here.
Here we will discuss five topics and some other sub-topics based on those five topics. Let's have a look at the index below.
We can host our websites anywhere we want, but there are lots of issues. Website speed, deployment process, costing, and many other mentionable issues here. Overall consideration, I found firebase hosting far better than the others. Here I am describing all the steps.
Quotes that will motivate you to be a better programmer.
Here I collected the top 26 quotes of legendary software engineers. Following these quotes and understanding these quotes will be a great achievement of your programming life. Let’s start
“Indeed, the ratio of time spent reading versus writing is well over ten to one. We are constantly reading old code as part of the effort to write new code. …[Therefore,] making it easy to read makes it easier to write.”― Robert C. Martin
“Repetition is the root of all software evil.” — Martin Fowler
“Don’t repeat yourself…
It's important to note that you can publish packages that are not Node.js modules. Any files that are bundled together with a package.json file can be handled as an npm package.
Publishing an NPM package and getting others to use it is a huge achievement and will be a milestone in your CV.
Here we have a package.json file.
Another thing we need is an index.js that is the entry module. Here, for example, we just exported a demo function called
So we got out package ready now we are ready to publish our package.
Love to solve problems