Keep one dedicated build folder per environment

Someone typing
Someone typing
Photo by Jexo on Unsplash.

When developing a React application, you might need to deal with different environments. Based on my experience, you should consider at least the following three environments:

  • Development
  • Staging
  • Production

Before deploying your React app to one of the last two environments, you need to build it. This is usually achieved by running a command aimed at creating a deployable build saved in your project’s build folder.

Such a method has a tremendous downside. For example, you cannot launch many build commands in parallel. In fact, they all depend on the same folder. …


It took me 474 days but it was worth it

Photo by Egle Sidaraviciute on Unsplash

As you can tell from my name, I am a native Italian speaker. I was born and raised in Italy and only studied English at school. My level was tragically low for most of my life. Before deciding to improve it, I had never thought about becoming an author. To be honest, I had always considered myself a terrible writer.

But let’s start from the beginning and see how learning a foreign language turned me into a writer…

Where Everything Started

It was 2019. I had just graduated in software engineering and had gotten my first job. I was not enjoying it at…


Writing technical articles can help you become a better developer

Someone typing on laptop
Someone typing on laptop
Photo by Kaitlyn Baker on Unsplash.

Although my career as a software engineer has just begun, I cannot find good reasons why I should not write technical articles. Instead, I strongly believe that every developer should do so.

Writing technology-related pieces is not complex and you definitely do not need to be a talented writer. What you need are good reasons for writing — and that is what this article is about.

Let’s take a look at my top five reasons why developers should write technical articles.

1. Sharing Your Solutions

We all feel special, but the problems we are called to face as developers are more or less the…


Analyzing the behavior of subscribers from Quora

Traffic stop sign.
Traffic stop sign.
Photo by John Matychuk on Unsplash

For the past few months, I have been using Quora to conduct a campaign aimed at increasing my blog newsletter subscribers.

During this time interval, I have had the opportunity to thoroughly study the platform and recently found out a significant downside. Focusing more on the behavior of visitors coming from Quora, I started to notice an interesting pattern.

Let’s see what this consists of and why it represents the major drawback of Quora as a marketing tool.

Enhancing My Campaign

My experiment of answering 100 questions on Quora in 30 days proved that by recognizing the right questions on Quora and crafting…


The art of making your Medium articles perform at their best

Photo by Luca Florio on Unsplash

According to toppubs.smedian.com, there are more than 15k different publications on Medium. Out of this jumble of publication, which ones should you choose to submit your articles?

A Stock Picking Inspired Method

Selecting the right publications is not so different from stock picking. Day traders and long-term investors use different methods to find and evaluate stocks. Although operating on different time horizons, they both share the same goal: making money. They all want their stocks to grow and generate income.

Likewise, every author wants their articles to perform at their best and reach the widest possible audience. By recognizing this analogy, I was able to…


Scraping a web page on-the-fly to retrieve public data

Photo by Michał Parzuchowski on Unsplash

Many online services do not offer APIs to give access to their public data. At the same time, they might have all this data available on their website. In such a circumstance, why not scrape it?

Web scraping is a complicated subject and — to perform it consistently — you may need an equally complex solution. If this is your case, I recommend this article, where I delved into building a robust, advanced, and modern rotating IP and User-Agent web scraping script.

In most cases, you do not need such a sophisticated system. In fact, an API that is capable…


Handle different MongoTemplates with the MongoDB 4.x driver

Code
Code
Photo by AltumCode on Unsplash.

There are plenty of online guides explaining how to configure a Spring Boot application that connects to multiple MongoDBs. The common approach was to use MongoDbFactory, but this class was deprecated in Spring Data MongoDB 3.x, which introduced the MongoDB 4.x driver.

So, let’s see how to configure multiple MongoDB data sources in Spring Boot using Spring Data MongoDB 3.x.

Please note that code will be written in Kotlin, but the same result can be achieved in Java as well. …


Making your API layer more robust and reliable

Photo by Maxwell Nelson on Unsplash

In my previous article, I showed how to define an API Layer to avoid code duplication in Spring Boot.

Its idea is based on separating where all your needed API requests are defined from where they are actually called. Having all the definitions in one place allows you to easily add shared custom behavior, such as retry logic.

After all, your back-end probably depends on other services. What would you do when they fail? Obviously, this is not your fault, but at the same time, you cannot expect users to restart their entire workflow due to avoidable errors.

Even if…


Configure Sequelize and Mongoose to handle concurrent data-intensive requests

Code on a laptop
Code on a laptop
Photo by Joshua Aragon on Unsplash.

Recently, I dealt with a huge performance problem in Node.js. My backend built using Sequelize and Mongoose was often unable to respond to any requests for minutes.

Let’s see what I did to identify the bottlenecks, why such issues can happen to any Node.js developer, and how to avoid them.

Detecting the Bottlenecks

I had monitored my VPSs for days without noticing anything alarming before realizing that the problem was elsewhere. Each of the databases used by the application has its own VPS. Data is very large — hundreds of millions of records — but the 16GB 4 CPU VPSs I am using…

Antonello Zanini

Technology Bishop, Freelance Software Engineer, Writer ‎‏‏https://antonellozanini.com/en

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store