Programming at school
Tags: beginners, programming, discuss, career
Published: 2022-04-09 08:22:13

My first time programming was in a high-school classroom, on a piece of paper. I distinctly remember the teacher whose favorite way to give a task was by saying “Write a program..” to do X. It usually was a small program to teach you a topic and practice programming.

For example, Write a program to see if a string is a palindrome.

Then he’d spend a few minutes explaining what palindrome was and then some logic we can use. On a board, he’d write using a lot of shortcuts. The languages were java and some famous ones were, “SOPL(System.out.println)”, “WAP(write a program)”, and “ISR(InputStreamReader)”, “BR(BufferedReader)”. 
All questions were so similar that we were usually told to write the program ourselves up until ISR/BR and then he’ll explain the logic.

This was very different than other classes, there was not a lot of information to digest and remember, just some logic to understand. It was almost like maths but without the need of so many formulae that you can’t even clearly see the logic. By the time I learned that maths also has logic that applies to similar problems it was too late for me.

In those classroom days, every subject was about remembering stuff, but programming was different it was about coming up with a clever way to do stuff, so for someone like me who hated memorizing stuff just for exams falling in love with programming was, to quote Spock, only logical.

This was before I had a computer or laptop, I had seen and used one in past at a friend’s house or in a lab at school but I had no way to go home and actually see if I can do this stuff on a computer, to actually see if it works.

One day, the teacher and I had an argument. In his usual fashion, he asked us to write a program to print a pattern, it was somewhat like a triangle made of stars and because we have been practicing I knew we need to use 2 for-loops.

After I was done writing the solution on paper, he came over, looked at it and said, it's wrong. I asked him why and he didn’t say why. This was my first experience with a shitty compiler before even knowing what a compiler was. 

> I must tell you before I continue, that this teacher was really one of the best ones I’ve had in my life, even though that interaction is bad, he actually motivated me a lot, guided me, and instilled a passion for programming and logic in me. For some reason, because he never cared about the whole program or whether he imported a library or not, most of his programs began with a statement, then a quick explanation of the topic, and then the logic that will come after ISR/BR. He taught me to focus only on the logic and not the actual semantics of the language or the tool, which to this day is the best tool I have in my arsenal.

Back to the argument. After the interaction with the shitty compiler, I tried to debug my code, going through iterations of 2 for-loops, trying to see what it’ll print (also, something that he taught me) and I could not figure out what was wrong. Since the teacher wasn’t going to tell and because we didn’t have open access to the lab, the next time I will be able to run it and test it would be during the next lab hour probably after 15 days, while we have to test some other program as well. This motivated me to figure out how I can find a way to run the program somewhere else.

The first stop was finding the java installer disc and convincing a friend with a computer that it is a good idea to install it on his computer.

> Sidenote: while we were installing it his father had already given around 20 dollars to an email claiming that he have won a lottery by a random draw of emails. (Another story idea: My father always taught me about scams and how to never trust someone when they say you are lucky)

It took a few hours to actually install it, this was before I knew we could google our errors, in fact, the internet was not readily available on this computer and you’d have to search it on a 2g Nokia phone, on a small screen and try to understand what it said. It was a nightmare.

But we were able to install it and run a hello world program. We were overjoyed by something, that by today’s standards feels like a very simple thing to do, but I guess most students when they see setups/installers, missing DLLs, drivers for the first time also think it's a huge ordeal.

I don’t remember if I ever ran the program and found what the error was, somehow it didn’t matter once I achieved something bigger like installing and running java. The program did haunt me for years and if I have to say what I was best at the end of high school, it was printing patterns in java. I gave it all and got very good at it. Today I know that I am motivated by things that I cannot do, or fail clearly. Somehow it pushes me to keep trying until I can do it so well that I don’t care about it anymore. This is the reason I fell in love with bouldering the first time I tried it.

I guess that is the secret tool that I have been developing for years that helps me call myself very good at debugging and making things work. Because when I face errors, I try to see why and I keep trying again and again until I succeed.

There are cons to this as well, which I learned to balance recently, like trying too hard without taking a break, not asking for help, etc. But I can say that over time the pros outweigh the cons and you have to learn to avoid those cons any way to be a successful team member.

{% twitter 1509447810093101062 %}

## Footnotes:
I always wanted to write about my life and how I became the developer I am today. But I am not good at writing so if you read this, please tell me what I could’ve done better. I do have many stories that I want to tell and would love to write them in a way people will enjoy.