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

---
title: Best Flavio Copes posts of 2022 | daily.dev
description: The most upvoted Flavio Copes posts of 2022, curated by the daily.dev community.
canonical: https://daily.dev/sources/flaviocopes/best-of/2022
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:url: https://daily.dev/sources/flaviocopes/best-of/2022
og:type: website
og:site_name: daily.dev
og:title: Best Flavio Copes posts of 2022 | daily.dev
og:description: The most upvoted Flavio Copes posts of 2022, 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 Flavio Copes — 2022

1. 1  
[](/posts/html-avoid-displaying-a-broken-image-if-the-image-is-not-found-7vz07gnhn "HTML, avoid displaying a broken image if the image is not found")  
[![flaviocopes's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1f2dbd275797411bbd37bfdaaf0951a9)](/sources/[source]/best-of/[year])  
1m read time • Jul 10, 2022  
### HTML, avoid displaying a broken image if the image is not found  
The technique I used is this: this inside an inline event handler in HTML refers to “this element” That’s a workaround that uses the platform features because I know I might not pay attention to that as I’m a solo developer and I might have a broken image visible for weeks before I realize.

+1  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/346fc8b840356f51c93d6a9796a5fea3)  
64  
8
2. 2  
[](/posts/macbook-air-or-macbook-pro-for-web-development--5h0vgihky "Macbook Air or MacBook Pro for Web Development?")  
[![flaviocopes's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1f2dbd275797411bbd37bfdaaf0951a9)](/sources/[source]/best-of/[year])  
2m read time • Oct 17, 2022  
### Macbook Air or MacBook Pro for Web Development?  
Macbook Air or MacBook Pro for Web Development? Apple currently has 2 lineups of laptops, the first is the Air, the second is the MacBook Pro.

+3  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/346fc8b840356f51c93d6a9796a5fea3)  
59  
22
3. 3  
[](/posts/debugging-javascript-bxgytlsp4 "Debugging JavaScript")  
[![flaviocopes's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1f2dbd275797411bbd37bfdaaf0951a9)](/sources/[source]/best-of/[year])  
9m read time • Feb 08, 2022  
### Debugging JavaScript  
Bugs are part of our day to day as developers, but our job is to minimize them as much as possible. The hardest part is always identifying where the bug comes from. Debugging is one of those skills that’s core to the activity of a programmer.

+4  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/3530a49d6ff9badb1ca06f7787d71ef3)  
54  
1
4. 4  
[](/posts/how-to-await-in-a-loop-in-javascript-ip0laqwt9 "How to await in a loop in JavaScript")  
[![flaviocopes's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1f2dbd275797411bbd37bfdaaf0951a9)](/sources/[source]/best-of/[year])  
1m read time • Jul 27, 2022  
### How to await in a loop in JavaScript  
You can do the same with a for..in loop to iterate on an object. You need to place the loop in an async function, then you can use await and the loop stops the iteration until the promise we’re awaiting resolves.

+1  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/346fc8b840356f51c93d6a9796a5fea3)  
45  
3
5. 5  
[](/posts/24-tips-for-beginner-programmers-tfeakjhbj "24 tips for beginner programmers")  
[![flaviocopes's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1f2dbd275797411bbd37bfdaaf0951a9)](/sources/[source]/best-of/[year])  
2m read time • Jun 01, 2022  
### 24 tips for beginner programmers  
Learn by doing, not by watching other people do. Be patient. you won’t learn quickly. it will take time. Find a community. It’s more fun with peers. Different people like different languages. If Python does not stick into your head, maybe JavaScript will. And vice-versa.

+1  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/32668b2cd1c5fcc375641e7592345675)  
42  
3
6. 6  
[](/posts/how-to-dynamically-import-javascript-modules-6x2r4cpn6 "How to dynamically import JavaScript modules")  
[![flaviocopes's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1f2dbd275797411bbd37bfdaaf0951a9)](/sources/[source]/best-of/[year])  
1m read time • May 14, 2022  
### How to dynamically import JavaScript modules  
JavaScript Dynamic Imports are a relatively new feature of JavaScript. They let you load modules from a folder without having to know the name of the folder. But doing something like importing test from folder doesn't work. You need to do a dynamic import, in this way:const test = await import ( folder + '/test.js' )

+1  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/dc249042692f583d79c9d5021ecde6d0)  
35  
3
7. 7  
[](/posts/roadmap-to-become-a-web-developer-in-2022-swfrxwpcn "Roadmap to become a Web Developer in 2022")  
[![flaviocopes's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1f2dbd275797411bbd37bfdaaf0951a9)](/sources/[source]/best-of/[year])  
8m read time • Feb 03, 2022  
### Roadmap to become a Web Developer in 2022  
Web Development is always evolving and every year in January I like to take a step back and re-evaluate and observe the ecosystem. The question is: where should beginner Web Developers start in 2022, so they will learn skills they’ll find jobs for? Is there anything new you should absolutely learn? Let’s get into it.

+5  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/72cdbfc7676bf2d5f52a6b8a7aab5702)  
26  
1
8. 8  
[](/posts/what-s-the-best-javascript-course--76dzhlr4t "What's the best JavaScript course?")  
[![flaviocopes's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1f2dbd275797411bbd37bfdaaf0951a9)](/sources/[source]/best-of/[year])  
2m read time • Nov 27, 2022  
### What's the best JavaScript course?  
JavaScript is at the core of everything. It can run in the browser natively, to build interactive websites and full-blown applications. It powers Node.js and other server-side runtimes.

+3  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/346fc8b840356f51c93d6a9796a5fea3)  
20
9. 9  
[](/posts/asking-google-to-index-your-page-8t-s3loke "Asking Google to index your page")  
[![flaviocopes's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1f2dbd275797411bbd37bfdaaf0951a9)](/sources/[source]/best-of/[year])  
1m read time • Jul 21, 2022  
### Asking Google to index your page  
You can ask Google to index a specific page that you just wrote, so it's indexed (added to the Google results) faster. I think this is only useful for new websites, so as I'm working on a new website I figured I’d test it.Assuming you have set up your domain on Google Search Console, go on URL inspection and enter the page you want to be indexed at the top.

+3  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/346fc8b840356f51c93d6a9796a5fea3)  
15  
1
10. 10  
[](/posts/introduction-to-the-go-programming-language-hxewaqhwc "Introduction to the Go programming language")  
[![flaviocopes's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1f2dbd275797411bbd37bfdaaf0951a9)](/sources/[source]/best-of/[year])  
3m read time • Sep 06, 2022  
### Introduction to the Go programming language  
Go is an awesome, simple, modern, fast programming language. It’s compiled, open source, strongly typed. It was created by Google engineers with these main goals: Make their projects compile (and run) faster. It was meant to be a replacement for C and C++ codebases.

+5  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/346fc8b840356f51c93d6a9796a5fea3)  
13
11. 11  
[](/posts/why-javascript-is-a-great-programming-language-for-beginners-ctq9e9a88 "Why JavaScript is a great programming language for beginners")  
[![flaviocopes's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1f2dbd275797411bbd37bfdaaf0951a9)](/sources/[source]/best-of/[year])  
1m read time • Oct 11, 2022  
### Why JavaScript is a great programming language for beginners  
JavaScript is the main language used to build websites. A website is the #1 tool to do anything on the internet. Every company needs a website or an e-commerce, and every new business will need one in the future.

+1  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/346fc8b840356f51c93d6a9796a5fea3)  
11
12. 12  
[](/posts/how-to-use-exceptions-in-php-eps37lven "How to use exceptions in PHP")  
[![flaviocopes's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1f2dbd275797411bbd37bfdaaf0951a9)](/sources/[source]/best-of/[year])  
2m read time • Aug 25, 2022  
### How to use exceptions in PHP  
Exceptions are used to make us, developers, aware of a problem. We wrap some code that can potentially raise an exception into a try block, and we have a catch block right after that. You can use the built-in exceptions provided by PHP but you can also create your own exceptions.

+1  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/346fc8b840356f51c93d6a9796a5fea3)  
11
13. 13  
[](/posts/where-to-host-a-postgresql-database-etsazfzxt "Where to host a PostgreSQL database")  
[![flaviocopes's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1f2dbd275797411bbd37bfdaaf0951a9)](/sources/[source]/best-of/[year])  
4m read time • Jun 23, 2022  
### Where to host a PostgreSQL database  
Local database is your best choice when you are developing your application on localhost. The drawback is the initial setup, but you can find many tutorials for your Operating System by searching “install postgresql on ” on Google or YouTube. DigitalOcean also offers a managed database that makes things easier (but also costs more, save time spend more)

+4  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/346fc8b840356f51c93d6a9796a5fea3)  
10
14. 14  
[](/posts/javascript-how-to-get-the-class-name-of-an-object-wzdg42c2g "JavaScript, how to get the class name of an object")  
[![flaviocopes's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1f2dbd275797411bbd37bfdaaf0951a9)](/sources/[source]/best-of/[year])  
1m read time • Apr 29, 2022  
### JavaScript, how to get the class name of an object  
You can look up the object’s constructor, then reference its name property. This method returns a string that represents the class name of the object. You can also directly compare the constructor property to the class, like this: hypertrophicclass Dog { } const roger = new Dog () roger . constructor === Dog //true

+1  
![Post Cover image](https://media.daily.dev/image/upload/t_mobile_feed/v1/posts/00ea368ca86ecb69b873e2e2ff0e1bdb)  
10
15. 15  
[](/posts/how-to-fix-decimals-arithmetic-in-javascript-2kkv-zr0n "How to fix decimals arithmetic in JavaScript")  
[![flaviocopes's profile](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1f2dbd275797411bbd37bfdaaf0951a9)](/sources/[source]/best-of/[year])  
2m read time • Apr 25, 2022  
### How to fix decimals arithmetic in JavaScript  
If you try to do the sum of two decimal numbers in JavaScript you might have a surprise. The reason is due to the fact computers store data as binary, 0 or 1\. Not every decimal number can be represented perfectly in this binary format. Some numbers are repeating numbers in binary. Try to convert 0.1 from decimal to binary.

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

[See all Flavio Copes archives](/sources/flaviocopes/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/flaviocopes/best-of/2022#page","url":"https://daily.dev/sources/flaviocopes/best-of/2022","name":"Best Flavio Copes Posts of 2022","description":"The most upvoted Flavio Copes posts of 2022, curated by the daily.dev community.","isPartOf":{"@type":"WebSite","url":"https://daily.dev"}},{"@type":"ItemList","@id":"https://daily.dev/sources/flaviocopes/best-of/2022#items","numberOfItems":15,"itemListElement":[{"@type":"ListItem","position":1,"url":"https://daily.dev/posts/html-avoid-displaying-a-broken-image-if-the-image-is-not-found-7vz07gnhn","name":"HTML, avoid displaying a broken image if the image is not found"},{"@type":"ListItem","position":2,"url":"https://daily.dev/posts/macbook-air-or-macbook-pro-for-web-development--5h0vgihky","name":"Macbook Air or MacBook Pro for Web Development?"},{"@type":"ListItem","position":3,"url":"https://daily.dev/posts/debugging-javascript-bxgytlsp4","name":"Debugging JavaScript"},{"@type":"ListItem","position":4,"url":"https://daily.dev/posts/how-to-await-in-a-loop-in-javascript-ip0laqwt9","name":"How to await in a loop in JavaScript"},{"@type":"ListItem","position":5,"url":"https://daily.dev/posts/24-tips-for-beginner-programmers-tfeakjhbj","name":"24 tips for beginner programmers"},{"@type":"ListItem","position":6,"url":"https://daily.dev/posts/how-to-dynamically-import-javascript-modules-6x2r4cpn6","name":"How to dynamically import JavaScript modules"},{"@type":"ListItem","position":7,"url":"https://daily.dev/posts/roadmap-to-become-a-web-developer-in-2022-swfrxwpcn","name":"Roadmap to become a Web Developer in 2022"},{"@type":"ListItem","position":8,"url":"https://daily.dev/posts/what-s-the-best-javascript-course--76dzhlr4t","name":"What's the best JavaScript course?"},{"@type":"ListItem","position":9,"url":"https://daily.dev/posts/asking-google-to-index-your-page-8t-s3loke","name":"Asking Google to index your page"},{"@type":"ListItem","position":10,"url":"https://daily.dev/posts/introduction-to-the-go-programming-language-hxewaqhwc","name":"Introduction to the Go programming language"},{"@type":"ListItem","position":11,"url":"https://daily.dev/posts/why-javascript-is-a-great-programming-language-for-beginners-ctq9e9a88","name":"Why JavaScript is a great programming language for beginners"},{"@type":"ListItem","position":12,"url":"https://daily.dev/posts/how-to-use-exceptions-in-php-eps37lven","name":"How to use exceptions in PHP"},{"@type":"ListItem","position":13,"url":"https://daily.dev/posts/where-to-host-a-postgresql-database-etsazfzxt","name":"Where to host a PostgreSQL database"},{"@type":"ListItem","position":14,"url":"https://daily.dev/posts/javascript-how-to-get-the-class-name-of-an-object-wzdg42c2g","name":"JavaScript, how to get the class name of an object"},{"@type":"ListItem","position":15,"url":"https://daily.dev/posts/how-to-fix-decimals-arithmetic-in-javascript-2kkv-zr0n","name":"How to fix decimals arithmetic in JavaScript"}]},{"@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":"Flavio Copes","item":"https://daily.dev/sources/flaviocopes"},{"@type":"ListItem","position":4,"name":"Best of","item":"https://daily.dev/sources/flaviocopes/best-of"},{"@type":"ListItem","position":5,"name":"2022"}]}]}
```

