There’s a danger in the internet and social media. The notion that information is enough, that more and more information is enough, that you don’t have to think, you just have to get more information – gets very dangerous.
– Edward De Bono
I have quit social media a few months back. I deleted my accounts on Facebook, Twitter and WhatsApp. Initially I felt like I lost connection with everything digital. But everything became normal after a few weeks. One interesting thing I noticed is that when you don’t have Facebook/WhatsApp, you enjoy things more since you never think about taking a photo/video and sharing it in Facebook. Since leaving social media, I have felt better and I think it also helps me to lead a better "intentional" life.
I used to be a fan of social media not long ago. Social media allowed anyone to express their opinion and share it with the whole world. It offered a platform for people to interact and know about each other. But since leaving social media, I noticed how addictive and dangerous social media has become over the years. It appears to me that the dangers of social media and its bad effects outweigh its benefits.
For example, I realize that social media is causing large scale damage to our social, administrative and legal systems. One of the fundamental principles of our legal system is this – "Everyone charged with a crime is presumed to be innocent until proved guilty". Our legal system and our constitution also offers an accused all the rights for defending his innocence in a court of law. Recent events in my country and my home state has demonstrated that both these fundamental rights are in danger simply because there is a large scale social media propaganda against the accused. This is exacerbated by the fact that a lot of new movies now glorify extrajudicial punishments or even murder. This has lead to a scenario where police is under pressure from the social media and then goes on to violate our laws and our constitution.
I also see that a number of people use social media platforms for propagating hatred against others(most are religious in nature). Such relentless propaganda with hatred is bound to affect a lot of people. In many cases, such people have thousands of fans and followers which strangely gives them protection from prosecution.
Recently I watched a movie in a theatre and during the credits it displayed over a dozen "online promotion" partners. These are a large number of companies who specialize in manipulating social media reputation and online ratings of movies. I think very few people realize the extent of the fake news problem. A large number of social media posts that people share again and again are originally posted by people with vested interests. Social media deepens and strengthens the confirmation bias, especially when it comes to young people.
I was member of a small number of selected WhatsApp groups till recently. Most of these groups were created around some shared interests such as "travel" or "residence association". But over time these groups were flooded with gazillion junk videos and images. It turns out that a large number of people blindly forward whatever they get through one group to all other groups! Many of these videos and images were either fake news or of gruesome events such as accidents. More and more small children are exposed to such material since many of them have access to the mobile devices of their parents.
It is a tragedy that for a large number of people, their daily actions are highly influenced by what they want to project on social media. It has a dangerous cascading effect since few are immune to social pressures. People look for social validation and acceptance on social media in the form of likes and shares.
A substantial number of people on Facebook does not post or share anything (they just read stuff) thinking that it will protect their privacy. What they don’t know is the kind of data Facebook has about them!
For me, following are the reasons for quitting social media,
- Avoid exposure to all the junk, fake news and nonsense shared through Facebook/WhatsApp.
- To find out my real friends (very few I realize!).
- Focus more on intentional living without the need for social validation.
- Protect my privacy (yes, I know it won’t work).
Treat your attention as a precious resource!
I do not fear computers. I fear the lack of them.
– Isaac Asimov
Computer programming is a passionate hobby for me from my school days. But I ended up taking a degree in electrical engineering. Almost everything I know about computing is self learnt. This is true for a lot of programmers out there. Most of us are proficient in one or more computer languages and are familiar with the technology stack we use in our day to day work. Yet most of us also have a nagging feeling that we don’t know fully how computers work!
Interestingly this is a problem faced even by computer science graduates! This is due to the high level of specialization and separation of computer science topics. Hence even CS graduates miss the elegant big picture of the computing field. The Elements of Computing Systems is a book designed to address this gap. This book attempts to provide a complete high level summary of the computing basics in just about 250 pages! Man, it does a really good job at that!
As you go through each chapter in the book, you are required to build each building block of a computer. You start with the basic Boolean logic gates and then move onto building complex Boolean circuits, Arithmetic & Logic Unit (ALU), CPU, memory modules, machine language, assembler, virtual machine, high level language, compiler and finally even an operating system!
Book Review: The Elements of Computing Systems
The Elements of Computing Systems (also known as Nand2Tetris) is written by two computer science professors, Noam Nisan and Shimon Schocken. It is a self study guide for building a modern computer from first principles. The book’s basic premise is that the best way to understand how computers work is to build one from scratch! The book consists of 13 chapters each containing a project that the reader is supposed to solve. The only pre-requisite for the book is the knowledge of a programming language.
If you study the book and then solve all the programming problems in it, you will get a deep understanding of the following topics,
- Boolean logic and logic design
- Data representation in computers
- Designing memory, ALU and CPU
- Practical use of data structures & algorithms such as stack, list, recursion etc.
- Method call stack, object allocation and heap
- Variable types, scope, object and array representation
- Memory addressing and memory mapped I/O
- How to write an assembler, virtual machine, compiler and operating system!
Obviously building a full fledged computer from basic logic gates is a very complex undertaking. However the authors have simplified this challenge substantially by adopting a number of clever strategies. These strategies ensure that the programming problems doesn’t become too complex for a beginner,
- We use a hardware simulator for building computer hardware. This avoids the need for working with physical components. Yet at the same time this teaches you everything you need to know about hardware!
- This course ignore error handling and optimization problems. For example, when you write a compiler you can assume that the program being compiled is error free. Optimization is an important yet hard problem. Ignoring it makes things simpler.
- The ALU (Arithmetic and Logic Unit) and CPU built as part of this course has a very simple instruction set. For example, the CPU we build won’t have any native multiplication capability. Also it only works with 16-bit integers.
- The assembly language and high level language (Jack) are all a bit verbose. But this substantially reduces the complexity in building assembler, VM code generator and compiler.
- Each chapter contains almost the entire design of what you are building. The design and the hints provided are the keys to the simplicity and the power of this course.
The Elements of Computing Systems consists of 13 chapters contained in about 250 pages. Each chapter starts with a background section, describing relevant concepts. The next section is specification, which provides a clear statement of the system’s abstraction – namely, the various services that is expected to deliver. The chapter then proceeds to discuss how the abstraction can be implemented leading to a proposed implementation section. The next section, perspective, highlights the important issues left out from the chapter. Each chapter ends with a project section, which provides a detailed guide on building and testing the system described in the chapter.
Here is a summary of the chapters,
- Boolean Logic – The book starts with quick introduction to Boolean logic and logic gate circuits. Using the basic Nand gate, a hardware description language (HDL), and a hardware simulator, you will build other logic gates such as And, Or, Xor and Multiplexer. An HDL tutorial is provided in the appendix.
- Boolean Arithmetic – Chapter 2 introduces Boolean arithmetic and signed integer representation in computers. You will build logic circuits for adding binary numbers using the chips built in the previous chapter. Finally you will build an arithmetic and logic unit (ALU) capable of doing arithmetic and logical operations.
- Sequential Logic - Introduces sequential logic and explains why a clock is necessary to maintain state in logic circuits. This chapter assumes flip-flop as the basic building block and then proceeds to show how memory registers can be built. You will build a program counter and memory units as large as 8K.
- Machine Language – Introduces a simple machine language capable of doing computation and memory access. The compute instruction is defined such that it can be implemented using the ALU built in the previous chapter. The machine language is simple and easy to learn and implement.
- Computer Architecture – This chapter combines the hardware components and the machine language to build a full fledged computer. You will combine memory, ALU and control chips to build the Hack computer. A keyboard and display is also added using memory mapped I/O. In Hack architecture, instruction memory and data memory are kept separate.
- Assembler - This chapter take us to the software land. You need to know a high level language to solve the programming problems from this chapter onwards. A simple mnemonic set is defined for the Hack machine language. You will then build an assembler for converting these mnemonics to actual machine language.
- Virtual Machine – I: Stack Arithmetic – Many modern languages (Java, C# etc.) are compiled to an intermediate virtual machine code for portability. This chapter introduces a stack based virtual machine language/architecture. You will need to write a program to convert the VM instructions to the assembly language defined in the previous chapter. This is a complex activity and hence is split into two chapters.
- Virtual Machine – II: Program Control – This is a continuation of the previous chapter and you will build the program control part of the virtual machine. Once you have completed the VM to assembly converter, you can write programs with less effort compared to the assembly language.
- High-Level Language – Introduces a high level language called Jack. It is similar to Java but is more verbose so as to help the compiler writer. Write a number of programs in Jack language to get a feel for it.
- Compiler – I: Syntax Analysis – The next logical step is to write a compiler that can translate the high level Jack code to the virtual machine code. It is a complex project and hence is attempted in two chapters. This chapter introduces the syntax analysis and parsing techniques of compilers. You will write a parser for the Jack program to convert it into a sequence of tokens.
- Compiler – II: Code Generation – Introduces the common compiler techniques for code generation. Using the parser from the previous chapter, you will write a full fledged Jack compiler. However you will need to use a number of library Jack classes for your program to work. In the next chapter, you will build these library classes.
- Operating System – Introduces the concept of an operating system. You will build a number of library classes in Jack language providing the basic OS services for the Hack platform. These include modules such as Keyboard, Screen, Output, Math, Array, String and Sys.
- Postscript: More Fun to Go – The final chapter provides a number of pointers to extend the Hack platform. Optimization and error handling are two obvious things to do. Another challenging thing would be to relax the rules of Jack language to increase the complexity of the Jack compiler.
All the required software (including source code) for the book is available on the nand2tetris home page.
The book is elegant, concise and very well structured. Clearly the course material has undergone extensive testing over the years. Each chapter provides hints so you get a high level idea of the solution. But it rarely tells you how to solve something. That is what makes this book so good. You have to really think and find solutions to tough programming problems. Also later chapters are tougher than initial ones.
I think there isn’t even a single redundant/unnecessary sentence in the book!
It took me around 20 days of dedicated work to complete the entire book including all the projects. It took me a while to solve the compiler code generator and the operating system chapter. I got stuck many times while working on the projects. I had an irresistible urge to look for solutions on the Web. But luckily I was able to overcome that urge and solve them on my own. This is something I suggest you do too. Don’t look up solutions on the web or forums. Try to solve problems on your own for the reward of intellectual satisfaction.
One limitation of the computer system we build as part of this course is that it can only work with 16-bit integers. This means that instruction memory size is limited to 32K. Since the code generators we build are not optimized, even simple Jack programs can lead to large machine code that won’t fit in instruction memory. This means that you won’t be able to compile your Tetris program all the way to machine code and then run it on the virtual hardware you built using HDL. Instead you will have to use the VM emulator to run your programs.
Finally this course reminds us the importance of abstractions in human progress. Most of the time we never need to look at what happens under the hood. Our abstractions protect us from all the underlying complexity. But never hesitate to look beyond the abstractions when needed.
Many colleges run computer science courses based on this book. The first half of the book is also available as a course in Coursera.
For a quick introduction to the book, please check out this short video by one of the authors (Shimon Schocken),
Computers have become an integral part of human existence. Almost everyone now carries a full fledged computer in their pocket! If you are looking for just one book that will help in you in understanding how computers really work, this is the book.
If you are a software developer or is planning to become one in future, you should read the book and complete all the programming projects. It will give you a deep insight into computer architecture and you will find it valuable throughout your career.
I enjoyed the book very much including all the projects in it. In fact this book gave me the best self-study experience in my life. The whole learning journey is one of intellectual thrill and intellectual satisfaction. Some may even find it a life changing experience. Highly recommended!
My Rating: 10/10
Every programmer should read The Elements of Computing Systems!
Further Reading/Additional Resources
- The Elements of Computing Systems Book (Amazon)
- Code by Charles Petzold
- Home page of The Elements of Computing Systems (Nand2Tetris)
- Introduction to Nand2Tetris (Video)
- The TED talk on Nand2Tetris (Video)
- The Google tech talk on Nand2Tetris (Video)
- The Elements of Computing Systems Course
- The Tetronimo Game I wrote in Jack Language
- Tic Tac Toe Game I wrote in Jack Language (Source code available)
When I read non-fiction books these days, I get a nagging feeling that the author could have communicated the idea in a much shorter book. Many books these days, especially in the self-help category, are bloated works converted from one or two blog posts. But very rarely you come across a masterpiece book and wish that it was bigger. Sapiens, A Brief History of Humankind by Yuval Noah Harari is one such book!
Yuval Noah Harari is an Israeli professor of history at Hebrew University of Jerusalem. His free YouTube course "A brief History of Humankind" covering 17 lessons and 62 videos is very popular. He wrote "Sapiens" originally in Hebrew and was later translated to other languages including English.
In less than 500 pages, Harari takes us through an exhilarating journey of human history. The topic of human history is so large, that it is a real challenge to decide what to include and what to ignore. Harari takes a high level view of human life over the centuries, but he also takes us through the perspective of common people when needed. Most of the things that traditional history textbooks usually cover are only very briefly touched upon.
Harari argues that it is our ability to gossip and believe in collective myth that has led to the unprecedented growth of human species. Everything that is the foundation of modern human civilization – money, religion, capitalism, consumerism and democracy is the result of our ability to believe in collective myth. Harari claims that it has enabled us to bypass evolution and even become gods on earth!
I am a huge fan of history and once I started reading it, I couldn’t put it down. The book triggers your imagination and curiosity. Harari tells many interesting stories. The lack of "political correctness" and "relaxed historical accuracy" may annoy or anger some readers! Here is an advice for easily offended readers – treat it as fiction!
Is there anything more dangerous than dissatisfied and irresponsible gods who don’t know what they want?
Summary: Sapiens, A Brief History of Humankind
Sapiens book is organized into 4 main parts covering last 70,000 years of human history,
- The Cognitive Revolution – Harari argues that it is our ability to gossip and believe in collective myth that led to the unprecedented growth of human species. He argues that it is this sudden ability that enabled us to be the only dominant human species on the planet. This part also takes a look at the day to day lives of early humans and explores the link between human growth and extinction of other animal species.
- The Agricultural Revolution – Is agricultural revolution history’s biggest fraud? Harari argues that for the farmers, this revolution manly offered suffering and death. This is an interesting conclusion since we think about agricultural evolution as a major achievement of human species. In more recent times, we have even started romanticizing farming and agriculture. This part also covers the evolution of language and bureaucracy.
- The Unification of Mankind – Harari argues that even though human culture has been in constant flux through the centuries, there has always been a definite direction to where we are going. Humans across the planet now form one large family. This part also explores the roles played by money, religion and imperial vision in unification of mankind.
- The Scientific Revolution – This section explores some of the reasons behind rapid industrial and scientific growth of European nations. Harari argues such a rapid advance is made possible by our acceptance of the fact that we know little about the world around us. It is our acceptance of ignorance that fuelled rapid scientific innovations. This section also explores the unification of the state, business and science. Obviously there are dangers in the marriage of business and science.
Each of the above parts have 4 or 5 chapters dealing with topics related to that era. For example, one chapter looks at the origins of money while another chapter explores why agricultural revolution may be a disaster as far as individuals are concerned. Sometimes you get to hear an interesting story, sometimes you get to see a photograph of historical significance.
After going through the entire human history, finally Harari turns into the philosophical questions of human existence such as the meaning of human life and human happiness. He briefly touches upon the consumerism and its effects on human happiness. He points out that we are on the threshold of becoming the gods on earth!
Review: Sapiens, A Brief History of Humankind
Harari’s Sapiens is an excellent summary of human history. It mainly covers the last 70,000 years of human history. But it is not merely about history as Harari is more interested in the motivations of the people behind history. And it is also full of his own conclusions! He argues that the large-scale cooperation of human beings is what made us the masters of the planet. He also briefly touches on philosophy and the chemical and biological interpretations of our behavior.
For any historian, it is important to at least partially suspend his personal beliefs while explaining historical findings. Harari does a very good job at that. He presents multiple viewpoints and theories of a historical event without actually taking sides. He admits that even today we are ignorant of many things including ancient history which left no evidence for us to study. However when it comes to conclusions, he has his own ideas which are very compelling!
Even though Harari doesn’t take any side in the debate of animal rights and vegetarianism, he paints a grim picture of the plight of domestic animals. There is no doubt that we are very brutal when it comes to industrial handling of animals used for meat and milk. The book contains plenty of horror stories. Historically my own local culture has been much more considerate towards the domestic animals, but money and industrialization is changing that. But here again, we need to be aware of the food requirements of 700 billion people!
One controversial part of the book is where Harari calls the agricultural revolution as history’s biggest fraud! He rightly points out that agricultural life has lead to lot of human suffering – tyranny of the elite classes, the quick spread of deadly diseases etc. Some are critical of this conclusion and argues that he underestimated the challenges faced by the so called happy "hunter-gatherers".
But we need to be aware that it is nearly impossible to make a judgment of history from our current privileged life. Many of the ideas and behaviors of my local community may be unacceptable to someone from a western country. In such a scenario, how can we judge people who lived thousands of years ago?
Towards the end of the book, Harari does a broad analysis of human happiness, looking not just at the philosophical question, but also the chemical and biological findings behind it. This section is sure to leave the reader confused if not completely depressed!
The small stories and intriguing photographs interspersed across the chapters makes the book a memorable read. It made me curious enough to investigate the background of the Lion-man, learn more about Gobekli Tepe and study the Buddhist teachings. And it made me think about what we are doing to our domestic animals bred for meat and milk.
Yuval Noah Harari’s Sapiens, A Brief History of Humankind is a brilliant piece of work. It is full of shocking and thought provoking stories. The vivid, crispy and witty language will dazzle you and its conclusions may even change your perspective on life. This is a masterpiece, get your copy today!
What do we want to want?
My Rating: 9/10
Further Reading/Additional Resources
- Sapiens, A Brief History of Humankind (Amazon US)
- Sapiens, A Brief History of Humankind (Amazon India)
- Harari’s YouTube Course on A Brief History of Humankind
- Photos of Oldest Temple (Gobekli Tepe)
- The Lion Man
- A Look at Cognitive Revolution
- The Last Tasmanian
- The Black War
- The "Earmouse"
- How Commercial Hatchery Works?