So you've been using the internet competently for many years of your life and you've become interested in programming --- great! However, you're probably a bit unsure what you should be doing. In this blog post, I hope to inspire you to get in there and just dive into programming and to give you a few tips to get started. Read on!
This is not going to be programming language specific and nor should it be --- instead I hope to talk in a more general sense about how to go about developing a programmer lifestyle.
Step 0: Motivation and Goals
The first and most important thing to think about when you want to start programming is why you want to do it. If you are trying to learn how to program purely because then someone else wants you to or if you want a job as a programmer then just be cautious as you will suffer dearly if you try to force yourself into the mindset of a programmer without any real motivation.
The best motives are things such as:
- Wanting to build something like an app or website (more on this later)
- For the pursuit of knowledge and curiosity, to test oneself
- To understand how something works. How does a website actually appear on your browser?
This list is not complete in the slightest, nor should you feel deterred by having a reason not mentioned. I am probably missing a lot after all. My point is, you should at some point want to program. You will stay up late for days on end and spend hours looking at the same pieces of code only to figure out what's wrong and you will hate it. But, it all becomes worth it in the end and the feeling of fulfilment is what keeps you going. There's always some way of solving something, you just need to keep at it. If thinking hard and googling a lot of technical questions and deciphering technical answers doesn't sound fun to you then you're right --- its not. What is fun however, is realising that you're learning and that you have benefited from your struggles. Trust me, it is a rewarding hobby (job, whatever).
Finding out why you are wanting to program is the key to unlocking the next step, so please think hard and reflect on your own motives before trying to further yourself.
Step 1: Getting Started
Now that you have confirmed that this feels right to you, the next step is to think of a stepping stone towards your goal that is both achievable and interesting to you. I am trying to make this article about recreational programming in the sense that I want to inspire people to program not just for uni or work, but for themselves.
This step is hard to talk about, so lets break it down a bit:
1.1: Beginners: Learning to code
We all have to start somewhere, and for the people who have little to no programming skills then this is the place! The fact you are reading this very sentence proves you are nerdy enough to have business with the computing world. After you have read this section make sure you read the other sections too, particularly step 2 onwards which provides advice for everyone.
Below are a few suggestions on how to get started programming. Think about your goal, do a bit of googling and find what languages you should be learning. DO NOT try and embark on a big project, whatever you do. The most important thing for you right now is getting knowledge, not projects, under your belt.
- Code Academy for learning the basics of many languages. I highly recommend you at least have a go at a language that you've found to be necessary to meet your goals.
- CS50 Harvard University allows you to actually audit their computer science course! They allow you to do assignments and watch lectures through EDX, which is pretty amazing. Be aware that while they may still be working with C it will still be beneficial to you. A lot of knowledge is transferable across languages!
- Learn through doing. Sure, take out a book from your local library or watch YouTube videos but make sure your fingers are on your keyboard. Trust me, the people who don't type and just sit there during university assignments never learn as much. That's why the above 2 links are great as they are interactive.
- Google it! Do not be afraid to look up how to do something. After self teaching so much (including how to set up this blog) I can testify that the internet is indeed your friend. Most of the things you learn will be copied from other individuals.
- Code Avengers is something I have heard but have never tried. I'm just listing it here for completeness.
Note: If you are wanting to learn web development then you need to be more specific. Do you want to learn networking and how to set up the websites in depth, or do you want to be a front end developer (the part of the website people see). If you are interested in the latter then your mind has to be as creative as it is logical and there will be a lot of competition. Best of luck!
Remember to read the rest of the article to get a feeling of the world of programming. You never know, you might be ready for the next step already!
1.2: Knowledgeable: Applying Knowledge
This section is for the people who have already learned how to program in some way who either do / have done it as part of an academic course or for work, but do not know how to transfer their skills into something they want to do. I like to think this is what sets me apart from some people at my university as I really enjoy working on things in my spare time and I love learning. Sure, we all learn how to program as part of our course, but I'd be lying if I said that when we were asked to make a game we didn't stand out.
The key to becoming a better programmer is to actually do something instead of browsing /g/. Same as before, here are a few things you should try out. I'm not going to talk about learning programming, I'm instead going to talk about applying it in different ways.
- Contribute to other people's projects. If you are not familiar with GitHub then please read the section coming up. It is vital for any programmer to use source control and GitHub is one of the best.
- Make something. Take a language you know (or you don't know --- plot twist!) and try and make something neat. It could be beneficial to mankind or just a proof of concept.
- Get inspired by others. A lot of programmers blog or have some space on the internet where they show off their achievements. I'm not saying you should feel bad for not achieving much if that's the case, I'm just saying that looking at the success of others can make you feel more productive and give you the nudge you need to become productive.
- Communicate with other programmers of different skill. Talk to people who are weaker and inspire them and similarly talk to people who are better than you and feel inspired from them. Try Gitter, a place where programmers can chat and collaborate. For instance, I wanted to learn MonoGame and so I took to Gitter to ask for advice and if I ever got stuck I had people who enjoyed solving issues.
- Try Linux. Sounds really stupid I know, but you don't know how many new programmers just use Windows and Visual Studio. Get Linux and start simple with Ubuntu or something. Then, learn Vim or Emacs (I prefer Emacs with Evil Mode --- the best of both worlds!). You will learn how to program more efficiently and love using your keyboard over your mouse. Additionally, you will learn how to compile programs without an IDE, how to work a computer with just a terminal (perfect for servers!) and finally why so many people love Linux for programming.
Step 2: Embarking on a project
Now you need to consider what you're going to make for the time being. This is going to be different to your end goal and is going to be something specific to you. You need to really consider what you are going to get out of the project and whether or not you can actually accomplish it. Don't pick something too easy or too hard --- ideally you are going to learn new things by applying things you already know.
Making a game in whatever language you know is a great method of just messing around. Test yourself a bit! Anyone can play a game and so you should be able to show people and they can test and feedback to you. If a game isn't appropriate then pick something which you can imagine the end goal of. If you can picture how the program or website is supposed to look or perform and you have a feeling then you should start thinking about how you should go about programming it.
If you've taken any sort of class on programming you will have heard a the phrase "divide and conquer". This is essentially the notion of splitting up a large task into smaller, manageable chunks and taking it step by step. On the surface this is just some sort of life lesson. It is only when you think of it in terms of programming that it makes more sense; take any activity your program should be able to fulfil and think about the necessary steps required to make it happen. If you want some style points you should consider the system as a whole and try to group common functionality into classes and functions. If you don't know what I'm on about you should look up Object Oriented Programming.
If you really want to get serious or if you are working with other people, consider drawing a diagram of some sort or listing the different parts of your program that need implementing. You can then delegate these tasks to your team or simply visualise your progress as you go. Things like this are also great to post on the readme of your GitHub repository (more on that later) so that people who don't want to trawl through your code have some sort of visual indicator of how the program is coming along. If what your making is a website then make sure to include a link to your website somewhere on the actual readme so that people can look at it.
Step 3: Staying on Goal
To some, programming is hard. To others, it is cruel. While it may be both of these things it can also be neither. It is important to remind yourself why you're programming and to constantly evaluate your progress and interest. If you become bored or dissatisfied then simply look at another field --- the beauty of programming is that its a frame of mind; once you have it you can learn something new at an accelerated rate.
This section is about how you can stay focused on what you set out to do. What's the point in starting something if you don't reach a point of success somewhere down the line? Having a set of tools that make programming enjoyable and easier are vital for survival.
If you need some insight in terms of the programming itself, feel free to check out my other blog posts. If in doubt, look what your compiler or your built program is feeding back to you, isolate the code that is making it function that way and fix it. Don't EVER let a problem halt a project. If there's any reason to abandon something don't ever let it be some sort of bug or compiler error. In face, these are the things you should be craving as you will develop your skills as a programmer, debugger and a researcher all at once.
3.1: Github
I've talked about this previously and I'm going to talk about it again. Any programming enthusiast needs source control and a space on the internet where they can see what they've done.
What is GitHub anyway?
"GitHub is a development platform inspired by the way you work. From open source to business, you can host and review code, manage projects, and build software alongside millions of other developers." In English, GitHub is a space where you can upload coding projects and collaborate with other people easily. Even when working solo having a code repository is crucial. If you make a mistake or if your computer fails then there will always be the last "commit" online.
A commit is essentially a snapshot of your program. The reason GitHub is better than something like Dropbox is because of the fact that it is intelligent to notice changes in your code. It only uploads and downloads the new code (a massive time-save with large projects) and summarises the commit with a helpful message along with the lines that have been added and deleted. I'm not going to go too much into this, so please read this and get started NOW..
Another thing to note is that if you work in multiple places, with multiple people or on multiple machines, being able to download what's new and upload your progress (while automatically merging your work with any made by collaborators) is an amazing routine to get in. It keeps everyone and everything on the same page while also keep a log of every change to the project.
Why would I want people looking at my code?
Firstly, you can make private repositories if you really want to. It requires a subscription to the paid GitHub service, but students can get this for free. I would suggest however, that any project containing non-sensitive info should be public. Why? Well, firstly other people may want to help you out by suggesting fixes, more secure / semantic functions or by simply reporting bugs. Secondly, it will show that you're an active programmer. Anyone (including potential employers) could look at your public repo and see exactly how much progress you've made.
If seeing you work on your own projects isn't enough, then simply using GitHub can sometimes be a deal-breaker. Source control is very important to serious developers, the last thing they want is to hire someone with no knowledge of committing to a repo.
Don't be worried about people stealing your code. It is much more of a benefit to you to be open and honest about what you have created than it is to be paranoid and making everything you do private. If you're a business or you're planning on monetizing something then make it private, go ahead. But as a small, hobbyist programmer be a little more real and realise that 90% of the people on GitHub could probably make something better anyway --- they won't care about stealing your code. Instead, they will help your code become better! If stealing code was a problem then people wouldn't go public with the majority of their repos.
Why GitHub and not another source control service?
Please shut up and just use GitHub. While there are many valid services out there, GitHub is extremely popular and most programmers use it. If you're only looking for source control then maybe looking for a service that offers free private repos would be in your interest, however do not underestimate the importance of others reviewing your code.
3.2: Upgrade your setup
I cannot stress this enough. Learning the Vi keyboard shortcuts has been a mini-challenge and has helped me enjoy programming even more. Sure, it slowed me down in the beginning but now I am comfortable with navigating any piece of software that supports Vi shortcuts (or Vi emulation plugins) without a mouse. Adobe Brackets, Visual Studio, Google Chrome, GitHub, Googlemail all use / can use Vi shortcuts and it is FUN.
Playing this simple game, Vim Adventures really helped me get started. The gif I made doesn't really do it justice, but seriously try it out. I didn't understand why it was so popular until I started coding with it and wow am I having fun. Notice I am talking about fun here --- it may take a while for me to be productive enough to make this effort worth it, but the fact that I enjoy merely typing is a big boost to my productivity.
Why do I keep going on about a text editor? Simple: I enjoy adapting my editor to look and feel cool and unique to me. As I type this it may not be the most amazing emacs.d it is my own and I'm slowly learning how to make appeal to me. People use emacs as a web browser, as a note taker and as a text editor that can be extended for any language. Trust me, its really neat and if you use Linux or a Mac I'd honestly give it a shot. I will probably make a blog post on how to get started with it, but a bit of googling should help. Note that there are some amazing plugins that allow you to use GitHub within emacs, reinforcing that GitHub is important!
If you're on Windows then to be honest you are stuck with Visual Studio for most of your coding needs. I have to admit, you cannot really do much better. If you really wanted to, try using a virtual machine and run a Linux distro so you can see what I'm talking about. You can also look at editors like Adobe Brackets, Atom and Sublime text if you're working with code that you don't need an IDE for (Web Development) and you're on Windows.
Just in case you didn't know, an IDE is a piece of software that can compile and debug your programs easily in. Visual Studio is probably the best thing on Windows, but there are other IDEs like Rider by JetBrains if you're working with C#. Note that JetBrains have lots of cool IDEs to look at if you want a change to Visual Studio or if you're on a different operating system.
If you're doing games development like I am, try a new engine (or if you haven't tried it, try making your own!). When I first opened up Unreal in January I was a little confused, but I slowly learned. After making a game with it I now understand why I enjoy the challenge making a game in pure code. Just a preference, but having more engines under your belt doesn't hurt!
Step 4: Network
Another thing I wanted to mention is how important it is to stay social about your hobby/goals. Tell people what progress you're making and what you want to do next. If they're a programmer also then you can also show them your GitHub repo and talk about how you implemented certain features. Speaking personally, people wanted to know how we made our level 'explode' (shown in the gif in this post).
I previously mentioned Gitter to be pretty good at getting in touch with people. If you haven't guessed already, it has integration with GitHub! Anyone you speak to on here not only has their own stories, motives and goals but also the repositories to go with them. Find a Gitter room that is related to your project and just chill.
There's obviously more than Gitter out there. There's the usual Reddit for sub-communities, /g/ for discussions and even Discord servers for when you find a community that has one. I am personally in a Gamesdev Discord and a Webdev Discord and have used both thoroughly.
It is important to talk to people --- even if you don't know them. You will learn how people who are stronger programmers than you are operate and how they would go about something you're trying to do. I have made a HUGE point about GitHub in this article as frankly I'm appalled at how many people on my course do not utilize such a useful tool. Most of the people you talk to will have GitHub profiles so hopefully if I haven't convinced you then the rest of the programming world will. Seriously, just try it if you haven't already.
Step 5: Finishing and Maintaining
Not many people choose to do these things, however if you do have a repo on GitHub you should try and make sure you keep a version that is working as intended committed. If you want to go in-depth, create a development branch so that any commits you make do not affect the master branch. Then, when you have a new, stable build, commit to the master branch and everyone's happy.
The reason I am talking about the end of a project is because it is awfully tempting to abandon a project once you have learned what you can from it. Personally, I have stopped work on Sprinty ever since Uni started again. It works, sure, but I wish I actually continued it, added new things and ported it to Android like I intended. I am probably never going to actually finish this, but it would be awfully impressive if I did. If I wanted to work with Monogame more, I would, but right now my attention is on SDL, which is essentially Monogame but C++.
If you do manage to finish a project then you should do everything in your power to maintain it. Let's say you made a plugin for some software, or an extension to make a website better --- if that website or software changes in some way then your program breaks down. Maybe no one will care, but if someone was to check out your portfolio and find something broken without you giving a good reason on the readme then it may make you out as someone who doesn't test their code thoroughly.
Wrapping things up
I hope this post has been somewhat helpful. I think more people who have programming jobs or who program as part of a university course should try and embrace programming as a hobby as well as a job. I may not be a professional (right now) but apparently I'm pretty good at picking up new things and teaching people what I know, so hopefully now you know just as much as I do about how to get started with doing.
If you are really, really new to programming and you found this article dissatisfying, let me know. I chose to focus on the people who have some knowledge as its very common for people to create tutorials about the extreme basics of programming --- its easy and everyone who programs understands it. The hard thing to talk about is the grey blur between learning about what a function is and how to make a game purely out of code using DirectX, for instance. There are many places out there that will teach you how to code, and I hope that once you have any sort of grasp on it you will think about the things I have talked about and get started with making something for yourself!
Top comments (0)