We all want to be able to grow in what we do, and in web development we spend most of our time writing code. This may include HTML, CSS, JavaScript, PHP, Python, ActionScript, or any other language you choose to build your Web site.
In this article, we'll share some practical steps that will allow you to expand your skills and become a better programmer. We propose five different habits that will make you better in the field you are in.
1. Focus on only one type of language in a single time period
If you are designing or developing a website, you will need to be familiar with many different languages at the same time. You may want to learn all of these languages at the same time, especially considering how they relate to each other.
I think, in a way, this is inevitable. But if you really want to improve quickly, I suggest you focus on a specific area of expertise. Do you want to make better use of CSS? Put your focus on this. Try using a single HTML document to implement a different layout using only CSS. CSS Zen Garden is a great example of using the same layout to implement different page styles. You can also find the list of elements and focus on them. For example, if you are familiar with CSS2, but want to improve your understanding of CSS3, you can learn CSS3 attributes and implement them one by one. You can read the current CSS3 specification and learn from each module to see what it can (or cannot) do on the browser.
You can also use similar methods for scripting languages such as JavaScript and PHP, although it is a bit tedious to do so for their functions. Another option is to choose a tutorial to learn, especially for the aspects you need in your job.
Do you want to be more proficient in WordPress development? There are too many related tutorials. Want to learn more about server-side image manipulation? There are also a lot of tutorials. Find them, add bookmarks, and learn gradually.
Choose one and stick to it until you have mastered it and then move on to the next.
2. Write Logic with annotations
Speaking of coding, I have insisted on many principles and ideas. One is that 95% of the code is logic. The other is from the human language to the programming language, and the logic does not change.
This means that if you can write it out in your code, you can write it down in English or other languages.
For example, suppose I want to lock or unlock something based on the time of day. Instead of writing the function code directly, we can take a step back and write the logic down in a simple English note.
Example:
- Function:lock on time
- // this function will accept two time values, indicating the range through
- // which it should return an unlocked status.
-
- // create a new data object
-
- // using the data object, get the current time
-
- // if the current time falls within the range passed to the function
-
- // return false – meaning that we are currently unlocked
-
- // else
-
- // return true – meaning that we are currently locked.
-
- // endif
-
- END FUNCTION
Here we list the complete logical structure of the function, which is similar to the blueprint we used to build the house. From now on, we can write the actual code based on the guidance of the annotations.
Obviously this is a relatively simple example, but I often use this technique when implementing complex functions. In this way, I can consider the complete logic before writing the function. I find this to be a very valuable habit that can make you make fewer mistakes.
I rarely delete comments, write logic in comments, and also mean that I have written the documentation for the code, which makes it easy for others to understand my logic, even for myself returning to view the code after a few months or years.
3. Learn the templates, plugins and open source code
The web is a very open place, especially in the development community. This provides a very valuable resource for those who want to be good programmers.
For example, you just touch html, you can download countless free templates from the Internet, because these templates are usually just plain html (as well as CSS and JavaScript), so they can be run locally, giving you a good chance to learn the code. Learn the tags and structure to better understand them, and modify the style sheet to see what happens.
Of course, I strongly recommend that you read some resources about standards and best practices, and you certainly don't want to develop bad coding habits yourself.
This is more useful for learning JavaScript and PHP, and their scope and logic are more complex than HTML, CSS, and so on.
For example, WordPress, a Content management system, is composed entirely of functions written using different PHP scripts. It also supports the extension of core functions, allowing you to download and install a variety of very cool plugins. The advantage of WordPress and its plugins is that they are fully open source, and you can fully browse through their source code.
The last piece of advice on this habit: never just use someone else's code structure, you should make sure you understand them , not just imitate someone else's code. It also helps to avoid bad programming habits by considering whether code conforms to the language-specific processes and standards.
4. Reading
Although there are a lot of useful information on the Internet, I still think it's not as good as reading a book on a related topic. Blogs may be articles or tutorials on specific topics, rather than books that can help you build an understanding of a strong foundation for a particular topic.
I've been using table layouts since the late 90 and early 21st century, until I'm tired of them, when I realized it was time to use DIV layouts. At the time, however, I was just trying to use the correct markup without fully understanding the CSS selector's syntax which was a very important part of the DIV layout. So I don't know about pseudo-classes, the whole notion of specificity and inheritance doesn't make sense to me, and so is the concept of positioning and floating.
Now, I have learned the language slowly from the information of various blogs (in fact I can spend less time), have a more comprehensive understanding of CSS patchwork. It takes a lot of time and I have a job to do, so I've been looking for a more appropriate solution.
So I bought Charles Wyke-smith wrote the Stylin ' with CSS in this book. This is a revelation. Just a few chapters of the content let me understand the basic concept of CSS. All that I had not known before had taught me in a very good way. It takes about a day, and I get the same knowledge that takes weeks or even months to get from a variety of blogs.
Of course, from that I learned a lot of CSS knowledge, but this book really I let me learn the basics of getting started with CSS, so far I still put it on the shelves as a reference.
If you want to learn a new technology from scratch, learning through a book is certainly one of the best choices.
5. Practice
Finally, I suggest that you develop the habit of fun. Sit down and see what you can accomplish on your own.
At present, CSS3 is a popular trend that different programmers try to push technology and you can discover its true abilities. Here are some examples:
CSS3 Transforms & @font-face Experiment
CSS Posters
Pure CSS Line Graph
CSS3 Leopard-style Stacks
Pure CSS Twitter Fail Whale
Of course, these CSS some is not completely practical, the most famous may be the pure CSS implementation of the Twitter fail whale illustration, this time? Yes. Is this practical? Not. But it must be fun, and it can prove how powerful CSS is.
What kind of coding experiment can you do? It is an interesting and effective way to learn.
Conclusion
This is all 5 habits that can improve your programming skills, and maybe not every one of them is about you, but hopefully you'll find at least one habit that attracts you. Please keep in mind that this place called the Internet is growing and developing, and to be a good programmer means to learn and grow constantly.
5 good habits that can make you a better programmer