Want to learn to code? Smart move. Coding is one of the most valuable skills in the 21st century economy. The technology sector is growing and, simply put, the number of jobs outnumbers the number of people who can do them. Teaching yourself to code can be the ticket to a new career, or to improving your career, or simply a way to expand your mind, and challenge your existing ways of approaching problems.
Anyway, let’s assume that you do want to learn to code. The million dollar question, then, is how? In this article, I’ll outline 5 tips for teaching yourself to code.
Create a learning pathway
As Stephen Covey says in his book The Seven Habits of Highly Successful People, it makes sense to ‘begin with the end in mind’. Before you embark on your learning journey, take some time to think about where you are going and how you are going to get there.
A learning pathway is simply a how-to manual for what you will do. Begin with your goal. Where do you want to be in one year’s time, for instance? Let’s say your goal is to be able to create a mobile app from scratch. If that’s your goal, then you need to do a bit of research first. What languages allow me to create mobile apps? How long do they take to learn? What are the basic functions of a mobile app? Etc.
A helpful device when goal setting is the SMART acronym. Your goals should be Specific, Measurable, Attainable, Realistic and Time-bound. You can use these criteria when mapping out your own learning pathway.
2. Create a (small) list of essential resources
The information age that we are living in brings with it blessings and curses. It is truly a blessing, and not one to be taken for granted, that we have access to so much learning content, freely, via the web. It’s hard to think of a topic that can’t be mastered via online articles, YouTube tutorials and free courses. But on the flip side, the sheer quantity of information out there can be somewhat overwhelming. The problem with being faced with so much choice is that it often leads to inaction.
Here’s where you’ve got to be smart. There’s way too much information out there for you to effectively engage with it all, so you have to be highly selective in the resources you choose. When choosing the resources that will form the bedrock of your self-authored coding curriculum, I suggest the following:
Go for quality over quantity. Be picky. Choose only a few of the very best resources out there.
Choose a variety of different types of learning resource. Actual, physical books, for one. YouTube tutorials, for another. Online courses, for a third. All the different formats of learning resources come with their own strengths and weaknesses. Diversify your learning portfolio.
Take some time when choosing your resources, but then trust your research. There may come a time when you hit a brick wall with resource A and start thinking to yourself, maybe I should have a quick google and see if there’s another book/course/video out there. Don’t do this, unless the resource is actual trash! You will be wasting precious energy and time looking for additional resources, rather than actually learning, which is the primary goal.
As for how many resources you choose to use, that’s up to you. But I would make a case here for less is more. If you have a list of 30 books, 100 articles, 63 YouTube tutorials and 19 online courses, you will be utterly swamped. Be as focused and as limited as you can be. This is an example of what your resource list could look like:
10 blog posts/articles, bookmarked or printed out.
3 YouTube tutorials.
1 online course.
And that’s it. Let’s say you wanted to learn how to code in Python. Imagine if you chose 3 highly rated books, 10 widely shared articles, 3 well-received YouTube tutorials and 1 online course with glowing recommendations, and just stuck with them. Day after day, week after week, ploughing on. By the time you had exhausted your learning resources, you’d be a veritable Python pro. And then you’d simply pick a new topic and start the process afresh.
3. Make a timetable, and stick to it
I’m busy. You’re busy. We’re all busy. That’s just the way it is. So if you want to get something done, particularly something hard, you’ve got to carve out time for it. Emphasis on the word carve. It’s not going to land in your hands, like a gift from the heavens. You are going to have to fight for it.
If you are self-learning to code, one of the reasons may be that you are already employed, and cannot take the time out to attend a traditional academic course or a coding bootcamp. You may have family commitments as well. Whoever you are, you probably have some demands on your time.
So, take a bird’s eye view of your average week. What are your non-negotiables? What are the things that you wouldn’t want to drop from your weekly routine, no matter what? Where is the dead time? When is it that you spend the most idle time, just mindlessly browsing on your phone? It’s time to reclaim those hours.
Be realistic with how many hours you can give to learning per week, and then put them in your diary. Don’t just say to yourself ‘I will spend three hours per week learning to code’. Be more specific. Where exactly are those three hours going to come from? Put them in your diary and treat them as sacrosanct. Commit to those learning hours, come what may. When it comes to learning, long term persistence trumps short term enthusiasm, every time.
4. Track your progress
Make sure you track your progress as you go. You may wish to do this via social media, by sharing with others what you have learnt/made. The twitter tag 100daysofcoding has made a community out of self-taught coders. Putting yourself out there gives you some accountability to others, and added motivation of knowing that there are people out there who have your back.
Another simple way of tracking your progress is by creating ‘confidence bars’ of topics that you are studying. Simply draw a rectangle, made up of 10 squares, and give it the title of the topic you are studying. Then, shade in how confident you are feeling about that topic, on a scale of 1–10. Keep hold of your progress bars, and update them every month or so. It’s a purely subjective measure, of course, but there’s still something to be said for your own feeling of where you’re at.
5. Commit to the long-haul
If you want this, if you really want this, then you are signing up to a life-time’s worth of learning. No topic is ever truly ‘mastered’, and that’s more true of coding than it is of many other things. The sector is growing, expanding and evolving everyday, and you’ll need to as well. So ditch the paradigm of ‘study, then coast’ and adopt the paradigm of ‘always learning’. It’s a healthy way to approach life anyway, and it will certainly help you on your learning journey.
This might seem like a redundant thing to write about. After all, Jesus makes it very clear in Matthew’s Gospel that ‘this then, is how you should pray’. After these words, he recounts the words of the prayer now known as the Lord’s Prayer, which is recited in countless homes and churches across the globe, everyday.
And yet a blog post like this, explaining how to pray the Lord’s Prayer would certainly have been instructive to me, when first considering these things. So it may be instructive to you, too.
Firstly, there are a few things that Jesus requires right off the bat, before any praying actually occurs. Two, in fact. First, that you should go into your own room. Secondly, that you should close the door.
Now I don’t think the imperative here is specifically about rooms and doors, but rather it’s more to do with what they represent. They represent privacy and intimacy and solitude. So first things first, go somewhere where you’ll be alone.
The first two lines — Our Father…
Then we get to the heart of the matter. The words that Christ himself spoke, and exhorted us to use as well. The first two lines of the prayer reads
Our Father, in heaven, Hallowed be your name
As you pray these words, take some time to meditate upon the following:
The use of the word ‘Our’. God is not just your Father, or my father, or his or her Father. He is Our Father. The Christian Church is a collective. We are united as children of one Father. That is a wonderful truth, and one worthy of some reflection. If you have time, consider who the ‘Our’ encompasses. It means you, and your Christian brothers and sisters. Not just those in your own circle of friends, but all Christians across the globe. This includes those who live in your vicinity, and those who live on another continent. This includes the Christians who are alive today, and those who have passed away. It even includes the Christians who have yet to be born.
The word ‘Father’. Put aside any baggage that you may have with your own earthly father. Instead, isolate those traits he has that are good and noble and worthy. Now imagine those traits being heightened and perfected. Now add any other traits that the archetypal Good Father might have. This is the Father that you should fixate upon. This is what God is like. A Father, yes. But more than that: a Good Father.
The phrase ‘in heaven’. What do you picture when you picture heaven? This may be a challenge for you. It certainly is for me. But nonetheless, give it a go. Jesus tells the thief on the cross that he will see him that day in paradise. So perhaps heaven is some kind of paradise. I don’t really know. But God is there.
The phrase ‘Hallowed be’. This is an odd phrase that I for one have never heard outside this scriptural reference. I take it to mean two things. Firstly that it is a description of God’s name. His name is hallowed. It is holy. It is sacred. And secondly, a clarion call to what ought to be. His name ought to be considered holy. It ought to be revered as sacred. It ought to be hallowed. Think on those things, as you pray these words.
The phrase ‘your name’. God has a name. His name is Jehovah. But He has other names as well. Names that describe His character. El Shaddai, for instance (Lord God Almighty), and El Olam (The Everlasting God), to name just two. Learn about the names of God, and dwell upon them. They will give you some insight into His character and His nature. As well as these descriptive names, there is something powerful about the very fact that God has a personal name. This helps to remind us that God is a person. Not an abstract idea or ephemeral entity, but a real person with a name.
The second two lines — Your Kingdom Come…
The next two lines of the prayer read:
Your Kingdom come, Your Will be done, on earth as it is in heaven
These are powerful words indeed. And as you pray them, think on the following things.
What is the Kingdom of God? What does it look like? What would it look like for our world to be a Kingdom, in which God is the King? What kind of social structures would there be? What would interpersonal relationships be like? Would we still have jobs? Etc. etc.
Then think about the next phrase, which refers to God’s will. What is God’s will? You may need to do some study, here. God’s will can actually refer to a number of things. What is it that God wants to happen? What does He wish to occur in my life and in yours? Here’s a verse to get you started:
Rejoice always, pray continually, give thanks in all circumstances; for this is God’s will for you in Christ Jesus. — Thessalonians 5:16–18
Now this might not be the full extent of God’s will, but, if you take the Bible to be true, then it certainly is one component of His will.
Now, what would it be like if God’s will was done, all the time, on earth just as it is in heaven? Take some time to imagine that. Do you think that God wills us to lie to one another? I’m certain that He doesn’t. That means that an earth in which God’s will was done, just as it was in heaven, would be an earth in which there was no lying or deceit. Take a ride on this train of thought. There would be no rape, no murder, no betrayal. Take this idea to its logical extreme. This exercise helps me to realise just how good the will of God is, and how much we ought to desire its coming to fruition.
Learning is rad. Who doesn’t enjoy learning something new? Who wouldn’t wish to learn a second/third/fourth language, or the timeline of key events in the Battle of Hastings? If such a person exists, I don’t want to meet him.
But learning can be hard. Hence, learning hacks. In this article I will outline three learning hacks that have helped me to hone my learning ability, and will help you to hone yours too. Here they are, in no particular order:
What is it?
To understand what spaced repetition is, and why it is so effective, it’s helpful to first learn about a guy called Hermann Ebbinghaus. Ebbinghaus, or ‘Ebby’, as he may or may not have been known as to his friends, was a German psychologist who, among other things, experimented on his own ability to recall information. He would test himself by memorising a list of nonsense syllables, and then seeing how many of the items he could recall. He would periodically retest, so that he could see what effect time had on his ability to recall. He plotted his findings in a graph that looked a bit like this:
Note that at the start of the graph, when the newly memorising information is fresh, the level of retention is very high. But after a short period of time has elapsed, it decreases markedly. This is why you can remember a new concept or piece of information right after you have learnt it, but can’t a week later. Or why you can read a book, and enjoy its central thesis, but barely even remember its title after a year or so.
Now this graph, known as the ‘forgetting curve’, is very insightful. But the next graph is straight up orgasmic.
This is the same graph, but with a key difference. Instead of only learning once, and then simply testing again and again, the subject learns the new material once, and then periodically reviews said content. Notice the miraculous effects of this simple retesting:
After each review, the level of retention goes back to the highest level.
Notice that the gradient of forgetting decreases after each review. This implies that after enough reviews, that gradient will eventually become a horizontal line.
Notice that the space between reviews is not even, but is getting larger.
What this means is that by simply reviewing previously taught material, you can banish the deadly foe of forgetting. After enough reviews, learnt material becomes encoded into the long term memory where it shall hence reside forevermore. This practice is known as spaced repetition.
The great thing about spaced repetition is that the ‘spaces’ between each repetition gets larger and larger. This means that you will eventually reach a point where you can review learnt material every year, two years, decade, etc.
How you can use it.
You can put the science of spaced repetition into practical use by ensuring that you review previously learnt material alongside newly taught stuff. So if you’re learning 1000 words of French vocabulary, for instance, spend an hour learning the first 25 words or so. Then, next time you study, spend half an hour reviewing the first 25 words, before spending another half hour learning 10 new words. Then, the next time you study, spend half an hour reviewing some of the first 25 words and some of the next 10 words, before moving on to another 10 new words. And so on and so forth.
If you like studying with physical index cards and that sort of thing, you can try the Leitner system, which is a method of spaced repetition. Alternatively, there is a mobile app, Anki, that applies the science of spaced repetition automatically to your learning. It’s essentially a set of digital flashcards, that uses an algorithm to adjust each card’s review time, based on your confidence in correctly recalling the information that they contain.
What is it?
Interleaving is a very simple learning hack that nonetheless has some decent academic credentials supporting its efficacy. If we think about learning something through a number of distinct topics, we might imagine a learning journey looking something like this:
If you have been at school, or worked in an educational setting, you might recognise this kind of thing. It’s very simple. You just teach one topic, and then move onto the next topic.
The problem with this model, though, is that by the time you’ve finished teaching and learning topic three, the content that was covered in topic one has been long forgotten.
Interleaving is a remedy to this conundrum. Displayed visually it might look like this:
This way, the same topics are covered, but they are interwoven with one another. So you learn topic one, and then move on to topic two and three. But then you recap and review parts of topic one, and maybe add some more detail, before doing the same with topic two, and so on.
In some ways this is a harder way to teach and to learn, and can be slightly less satisfying. When learning history, for instance, it feels more natural to move in a chronological fashion, rather than jumping back and forth like some irritating cricket. Nonetheless, studies have shown that interleaving can have a positive effect on learning. So give it a go.
How you can use it.
You can use interleaving by thinking carefully about the structure of what you are learning (or teaching). Plan for opportunities to re-teach and re-learn topics, and interleave them with one another. Try to find connections between the links, so that the interleaving doesn’t just seem arbitrary. If you can find those links, the learning will be deep and effective.
3. Dual coding
What is it?
Dual coding was first proposed as a model of memory by Allan Paivio in 1971, but it has found significant application in the world of education and learning. Dual coding is actually used a lot, even if you don’t recognise the phrase. Allow me to explain what it is, briefly.
If you think about it, when we learn, we usually use the audio channel or the visual channel. Learning via the audio channel means listening to words spoken by a lecturer, teacher, colleague, etc. The words go into our ears and perform some kind of magic in our brains by which we learn something. Learning via the visual channel happens when we read a text on our own. Similarly, words enter our brain via our eyes, magic happens and we learn something.
Both these channels are good, hence the smiley face in the picture below:
But when you combine the two, that’s known as dual coding. What it means is that you are learning via two ‘channels’ simultaneously. An example of dual coding would be a biology teacher displaying an image of a cell on a big screen, whilst simultaneously explaining the different features of it. So students are learning visually and verbally at the same time. Another example would be an video that explains a concept (such as conjugating Italian verbs) via an animation with a voiceover. Simple, right? And for sure it occurs organically enough in the process of teaching and learning. All the same, it’s helpful to know that it has a name, and that it has been proven useful.
The audio channel and the visual channel are both noble. But the audio-visual superhighway is next-level. (Don’t be put off by the demonic looking figure).
How you can use it.
If you are a teacher or a learner, you probably already are using dual coding. But it’s helpful to be intentional about it. Some ways that you can use dual coding in your learning is by:
Drawing an image that represents some content to be learned, and then explaining it verbally to someone else.
Watching animated videos with voiceovers.
Well there we are. Three learning hacks. I have found them useful, both in my career as a teacher, and in my individual studies as a learner. I hope you find them useful too.
Over the past three years, my wife and I have spent many hours driving through the Kenyan countryside. We have been living in Kenya since 2018, working in a school. And one of the great things about working in a school is that you get school holidays. Booyah. Hence, we have been fortunate enough to take a number of road trips around Kenya in our time here.
Anyway. That’s slightly beside the point. The real point is that we have spent approximately one butt-tonne worth of hours in the car, together. So the question is, how do you fill the time? Podcasts and music are fine, up to a point, but the real car journey gems are games. Boy oh boy, the games we’ve played. OK, I exaggerate. We haven’t played that many, and they haven’t been that good. But they have passed the time. One of our personal favourites is to rap battle. The rules are fairly simple. One person sets the theme, for instance ‘potholes’, or ‘bananas’, or, if you want to psych out your opponent by going abstract, ‘meaning’. Then, we play this song, specifically. It simply has to be that song. If you listen to it, I think you’ll understand why. Then we just take it in turn to absolutely roast each other, rap battle style. It’s a game with no winners. Just two losers, rapping terribly in a car.
Anyway. Asides from themed rap battles, we came up with another hum-dinger of a time passer this year, on one of our journeys. Bible memorisation. Depending on your theological convictions or lack thereof, this may seem like a pointless task or a pointful one. For us, it’s the latter. But whether or not you think the Bible worth memorising, surely you can agree that memorising anything is pretty badass? Well, we devised a method of memorising Bible verses that was as badass as Billy-O. Here’s what we did. (Fair warning — it’s not easy peasy lemon squeezy. It’s more like challenging pallenging lemon squallenging. But my wife and I are bozos. If we can do it, so can you).
Step one: Create a memory palace.
If you have spent any time at all geeking out on the topic of memory and memorisation, you will know that memory palaces are basically like crack to mnemonists. And rightly so. They’re awesome. They tap into something that may or may not be called the trans-cranial-spatio-memoritus pathway in the brain. In layman’s terms, when our memories are attached to vivid mental pictures, that occupy real space in an imaginary world, we tend to be better at recalling them. If you’re interested in memory stuff, read this book by Joshua Foer. It’s really rather good.
I digress. Memory palaces are simply places that you know, really well. So for us, it was our house. To be more specific, we created our memory palace room by room. So we began with our hallway, leading out to our patio. What we did, simply, was imagine ourselves walking on a specific route through our hallway/patio. We imagined the smell of the place, and the way the sun lights up the room, and the way that it feels to be there. Then, we very deliberately fixated upon 10 items in our hallway/dining room in particular. Not that it’ll bother you particularly, but we chose: the bowl we put our keys in (#1); the french windows (#2); the patio chairs (#3); a big old leafy tree (#4); our banda (#5); the washing up line (#6); the door to our temporary tunnel (long story, #7); the inside of our tunnel (#8); the door back inside (#9) and then a comfy chair (#10).
This part of the process is really important. I’d recommend just doing what we did, and using one room of your house. Go through it, mentally, a few times, until you can visualise every little aspect. And make sure the journey is the same every time. Make sure you know what all the marker points on your journey are.
Step two: familiarise yourself with the Dominic system.
The Dominic system is another piece of mnemonic gold. It’s a method of converting numbers to letters, in a way that’s easy to remember. Don’t worry about why you’d want to do such a thing right now, just take it from me that it’s helpful.
Very simply, the Dominic system assigns different letters to different digits, like so:
1 = A | 2 =B | 3 =C | 4 = D | 5 = E | 6 = S | 7 = G | 8 = H | 9 = N | 0 = O
You need to learn these. 1 through 5 is easy, as it corresponds with the first to the fifth letters of the alphabet. Six is ‘S’ because of the ‘s’ sound. Eight is ‘H’ because, I guess, the sound ‘aitch’ is a bit like ‘eight’. Nine is ’N’ because of the ’n’ sound. Zero is ‘O’ because they look alike. I have no earthly clue why seven is ‘G’, but there we are.
Step three: Get ahold of some Bible verses to memorise.
This is quite straightforward. If you google ‘Bible verses for memorisation’, you will find that a lot of people have quite helpfully created lists of just that. Choose some that you like, and put them in a list. We did 10 at a time, which worked well for us.
Step four: Turn your verse references into memorable images.
Right. Now things get to be a lot of fun. And the best way of explaining what to do here is simply to go through what we did.
Our first memory verse was Psalm 51:1 — Have mercy on me, O God, according to your steadfast love.
In itself, not a particularly difficult verse to memorise. But we wanted to make sure that we would remember it not just for a season, but forever. So we wanted to make it stick. So here’s what we did:
We came up with an image to represent the word ‘Psalms’. For us, this became a cartoonish, exaggerated version of Uncle Sam.
Then, we came up with an image to represent the number ‘51′ (for the chapter number) and ‘1’ (for the verse number). For us, these were a man with the EA Sports logo instead of a head, and Alvin, from the chipmunks, respectively.
You can probably see why ‘Psalms’ became ‘Uncle Sam’. They just look kind of similar. But you might be wondering where the heck we got EA sports logo head man, and Alvin from. Fair enough.
Remember the Dominic system, from step three? Well, if you remember that each number became a letter. So 51 became ‘E’ and ‘A’. Likewise, 1 became ‘A’. Now we simply needed to think of a famous or memorable person to be represented by those letters. No one with the initials ‘E’ and ‘A’ sprung to mind, so we got desperate, and conjured up a bizarre image of a man with the EA Sports logo for a head. Weird, I know. But memorable. For the letter ‘A’, we just thought of Alvin, with that big letter ‘A’ on his jumper.
So now we had converted our not innately memorable verse reference — Psalm 51:1 — into three persons: Uncle Sam, EA Sports Head Man, and Alvin. Onto the next step.
Step five: Turn the verse itself into a memorable image or scene.
Now we get to the heart of the matter. Memorising the actual verse. Our first verse, again, is this:
Psalm 51:1 — Have mercy on me, O God, according to your steadfast love.
Now at this point, you’ve just got to get creative. You have to:
Find a way to make those words memorable.
Include all the figures that are represented by your verse reference.
Locate the image/scene in the key spot in your memory palace.
So here’s what we did. We visualised the area in our memory palace where the verse was to be situated. For us, this was the bowl we put our keys in. Then, after some deliberation, we settled on the following imaginary scene:
Uncle Sam is pointing a gun at a quivering and terrified EA Sports Head Man and Alvin, who have their hands up in cowardly surrender, right in the middle of our key bowl. I should say, that they’re mini versions, so they fit in there nice and snugly. EA Sports Head Man makes an appeal to Uncle Sam: “Have mercy on me!”, then, seeing Uncle Sam’s unrelenting scowl, lets out a whimpering and defeated exclamation — “Oh, God!”, before passing out. Uncle Sam is bemused, but continues to point his gun at the pair of them. Then Alvin pipes up, and in his distinctly and, frankly, annoyingly high pitched voice, squeals the words “According to your steadfast mercy!”, which seems to be a little incongruous to what’s going on.
And scene. That’s it. What happens next? Who knows. Who cares? It doesn’t really matter. The point is, that’s the scene.We know it inside out, and when we enter that part of our memory palace, it plays out vividly, like some weird outdoor avant-garde theatre. Et voila! The process is complete. Once the memory has been firmly implanted, and rooted in your memory palace, recall becomes a simple case of translating the images into their original content, thus:
Uncle Sam helps us remember Psalms
EA Sports Head Man and Alvin help us remember ‘51’ and ‘1’.
EA Sports Head Man’s plea gives us the phrase ‘Have mercy on us’ and ‘Oh God’.
Alvin gives us the final clause, ‘according to your steadfast mercy’.
Put it all together, and we get — Psalm 51:1 — Have mercy on me, O God, according to your steadfast mercy.
Does that all seem bonkers? Like a mad amount of effort to go through just to remember one verse? Well maybe it is. But the point is, it works. And once you get the gist of the thing, it becomes increasingly easy to create mad scenes, memorable characters and bizarre combinations of the two.
Step six: Take a walk through your memory palace.
This is where the magic of the memory palace makes itself known. Once you have gone through the faff of making 10 (or so) memorable scenes and placing them in prepared areas of your memory palace, you just need to carefully walk through said palace in your imagination. As you do, you will be blown away by what occurs. Images will pop into your brain and start acting out weird and wonderful performances. And most importantly, those wacky scenes will elucidate for you the treasures that they carry: the Bible verses you have chosen to remember.
Yes, it takes some time initially. But the outlay is worth it. The dividends it can pay are immense. Currently, we’ve memorised 42 verses, and we plan to keep going until we’ve reached a hundred at least. And we have a lot of fun, in car journeys and other times besides, playing out our crazy scenes and recalling the verses they represent.
Your memory is far more powerful than you give it credit for, and this is just one way to start tapping into that potential. I hope it bears as much fruit for you as it has for us.
Computers don’t understand English. Or french, Urdu or Toki Pona for that matter. They only understand numbers. Or to be more specific about it, they only understand zeroes and ones. Or to be even more specific about it, they only really understand something being either ‘on’ or ‘off’, thereby represented by a zero or a one. But I’m getting ahead of myself.
The language that computers speak is the language of binary. “What is binary?”, I hear you say. Well, allow me to wow you with my ridiculously in-depth knowledge on the subject. Or allow me to make you go ‘eh’ with my mediocre understanding and laxidaisical explanations. Either’s fine with me.
To understand what binary is, we first need to consider what regular ol’ numbers are, in a slightly abstract way. Take for instance the number 1,498. To write that figure in letters requires me to type one thousand, four hundred and sixty-eight. That’s a total of 36 letters, four spaces, one hyphen and one comma. Whereas I could alternatively just type 1,468. Much easier, and yet it conveys the same information. Here’s where we get a little bit abstractamundo. What is the information that both the phrase one thousand, four hundred and ninety-eight and the digits 1,468 both convey? Well they convey the idea of a number. The concept of 1,468 is a concept of that number of items. What items? At the moment, we don’t have any clue. We simply know that there’s 1,468 somethings.
The reason that typing 1,468 is much easier than typing its text namesake is because that simple set of four numbers is, in actual fact, cheating. It’s cheating because all it really states is the number 1, the number 4, the number 6and the number 8. Yes they’re in order, but so what? They still only count for four items of information. But we understand this combination of figures as representing a much larger number because we have been taught the place value system.
Imagine, if you will, the number 1,468 drawn on a piece of paper. Now, imagine drawing vertical lines between each of the numbers, starting at the base of the number, and rising up past the top of it and then about an inch further. Now imagine a horizontal line that disects all of the vertical lines, above the numbers that they separate. You’ve just put 1,468 into a table. Well done you. Now, where the vertical lines poke through the horizontal line, formining rugby goal shapes, you can write some words. In the furthest space on the right hand side, above the bot of the horizontal line that hovers over the ‘8′, you’re going to write the word ‘ones’. I think you can see where I’m going here. One column to the left of the ‘ones’ you will write ‘tens’, and then ‘hundreds’ and then ‘thousands’.
Now, though we don’t actually draw tables like this over our numbers, this is exactly what we are doing in our brains when we see an arrangement of numbers like ‘1,948′. We’re doing some mental maths. Namely:
This number contains ‘8′ lots of ‘ones’, which is equal to ‘8′.
This number contains ‘6′ lots of ‘tens’, which is equal to ‘60′.
This number contains ‘4′ lots of ‘hundreds’, which is equal to ‘400′.
This number contains ‘1′ lot of ‘thousands’, which is equal to ‘1000′.
Therefore the total number is 1000 + 400 + 60 + 8 = 1,468.
Of course, you can keep on going further to the left and rfurther to the write, on this imaginary table. Further to the left you get ‘ten thousands’, ‘hundred thousands’, ‘millions’, and so on. Further to the right you get ‘tenths’, ‘hundredths’, ‘thousandths’, and so on. Now, what’s important to understand about this system is that there is a pattern for getting from one column to the next. If you begin on the ‘ones’ column, you multiply one by 10 to get to the value of the next column, whicch is ‘tens’. Then to go further left, you multiply by 10 again. To move to the right, you divide by 10. That’s why the column to the right of the ‘ones’ column is ‘tenths’. Because 1 divided by 10 is one tenth. So we divide by 10 to move right, and multiply by 10 to move left. The common factor either way is the number 10.
And that is why this system of counting and thinking about numbers is known as ‘base 10′. Comprende? Good. Now, the fact that our widely used system of counting is known as ‘base 10′ begs the question: ‘are there other systems of counting?’ You betcha there are. You can, in fact, count in any darn base you like. So, for instance, if we wanted to count in ‘base 9′ we would simply do exactly what we did for ‘base 10′, but instead of multiplying or dividing by 10 each time, we’d multiply and divide by 9. Goodness knows why on earth you’d want to engage in such a despicable act, but that’s by the by. This is what it’d look like if we calculated what ‘1,468′ was in ‘base 9′ as opposed to good old fashioned base 10:
There would be ‘8′ lots of ones. So that’s OK.
There would be ‘6′ lots of nines. Eew. OK, that’s 54.
There would be ‘4′ lots of eighty-ones (i.e. 9 x 9). Postively rank. That’s 324.
There would be ‘1′ lot of seven hundred and twenty-nines. That is 729 again.
Added together it would be 8 + 54 + 324 + 729 = 1,115 (in old money).
Like I said, I have no idea what kind of sick, twisted psychopath would use base 9 as a counting system but it is at least hypothetically possible.Now, this is where computers fit in. If you keep on going down, to base 8, 7, 6, 5, 4, 3 and then base 2. Here’s where we’ll stop. Now, instead of calling it ‘base 2′ like dweebs, let’s start calling it binary, so that everyone knows that we’re badasses, and that we mean serious business. Now, remember the imaginary table you drew? Good. Now, the important thing about that table is the rule that as you go to the left, you multiply by 10, and as you goto the right, you divide by 10. Let’s not think of ‘10′ anymore, but rather think of any number, which we’ll call ‘n’. Another way of thinking of a hundred is 10 x 10, or 10 to the power of 2. So the exponent increases by one, each time we move to the left, and decreases by one, each time we move to the right.
Instead of our value of n being ‘10′, in the binary system it is ‘2′. So our imaginary table would start a column called ‘ones’. That’s because 2 to the power of 0 (which is the centre of any base counting system) is 1. Move to the left and we have a column called ‘twos’. That’s because 2 to the power of 1 equals 2. Further to the left we have ‘fours’ (2 ^ 3), ‘eights’ (2 ^ 4), ‘sixteens’ (2 ^ 5) and so on.An important thing I forgot to mention is that the ‘base’ number of a counting system also acts as a limit for the number of integers you can use. So when counting in base 10, we are limited to 10 integers. Those integers are 0 through to 9. After we get to 9, we write ‘10′. But we’re not using any more integers, we’re just recycling old ones. A ‘1′ moves into the ‘tens’ column, and then a ‘0′ sneaks into the ‘ones’ column. To go to base 11, base 12 and so on, you would actually need additional number symbols to allow you to do so.
So with base 10 counting, we are limited to the integers from 0 to 9. In base 9 counting, we would only have the integers from 0–8 at our disposal. Etcetera etcetera. So by the time we get to base 2, I mean, binary, we only have two measly integers to deal with. 0 and 1. Welcome to the wonderful world of zeroes and ones.So, to go back to our initial number of 1,498. When you think about it, there’s actually an awful lot going on here. Each of those squigggles we call ‘integers’ is just a mark on a piece of paper (or a screen) that symbolises an abstract entity we know of as a number. The very order those symbols are in allows us to calculate a larger number, through our abstract counting system, known as ‘base 10′. And we are able to somehow hold in our minds the very idea of 1,468, without necessarily qualifying it with a what. Weird, and wonderful indeed.
To render this number in binary, it’s helpful to work out what the imaginary column headings would be. We’d start with 1, then go left to 2, 4, 8, 16, 32, 64, 128, 256, 512, 1048. Let’s stop there because that’s enough. Then, we’d just ask ourselves, ‘how many lots of x column are there in 1,498?’ So let’s do just that (remembering that the answer can only be 1 or 0):
How many 1024s are there in 1,468? Answer: 1. (This is our first digit).
Now subtract 1024 from 1,468, which gives us 420. (This is because the amount ‘1024′ has now been registered by a ‘1′ in that column. So we can discount it, and work with the rest of the number now).
How many 512s are there in 444? Answer: 0. (This is our second digit).
How many 256s are there in 444? Answer: 1. (Third digit).
Now subtract 256 from 444, which gives us 188.
How many 128s are there in 188? Answer: 1. (Fourth digit).
Now subtract 128 from 188, which gives us 60.
How many 64s are there in 60? Answer: 0. (5th digit).
How many 32s are there in 60? Answer: 1. (6th digit).
Now subtract 32 from 60, which gives us 28.
How many 16s are there in 28? Answer: 1. (7th digit).
Now subtract 16 from 28, which gives us 12.
How many 8s are there in 12? Answer: 1. (8th digit).
Now subtract 8 from 12, which gives us 4.
How many 4s are there in 4? Answer: 1. (9th digit).
Now subtract 4 from 4, which gives us 0.
It feels foolish to keep going, but we actually need to. We need to know where our number will end, though we know there will only be zeroes from now on.
How many 1s are there in 0? Answer: 0. (11th and final digit).
How many 2s are there in 0? Answer: 0. (10th digit).
Phew! That was some hard graft! If we put all those zeroes and ones together, we get this:
OK, that was a lot of effort, and you may reasonably be asking yourself why bother with all this stuff and nonsense in the first place. Well, the reason this is all of value, is because these strings of ones and zeroes are the key to computers understanding our world and vice versa. When you input something into your computer, a programme will convert your input into a string of ones and zeroes. Binary, in other words. And in this sea of simple shapes, a line or a circle, the computer is able to perform magical tasks at incredible speed.
But why? Why do we bother with binary? Why can’t computers just understand numbers in a regular base 10 fashion like the rest of us? Well, it goes back to something I mentioned in my previous blog post, namely that computers are basically speedy simpletons. They literally do not understand anything more than zeroes and ones. But actually, its even more basic than that. They don’t even undertsand zeroes and ones, technically. They are simply able to recognise when an input is ‘on’, versus when that same input is ‘off’.
Imagine that nice-but-dim cousin of yours. Jeff, I think his name is. Now, imagine that you have a system in place with Jeff, that serves him well at social functions. When you give Jeff a thumbs up, he gives a big old smile. When you give Jeff a thumbs down, he looks suitably morose and forlorn. Thrrough this ingenious code, you are able to ensure that Jeff’s outward display of emotions are appropriately tactful at both your great-aunt’s funeral, and your step-sisters wedding. If you want to make it even simpler, you can actually get rid of one of the symbols, and just say that the other is the ‘default’. So Jeff beams at all times, 24/7, until he sees the thumbs down symbol from you.What Jeff is doing, is basically what a computer does. It does one thing when the input is ‘off’ (i.e. the default position), and another thing when the input is ‘on’. Now, what separates Jeff from a computer is simply a matter of speed. Whereas Jeff can change from frowny face to smiley smile in a split second if necessary, the computer can perform millions of outputs (albeit simple ones) in a matter of milliseconds. Because a computer does so many things (i.e. performs so many outputs) in such a small amount of time, those simple outputs accrue into what appears to be quite a complex set of functions. Computers are really very simple, but they cleverly disguise their lack of complexity with their rapid speed.
To come back to binary, then, computers speak the language of binary, because it is the only language they can speak. The computer understands an input of ‘on’ as the value ‘1′ and an input of ‘off’ as the value ‘0′. When you consider that the computer is materially composed of electronic chipboards and whatnot, those values of ‘off’ and ‘on’ correlate to electrical currents, which can be switched on and off accordingly.
Perhaps I’ve been a bit harsh on computers. They are really quite remarkable. And they can certainly do things that we can’t. But at their core, they are basic creatures that perform one function extremely quickly. By understanding offs and ons as 0s and 1s, computers are granted the gift of language. And languages, even a simple ones, contain within them the potential for staggering, possibly even infinite, complexity.
A short poem, summarising this blog post:
Computers don’t speak english, they speak a language called binary,
Computer science is the science of computers. Duh. But let’s break it down a little further. What does it mean to do science? What separates science from other academic disciplines? It makes sense (I guess?) to talk of computer science, but we don’t think of the study of, say, literature as being literature science. Nor would we likely replace the term ‘theatre studies’ with ‘theatre science’ anytime soon.
So what gives? What is science all about? What does it mean to surreptitiously add the word ‘science’ to the ass of a word like ‘computer’? The answer is that science is the methodological, observation-oriented study of the natural world. Biologists study life, that is, the ‘bio’. Chemists study the molecular components that make up our world, and physicists just study every damn thing under the sun. Anything that could be deemed ‘natural’ is fair game to the scientist.
We don’t call philosophers scientists. We call them philosophers. Why not scientists? Well, presumably its because philosophy is, in some sense, not natural. What I mean is that it’s not a naturally occurring phenomenon, unlike, I don’t know, argon. Ergo, the study of philosophy doesn’t count as science. Same goes for theology, for literature, for theatre, etc.
So science is the study of the natural world or, perhaps more accurately, the study of the material world. So then this begs the question: are computers legitimately the subject of scientific enquiry? I mean obviously they are material. A computer exists, just as you or I do. But so do microwave ovens. And we don’t have microwave oven science. So there’s more to it than just that. We aren’t interested in what computers are in a physical sense, we are interested in what they do. So computer science can be thought of as the scientific study of the functions of a computer.
Right. Glad that’s sorted. But now the question remains: what is a computer?
In its simplest form, a computer is a device that computes. ‘To compute’ means to calculate. So a calculator is a form of computer. In fact, it’s worth noting that it is no coincidence that a term like ‘calculate’ that is almost universally associated with the domain of mathematics finds its way into the heart of computing as well. Computers are inherently mathematical creatures. Just as you type in ‘2’, ‘+’, ‘2’ into a calculator, followed by the ‘=’ button and are immediately presented with the numerical outcome ‘4’, computers, too, operate in this simple fashion. Input, output. Number goes in, number comes out.
Here’s a bold claim. The only thing that computers can do is churn out strings of numbers. That’s it. They’re the ultimate one-trick ponies. Input, output. Number goes in, number comes out. Now it goes without saying that computers can do a lot more than that. In a sense. Think of the laptop or phone that you are using right now. It probably has the capacity to browse the internet, to send emails, to pin point your location on the planet, to shoot and edit videos, etc. So in a sense I’m being a jerk to say that all they can do is churn out numbers. But in fact, that really is all they can do. The only reason it looks like they can do all that other stuff is can be broken down into numbers. Type a message to your mum and click send. The computer only knows what to do because your message, and your request, first gets translated into a string of digits. Input, output.
This weird pseudo-simplicity that computers have makes them beguiling indeed, don’t you agree? On the one hand, they rule the world. Life as we know it would go all gooey if the computers all shut down. They control transport systems, the financial markets, rocket launches, you name it. And yet on the other hand they are essentially just electronic dopes, capable only of following strict numerical orders, albeit at breathtaking speeds. Weird, huh.
And now, some more factoidal information about computers, that will likely warrant blog posts of their own, arranged in a catechistic fashion:
What language do computers speak?
They speak a language called ‘binary’. It’s numerical, in a sense, but not as we would normally think of it. In a nutshell, it’s a series of 0s and 1s. So 000100101000100100100001001001 means something to a computer. I don’t know what it means, but it means something.
What are computers made of?
I don’t know. Plastic. Metal. Glass. A bunch of stuff I guess. Go ask your dad.
What are the core components of a computer?
That’s a better question. The core components of a computer are a central processing unit (CPU), input devices, output devices, and memory. More on this topic in a future blog.
Did you make up the word ‘factoidal’?
And finally, here’s an illustration you didn’t ask for:
I have toyed with the idea of creating a website slash writing a blog on and off for a few years now. I’ve always put it off for the following reasons:
I am a dreadfully dull person, with nothing interesting to say.
See reason 1.
OK, not really. I’m being facetious. I’m not that dull. But the truth is that I have started to write this blog simply for its own sake. I figured that if one wants to improve at summat, one must spend some time doing said summat. The summat in question is writing – blog writing in particular.
So here goes. I have no particular end goal in mind, and I have nothing to sell. I’m just writing as a means to improve my own writing.
I guess I’ll fill this website with the usual sort of guff. Book reviews, mini-articles and the like. I hope it’s less dreadful than it sounds like it’s going to be. Here’s hoping.