Mortgages, Calculations and Python: a nightmare with a happy ending

Tom Ndex
3 min readApr 5, 2021

On my birthday, about a month ago, i decided to finally begin learning how to be a programmer or how to write code or how to understand how computers work, which ever one comes first. I had a clear understanding of where i wanted to end up and had already drawn out the map for this journey and even had a ridiculously ludicrous assumption of how long it would take me- one year from zero knowledge about computers only how to surf the web, netflix, windows media player and of course solitaire, to a self employed UX designer with full stack developer capabilities.

So I began at the start line CodeAcademy, (i had been paying the subscription for close to a year but never used it lol) it took me 3 weeks of daily study and 2 books (both probably written for 13 year olds) to understand the syntax, variables, strings, data types, functions, compound and conditional statements. By this stage my head and ego had grown to the size of probably a tractor wheel, I thought I was a programmer, that I understood the language of computers and that sooner rather than later I was going to be a programming aficianado, computer extraordinaire. Then i began the final lesson before the project at hand, a brief introduction into classes and object oriented programming. It was horrific, it was as if the lesson was written in sanskrit and my head was well and truly spun.

i didn’t go back to my computer for three whole days, I knew i wasn’t going to give up but at the same time i felt extremely stupid and very slow, bearing in mind I am a fully grown man the temper tantrums and near break down in tears where consistent. But as Jesus rose on the third day so was i going to tackle this project starting on that third day. The project — a mortgage calculator a way for people to calculate the monthly mortgage payment, total mortgage repayment and total interest paid. My resurgence was prompted by my third book on programming which introduced me to programming paradigms, suddenly i realised i had been, for all the 3 weeks i had been learning, thinking from a procedural programming paradigm and was now trying to complete a project using the object oriented paradigm which i had literally just dipped my toes into. I decided to stick to what i was comfortable with and to accept that my first project was going to be very kindergarten like and the code would probably be ridiculed by anyone who had any semblance of programming knowledge but I was comfortable writing it, I was comfortable reading it but most importantly I was comfortable thinking it, that was enough to take away from this project if there was anything to take.

I found that accepting my own ignorance and sticking to what i had so far learned made thinking like a programmer easier. I suddenly found it easier to see what i wanted my program to do in my head and more importantly how it would do it. It even mad using VCS and Github easier and on top of that made tackling the next phase of my education and initiation into the world of computers exciting and something to look forward to… well I’m hoping anyways

So until next time do amuse yourself with the amateur level code that i leave you with and please feel free to correct and add notes or just ridicule lol heres the link https://github.com/Tomndex/mortgage_project/blob/master/mortgage_calculator.py

oooohhhhh just realised this is also my very first Blog

--

--