How to learn to code
N.B. This article is an except from the beginning of my book ‘Programming: A Primer’ (Copyright, World Scientific Publishing)
Over the past few decades, computers have radically changed the way we run our lives. They have affected the availability of information, our methods of communication with friends and family, education, business, healthcare and our study of the universe. With the availability of technology and the immense power at the fingertips of anyone who can use it, programming literacy has become one of the most sought-after skills on the planet.
Only recently has computer science become a core aspect of the school curriculum. This is great news for children and young people, but what about those who’ve already finished those stages in life? What about those who’ve missed the boat? To the vast majority of us who fall into this category, it’s our task to begin the journey of gaining a functional understanding of programming, while acquiring the confidence and commitment to put our ideas into code.
I still remember how I began my journey. A few simple searches on Google during my time at high school, such as “How to program”, “How do I become an iOS developer?” or “How to be Mark Zuckerberg”. It was the same place that it starts for many programmers, and it’s a legitimate place to start. Search for “Learning to code in C” and you’ll find some well-written online tutorials, or for “Which programming language should I learn first?” and you’ll find some critical and interesting articles comparing JavaScript with Python as a starting point. This form of learning is great for answering those specific questions you have as a beginner, but it lacks something essential – it won’t teach you the broader context or the technical framework into which findings from your own learning will fit. If you pick up a hefty 500-page textbook on Python for beginners, it will teach you Python, but it won’t make you an agile programmer, able to adapt quickly to solve new problems.
An alternative to this self-study approach is to undertake some kind of formal education in programming. Study Computer Science at degree level, or go to college to study Software Development. These can be fantastic courses, and I greatly valued my time at university, but this option is not available to many of us. With jobs, families, and/or financial constraints it can be impossible to spend three years learning to code. Or maybe you’re at university already, but you chose a different degree and are already half way through a course in Geography or Fine Arts. Besides, a degree isn’t by any means necessary for equipping you to solve the vast majority of programming challenges out there – in fact, you’re free and able to do it yourself, just as you are.
Programming for Everyday Life addresses this situation. In writing this book, my goal is to inspire you, and to help you harness your urge to invent, to build and to circulate your own ideas, through teaching you the fundamental concepts behind modern programming. I want to help you understand the powerful tools at your disposal, and to offer you a glimpse at the vast ocean of possibilities for changing the world for the better though programming. My assumption, therefore, is that your approach is practical, not academic and that you actually want yourself or others to benefit in some way from what you’ll able to do[P1] . So if you’re approaching coding with a “cut out the nonsense and tell me only what I need to know” outlook, you’ve got the right book.
This is primarily an introduction to the fundamental concepts in computer programming and not a step-by-step tutorial for simply learning a particular programming language. As such there won’t be detailed instructions on what to do in order to get your development environment set up on a range of platforms, nor will there be a comprehensive coverage of all the features of the relevant programming languages. On the contrary, this book is a journey from alienation to familiarity with the ideas behind programming. You’ll be introduced to the basic concepts of various programming languages, so that you can go away and learn a few for yourself with ease. You’ll find out about what the different languages are used for, and how to write powerful programs quickly. Languages for designing powerful websites will be introduced. Database languages, and a selection of popular algorithms will be explained. In later chapters, we’ll take a look at where technology is heading, and how developers can benefit.
The reality about being a programmer is that it’s not a job title, or an honorary title given for graduating with a technical degree. It’s primarily a mind-set, which uses the power of computing to solve new and interesting problems. Programmers can be
student entrepreneurs designing the next social network
accountants seeking more efficient ways to manage clients’ book-keeping
professionals who want to help make law, medicine or science more interesting and accessible
long-term unemployed adults looking to make the most of their time
social entrepreneurs providing content management systems for charities, churches and other causes
Teachers, doctors, engineers or builders are all one and the same when it comes to programming – they are problem solvers. The key to success in problem solving is in familiarity with the principles, being aware of the tools and dreaming up the possibilities.
To get the most out of this journey, I’d recommend skim reading each chapter first, and then going over them much more slowly; digesting all the new ideas and knowledge, and fitting the pieces together.
With all of this in mind, let’s get going!