Another way of thinking about programming is to consider a task that we all do, multiple times a day – using a computer, of course, but more specifically, by using the Internet. That task is searching for some information on the Internet.
Most of our searches for information tend to be on Google. But perhaps you might not notice that you are also searching on other sites, partly because “searching on the Internet” has become synonymous with the word “Googling.”
But you might have also searched on the Internet, when, for example, you looked for a product on Amazon or Wal-mart, looked for a book on your library’s website, or tried to find a friend on Facebook or a co-worker on LinkedIn.
So what part of this involves programming? The first part is that all searches on the Internet require you to communicate with a computer, so you are definitely programming something, though you might not know what. In fact, you are talking to multiple computers all in one go, when you do most Internet searches. The Internet is too big for any one computer to handle most searches!
The second part becomes more obvious when you are searching for something that’s not easy to find – you are engaging in problem solving, with the aid of a computer. If you search for a restaurant whose name you know, say, that’s something you’ll get the right result back for at the very top of the page, probably on your first try. But if you are looking for the name of a movie when you only vaguely know the plot, you might have try a few variations of your search to nail it.
You might also encounter the problem solving aspect of an Internet search if say you are looking up an old high school friend, who had a fairly common name. What other pieces of information about this person might you add to the search to see if you can find out what they are up to now? Maybe it’s a hometown, or a profession you think they might have taken up because you know what they majored in when they went to college.
You might search on a variety of sites – not just on Google, but on various social media sites as well.
Each of these variations are clues you are feeding into the search algorithms and are ways of narrowing down the possibilities from the billions of pages on the Internet. When you problem-solve by trying different sites out, you are recognizing that you have to talk to different groups of computers – as if you were going around town and asking about a lost dog at different stores and restaurants, because you know that each location has a better view of the streets and alleyways around them.
It doesn’t in fact matter whether you know how the algorithms “actually” work, to be able to problem solve effectively. The main aim is to find a good solution – the name of a movie, where this old friend of yours lives now (don’t stalk them though!), what’s the lowest price on the latest Android phone, etc.
In fact, that’s the fourth part of this process that’s akin to programming – you will probably treat many tools as “black boxes.” You won’t know how they work but what will matter to you is how predictably and reliably you get the “right” answers from these tools. Of course, part of the ongoing journey of programming is opening up the boxes one by one, like stepping through a wonderland of doors that each open up to new adventures.
All this might feel very removed from anything that you have thought of as programming – or that you are doing already perhaps, through books, online tutorials and classes. But the principles of programming are more important to learning how to program and more importantly, how to think like a programmer.