Programming myths busted

Published January 4, 2020
Illustration by Muhammad Faizan
Illustration by Muhammad Faizan

What do you imagine when you first hear the word ‘programmer’? For many people, it’s the image of a lone, hoodie-wearing guy with huge spectacles, tapping relentlessly at the keyboard late into the night, doing the daunting (and might I add boring) work of solving other people’s computer troubles.

This is nothing more than a myth. Sure, a computer science (CS) student can use their skills for computer troubleshooting (i.e. solving computer-related problems), but that’s only a tiny fraction of all the really cool stuff that you learn while studying CS.

So today, let’s explore the myths and truths of studying the science of computers, and answer some of the most basic questions you may have about what it is all about, e.g. What’s with all the mathematics? What’s a computer programmer? More importantly, what do they really do? And, even more importantly, is it any fun? (Spoiler alert: The answer to the last question is a resounding “YES!”)

The good news

You might already know how to use a computer for basic tasks, e.g. surfing the internet, looking up things, writing and printing letters, sending and receiving emails, etc.

Awesome! You’re already ahead of many other people, because in the world of technology, there’s this thing called the “digital-divide” that is caused by, among other things, people not having access to — or the knowledge to utilise — digital technology such as computers and the internet. This causes them to miss many of opportunities (think MOOCs, eBooks, scholarships, applying to colleges online, etc.) that other privileged people might take for granted.

Computer science vs programming

Computer science is about mathematics, theoretical models and algorithms. Mathematics and computer science go hand-in-hand because you need mathematics not only to prove and support theories, but also to make games or graphics.

Programming, on the other hand, is really a tool or a vehicle for making use of the enormous computing power that is at our disposal.

Programming consists of making computers do stuff for us which would be very difficult, menial or plain old boring for us to do. You might create a programme to have all your files renamed according to your preferred pattern. Or you could want to be reminded at random times of your achievements in the past. Or you could just be wanting to receive random happy news throughout the day. Yes, you can do all of that through programming!

You don’t have to be a nerd or a geek in order to dip your toe into the world of CS. All that talk about mathematics might have caused you a flashback of those dreadful school memories (e.g. “calculate the age of Anna if she’s X years older at the time …”). But fear not! Programming languages are very easy to use, and you can quickly learn to make cool stuff without having to go too deep into the intricacies of theoretical computer science.

Make your life easier by programming cool stuff

Wouldn’t it be great if you could just automate all those boring calculations to be performed on all the numbers lying in your spreadsheet? Don’t you want to know how to tilt the odds in your favour in a game of noughts-and-crosses? Similarly, if there are more than a hundred ways of getting from city A to city B, would you not want to know quickly what’s the optimal path from A to B and vice versa?

The best thing is: We can answer many of these questions by using just a few lines of code!

Illustration by Muhammad Faizan
Illustration by Muhammad Faizan

The fun side of programming!

Even those awesome problems might have sounded boring to you and you may be wondering why bother. Again, no worries!

You can do some wicked animations, (including the flip-book style animations), by using basic programming constructs in the right software environment. This can range from simple animations to complex and somewhat realistic rigged 3D character models. Basically, you will be able to indulge your creative fancy by creating cool animations just by using basic programming constructs and an open source programming environment called Processing, created by the wonderful people at MIT Media Lab.

Within the Processing environment, you can make simple games with little effort, add new features to old games (if they have their code documented and the code is freely available) and the list goes on.

The academic side of programming

You might want to do an analysis of a novel you’re reading for class. Say you want to know how many times throughout the novel a particular part of speech is used and how that compares across all the different novels by the same author.

With the aid of a computer language called Python (and some extra prewritten code which you can easily find in a code library called NLTK — just Google it!) you can perform not just that feat, but also plot a graph showing the analysis and that too right from within Python!

Fun fact: This “Python” by the way has nothing to do with the reptile of the same name. The founder of this programming language named it on the famous British comedy group Monty Python.

One of the most common excuses for not learning programming is: “I’m a business/physics/biology student, etc. I don’t need programming.” That’s so old school! Unless you were born in the days of Newton when all we had were equations to model various phenomena, you are not going to get very far without making use of programming, or at least it’d be highly difficult to do so. Some programming knowledge is handy to have for students in all academic fields.

Still unconvinced?

You still think coding is for nerds only? Think again! Karlie Kloss (an American supermodel) took to learning coding because she was, in her own words, “inspired by code’s creativity and endless possibility” and went on to launch a coding bootcamp! This also shatters the common stereotype that only boys can be good at techy stuff and proves that programming really is for everyone.

Here’s the thing: Programming opens up a whole new world for you because it frees you from the restrictions of vendor-made software. It allows you to make stuff that you really, really want to see and use. It could be animation, games, or applications to automate boring tasks, creating a new painting software and what not.

Maybe you need to do a complex theoretical analysis, maybe you need to analyse lyrics of pop songs and find some patterns, maybe you’re fussy and you don’t like Excel plotted graphs and want a custom made graph with various features that’d be difficult to implement using Excel; you can do all of this and much more if you have some programming knowledge. Again, there are no limits here!

Programming is going global

Considering all the wonderful things that programming can do for us in all these various disciplines, it is not surprising that now it’s trying to make its entry into the definition of literacy: reading, writing, arithmetic and coding. “Coding”, by the way, is a verb that means the act of writing “code” for computer that it can understand.

While it is arguable whether coding ought to be a part of literacy’s definition, we cannot deny that it is an important skill that can not only aid you in odd times, but also allow you to make fun stuff (and appear cool — or nerdy — in front of your friends!).

Learning programming

To learn programming, all you need is a basic computer.

Coding is not rocket science; it’s as easy to learn as any other subject you may be learning at school. And if you find that you can’t understand a specific concept while learning to code, it’s very likely that a) you need better resources, b) you need to change your tutor, c) you need to give it another go (and keep coming back at it from time to time), d) someone or something told you that you can’t understand CS or something else and now you have internalised it.

So here are some tips to help you face the challenges that lie ahead:

1. Find the right support

These days there are tonnes of resources and most of them are available for free (think Coursera, Edx and such). Try to post your specific problem at some beginner-friendly programming forum (such as stackoverflow.com). Buy another book. Better yet, if you have someone around you who knows a great deal about computers and coding, ask them to mentor you.

2. Have grit and willpower

I can’t stress enough the importance of having grit and will-power for learning any new skill. This tilts the odds of success in your favour. Turns out, grit and willpower are better indicators of success than intelligence tests, such as the famous Stanford-Binet IQ test — this fact has been proven by various repeated psychological studies. Don’t be discouraged if at first you don’t succeed. Hardly anyone ever succeeded when they first tried to walk as children, right?

3. Figure out how you learn best

Keep in mind that different media work for different people. Some like to learn by watching videos, some by reading textbooks, some by listening to audio books, and so on. See what works for you and stick with it.

Follow these tips, stay consistent in your practice, and soon you’ll realise that programming is not as difficult as you assumed — and it’s actually more fun than you imagined.

So go on, do it! And I hope to see some epic stuff made by you for you!

Published in Dawn, Young World, January 4th, 2020

Opinion

Who bears the cost?

Who bears the cost?

This small window of low inflation should compel a rethink of how the authorities and employers understand the average household’s

Editorial

Internet restrictions
Updated 23 Dec, 2024

Internet restrictions

Notion that Pakistan enjoys unprecedented freedom of expression difficult to reconcile with the reality of restrictions.
Bangladesh reset
23 Dec, 2024

Bangladesh reset

THE vibes were positive during Prime Minister Shehbaz Sharif’s recent meeting with Bangladesh interim leader Dr...
Leaving home
23 Dec, 2024

Leaving home

FROM asylum seekers to economic migrants, the continuing exodus from Pakistan shows mass disillusionment with the...
Military convictions
Updated 22 Dec, 2024

Military convictions

Pakistan’s democracy, still finding its feet, cannot afford such compromises on core democratic values.
Need for talks
22 Dec, 2024

Need for talks

FOR a long time now, the country has been in the grip of relentless political uncertainty, featuring the...
Vulnerable vaccinators
22 Dec, 2024

Vulnerable vaccinators

THE campaign to eradicate polio from Pakistan cannot succeed unless the safety of vaccinators and security personnel...