As a developer, I find exciting and captivating to discover a new technology or to learn a new language. But how to do it effectively?
Here are few tips you can try when beginning a project on a new technology :
- Understand the structure: learning how functionalities and roles are separated and work together will help you to know how to add functionalities and where in your project.
- Learn how to write properly what you want to implement. You can check some previous PR of another project working on the same technology. That way, you will see how to add your own contribution to the structure.
- Be curious: do not let dark areas you do not know in your project. Try to have a good overview of all your project without going into details. Many technologies have well structured tree project. Even if you don’t use some parts of the project they are here for a reason. Do not hesitate to ask your teammates, they know things !
- Draw the data flow: when you start to have a good idea of how your project is built, try to draw the data flow of what come in and out of your project. By doing so, you will understand how your program reacts to an event or a user input.
- User a debugger: a debugger will allow you to stop your program almost everywhere and to check the state of the data that is being processed. You can run your program instructions by instructions, understanding what truly does your code.
- Read unit tests: unit tests are meant to validate that each step of your software worked as designed. You will see what each part is supposed to have as input and what it is expected to return.
- Make your code crash: this may seem odd, but when you just finished a new functionality, try to make it endure different inputs. You will see the full potential of what you just wrote, and if it crashes, ask yourself why and try to understand the limits of the mechanisms you used. You will learn about the side effects of the technology and its assets. The best way to do so is to write unit tests, because it allows you to test each part of your code separately.
Here are some articles that helped me discover new technologies on my projects:
Redux (thanks Nicolas Boutin for these amazing articles ;))
Symfony
- Configure Xdebug and PhpStorm for a Vagrant project in 5 minutes
Javascript
- Keep calm and love Javascript unit test
Feel free to add your own gold nuggets articles