You’re reading this from a network, using software, on a device, all of which rely fundamentally on algorithms. This book allows you to see the vast portion of the software iceberg that lies beneath the surface, doing its clever but invisible thing, the real building blocks of contemporary computing – algorithms. We use algorithms all the time when we do even simple arithmetic. Multiply two numbers such as 23×4 and you’ll use a mental algorithm you probably learnt at school. Whenever you search, buy, do online banking, online dating, get online recommendations, see online ads; algorithms are doing their devilishly clever work. MacCormick deliberately chooses, not the classic algorithms you will find in coding courses around sorting and so on, but nine that do astounding things in the real world. These are the algorithms that continue to shape the future whenever you search, buy and socialize online.
So what are MacCormick’s nine favorite, real-world algorithms?
9 algorithms that changed the future
1. Search Engine Indexing: Finding needles in the world’s biggest haystack. Search for something on the web and you’re ‘indexing’ billions of documents and images. Not a trivial task and it needs smart algorithms to do it at all, never mind in a tiny, tiny fraction of a second.
2. PageRank: The technology that made Google one of the biggest companies in the world. Google has moved on, or at least greatly refined the algorithm(s) mentioned here. Nevertheless, the multiple algorithms that rank results when you search are very smart.
3. Public Key Cryptography: Sending secrets on a postcard, is a description of how encryption works and keeps your credit card details safe when buying stuff. Amazon, Ebay, PayPal, credit cards and the entire world of online retail would not exist without this algorithm.
4. Error Correcting Codes: Mistakes that fix themselves, so that sound, pictures and videos can be saved, stored and retrieved without loss, even from a CD or DVD but especially across networks, where these clever algorithms maintain quality.
5. Pattern Recognition: Learning from Experience on postcode readers, faces, license plates, in translation, speech recognition – pattern matching plucks out meaning from data. Mobile devices especially need to use these algorithms when you type on virtual keyboards or use handwriting software.
6. Data Compression: Something for nothing when we zip files, compress for transmission, decompress for use. Lossless and lossy compression, and decompression, magically squeeze big files into little files for transfer.
7. Databases: The quest for consistency describes how databases work. Again, the advent of big data means that the balance, in some contexts, has swung away from algorithms, towards the power of massive data sets. Nevertheless, when you use a database you use some clever algorithms.
8. Digital Signatures: Who really wrote this software? Some very smart algorithms are used to create signatures for individual users.
9. What is computable? Or more accurately what can’t be computed. Things don’t crash as often as they used to because algorithms catch the problems. However, some things, even using proof by contradiction don’t help and software has its limits. There are undecidable problems that computers can never solve.
This last of the nine, is a deliberate counterpoint, but it reads like an anomaly or personal enthusiasm, rather than a natural ninth algorithm. There’s a certainty about his abstract logic that is unwarranted, as we have quantum computing and philosophical arguments that allow us to question these certainties. It would have been much better to have written a chapter that shows the weaknesses of the algorithmic approach, such as our mistaken reliance on them in financial predictions, creating illusory certainties, the production of false positives and so on.
His first eight algorithms are interesting and pretty much describe the major, practical algorithms that did and continue to shape the software and online behaviors of people when they are online, although I’d have made number nine the smart file sharing algorithms behind Napster and Bittorrent that irreversibly changed the music and other industries.
Tricks of the algorithmic trade
The algorithms he presents really are works of art that have been designed, tweaked and finessed in response to experiment with real target populations. They work because they’ve been proven to work in the real world. Of course, what’s seen as an algorithm is likely to be multiple algorithms with all sorts of fixes and tricks. I particularly liked the way he reveals what he calls the ‘tricks’ of the trade, such as checksum, prepare then commit, random surfer, hyperlink, leave it out, nearest neighbour, word location, repetition, shorter symbol, pinpoint, same as earlier, metaword, padlock, twenty question – the smart tricks of the trade that make algorithms really sing. At these points the book gets beyond the rhetoric to the real facts.
Applicability to learning
Almost all of his chosen algorithms are already being used by teachers, learners and researchers. The first two on search and Google rankings are obvious examples used by every teacher and learner, daily. This is a real learning tool, what I’d call a MOOP (Massive Open Online Pedagogy). Perhaps indirectly, whenever you use Amazon to buy a book, you use key cryptography. Pattern matching is also used whenever you write, either in a search query or with predictive text or a spellchecker or translator. Error correction and data compression click in whenever rich media are used. This is what has enabled another MOOP (Massive Open Online Pedagogy) – video in learning. Databases are used for many forms of content storage and, although you may not know it most of the time, whenever you access a learning management system, VLE or learning content, you will have been using algorithm-driven databases. In other words, algorithms already lie at the heart of online learning, albeit in an almost invisible and indirect way.
We are now entering an age of algorithms in learning, where targeted algorithms can be used to improve the teaching and learning experience. It is clear that we use mental algorithms, almost every time we think, especially in a learning context. The hyperlink is another MOOP (Massive Open Online Pedagogy), that powers non-linear learning, where link analysis is used not only by Google but also by Facebook, Amazon and almost every other major online service. Knowing what you click on drives the major commercial models. In page ranking it improves the accuracy and reliability of the search query, in learning it can be used to draw inferences about the learner to present the optimal next item in their learning journey. It can also be used to improve the design of the course, even automatically as the network of content readjusts, whenever a new screen is presented, based on past data. Software algorithms can therefore be used to match new knowledge from a network of learning experiences to your existing, knowledge network. Algorithms can be used to deal with personal behavioral habits around how long you were on task, spaced practice and so on. Learning is complex, algorithms are smart. Too much linear e-learning is too simple for the complex task of learning. We have seen how algorithms have been used in simulations and games to improve the user experience and performance. This is bound to happen in other species of online learning.
To see a useful breakdown of the Types of adaptive and algorithmic learning, Jim Thompson has written an excellent primer. For a general discussion of Algorithmic learning see this article by Donald Clark.
It’s an accessible book, as he’s writing for the lay person using analogies and simple progressions, upping the level of complexity as he goes. As he gradually reveals the secrets of his nine algorithms you can’t fail to admire the elegance of these carefully constructed, magic, mathematical spells. They are stunningly clever.
Types of Adaptive Learning by Jim Thompson
Algorithmic learning by Donald Clark