Study Gale.

Escaping the console

17 Jun 2023

What we learn in class is great, foundational knowledge. However, it would take far too long to learn to write programs that do more than just output something into the console if you were to wait until it is taught in a course. Students should take the time to explore and apply what they learn in class to side projects that more closely resemble real-world software.

This is for students who are starting their venture into creating their own personal projects that may need a little push in the right direction. If you’ve ever looked at products or other’s projects and thought to yourself “How did they do that? If I were to do something similar, where would I even start?” then you’re not alone. I was the same, in fact, I still am. The best way I can explain it is that you need a good mental model of how things work to get good at creating software, whatever that means to you. Starting out, your mental model might be very fuzzy if not non-existent. As you gain exposure to various knowledge from practice and learning, you’ll gain a clearer picture of how it works, and you’ll be able to focus on more advanced topics as you go.

You don’t really start from scratch

Say you are like me, interested in creating a website with more than just HTML, CSS, and JavaScript. The reality is that you’ll need a lot more than just small little scripts/programs to get your website off the ground. For example, a very basic thing you will need is a server, a local one to use for development rather than hosting. Do you know how to make a local server? I sure don’t. Maybe we’ll both figure it out in the future. In the meantime, we’ll use software that was already created to quickly achieve our short-term goal of creating small side projects. Hopefully the long-term goal is to turn all that seems like magic into abstractions.

Starting out you’ll heavily rely on frameworks and libraries specifically designed to tackle a problem. For example, I used the Django web framework to create my first “full-stack website” (it didn’t do much other than CRUD operations). It’s a batteries included framework, meaning that it provides many solutions that you may use during development, built right into the framework itself. For example, it automatically creates an admin page for your website, has its own ORM software to query your database with Python rather than SQL, and so on. You too will most likely rely on many frameworks, libraries, and projects to build whatever it is that you are building.

However, it’s important to keep in mind that you are most likely going to start using these more like clutches rather than tools. I was proud when I made my first website, but it was a trash pile that was extremely finicky. In the end, if I were to modify anything in the code, the whole thing would stop functioning. This is because I did not really know what I was doing. I was just mashing things together that I got from the documents, hoping it would work. Don’t just get good at using a tool, get good at understanding the underlying mechanisms that make it work.

Anyhow, get familiar with the package/dependency manager of your language of choice and search to see if there are any popular frameworks or libraries used in your field of interest. Install a few, read their documentation, and get to coding.

Tutorial Hell is real

It’s hard to come up with good ideas for projects. In all honesty, I don’t think most beginners will come up with any good ideas for their first few side projects, that’s fine.

I’ve seen suggestions online that say to just follow a tutorial of something interesting and call it a day. This is ok if you’re still learning the language, framework, or library. The problem in following tutorials, however, is that you only learn on a shallow level, and it doesn’t look that good on a resume either. That said, not everything you do has to be done towards crafting a great resume.

Following tutorials helps get a quick glance at what’s possible and the workflow of the tools you’re working with. However, being hand-held and guided through the process of building something stops you from formulating a mental model of how the language or framework you are using actually works. You’re missing out on the entire decision-making process. When you are faced with a problem such as “How do I achieve XYZ?” You do not have to find a solution; it’s already in the tutorial for you. If you’re just starting out, maybe pick up a tutorial-styled book. I used “Django for beginners” by William Vincent. Afterwards, I recommend refraining from leaning too much on tutorials, or you won’t exercise that problem-solving muscle of yours.

You should strive to create something using just what you know already, and what you can gather from the documentation and searching debugging-styled questions. In doing so, you will be – either explicitly or implicitly – forming a mental model of how the tool you are using works. You will then write code based on your mental model. If it works, then your mental model is correct (or hasn’t led you to an error yet). If it doesn’t work, then your mental model is incorrect, and you’re left with the task of figuring out what’s wrong. When you go through the trials and tribulations of figuring out why, you’re likely (if you’ve been paying attention) to come out with a better understanding of how whatever it is that you’re using works. That is, a better mental model of your tool. This is not something that you gain from following a predefined problem in a tutorial.

When inspiration runs dry

So, we’re at the main problem: we don’t want to just follow a tutorial, but we don’t have original ideas for a side project; what to do? The cliché, but valid, advice is to introspect and find out any problems that you face and devise a solution for your problems and code it. I found that most problems I can think of are hard problems, hence why there isn’t already a solution for it, and I don’t have the skills yet to code it.

What I’ve come to settle on is to simply challenge myself with each project. We tend to know pretty well where the bounds of our skill are. We can think of or see other’s projects and know whether we would be capable of making something similar. So, the main task is to find a skill, behaviour, or technology that we aren’t familiar with and practice it.

As an example, you may start with typing up a simple static website using HTML, CSS, and JavaScript. Next, you may want to challenge yourself with creating a more dynamic, yet still technically static website. With a bit of searching, you’ll find that using a templating language is great for this. Next, you’ll try to create a truly dynamic website that uses server-side scripting. This will open doors to working with sessions, cookies, polling, databases, APIs, etc. It doesn’t matter how big or small the project is, what’s important is that you’re isolating something that you don’t know how to do, then beginning to learn how to do it.

Avoid perfection, embrace iteration

The amount of time I’ve wasted on thinking of how to do something right on the first try. Avoid that at all cost. Trust me, you’ll gain nothing from overthinking about what frameworks to use or what things to learn first. As a student you’re better off studying all aspects of computer science and getting exposure to all fields in software development. It’s not a waste of time to try something and learn that you hate it; better to know now than two years into your career.

If you think about it trying to get things right early on is a premature optimization. Instead of getting started and learning the fundamentals, you’re spending time worrying about insignificant things that won’t matter in the future, since you’re still just a beginner. Consider this when you come across sites online that suggest it’s useless to use languages or frameworks that are old or not popular anymore. Skills transfer, and what you’re doing now is gaining foundational knowledge that will serve you wherever you may end up.

Time is the only currency we have no control over, and hard work is the only currency we have full control over. Don’t worry about the acceleration of your learning. Instead, just make sure that you invest some energy into trying your best, because that’s hard work.