Mastering development process
For the last year, I've been thinking a lot about a path which would allow me to be a true professional. I've learned new types of architecture, patterns, ways to improve the design of my code. It has helped me a lot to grow as an iOS developer, to deliver faster. But when it comes to being a professional, it's not only about your coding skills. It's about mastering the development process. Typically you've got a task, then you start coding and after it's done - push it to production. It's quite a simple flow, isn't it?
Think
Let's assume that your task is to shop for the ingredients to make pizza. You know the recipe, you know which ingredients you need to make pizza - does it mean that you are ready? You might be, but you might end up having a problem putting all the ingredients into your fridge, because it contains too many objects that you have implemented bought before.
It is called ingredients duplication
As silly as this example may seem, it shows that before you start even an easy task, you should get to know what you need to do. If your task is too big, ask your teammates whether anything in the project can be used. If you are the only developer in the project - spend some time on research. It might save your time and protect you against code duplication.
Do you go to the same shop as always? Maybe there is something that could be improved in your recipe? Here is the area for your growth. If you spend a few minutes on searching for a shop with a better quality of ingredients, you will have a higher chance to bake better pizza! Same with your task. It's worth spending some more time to make sure that the solution you are proposing is the best. Read articles, talk with your colleagues, write down a draft of a solution, ask for feedback. If there is some legacy code which you would need to interact with, maybe it is a good time to refactor it? Just keep it reasonable - if your task would take a few hours, it's not a good idea to do it for tens of hours.
Before you move on, you should prepare your plan. Make a list of things that you need to do, make sure that API is ready. It's worth splitting your lists into smaller parts. It would help you to quickly determine what has already been done and what should be done next. Asking your QAs for test scenarios, which you would be covered during implementation, would be a good idea.
Last but not least - probably the most important thing here - make sure that you are going to solve the right problem. If you are told to get pizza then maybe baking pizza yourself is not the best solution at the moment? If you are throwing a party for a hundred people - you don't want to spend the whole evening with your oven. Same with development - the one who creates a task does not always know the alternatives. You might propose the alternative solutions, discuss the risks and advantages.
Code
Coding is well understood since both the code and architecture have to be clean. When it comes to writing tests... well, it's hard to find time for testing. This is what you will hear most of the time when you ask someone who doesn't write tests. Does it mean that their development process does not contain tests? Let's check how a typical coding process looks without writing tests:
- Write code
- Run app, go to the place which you are creating/modifying
- Test if it works
Well, this process contains tests - the ones with poor quality, which can be run only once, and you had time for them. It is simple, but would adding tests writing complicate the process?
- Write code
- Write test
- Run test
We can run tests without running an app. The same amount of steps but our tests are now automated! Our coding process became more solid. I'm not here to convince you that you should write tests (which you should) - just pointing out that if you are testing your app already, it is your choice which kind of tests you prefer. It could be even simpler if you go ahead with the TDD(Test-driven development) approach and treat writing code and tests as one.
- Write solution
- Test solution
Is it faster? At first, you might think that these two steps are slower, but in the long run, they save a lot of time and give you both confidence and a high quality solution.
Verification is the last step - prior to pushing your code to production or even to a code review. Make sure that you don't forget anything. Run your app and check if it works as expected. Do a self review to verify that your code looks well. Spend some extra time to make your code cleaner. Think what could be improved.
Making it easy to read makes it easier to write.
Uncle Bob
Measure
Nowadays, we have a lot of free services that allow us to gather data about our applications. Use them. Even if your task didn't involve analytics. Put analytics in your code to measure the impact that your task is aimed at achieving or what your users are doing in your app. Instead of ignoring errors or places which should never happen - log them. It will allow you to react before something gets out of hand. You should think about these all steps through all the process. This is the last moment to ask if your pizza is ready to be baked.
Pushing code to production or to stores is not where your task finishes. For stakeholders this is the moment when it starts. Observe your analytics data from time to time. The data will allow you to know the user and the app better. Based on analytics you will get feedback - does your solution fulfill the user's needs? Have you done a good job? Based on that, you can help build great products! It's the place where you can measure success. All thanks to your professional approach to development.
Summary
The references to making pizza are not accidental. The idea to write this article came to me while measuring the amount of fresh yeast to make pizza dough. I wanted to make pizza like a pro does. Making pizza is a complex process where each detail can decide about the quality of pizza. Just like with coding! Each part which I described here is equally important to make professional software. To master the development process, you need to learn a lot, take each step with the same care. However, if you keep doing that, you will be able to grow faster and day by day you will be closer to becoming a professional.
Keep it in mind that it's not a full list of things which you should take care of. I'm still mastering my development process, so if you have any thoughts, feel free to share them in the comments or reach me via twitter!