<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/sources/towardsdev/best-of/2021" -->

---
title: Best Towards Dev posts of 2021 | daily.dev
description: The most upvoted Towards Dev posts of 2021, curated by the daily.dev community.
canonical: https://daily.dev/sources/towardsdev/best-of/2021
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:url: https://daily.dev/sources/towardsdev/best-of/2021
og:type: website
og:site_name: daily.dev
og:title: Best Towards Dev posts of 2021 | daily.dev
og:description: The most upvoted Towards Dev posts of 2021, curated by the daily.dev community.
og:image: https://media.daily.dev/image/upload/s--VAY5ToZt--/f_auto/v1724209435/public/daily.dev%20-%20open%20graph
---

# Best of Towards Dev — 2021

1. 1  
[](/posts/git-commands-you-must-know-xabcrjuwd "Git commands you must know")  
[![Ludivine A's profile](https://media.daily.dev/image/upload/v1669832105/avatars/avatar_l3qo6AG3M.jpg)](https://daily.dev/ladev)  
[![towardsdev's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/2c710db2750a4a70835862534cb7c9d4)](/sources/[source]/best-of/[year])  
3m read time • Dec 23, 2021  
### Git commands you must know  
Git is a very important tool for any developer. Here is a rundown of 13 important git commands to better manage your workflow. There are many more commands available that you can find here, but these are the most useful and frequently used ones and they will definitely speed up your coding process.

+1  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/b9b77b021512dcca73fc7b4d69fedb3d)  
141  
11
2. 2  
[](/posts/refactoring-nested-loops-in-js-6o5fot3d9 "Refactoring Nested Loops In JS")  
[![towardsdev's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/2c710db2750a4a70835862534cb7c9d4)](/sources/[source]/best-of/[year])  
3m read time • Dec 09, 2021  
### Refactoring Nested Loops In JS  
Most of the code in JS gets nested because of the various conditions one has to handle for the solution. Ternary operator is the best and most common way to replace your “if…else” statements. Switch case statement is not the best possible way to. replace nested ‘if-else’ statements but these can be used to reduce. duplicate code which is another common mistake ignored by developers.

+2  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/b994c03976f7e608e0133296b9bbb20f)  
124  
4
3. 3  
[](/posts/what-is-better-for-http-requests-fetch-or-axios-comparison-wpdquozbf "What is better for HTTP Requests: Fetch or Axios Comparison")  
[![towardsdev's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/2c710db2750a4a70835862534cb7c9d4)](/sources/[source]/best-of/[year])  
8m read time • Sep 18, 2021  
### What is better for HTTP Requests: Fetch or Axios Comparison  
Fetch() is part of a JavaScript window-object method within the Fetch API. It is built-in, so users don’t have to install it. Fetch() allows us to get data from the API asynchronously. Axios is a Javascript library used to make HTTP requests from the browser. It supports the Promise API that is native to JS ES6.

+2  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/5d0bea8dd706b06df44440a5fdffe539)  
96  
5
4. 4  
[](/posts/web-storage-apis-local-storage-and-session-storage-whgcpjsaz "Web Storage APIs — Local Storage and Session storage")  
[![towardsdev's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/2c710db2750a4a70835862534cb7c9d4)](/sources/[source]/best-of/[year])  
4m read time • Apr 16, 2021  
### Web Storage APIs — Local Storage and Session storage  
Web Storage APIs are used by developers to store data into the browser to improve the user experience and performance of the web apps. storing this data can be done by two mechanisms: either by using the sessionStorage API and the localStorage API. Both are used for storing the data on the client-side the data is never transferred to the server while making a network request.

+1  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/f7b379cb8a8118e3bed5cd90be91f01a)  
34  
1
5. 5  
[](/posts/javascript-the-hard-parts-part-1-o2zwaxvxt "JavaScript The Hard Parts — Part 1")  
[![Osama Mohamed Ammar's profile](https://avatars.githubusercontent.com/u/42181138?v=4&s=64)](https://daily.dev/osamamammar)  
[![towardsdev's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/2c710db2750a4a70835862534cb7c9d4)](/sources/[source]/best-of/[year])  
4m read time • Dec 30, 2021  
### JavaScript The Hard Parts — Part 1  
The code that you write in JavaScript is wrapped with a big thing called execution context. When we called argument, we mean the actual number or value that gets passed in, and the parameter is the placeholder that awaits it. After the function finishes or returns a value, the execution context will be deleted.

+1  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/0edfce08b1b98e3c31233ca4334a81cb)  
33
6. 6  
[](/posts/a-practical-guide-into-devops-as-a-back-end-engineer-4phmqapus "A practical guide into DevOps as a back-end engineer")  
[![towardsdev's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/2c710db2750a4a70835862534cb7c9d4)](/sources/[source]/best-of/[year])  
16m read time • Dec 27, 2021  
### A practical guide into DevOps as a back-end engineer  
How to set up a digital ocean droplet, a GCP instance, or an AWS EC2 instance. Decide which cloud platform you will use then select the link for a walk-through on how to get started. Use docker-compose to build, deploy, run, update, and stop containers using simple commands.

+5  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/586d59bc6adb97cb949bef1e97e37137)  
27
7. 7  
[](/posts/creating-a-gateway-service-with-node-js-typescript-and-fastify--yl-djpegb "Creating a gateway service with node js, typescript and fastify.")  
[![towardsdev's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/2c710db2750a4a70835862534cb7c9d4)](/sources/[source]/best-of/[year])  
2m read time • Sep 03, 2021  
### Creating a gateway service with node js, typescript and fastify.  
gateway is an infrastructure layer that sits at the front of all your back-end micro-services. It is a node network, a key stopping point for data on its way to or from other networks. Since we are using typescript, we have a lot of configuring to do before hand. We are going to make use of the micro- services architecture.

+4  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/5d2196aa34e43fb04d9ceae670a095d2)  
23
8. 8  
[](/posts/react-useeffect-cleanups-avegrqdht "React & useEffect cleanups")  
[![towardsdev's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/2c710db2750a4a70835862534cb7c9d4)](/sources/[source]/best-of/[year])  
4m read time • Dec 28, 2021  
### React & useEffect cleanups  
React & useEffect cleanups Tasos Kakouris 18 hours ago · 5 min read Image from https://undraw.co I hope you will enjoy this article! If you do, you can follow me on social media where I post more content like this one; check here: https://tasoskakour.com.

+1  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/97424dd92972d2eae866d79cf1636907)  
22  
1
9. 9  
[](/posts/event-loop-in-javascript-jlq08rzp4 "Event Loop in JavaScript")  
[![towardsdev's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/2c710db2750a4a70835862534cb7c9d4)](/sources/[source]/best-of/[year])  
11m read time • Apr 13, 2021  
### Event Loop in JavaScript  
Whenever an async function is called, it is sent to a browser API. These are APIs built into the browser. Based on the command received from the call stack, the API starts its own single-threaded operation. The event loop facilitates this process. It has one simple job — to monitor the callstack and the callback queue. Inside the task queue, the tasks are broadly classified into two categories.

+1  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/fb4a63e05ce4ac5e2b190d80660296d3)  
20  
1
10. 10  
[](/posts/gui-applications-in-a-docker-container-kgn3y-a-t "GUI Applications in a Docker Container")  
[![towardsdev's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/2c710db2750a4a70835862534cb7c9d4)](/sources/[source]/best-of/[year])  
2m read time • Dec 30, 2021  
### GUI Applications in a Docker Container  
The X11 socket is a program that allows users to run GUI applications on top of their OS. To launch a container we need its image file (i.e. setup) We can get the image of a container either from the internet or we can create it by ourselves.

+2  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/4bbc1f1d33716fbd48404d31e966f337)  
19  
1
11. 11  
[](/posts/how-to-get-rid-of-the-last-any-in-your-typescript-code-rz-f-qfr8 "How to get rid of the last any in your TypeScript Code")  
[![towardsdev's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/2c710db2750a4a70835862534cb7c9d4)](/sources/[source]/best-of/[year])  
3m read time • Dec 16, 2021  
### How to get rid of the last any in your TypeScript Code  
TypeScript offers an impressive set of tools to manipulate types. Using these tools we can tighten the safety net of strong types and catch any syntax error during compilation. But there are some functions which are hard to type strongly. How to get rid of the last any in your TypeScript Code.

+2  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/2ea61b57c64bc74aa29f7d533660ffcb)  
17
12. 12  
[](/posts/a-complete-guide-to-web-storage-apis-local-storage-and-session-storage-in-javascript-eznb0rqyn "A Complete Guide to Web Storage APIs — Local Storage and Session Storage in JavaScript")  
[![towardsdev's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/2c710db2750a4a70835862534cb7c9d4)](/sources/[source]/best-of/[year])  
4m read time • Apr 17, 2021  
### A Complete Guide to Web Storage APIs — Local Storage and Session Storage in JavaScript  
Web Storage APIs are used by developers to store data into the browser to improve the user experience and performance of the web apps. storing this data can be done by two mechanisms: either by using the sessionStorage API and the localStorage API. Both are used for storing the data on the client-side the data is never transferred to the server while making a network request.

+1  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/f7b379cb8a8118e3bed5cd90be91f01a)  
11  
1
13. 13  
[](/posts/the-power-of-sql-exvosniuw "The Power of SQL")  
[![towardsdev's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/2c710db2750a4a70835862534cb7c9d4)](/sources/[source]/best-of/[year])  
4m read time • Dec 18, 2021  
### The Power of SQL  
Structured Query Language or SQL was created by Edgard Codd in 1970 at IBM in order to deal with the large amounts of data that was coming to the world on a regular basis. It has been over 50 years since SQL has come to be and yet it still one of the most widely utilized programming languages today. A recent analysis from dataquest.io showed that out of 32,000 jobs that mention the key word ‘data’ in it, SQL is one of. the top programming languages to have as a skill set when applying to jobs.

+5  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/a2b41eb87d155a19f217472b57d87add)  
10

[See all Towards Dev archives](/sources/towardsdev/best-of)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@graph":[{"@type":"CollectionPage","@id":"https://daily.dev/sources/towardsdev/best-of/2021#page","url":"https://daily.dev/sources/towardsdev/best-of/2021","name":"Best Towards Dev Posts of 2021","description":"The most upvoted Towards Dev posts of 2021, curated by the daily.dev community.","isPartOf":{"@type":"WebSite","url":"https://daily.dev"}},{"@type":"ItemList","@id":"https://daily.dev/sources/towardsdev/best-of/2021#items","numberOfItems":13,"itemListElement":[{"@type":"ListItem","position":1,"url":"https://daily.dev/posts/git-commands-you-must-know-xabcrjuwd","name":"Git commands you must know"},{"@type":"ListItem","position":2,"url":"https://daily.dev/posts/refactoring-nested-loops-in-js-6o5fot3d9","name":"Refactoring Nested Loops In JS"},{"@type":"ListItem","position":3,"url":"https://daily.dev/posts/what-is-better-for-http-requests-fetch-or-axios-comparison-wpdquozbf","name":"What is better for HTTP Requests: Fetch or Axios Comparison"},{"@type":"ListItem","position":4,"url":"https://daily.dev/posts/web-storage-apis-local-storage-and-session-storage-whgcpjsaz","name":"Web Storage APIs — Local Storage and Session storage"},{"@type":"ListItem","position":5,"url":"https://daily.dev/posts/javascript-the-hard-parts-part-1-o2zwaxvxt","name":"JavaScript The Hard Parts — Part 1"},{"@type":"ListItem","position":6,"url":"https://daily.dev/posts/a-practical-guide-into-devops-as-a-back-end-engineer-4phmqapus","name":"A practical guide into DevOps as a back-end engineer"},{"@type":"ListItem","position":7,"url":"https://daily.dev/posts/creating-a-gateway-service-with-node-js-typescript-and-fastify--yl-djpegb","name":"Creating a gateway service with node js, typescript and fastify."},{"@type":"ListItem","position":8,"url":"https://daily.dev/posts/react-useeffect-cleanups-avegrqdht","name":"React \u0026 useEffect cleanups"},{"@type":"ListItem","position":9,"url":"https://daily.dev/posts/event-loop-in-javascript-jlq08rzp4","name":"Event Loop in JavaScript"},{"@type":"ListItem","position":10,"url":"https://daily.dev/posts/gui-applications-in-a-docker-container-kgn3y-a-t","name":"GUI Applications in a Docker Container"},{"@type":"ListItem","position":11,"url":"https://daily.dev/posts/how-to-get-rid-of-the-last-any-in-your-typescript-code-rz-f-qfr8","name":"How to get rid of the last any in your TypeScript Code"},{"@type":"ListItem","position":12,"url":"https://daily.dev/posts/a-complete-guide-to-web-storage-apis-local-storage-and-session-storage-in-javascript-eznb0rqyn","name":"A Complete Guide to Web Storage APIs — Local Storage and Session Storage in JavaScript"},{"@type":"ListItem","position":13,"url":"https://daily.dev/posts/the-power-of-sql-exvosniuw","name":"The Power of SQL"}]},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Sources","item":"https://daily.dev/sources"},{"@type":"ListItem","position":3,"name":"Towards Dev","item":"https://daily.dev/sources/towardsdev"},{"@type":"ListItem","position":4,"name":"Best of","item":"https://daily.dev/sources/towardsdev/best-of"},{"@type":"ListItem","position":5,"name":"2021"}]}]}
```

