Learn to Code
Programming is a great skill to have. It is hugely rewarding on both a personal and professional level, giving you the ability to build and tinker and invent. It can open doors to all kinds of career paths with great benefits, be it a respectable paycheck, freedom to work when and where you want, or all of the above.
It’s no surprise that more and more people, from all kinds of backgrounds, are deciding to learn to code. But, each person who tackles the task is soon faced with an unpleasant reality: Learning to program is hard.
Complicated and confusing, at first, much of coding doesn’t make any damn sense. Contrary to expectations, the feeling of “I don’t get it,” may persist unabated long into the journey, making once bright-eyed beginners feel hopeless, lost, and ready to give up.
The moral of the story is this: Be prepared. The path to programmer paradise and learning to code is a long one, and without the right mindset at the beginning, it can quickly lose its appeal.
In this article, I’ll attempt to give you some guidance on what to expect on your journey, how best to go about it, and what tools and resources you may find helpful along the way.
What to Expect
Maybe it’s obvious, but the first thing to make sure you wrap your head around is that programming, at its core, is a technical discipline. The earliest skills you learn will require a lot of “exactness” and “correctness,” and trying to cut corners will get you nowhere. You will have to learn at least a little bit of math, as well as a lot of things that might feel like math, such as procedural logic.
The point is, learning the foundations of programming takes a lot of focus and practice. However, countless people, techy and non-techy alike, have made this journey before you so do not be discouraged. As we will see, there is an abundance of resources for people just like you to help make the process as easy as possible.
The learning curve to learn to code is steepest in the beginning. There is a huge amount of “fundamentals” to absorb, including the various parts of a programming language (expressions, variables, data types, operators, loops, conditional statements, functions, classes), and the techniques for understanding how much of your computer’s time and memory space your code is going to use (complexity). You will write a lot of code that doesn’t work the first time, so you will have to come to terms with the bane of every programmer’s existence: debugging.
Once you’ve learned how to write code, you will be able learn how to write robust code. Making code efficient, easy to read and understand, and easy to expand on, is an art, and one that is constantly evolving. You will be able to start exploring different software philosophies, and go from simply being a “coder” to being a “software architect.” This is also a process that takes a lot of time and practice, but the better you get at it, the more you will find opportunities opening up for you.
How to Learn to Code
Each person’s journey to programming paradise is different, but there are some good principles that all travelers can benefit from. Here is the basic process I recommend if you are just starting out:
1. Choose Your Destination: Pick a Language, Any Language
If you are serious about learning to code, the language you pick really doesn’t much matter. Most popular programming languages share the same fundamental concepts, and by the time you’ve really gotten the hang of programming in your first language, picking up a new one will be easier than the first time around. If you are learning through a university degree program, or similar, your language will probably be chosen for you.
Here are some general notes on each, to help you decide:
Interpreted languages are easier to get started with. This is because their source code can be run as soon as it is written. In contrast, compiled languages require an extra step between writing and running the code.
- Extremely flexible syntax.
- Easy to get started with.
- High demand makes for well-paying jobs.
- The flexibility can obscure much of the underlying processes.
- Slow performance makes it a poor fit for high-end applications.
Commonly Used For
- Only option for in-browser software.
- Critical to every modern website.
- Extremely high demand equals an abundance of well-paying jobs.
- Complex syntax can sometimes be confusing.
- More challenging than Ruby or Python for beginners.
Commonly Used For
- Elegant, minimalist typing syntax is beloved by practitioners.
- Easy to get started with.
- Slow performance means poor fit for high-end applications.
- Poor scalability. Language design makes for problems in large applications.
Commonly Used For
- Web back ends. See Django.
- Scientific research and academics. See SciPy.
When code is compiled, it is converted from human-readable code into optimized machine code before it runs. The result runs much faster and more efficiently than interpreted languages. The compiler that does this must, as part of its job, make sure that everything that has been coded “makes sense,” and, as a result, it can identify and prevent many types of bugs that interpreted languages are susceptible to.
For this reason, it is harder to get away with mistakes or bad code with these languages. They will force you to gain a deeper understanding of what is really going on “under the hood,” and you will learn much more about how a computer really works. The price is that these languages are more labor-intensive, and typically more challenging to learn for beginners.
Compiled languages are used in applications that require performance and reliability, including embedded applications, which may run on hardware with tight resource limitations, and large, complex applications, where even a small bug can wreak havoc.
- Can deliver better performance than any other “high level programming language.”
- Will teach you the most about how a computer works.
- Probably the hardest to master from this list.
Commonly Used For
- Operating systems.
- High-end video games.
- Embedded systems.
- Robotics and artificial intelligence.
- Most widely-used language, overall.
- Strict typing forces a clear and efficient way of thinking.
- Complex syntax can be cumbersome to read and work with.
- Considered by many to be old-fashioned, monolithic, and approaching decline.
Commonly Used For
- Large-scale enterprise applications.
- Web development.
- Android development.
HTML and CSS: Not Programming Languages
It should be noted that HTML and CSS, which are used in pretty much every webpage that has ever existed, are not programming languages. They are presentational languages, used to define how something should look and what it should contain, but not how it should behave. Nevertheless, they may be a good place to start, because they are much easier to pick up, and will teach you how to type things correctly. In addition, if you plan to do any web development, you will have to learn them at some point anyway.
2. Start Small
Learning takes time, and there is a lot to absorb. If you try to build a complete application on your first day, it won’t work out. To spare yourself the frustration, start by solving small, simple problems, and work your way up.
For example, the first program that is traditionally written when learning a new language is the “Hello World” program, which simply prints the words “Hello World” to the screen. In most languages, it is almost impossible to write a simpler program, and clearly this program does little of actual use. However, it still incorporates many of the fundamental parts of the language, and so it is perfect for introducing oneself to how the language is typed.
From here, you can write something that adds or subtracts some numbers, then something that takes input from the user. You can then learn about conditionals, which are a way to make decisions, and loops, which perform repetitive tasks. Soon enough, you will be ready to build your first object, and at that point you can start to experiment with building complete applications.
3. Be Patient
The core concepts of programming can be quite challenging. Many of them are not at all intuitive if you don’t know already know how the computer works at a deeper level.
For example, when I was starting out, I found debugging to be an infuriating process; it didn’t feel like programming. Instead of writing new code that did cool new things, I would spend an entire day scouring something I had written, trying to figure out, “How did I f*** it up this time?” scratching my head and ready to give up. Eventually, I would discover I had left a single semicolon out somewhere, or used a tab instead of a space, and by the time I got my code to work again, it would be the end of the day. I would feel like a total idiot; it would feel like such a waste of time.
This sort of thing is going to happen to you, and it will drive you absolutely nuts. So, one of the keys to success is this: be patient, and go easy on yourself. Some of the best advice on the subject recommends focussing on the process, not on the goals. If you focus on your eventual goal (“I want to build a website by the end of June”) you will get discouraged, and feel like a failure. By letting yourself take as long as it takes to make progress, you will be more successful.
4. Practice Practice Practice
Like any skill, getting good at it really comes down to practice. There is nothing like doing something, to learn how to do it! Even if you can only spare a few hours a week, if you keep practicing regularly, you will, one day, find yourself knowing how to program. Eventually, you will develop an intuition for things, and something that took a whole day at first (like tracking down a bug), may now only take a few seconds.
When you feel like you have more or less gotten the hang of the basics of programming, a great way to get practice is to start your first project. Think of a simple application you’d like to build, such as a to-do list, or a calculator (again, start small), and give it a shot. This will teach you how to solve architectural and design problems, and build different pieces so that they will fit together into a working whole. These are the essential skills that will allow you to truly call yourself a programmer.
Depending on your goals, learning style, and means, you may want to use different resources along your journey. To help you determine what methods are right for you, here’s a quick summary of some of the tools you can use, ordered, roughly, from more structured learning to less structured learning.
This is the category of options that provide instructors, homework, tests, grades, deadlines, and real consequences if you don’t make your studies your highest priority. These are the options where you will have to go to class or flunk out of the program.
Formal University Degree
The most costly but, for many, the most valuable option, a formal university degree will give you the best foundation for a thriving career in programming and computer technology. You will receive recognition for your accomplishments in the form of your degree (a major leg up when entering the professional marketplace). But more importantly, you will emerge with a deep and thorough understanding of all things computer, and your abilities to write truly top-notch, effective software will reflect this.
Here are some of the things you can expect to learn in-depth from any decent university program, and that may be more difficult to find thorough instruction for elsewhere.
- Electrical Circuits – The basic physics underlying virtually all computer hardware.
- Digital Logic Circuits – How to represent truth and logical constructs with circuits.
- Microprocessors and Computer Systems – How logical circuits are combined to make a programmable computing machine. What’s happening on all those little metal pins and printed wires.
- Operating Systems – How to program a computer to manage, organize, and protect itself, and enable the safe operation of multiple applications.
- Databases – How to store and copy large amounts of data without losing it, corrupting it, or making it impossible to search through.
- Networks – How different and unrelated computer systems can talk to each other.
- Higher Mathematics – Including Calculus and Linear Algebra. Essential for any career in advanced or cutting-edge fields.
- Signal Processing – How to cross the boundary from the analog to digital worlds, and vice-versa.
- Numerical Methods – For when real-world problems don’t fit neatly in a computer.
Computer science and engineering school will kick your ass, and you will have to sacrifice and dedicate yourself to completing it. But the rewards will be well worth it. I struggled to earn my own degree, but the day I received it remains one of the proudest days of my life.
So-called “bootcamp” programs have emerged to fill the needs of those who do not have the time or resources to pursue a formal degree, but are willing to work hard, and at least learn the minimum necessary to start a software development career. In both cost and required commitment, they fall between a formal degree and the self-directed options discussed below.
Bootcamps typically involve 8 to 12 weeks of intense study and cost around US$10,000. They cover a lot of material in a short amount of time, during which you will have to sacrifice most other pursuits. But, they promise to prepare you for real-world software development, and put you on the fast track to a career in programming. Many bootcamps culminate in career days, or otherwise attempt to place you in a paying job soon after graduation.
Bootcamps are a relatively recent and explosive phenomenon. As such, it is still hard to measure their success rate, and many have yet to develop a proven track record of placing graduates in jobs. With that said, the available programs can only be expected to get better as this burgeoning new industry continues to grow. As long as you do your research carefully, you may find this is perfect option for you.
Most bootcamps are local programs, so you will have to see what is available in your town. If you live in a major metropolis, perhaps you can find what you’re looking for on this list, or this one.
More and more resources are becoming available every day for those who work best with an element of structure and guidance, but do not have the time or resources to commit to a formal degree or bootcamp program. These options are typically offered entirely online, and many are completely free! As the high demand for such services has become apparent, these tools have grown rapidly in sophistication and value delivered. Courses in software development have naturally driven much of this evolution, as learning and teaching software through software has obvious benefits.
So you want to be a programmer, do ya? These tips and tools will help you get started.
Massive Open Online Courses (MOOCs)
MOOCs are an amazing resource and are making major strides in leveling the playing field for quality, affordable education. They offer much of the structure and guidance of the world’s best formal university classes, but are available online to anyone, anywhere, who has an internet connection. Many popular MOOCs are also entirely free, although for an additional price (and commitment to studying), formal credit can also be earned for many classes, equivalent to university credits.
There are many first-rate MOOC platforms available online with courses taught by professors from the world’s most prestigious universities, and community platforms so that you and your classmates around the world can help each other learn. Here are some of the best-known providers:
Be advised that, as advertised, these courses offer university-level coursework, so you better be prepared to work hard to get through them!
Guided Tutorial Websites
If you like structure and guidance, but don’t like deadlines, there are a lot of great online platforms that provide automated, step-by-step training through a wide range of delivery methods. Some are driven by video tutorials, some by text. Many include interactive code editors for you to practice on in your browser. These give you great flexibility to learn at your own pace, be it a half-hour of practice at the end of each day or a 10 hour marathon on the weekend.
While many of these platforms require a paid subscription in order to access all the content, most offer free trials so that you can get started right away, and decide for yourself whether it works for you.
This is just a short list, so search around and see what else is out there!
For those who want to find their own way to learn to code, or improve their knowledge on their free time, without the pressure of structured lessons, the following tools provide a self-directed approach. Even if you are going to take one of the above approaches, you may find many of these resources helpful for supplementing your learning or providing a platform for practicing.
If your goal is just to practice solving programming problems, the internet, once again, has you covered. The following sites offer ever-expanding sets of coding challenges, along with interactive coding interfaces, for solving problems, having your solutions graded on the fly, and comparing how they stack up to other users’ solutions.
Learning programming passively has limited practicality, but if you want to absorb some of the deeper concepts, learn to code between meetings or with a glass of wine in the evening, these lecture series are some of the best out there. If you like this sort of thing, check out what else is available on YouTube and around the web.
Even with all the wonders of technology available, for many people there is still nothing like a good book to dive into and get a deep understanding of a topic. If you like learning this way, check out Toptal’s List of Top Free Programming Books.
Learning to code is a very personal journey. Everyone starts with different resources and different goals and encounters different challenges and opportunities along the way. Don’t worry about what others are doing, or how they got there. Even for experienced programmers, the journey itself never ends, as there are constantly new things to learn.
So, my advice to you is, take it slow, and enjoy the journey! There is a lot to explore, and a world of wonders awaits you. A journey of a thousand miles begins with a single step. Here are some good shoes. Good luck!
This article was written by NICK MCCREA, a Toptal Ruby developer.