1. Read the Handbook
It's a classic, but you should never forget it. Please note that we are not talking about reading a brick describing a programming language from cover to cover. For me, the delightful acronym "RTFM" instead means immediately avoiding entering our problem in Google, hoping for an immediate solution. Often, it is enough to take the time to look at the description of the functions we use to understand our problem. It can indeed take longer to look in a manual, but you will discover many advantages.
- You will know the "why" of your problem and not only the "how" to solve it.
- You will quickly become familiar with the documentation of your tools. This will allow you to find information much more rapidly when you encounter more complex problems.
- It will give you the chance to stumble upon features or behaviours of the tool in question that you would never have discovered otherwise.
- Finally, it will give you a much more global view of what you are using as languages, API, frameworks etc. You will be able to fix some problems before they even arise.
Without putting aside all the resources available to us such as blogs, forums, etc., the first resort should always be the documentation, which, however, is specifically written for us: developers.
2. Question Your Habits & the "Best Practices" You Know
As a developer, you like to use proven standards, and that's a good thing. However, let's keep in mind that the perfect way to code does not exist. By reflecting on established standards and understanding the motivations behind them, you will be able to push their limits.
Some analysts will even go so far as to destroy everything known about a method to rebuild an even stronger one. So be bold when it comes to making your code even cleaner, more efficient and more precise than the standard requires. Who knows, maybe one day it will be your turn to write that standard.
3. Always Code & Comment as if You Were Going to Reuse Your Code
We spend our time writing code that accomplishes different tasks, but we often reuse the same ways of solving problems. When a similar situation arises, the first thing we do is open old code to get inspiration; everyone does this. It's a usual and relatively efficient way of working. Then, we open the file and start to copy and paste code sporadically. Unfortunately, we have to rename all the variables, change the comments, function names, and sometimes even entire objects each time.
Why not make an effort the first time you write a function?
- Identify the generic elements to all your applications and give them names related to their functionality rather than their contexts. (ex: $user instead of $client_surfer)
- Write comments related to their immediate environment and not to the global context of the application.
//Comparing the two tables to extract the standard rows instead of:
// Extract the financial reports that are present in the $my_favorit_report and $some_report_from_site tables
You will save a lot of time by not having to rename your variables or comment on your code again, or worse, leave comments that don't match your code. On the other hand, be careful not to fall into the trap of being too vague in your descriptions. There is nothing worse than a confusing comment.
4. Make Some Prototypes
Don't hesitate to try out code in a test environment and experiment with different ways to achieve the same goal. Sometimes you will find a faster, better or simpler way to achieve your goal. Also, you'll find the least vital parts of your functions or objects.
The most exciting thing about prototyping is that you will become much less attached to your code. You'll feel much more comfortable completely starting over with some of your work. It may sound silly, but when we implement a feature and find it doesn't meet our expectations, we tend to "patch" it. If it's a prototype, you'll be happy to take it apart and rebuild it instead of patching what already exists.
5. Following Blogs & Tweets Is Not Just for Designers
All designers check their favourite blogs and the latest trends on the web for inspiration before starting a task. As a result, UI construction, the working methods, and their tools are constantly evolving.
Wait a second... that's true for us too, right? We, too, need to know what's the best in our field to keep up to date! “Blogs are for creative people, we are just programmers": is a stereotype that needs to disappear. Remember that you have to be inventive and inspired to create a feature. Many famous programmers and analysts have a blog and a Twitter; maybe it's time you do your homework!
Here are some blogs that might interest you:
Dozens of others are worth checking out; this list is just a starting point. As far as Twitter is concerned, I suggest you start by following the editors of the software, libraries, frameworks and languages that you commonly use to keep up to date with new releases.
Food for thought:
As a developer, not knowing how to fix certain situations is part of our daily lives. We are not distinguished by what we already know but by what we can do in our profession.