This is the NTH day of my participation in Gwen Challenge
Great short snippets of code that you’ll often use in development, right here.
Programming Navigation is dedicated to recommending quality programming resources at 💎
Project open source repository: github.com/liyupi/code…
Kneel for a star ⭐️
Hello, I’m Fish two. I found that many of my friends have such a problem when learning programming. Although they can understand it by watching video tutorials or books, they can’t write code without the tutorials, let alone write good code.
In addition, in my work, I find some programmers around me, although they say they can write workable code, but their code writing is very rough. Sometimes they have to write 10 or 20 lines of functions that can be completed by one line of code, which makes me tired.
Why do these problems arise? It’s not necessarily about writing less code, it’s more about looking at less code.
It’s important to learn how to program and practice, but it’s also important to look at other people’s project code and learn how to write it well!
So today I would like to recommend a very useful website called 30 Seconds of Code, which is built by a foreign god.
True to its name, the site is a collection of short code snippets that programmers often use in their development work, with the goal of teaching you good code in just 30 seconds. Support for JavaScript, CSS, Python, React, Node and other mainstream technologies, help you learn excellent code writing and practical programming skills that you will never get the chance to learn in video tutorials.
Taking the JavaScript language as an example, you can select the code snippets you want to learn by category, and see a list of articles.
Enter an article, such as this How Can I define an enum in JavaScript? How to define an enumeration in JavaScript
You might think this is very simple, and very easy to write code like this:
// Enumeration of dates
const daysEnum = {
monday: 0.tuesday: 1
});
Copy the code
If you just follow the tutorial, you’ll probably never realize that this is actually wrong! Even if the const constant keyword is used, the properties inside the object can still be modified, which does not meet the requirements of enumerated classes.
In this article, the standard enumeration definition method is provided, which is really short, even less than 30 seconds to learn. There are also programming ideas and code explanations, which not only teach you how to write good code, but also guide you to think about how to write good code.
There are hundreds of great short code snippets on the site so far, and I highly recommend that anyone learning front-end, Python, etc., take a moment every day to go through all the great examples on the site, which will definitely improve your programming skills. Even if you don’t have time to go through the process, you can use the search function provided by the website. When you encounter a problem, you can find the code you need according to the keyword of the problem
Welcome to have a try, if this article is helpful to you, please also help to like! ❤ ️
🔍 Project Address: www.code-nav.cn/rd/?rid=174…
In the programming navigation (www.code-nav.cn) can also find more high-quality programming learning resources, welcome to share with the students who need it!