IMHO, programming is like cultivating. Initially, when I started to learn programming, I always thought that programming is just a tool to achieve something in software. It was hard and boring to some extent. There are some syntax and special keywords that I need to remember which I don’t understand. Shameless to say, I was having this mindset for quite a long time. Until recently, I realized programming is not really what I thought long ago. In fact, we can treat programming like crop cultivation. It has to be nurtured often to attain higher skill level.
If you google around and you will see something like below to show you the steps for cultivating land.
Step 1: Choose locally adapted varieties.
One cannot simply choose anything to grow on a piece of land. Can you grow tomato in a desert? Thus, we need to examine the land to see find out what kind of plants are suitable for it. Different type of land has its own well adapted varieties. Let’s also not forget about local weather, temperature and so on.
As for me, choosing a right technology is important for a project. When I first started to build ecommerce web application, I chose ASP.NET as I have experience using Microsoft technologies and also my boss was also familiar with it and has certain of level of confidence on it too. From here, I understand that technology does not choose a project, a project chooses a technology instead.
Step 2: Plant at the right time of year.
Choosing a right timing for planting is like having proper meal throughout the day. You can`t have dinner for your breakfast, can you? Understanding the plant life cycle helps to find a right time to grow without concerning it might die too quickly.
When I starting to implement a functionality on a page, I will always focus on getting the expected output first without concerning too much on the quality of the codes. Getting the function to work at the minimum level is important as I can quickly to see if the whole system is workable or not and also whether it is fulfilling the functional requirement or not. I don’t see a point on trying to come out with perfect good quality codes but eventually it does not fulfill the requirement.
Step 3: Prepare the soil properly before planting.
Getting the soil prepared properly will ensure the crop to be successfully. Getting rid of weed, turning soil and spreading organic matters such as compost are important in making sure the plant is living healthily.
In order to save time, I will google around to search a quick solution for my problem. Luckily, virtually for every programming problem I encountered, Google will always have the answer. But is this a long term solution for me and for the project? What is the inner problem of this? I found out that problems that occur are not the complexity of project but my level of programming skill and understanding of the technology. Reading and practising all about programming is like athlete training for 100 meter run. Of course, everyone can run but why professional athletes can run better than us? It is simply because they never stop to improve their running technique.
Step 4: Plant properly.
Technique to plant may seem easy to perform, however, slight misjudgment could have some big impact on future crop. How deep should I plant the seed? What is the recommended distance between the plants? Does it need support stick? Answers for these questions about how to plant properly can really show one’s expertise level on planting.
In programming, code tidiness and organization are important for future maintenance. I once liked to put all my codes in one place thinking that it was the easiest and quickest way to get things done. And the worst thing is I never come back to improve them and assuming that once requirement was fulfilled I shouldn’t be worry to change again. Guess what? After such a long time, there was a change requirement and when I went back to that codes, I almost wanted to commit suicide as I couldn’t really understand a single line of code as it was so messy and couldn’t even know where to begin. Life would be much better if I know how to organize it.
Step 5: Water consistently and fertilize regularly.
Plant needs water to survive. Water is so important that plant can evolve to sustain water as long as possible. We also have to make sure the soil is fertilized regularly to let the plant obtains adequate nutrients.
A lot time, I heard people saying that programming is only for young people as they are more energetic and can afford to take overtime to get things done. As they get older, it’s often a better choice to move to management level as they will have to spend more time with family and other commitments too. I think it’s all down to the attitude towards programming. Do you love programming? Do you apply the principle in programming in your daily life too? It may sound unbelievable to suggest that we can apply certain principle in programming in our daily life. For instance, we have the concept KISS (Keep It Simple Stupid) to make sure that our method or function is short and simple to understand. We can also use this concept to convey our message to other people. When we try to explain things to other people, do we sometimes unintentionally impose our ideas to it?
Step 6: Eliminate weeds.
Weeds are plant that grow around the crop which often steal nutrients away. They are resilient and hard to get rid of. It’s always easier to destroy them when they are just about to come out. Controlling weeds requires consistency.
It’s not surprise to come across a project that has a lot of features but only certain features are being used by people oftenly. I, myself once built a lot of functions for a page thinking that user might need this and this. However, I found that all user wanted to do is to click that single button to perform a task. Do I keep those extra functions or not? Keeping those extra functions are like letting them grow like weed and steal the attention away from the reader who is trying to understand codes main task. Keeping the code base clean and clear to show its main task is important in programming.
Step 7: Control insect pests.
It’s almost inevitable that every plant is a food for certain group of insects. Getting rid of pests is important and relatively not so difficult. While doing so and making sure the crop is free from insecticide chemicals is hard.
During my early days of programming, I never came across of the concept of unit testing. The typical steps I normally took is to repeat whole set of steps to test and fix the bug again and again. Until one day, I watched an online training video about benefit of unit testing, it opened my eyes and found my relief as if I have been a slave of something which took me so much time to search for solution. A good programmer can fix a bug in run time, a wise programmer fix a bug before run time.
In conclusion, I think programming is already a part of my life. Not only it helps me to think rationally but also to improve me in all aspects of life too. Programming can be nurtured too and as long as I cultivate it consistently I can always improve my programming skill.