Elijah's Blog

Becoming a better programmer
Becoming a better programmer

When I was younger I played a lot of different sports, from football to Tennis to speed skating. Nowadays, I get my exercise from the gym or walking to the train station. I’ve also been programming for around 6 years now and the libraries I used when I first started are much different than they are now. In fact, a lot of the developer community has changed since I started programming.

When I started off learning how to write code, I was in fourth grade. I went to Barnes and Noble where I picked up a book on HTML and CSS. At that time, all my friends were using AIM but my parents wouldn’t let me get an account. I didn’t really know what I wanted to create with HTML and CSS but I knew I wanted to create something that I could use with my friends. In fourth grade, like most kids, I had to create different posters and other graphics for school. My dad taught me how to use all the Microsoft programs including Publisher. The program actually had a way to export a document you created to HTML and in turn, a webpage. I would spend hours on my family’s old Dell laptop trying to create a cool webpage. This included googling endlessly for creating a login form using only HTML. Of course, at that time, my web development knowledge was all visual. I thought what you see is what you get and somehow the login just “magically works”.

Getting nowhere with Publisher, I ended up finding Weebly and Wix. These are online tools that give you a “what you see is what you get” (WYSIWYG) editor to create a webpage, without having to worry about how logging in “magically works”. Using this got me pretty far for creating my website. My favorite part was that Weebly actually had a chat plugin, so I could invite my friends to my website and we could chat after school.

Fast forward to high school, I had pretty much forgotten about programming and writing code. I started getting interested in movies and visual effects. When I was a sophomore I had the opportunity to start taking college courses full time. During that time, I decided to take an introductory programming course in C++. I thought, if nothing else, it would be interesting even if I was going into the film industry.

After finishing that C++ course, I had a much better understanding of not only how computers and software work, but also how programming allows you to do anything. This was also around the time that the first Iron Man movies came out; my friends and I thought JARVIS was the coolest thing ever. With my new programming “skills”, I decided to try to build it.

In order to build this advanced AI system, I knew C++ would only get me so far, mostly because my programs so far you had to run on the command line. I wanted the interface to have a nice design. I started making some mockups of what I wanted it to look like using Photoshop. I was able to find the screenshots I took from back then.

After coming up with these screenshots, I realized I needed to start building this. I was very lost on where to start so I remembered back to my fourth-grade experience and decided to start re-learning HTML, CSS, and now Javascript. I found Codecademy as a good free option to learning how to program. After starting their HTML and CSS course, I realized how tedious writing CSS and HTML was… I felt there had to be a better way; this was programming after all.

A couple months beforehand, I had done a Ruby on Rails tutorial so I thought Ruby might be what I’m looking for. At that time Codecademy didn’t have a Ruby course, but after some googling, it turned out Python was pretty similar. I dove into the Python course and quickly found how different dynamically typed languages are from statically typed ones.

Again, I was a very naive programmer so I spent many hours googling very strange things. “Pass variables by reference in python”, “Pass variables by value in python”, “how to compile python”. Looking back, these make me laugh but made sense at the time since I only had C++ as a reference. After completing the Python course in Codecademy, I wanted to know how I could apply it to web development. I found the Django web framework and started doing some tutorials, I still didn’t fully understand most database concepts.

Being frustrated by Django, I went back to Codecademy and started an API course for NPR. I didn’t understand what an API was, but after completing the course I found out. I realized that an API can do a lot of the heavy lifting, and was a great interface to applications that I wanted to use. For my JARVIS project, I knew one thing I wanted to show was upcoming movies and be able to ask if a movie was released yet.

After more searching, I found “The Movie Database” which had an API allowing you to search for movies. I thought, “Great! Now I can setup the movie part of my JARVIS application”. When I started using the API I realized I still didn’t know enough to start building the full JARVIS application, QT was just out of my league. I was really frustrated, I had spent all this time learning all these different concepts but I couldn’t figure out how they all fit together.

A few days later, something clicked. I’m still not sure what gave me the insight, but I realized I should just try to create a web application using an API (so I wouldn’t need to worry about setting up a database). Since I had been playing with the movie API I decided to make a simple movie website that would show if a movie you were searching for was released yet or not. After many months of working on the project during my free time after school and in between work at McDonald’s I finally had a semi-working website.

http://iioy.zumh.org

It looked awful at the time, but I was so proud because I figured out how to use jQuery to make the search actually search! Then I realized I had another problem, how do I actually put this on the internet… the thought hadn’t really crossed my mind. After many more weeks of trial and error, I deployed the first copy of the website to DigitalOcean using one of their premade Django droplets. I didn’t know what Git was at the time, so I used SFTP to upload all my files to the server. The server is also where I did live editing of the source code to make it work.

Finally, the website was deployed. I was so happy being able to show my friends and family that I had my own website that worked! I’m almost 100% positive it had some awful security vulnerability too.

As the years have gone on, I’ve rewritten my movie application three times and am currently working on the fourth complete rewrite from scratch. You may be asking yourself, “why would you do that?” The simple answer is “practice”. In sports, you practice every day to get better than you were the day before. There are also clear benchmarks of your performance: the number of touchdowns scored, races won, etc. In programming, tracking your progress as a developer is a little harder. Sure you can gauge it by the job you have, and if you get promoted to a fancy new title with “Sr.” in front.

A wise colleague of mine once told me that titles are “bullshit” and I think he was right. The way a company sees you and the way you see yourself should be different. As your tenure at a company grows, you will be seen as an expert even if you’re not actually growing as a person or developer. This is why I’m rewriting my movie application for the fourth time. When I look back at my code from the second and third rewrites, I can’t believe I thought that’s what good code was. I also know that a couple years from now when I look back at the code I’m writing now I’ll think the same thing.

I’m scared that one day, I’ll look at the code from years ago and still think it’s good. If this happens, it means I’m not growing as a developer. I want to be a better programmer than I was yesterday. Even though the general idea of my movie application is the same, I think of how I can make it better, more secure, and performant. How can I take what I’ve learned in the past three years and make this new code the best I’ve ever written?

At the time I’m writing this, I’m not sure where it will land. I may never finish the rewrite and give up because I’m lazy or discouraged. I hope that won’t be the case.

In closing, I would encourage everyone who is just starting out programming to not be discouraged by the small road bumps you face. There will be much bigger ones down the road, so learn how to effectively deal with the small ones. Lastly, always practice. Programming is an art, a sport, and sometimes magic; the more you practice the better you will be.


New website is live at https://iioy.zumh.org and the code is open sourced at https://github.com/tizz98/iioy-v4.

Newer
Older