HOW I LEARNT TO CODE BY 
                     EXERCISING
Image Credit: Daniel Oyagha-friendly boxing match

HOW I LEARNT TO CODE BY EXERCISING

Learning to code or to exercise is a journey.

Prior to when I started off to learn how to code, I usually do regular exercise on Saturdays where, I would engage in different outdoor exercise such as 15Km run/jogging, acrobatics, skipping ropes, jumping, push-ups, sit-ups etc. 

I when I started to code, my classes were usually on Saturdays while my exercises were also on Saturdays soon both started to clash and I need to choose one of them or find a better way to manage both. I was new to coding and I really wanted to get soak all of myself into my new found skill of learning to code so, I stopped to exercise while I devote more time to my coding.  

This went on for 6 to 8 months of not exercising at all.  One day I decided to go for my usual exercise, I soon discovered that the things I could do before I was now struggling with them. This was because my body system had adjusted to fit into my new lifestyle of not working out on Saturdays as before. Instantly I realized that it was time for me to marry both together, I decided to re-adjust my routine such that it accommodates both my regular Saturday workout and my Saturday coding classes. 

Shortly after this, I noticed that my coding experience started to improve compared to when I stopped to exercise as I saw lots of similarities in both and how transfer of knowledge from one could help me in the other. The following paragraphs describes how this came about. 

Lesson one: Never compare yourself with anyone 

When I returned back to my regular exercise and started to jog 15km, I noticed that I get tired easily and am not able to get to the finish line of the 15km distance that I would normally have gotten to with ease. I didn’t have the same endurance and stamina level as I used to. 

I also noticed that some persons that I knew couldn’t cover this 15km before could now do so easily. I didn’t allow this to discouraged me, I just told myself that if I don’t give up again, I would soon be able to catch up and get in shape. 

I choose to own my race and my pace, I was determined to first show up every Saturdays, get into my training kits, hit the road and just start to jog. 

After a while, I started to improve, my endurance and stamina level started to rise again and by the end of 12 weeks, I had could now cover the same 15km distance that I couldn’t before. When you start to learn how to code, you would meet different people with different level of expertise. Some are already better than you, some are just starting off while you are better than some. What matters most is your ability to be consistent and not where you are in terms of how good or bad you think you are. You have to own your coding race and coding pace. 

No alt text provided for this image


Lesson Two: Focus on the Finish Line 

When I returned back to my Saturday exercise, I chose some mental milestones as anchors by using key figures such as a particular fuel station, getting to the 2nd pedestrian bridge, next bus station etc. I would mentally charge myself by saying you know what, you are tired now but just endure a little till you get to the next bus station or the tallest building located along the route I usually work out. When I get to the tallest building, I would repeat the cycle and say you know what, just get to the next fuel station, I would usually do this till I eventually get to the finish line. In essence, I would mentally break the finish line which initially looked far and difficult into smaller milestones by using key monuments as anchors along my path as indicators to measure how close I was to the finish line. Soon I would find myself breasting the tap at the finish line and would be very excited. 

Same thing applies to learning to code, when you start to code, some things would appear so difficult or too big for you to understand. All you have to do is break down that difficult or huge concept into the smallest possible chunk then start with just one. When you are done with this, take on the second and then the third and shortly you would find that you have finished all the task or project. 

Lesson Three: Decide on a routine and stick to it 

My regular exercise routine are all the Saturdays in a month from 6am to 9am. I had built my lifestyle around this and, my body metabolism was already used to this routine. 

 When I returned back to my exercises, for some month, I would struggle to go on one of the Saturdays and then skip or miss out on the remaining three Saturday in the month. By the second month, I would miss out on all the Saturdays and then by the third month, I would keep to just two of the Saturdays. I ended up confusing my body metabolism as it tries to build a pattern around my exercise routine. I struggled really hard to maintain consistency then, I realized that the gains I had on the first Saturday in terms of building stamina and endurance were all gone. Rather than building on my last gains, I ended up starting all over again a couple of times.  In the words of Sir Anthony Robbins “It is not what we do once in a while that shapes our life but what we do consistently”. 

When you start to code, coding one hour every day is far better than coding 20hrs in one day once a month. Your brain would struggle to assimilate and struggle to build a pattern of what you are trying to learn. Eventually, by the second or third month when you return, you will have to start all over again rather than building on your last gains. 

Lesson Four:  Practice mix model of learning 

Aside from me engaging in the 15km jogging, I also do other forms of exercise like sit-ups, push-ups, skipping rope, friendly boxing, stretching etc. I try to make all the muscles and joints of my body to have a feel of my exercise no matter how little rather than just engaging in just one form of exercise every Saturday. 

As a beginner into programming, it is not out of place for you to start out with video tutorials. If you remain on just video tutorials alone, only a part of your bran would be developed.  

No body becomes a plumber just by watching a video tutorial on how to fix the broken pipes in your kitchen. 

More so, learning to code with just video tutorials alone will give you a skewed opinion or understanding of that concept because the video instructor will only teach or explain the things or the part, he or she wants you to know. To improve your skills, adopt the use of video tutorials, Pdf books, documentations, Google, StackOverflow, reading the code base of others even if you don’t understand it. All these would increase and improve your mental model and make you a better developer. 

No alt text provided for this image


Lesson Five: Be Agile or Flexible 

When you engage in different types or forms of exercises such as outdoor, indoors or even a combination of both, over time you would observe that your body will be very flexible, your breathing would improve, your heart would pump blood well, your body metabolism would find it easier to break down whatever you eat and all that. It will be a lot easier for you to move or carry your body any day any time because your body is very flexible. So also, when you use different materials such as a combination of video tutorials, Pdf books, documentations, Google, StackOverflow, reading the code base of other, your brain and mind grows really fast, your brain becomes very flexible to tackle any coding challenge that you may be facing because you understand the concept from different point of view. 

Lesson Six:  Consistency, perseverance, and showing up 

When I returned back to my exercise, at the initial phase, I didn’t just drive myself to start jogging the regular 15km that my body was already used to. Whenever I miss a Saturday, by the next Saturday I usually won’t drive my body on the 15km run at a stretch rather, I will do say a 5km the first time and then next Saturday do a 10km then by the 3rd Saturday I would do a 15km. This will continue till am able to maintain my momentum as my body system get acquainted to it again. I found this very essential as I tried to return to shape, endurance and stamina for the 15km run. It will be harmful to your body if after missing a few turns you end up driving your body to go on your normal routine in my case a 15km run just on the first day.

No alt text provided for this image

Usually, you should practice the tip above. Same thing applies to when learning to code. It is normal to find beginners into coding for the 1st time to stop coding upon facing a little challenge. At times they would stop to code for a week, at times months then return to it again or never return. Whenever you left off from learning a particular difficult concept or task, don’t just continue from where you stop, rather try to go back a little to a related but simpler concept as a refresher. This will give your mind and brain a soft landing as you move back to the difficult concept. Be determined to open your laptop daily and code even if it is for 15 minutes daily. Consistency, perseverance, and showing up matters most than the time spent.

I hope you find this article useful on your coding journey. 

Do you know anyone who would like to improve his or her coding skills while engaging in a physical exercise? Please share this article with them. 


Nkem Obodoagwu

Electrical Design | Power System Engineer | Project Management | Renewable Energy |

4 年

Beautiful?

Clifford Ogun

Electrical/Instrumentation Engineer

4 年

Nice write up. Thanks for sharing

Desmond Okeke

Software Engineer

4 年

I can relate to this... Very apt...

Hafsah E.

Frontend Engineer || Technical writer

4 年

This is very nice and insightful. Thank you Daniel.

Hilary Chukwudi

Software Developer

4 年

Sedentary lifestyle describes a software developer's career practice! What better way to mitigate the health risks it brings other than proper exercise. This article is apt not just for software devs but everyone whose job or activity requires prolong sitting.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了