My Coding Journey (part 1)
January 2020
As far as I remember, it all began in January 2020. I was curious on how webpages work and I was interested to learn how to also make them.
And it was also at that time that I saw grade 8 students writing some gibberish phrases in the library, and when they saved and reloaded the website, they got pretty interested at the result the code gave. And so, I picked up the motivation needed to learn those weird looking code. Then, after that, every time I would go to the library to learn how to code in HTML. And after I’d learned enough of it, I showed my classmates how I could change the text of a website.
I used to know less coding back then. When I used barebones HTML, my creations were not as good as the ones made with CSS. So, I learned how to style elements I coded on the page.
And, for all honesty, CSS was one of ”the most clear”, and just one of the ”most downright confusing” as the codebase grew. And most of the time, I was just “using plain css”. CSS is a styling language that follows the principle of cascading. The style that was last declared in the file or <style> tag is the one that applies to the different styles.
Of course, CSS doesn’t end there. It also has ”specificity for styling elements”. And it was such a mental overhead that I tried to quit web development. This is because as soon as your CSS grows, it will be (almost) hard to manage. But fortunately, with a little organization and effort, I could make small projects.
February 2020 - May 2020
Then, on February of 2020, I stumbled upon Wordpress, a CMS or Content management system. In wordpress, you could basically design a webpage with a visual based editor rather than editing it by code. After realizing how much hours I’ve wasted in learning web development, I reflected on this question: if a CMS (Content Management System) can handle the whole website stuff, why do I need to code in html and css? And when I realized that I don’t really need to code html and css, I thought that learning it is useless.
That is what led me to quit making websites and start making desktop/mobile apps, command line interfaces, and so on.
And to make that possible, I tried using python for programming. Python is the first real programming language that I’ve learned because HTML and CSS are not programming languages. Python is so simple that it is easy to understand, and has a very minimal syntax due to it having little amount of keywords:
Example
a_variable = 20
def print_var(insert_arg):
print(a_variable) After learning concepts like Control flows and Loops, I then realized that this is too simple that it’s just not possible. The following is an example of a Control flow statement in python.
Example
a_variable = 40
if a_variable > 50:
print("a_variable must be greater than 50")
else:
print("a_variable could either be equal or less than 50") And based on the concept of control flow, if the first condition is not met, we move on to second condition and so on…
In the example above, it shows the result ”a_variable could either be equal or less than 50” because it’s clear to the programmers that the variable is literally not greater than 50.
After learning the ”simple” concepts in programming, I stumbled upon intermediate to advanced concepts of functions and objects, which in modern programming, is important because it can help you in solving various problems related to programming. For noobs, functions are just reusable blocks of code that are created for either not repeating a block of code many times, or just helping you do a certain task in which it returns a predictive outcome when you invoke or call it.
Meanwhile, objects are pieces of code that have unique properties and common methods for mutating or getting the properties. But, to construct an object, you need a class, which is just a blueprint for building an object.
It eventually took me 3 months just to understand these concepts.
Then, after I knew enough in coding a program, I tried to make a calculator app. I watched videos on how to make calculator with tkinter. And when I finished making my app, it didn’t look good. I think it just looks like an app that came from the 90’s. And so, I tried finding other solutions for making an app, but never really had the courage to try them.
And since, web technologies are readily available when you visit a website, I try making websites anyways.
June 2020 - September 2020
But this time, I was trying to make it more interactive. So, I tried learning Javascript. On the surface, it just looks like it’s python, but it is more complicated than that. In python, you get to use the ”=\=” to test for equality, but in Javascript, you use the ”=\==” equality operator and it kinda sucked.
What is specially hard in Javascript is accessing the dom. In Javascript, you have to access the dom because it’s hard to choose which type of dom accessing to use. I also got frustrated by the properties in it, such as styling and attributes. But luckily, adding click event handlers to a button is not a problem. And I tried making accordions, carousel from websites, and youtube.
And when I got frustrated with Javascript and dom, I really wanted to learn other languages. But since the online class was about to start, I stopped it for a while. Combine it with the fact that I got very distracted by anime. I just continued it in November.
Summary
- I learned programming concepts such as:
- variables
- functions
- objects
- Website styling and markup
- I familiarized with programming notations in javascript and python