February 23, 2017

How to become the MacGyver of surviving terrorist attacks

0 comments
It's true you're more likely to be fatally crushed by furniture than killed by a terrorist, but preparing for unexpected events is always a good idea. So how can you prepare for a terrorist attack? The government tells you to:
  • Be prepared by observing the emergency exits
  • React quickly and not freeze from panic
  • Make yourself a small target by hiding
  • And if everything else fails you have to fight for your life

But I don't think reading a 4-point bullet list is enough. The list says you shouldn't freeze from panic, but who's voluntarily freezing from panic? Isn't that an involuntarily decision made by your brain? Anyway, last year I read the book The Unthinkable - who survives when disaster strikes - and why by Amanda Ripley. The reason I read it was because a guy on a radio show talked about zombie attacks and he said the book would really help you prepare for the zombies. I'm not a big believer in zombie attacks, but the book doesn't mention the word zombie, and it was actually one of the best books I read during the year. 

The Unthinkable mentions several disasters, including 9/11, the sinking of the Estonia ferry, and a huge explosion in Canada. It's true you can't survive all disasters. If you were caught in one of the floors above the floors where the aircraft hit the Twin Towers, then this book will not help you. But you can maximize the probability to survive if you know what's going on in your brain when you are in the middle of a disaster.

In an emergency situation, your brain will not always help you survive. It can begin to make stupid decisions:
  • You will not accept this is happening to you. It's common to laugh, which in these situations is a form of denial: "This can't be happening to me!" Then you might get angry and then you may become quite, so mood swings are normal. But you will most likely not panic. Most people who die in disasters die from doing nothing at all and not from running around like a wet hen. In hindsight, they might think they panicked, but they only felt afraid and that is not the same thing as panic. So what you have do is to go from the denial phase to the do-something phase while remaining positive. Studies have shown that people perform better under stress if they think they can handle the situation.   
  • You will begin to gather stuff you want to take with you but you will not need. 
  • Your memory and senses will be switched on and off. This is happening at certain key points, so you may lose your vision or hearing. Remember the soldier in the reality-based Band of Brothers series who became blind during combat, but would later regain his vision when things calmed down.
  • You will forget your obligations. One person who survived 9/11 was actually in charge of evacuating the floor, but the person forgot all about it only remembered it several weeks later.
  • You will observe what other people around you are doing. This is the reason why you won't react quickly because you don't always know if you are in a terrorist attack. For example, it's easy to confuse firing guns with fireworks. If you begin to flee and it turns out to just be fireworks, then you will be laughed at and perhaps your fleeing will end up on YouTube. So you will observe what other people around you are doing, and if no-one else is doing something then neither will you. In the past, people have died because they followed the crowd, while ignoring closer exits. 
  • Your brain will freeze. The reason is you have never before been in this situation so your brain freeze while trying to figure out what to do. One person in the book who was under fire began thinking about the The Naked and the Dead, a book about soldiers in combat, because his brain was searching though its archive of experiences. This also happened when Estonia sank. One of the survivors could see how people on the top deck just sat down in chairs and where doing nothing at all instead of trying to reach the life boats, which were very close. 
  • You will come up with stupid ideas. One woman almost died from a fire because the person outside didn't want to crush the window out of fear of getting in trouble for crushing a nice window. 
  • You will follow the wrong leaders. One of the companies with most 9/11 survivors was a company with a security chief who made sure everyone knew where the emergency stairs were, and when the attacks happened everyone listened to him. But following leaders can also be the wrong decision. Firemen have seen people moving along their fire trucks towards the fire, instead of moving away from the fire because firemen are seen as leaders in a disaster.       

But your brain will also make smart decisions. Opposite from what you may first think, you will be more kind than you would have been on a normal day and you will behave orderly. During the evacuation of the towers during 9/11, people were calm and didn't run over each other on the stars on the way down. Your brain can also toughen up itself. Research shows that special forces soldiers tend to have more traumatic backgrounds, so their brains have learned something from the trauma, which makes them more capable of handling stress.   
   
So what can you do? How can you help you brain not to freeze? Remember that your brain is freezing because it doesn't have any experience from the situation. So the solution is to prepare to get experience. One police office from the book explained how his subconscious mind made better decisions than his conscious mind, so he always trusted his subconscious mind when the bullets were flying above his head. When I was in the army I recall how we had to disassemble and assemble our rifles hundreds of times until the process became unconscious. I've luckily never had to perform this process while the bullets are flying, but if you listen to the book it wasn't a waste of time.

But preparing for disasters is easier said than done. The author of the book suggests we should build amusement parks where you can prepare for disasters. Someone in Britain had the idea to install aircraft cabin simulators in airports, so passengers who are waiting for their flight could practice open emergency doors, but they idea went nowhere...

The government bullet list says you should prepare by observing where the emergency exits are. You now know why this is helpful: it will give your brain experience and it will not freeze if something is happening. This is also true when flying. Disaster experts always read the "useless" safety briefing cards because they know each aircraft is different and they know their brain will use this information if a disaster happens. They also test to exit the hotels they are visiting by using the stairs because they don't trust that someone will show them how to escape. This is important: everyone has to know what to do if a disaster happens. Remember the person who survived 9/11 and was in charge of evacuating the floor, but the person forgot all about it? So if you just have key employees in charge of the evacuation, it is not good enough.

You need to forget your experience of what has happened before. This might sound contrary to what I said above: you need experience to survive a disaster. But experience from disasters can also harm you. You may believe that many of those who died in Hurricane Katrina were poor and couldn't escape the city. But the truth is that many of those who died because they had survived previous hurricanes and thought they also would survive Katrina. So many of those who died were not poor, but old. There's also a story about a tsunami that killed people because they had locked themselves in their house because they thought the sound of the tsunami was gun shots because that's what their experience told them.  

You have to learn not only that you should do something, but also why you should do it. For example, we have all listened to flight attendants explaining what to do if the oxygen masks drop down from the ceiling of the plane. They always say you should put on your own mask before helping others. But why is it important to always put on your own mask before helping others? The answer is that in the event of a rapid decompression, your have not more than 15 seconds before you pass out. Now you understand why you have to prioritize putting on your own mask before helping others!

You have to learn how to breathe. Both FBI agents and special forces are taught how to breathe correctly to master their fear. This is how you should do it: breathe in for four counts, hold for four counts, breathe out for for counts, hold for four counts, and repeat all over again. This will help you from hyperventilating or panicking. One police office was playing a tape recording of a police siren while breathing to make it an automatic response to the siren.   

February 13, 2017

Can you design structures that last forever?

0 comments
Structures: Or Why Things Don't Fall Down by J. E. Gordon is a book about how you can design machines, buildings, boats, aircraft so they don't fall down. But the sentence "falling down" is not telling the entire story as the book will also tell you how to design structures so they don't explode. The reason I decided to read it was because Elon Musk, who is famous for building electric cars and rockets, recommended it. When he founded his rocket company SpaceX, he didn't have any experience from designing rockets, and since it's important that rockets "don't fall down," this is one of the books he read to learn how to design rockets: "It is really, really good if you want a primer on structural design."

As Elon Musk said, the book will give you a primer on structural design, so it's not a book you should read if you want to learn how to actual design so things don't fall apart. The author has included a few formulas you can use, but no examples of how to actual use the formulas. But the book is filled with interesting examples of how structures have failed and it will also give you a brief history of the area, so it's a good read in connection with a university course covering then calculation part. I would have really enjoyed reading it when I took a class on the subject a few years ago.

The area the book covers is also known as the strength of materials, and it's not the easiest of areas you can study. I would say that the area is abstract, which is why it's difficult to design structures so they don't fall down. You can't always make calculations to understand what's going on in the material until the structure has collapsed and this can take several years before it happens. This is actually one of the reasons Tesla Motor's first car, the Roadster, was delayed. The Roadster used a transmission that fell apart, not immediately, but after driving many miles. When Tesla Motors thought they had come up with a solution to the failing transmission, they had to drive it many miles to see if it really worked, so it was really time consuming to test new solutions.

I thought the most interesting parts of the book was the examples of how old structures has failed and why some didn't fail. This is an area I've had in the back of my head: if it today is difficult to design a structure so it doesn't fall down, then how difficult was it 500 years ago when they didn't have the computers engineers have today? For example, the Notre Dame Cathedral was completed in 1345 and is still in 2017 standing in Paris:

Notre Dame Cathedral by Matthew F 

The book's answer to the question what engineers back in the days knew and didn't knew is that while it might seem obvious that the medieval masons knew how to build churches, they were actually more priests and chefs than engineers. A medieval mason trusted God and a cookbook with rules of thumb when constructing buildings. The medieval castles were built with rules inherited from the Roman empire: thick walls, rounded arches, and small windows. Following rules of thumb is the way to go when you design buildings because these rules scale, so it's as easy to build a small church as it is to build a large cathedral. But trusting God didn't always work, and this is another reason why we overestimate the medieval masons. While we admire the great buildings that seem to last forever, those buildings that fell down are long forgotten, although the combination exists:

The Leaning Tower of Pisa by Saffron Blaze

So the medieval masons trusted God and rules of thumb, but what about the medieval shipbuilders? While the medieval engineers could build larger and larger churches, the ships had the same size. The reason is that you can't use the same rule of thumbs you did when you designed a small ship as you do when you build a larger ship. They probably tried to build larger ships, but they failed and are now long forgotten. But one of the failed ships that we remember is Vasa, which was a Swedish warship completed in 1628. Vasa sank on her maiden voyage because the shipbuilders deviated from the rules of thumb and their failure is now a major tourist attraction in Stockholm.

Vasa by JavierKohen

Following rules of thumb continued during the Industrial Revolution. The theory engineers use today to design structures that don't (always) fall down were developed at the same time, but rules of thumb was apparently more important than "theory." The result was: more human lives lost. In the 19th century, steamboats were racing up and down the Mississippi river. To win the race, the engineers used an "optimistic" approach to boiler design to save weight. As a result, and in one year only, 27 ships were lost as a result of boiler explosion. The author argues that the idea to ignore theory is to some extend true also today, and that "nine out of ten accidents are caused, not by more or less abstruse technical effects, but by old-fashioned human sin - often verging on plain wickedness."

Historically, we have seen that structures have fallen down because the engineers didn't use the theories we have today. So can we today design a structure that will last forever? The answer is no! The problem is that you can't take everything into account when designing a structure. Some structures are likely to be broken only by an unusual combination of events. A bridge may collapse if on a windy day, there's an unusually amount of traffic on the bridge. It may take years before one of these events happen. A structure that might seem it will last forever, is actually dangerous simply because it has never been fully tried. According to the author:
"It it is impossible, in practice, to plan for a safe life of exactly so many hours or years. We can only consider the problem in statistical terms and in the light of accumulated data and experience. We then build in whatever margin of safety seems reasonable. All the time we are working on a basis of probabilities and estimates. If we make the structure too weak we may save weight and money, but the chance of the thing breaking too soon will become unacceptable high. Contrariwise, if we make a structure so strong that, in human terms, it is likely to last forever - which is what the public would like - then it will probably be too heavy and expensive. Because we are necessarily working on an statistical basis, when we design a practical structure for a realistic life we have to accept that there is always some finite risk, however small, of premature failure."

So remember the next time you are sitting in a plane high above the sea, driving your car on the highway, or riding in an elevator, the engineer has most likely done his or her best to design the structure, but there is always some finite risk, however small, of premature failure.

February 12, 2017

3 books you must read if you want to learn more about helicopters

0 comments
I've spent some time reading books about helicopters to research a project I'm working on. This is a list of the books I thought were the best.

Chickenhawk. This book is considered a must-read for all helicopter pilots. It's written by Robert Mason, who was a helicopter pilot in the Vietnam war, which was the first conflict that really used helicopters. Yes, helicopters were used in both the Second World War and in the Korean War, but in the Vietnam war, US realized that they could transport battalions of soldiers across the battlefield to surprise the enemy. The book includes a lot of information on how to operate a helicopter in a war zone, but it's not a technical manual, so if you are not interested in helicopter technology you will also enjoy reading it.

Deadliest Sea - The Untold Story Behind the Greatest Rescue in Coast Guard History. This books tells the story of a sinking fishing ship in the middle of an Alaskan cold sea and how the US Coast Guard did its best to rescue the fishers. While the book Chickenhawk told the story of how helicopters operate in a war zone, this book will tell the story of how helicopters operate from a coast guard perspective: what equipment does a coast guard helicopter carry, how does the rescue swimmer operate, how can a helicopter refuel at sea, and much more?

Helicopter flying handbook. Is a free book written by the US Department of Transportation and is a handbook written mainly for students who want to become helicopter pilots. While Chickenhawk and Deadliest Sea will give you some technical details, this book will tell you all about aerodynamics, flight controls, systems, performance, flight maneuvers, emergencies, how to operate a helicopter in different weather conditions, and so on.

If you still want to read more about helicopters, you can also read We Were Soldiers Once...and Young: Ia Drang - The Battle That Changed the War in Vietnam, which tells the story of a battle in Vietnam famous from the movie with the same name. Robert Mason, who wrote Chickenhawk, participated in the same battle, so some of it is repetition if you read that book. Neither is the book focused on helicopters, but there are some helicopter facts in it.

Another book you can read is Black Hawk Down: A Story of Modern War, which is another book famous from a movie. It will tell you the story of what happens when a helicopter is shot down in the middle of a conflict. While many helicopters were shot down in the book Chickenhawk, the Black Hawk Down battle took place in Somalia in the 1990s.

February 5, 2017

Why Drawing Cats Will Make You Question Everything

0 comments
A few weeks ago I read the book The art of game design. Game design is more than how a game should look like, but the book's chapter on aesthetics said that "the key to creating great artwork is in your ability to see." Well, how hard can it be to see? The answer is that it's actually difficult to really see. One good example of where your brain is fooling you is Shepard's famous table image:


Your brain is telling you that the tables don't have the same shape. But if you measure them, you will see that they have the same shape even though one of them is rotated 90 degrees.

If you look at an object, like your phone, you see a phone. But to really see the phone you have to learn to see the its shapes, colors, proportions, shadows, reflections, textures, and its relationship to the environment. Why is it so difficult to actually see the phone? The answer is that our brain is programmed to take shortcuts to avoid being overloaded. If you each time you saw an object, you would notice its shapes, colors, proportions, and all the other things, then your poor brain would become overloaded. So it's easier for the brain to just add labels to the objects you are seeing and then move on to the next object.

The brain's habit to add labels to objects you are seeing is a problem if you want to draw images. This is the topic of the book Drawing on the rights side of the brain. The idea behind the book's title is that your brain consists of two sides: left and right. It's the left side that add labels to objects and it's the right side that can see all the details, such as shapes, colors, proportions, shadows, etc. So you need to use the right side of your brain if you want to draw an image of whatever you are seeing. Switching from the left to the right side is not an easy task as there's no switch you can use to just deactivate the left brain. What you need to do to make the switch is to fool the left side.

If you want to draw this cat, your left brain will bring up its memories of what a cat looks like and you will draw these memories instead of what you are actually seeing.


One of the tricks you can use to be able to draw the cat with the right side of the brain is to turn it upside down:


Why should you turn the cat upside down? The answer is that it will be much more difficult for your left brain to attach memories of cats to the cat, making your right brain take over so you can actually see the cat's shapes and colors. So when you draw the cat you need to avoid words like eyes, because it will bring up memories of eyes that you will draw instead of the green shapes you should draw. This is actually a technique forgers use to copy signatures: they have learned that it's easier to copy the signature if they turn the original signature upside down.

You also need to avoid cat characteristics like that it's soft because it will not help you to draw the cat and the visual information you see may not be the same as what you remember. So you should draw what you see and not what you know. You should draw what you see without questioning why whatever you are drawing is looking like what you see. But when you are finished with you drawing, you should use your left brain to judge the result. Is what you drew looking like a cat?

December 31, 2016

Books I read in 2016

0 comments
Each year I write a list of books I read during the year. This is the 2016 list:
  1. A Brief Introduction to Neural Networks. A free book that will give you an introduction to artificial neural networks, which is a group of mathematical models behaving similarly to neurons in the brain.  
  2. Clouds of Glory: The Life and Legend of Robert E. Lee. A biography on Robert E. Lee who was an engineer but also a famous general in the US Civil War. 
  3. The Society of Mind. Written by Marvin Minsky, who is famous for his contributions to artificial intelligence, the book describes how he thinks the human brain works. 
  4. Superintelligence. What will happen when our computers are becoming smarter and smarter? Are they going to kill us or are they going to help us? 
  5. The Devil in the White City: Murder, Magic, and Madness at the Fair that Changed America. This book consists of two stories: the first is about the world fair in Chicago and the second is about a serial killer who used the fair to lure his victims to their deaths. 
  6. The way of the superior man. What's the meaning of life? Why are women so strange? This book is trying to answer those questions. 
  7. Omgiven av idioter (Surrounded by idiots). Is a Swedish book on psychology and why it seems like some people around us are idiots. The answer is that humans behave differently, so to handle people who seems like they are idiots you have to handle them in a special way. You might argue that someone who can't take initiative is an idiot, but that's just how that person is, so you have to tell the person what to do.
  8. Fundamentals of computer programming with C#. Is a free book about the basics of the C# programming language. 
  9. .Net Book Zero. Is a free book about the basics of the C# programming language. 
  10. The Pragmatic Programmer. Is trying to summarize the experience of older programmers so new programmers can learn from them. 
  11. The Best of edw519. Is a free book and summarizes the knowledge of the user edw519 (from Hacker News) who is an experienced programmer. 
  12. Game Programming Patterns. Is a free book and it will teach you basic ideas or building blocks related writing software for games. 
  13. Masters of Doom: How Two Guys Created an Empire and Transformed Pop Culture. Is a biography on John Carmack and John Romero, who created the popular games Wolfenstein 3D, Doom, and Quake. 
  14. Getting Real: The smarter, faster easier way to build a successful web application. This book will teach you a better way to develop new products. If you want to develop a Microsoft Word competitor, then you should build a product with less features, get feedback from customers as soon as possible, and try to stay as small as possible. If you do that (and a few other things explained in the book) then you will be able to compete with a larger company that can't be as flexible as you can.  
  15. Production Volume Rendering. Is a free book and is all about volume rendering which is a technique to display volumetric elements such as clouds on the screen. For example, the clouds in the movie Avatar were generated with volume rendering.
  16. Beyond Band of Brothers: The War Memoirs of Major Dick Winters. Is the biography on the leader (with the red hair) in the television series Band of Brothers.
  17. Panzer Leader. Is a biography on and by Heinz Guderian, who was responsible for making the tank an important part of the German war machine during World War 2.
  18. Ivan's War: Life and Death in the Red Army, 1939-1945. Russia lost millions of soldiers during the Second World War. This is the story of them (and those who survived).
  19. Infantry Attacks. In the movie Patton, where Patton on the battlefield is facing the German officer Erwin Rommel's troops, there's a famous line: "Rommel you magnificent bastard, I read your book." This is that book, and it's about Rommel's endeavors as an officer during the first world war. 
  20. The art of game design. A book about how to design games. 
  21. Mud, Sweat, and Tears: The Autobiography. Bear Grylls has a few popular television shows about how to survive in the wilderness. This is his biography. 
  22. Red Storm Rising. What would happen if NATO and Russia decided to fight a war against each other?
  23. A history of mathematics. As the title says: the history of mathematics from before the Egyptians to the middle of the 20th century.
  24. How to solve it. A book about how to solve mathematical problems. It's obviously not a solution to how to actually solve all mathematical problems, but it gives you insights into how to start solving problems and how other mathematicians have solved their problems. You can probably apply it on other problems as well - not just mathematical problems.
  25. Fermat's Enigma: The Epic Quest to Solve the World's Greatest Mathematical Problem. Fermat's last theorem was one of the most famous mathematical problems. This book tells the story of how the problem was solved. It will also give you a brief overview of the history of mathematics.  
  26. The man who knew infinity. A biography on the Indian mathematician Ramanujan (and also to some extent a biography on the British mathematician G. H. Hardy).
  27. The Wisdom of Crowds. Will teach you when you should (and when you shouldn't) listen to a group of other people. 
  28. Sophie's World: A Novel About the History of Philosophy. Is a dramatization of the history of philosophy, so if you want to get an introduction to philosophy you should read it. 
  29. Save the cat! The Last Book on Screenwriting You'll Ever Need. Is a book about how to write stories for movies, but most likely you can also use it if you are writing a book or a story for a game or a book.  
  30. The Great War of Our Time: The CIA's Fight Against Terrorism - From al Qa'ida to ISIS. Includes stories such as why CIA failed to predict 9/11, why CIA failed to find any weapons of mass destruction in Iraq, what are some misconceptions regarding the embassy attack in Libya, some Edward Snowden criticism, and what really happened when President Bush's dog Barney got a piece of plastic stuck in his throat during an intelligence briefing. 
  31. A theory of fun for game design. Why are some games fun and other games boring?
  32. Game over press start to continue. The book covers the history of Nintendo from the birth of the company to 1999, including stories how Mario was created, how Nintendo traveled to Russia to get the game Tetris, and the history of other companies like Atari and Sega.
  33. Moon Lander: How We Developed the Apollo Lunar Module. Tells the story of how the engineers developed the so-called Lunar Excursion Module, which landed mankind on the Moon in 1969.
  34. Swarm Intelligence: From Natural to Artificial Systems. All about artificial intelligence algorithms inspired by our tiny friends the ants and other insects.
  35. Visual Explanations. A book by Edward Tufte and is about pictures of verbs, the representation of mechanism and motion, process and dynamics, causes and effects, explanation and narrative. You will for example learn how the Space Shuttle Challenger disaster could have been avoided if NASA has used other visualizations. Is filled with images so it's a fast read.
  36. Beautiful Evidence. Is about how seeing turns into showing, how data and evidence turn into explanation. It's by the same author as Visual Explanations, so it's filled with images so it's a fast read. You will learn, for example, why you should have images that explain the text close to text so the reader doesn't have to go back and forth as if you collect all images at the end of the book, like some authors do. This is common sense, but you still have to learn it so that it becomes common sense. You will also learn why the Space Shuttle Columbia was destroyed because of a PowerPoint presentation, which by the way you should avoid because they are too summarized. Use technical reports! There's also a saying that "a picture is worth a thousand words," but you have to make sure that your picture is worth a thousand words. Sometimes a picture can be worth less and then you shouldn't use it. 
  37. Envisioning Information. Is the third book by Edward Tufte I've read this year and is about how to display complex data. You will see beautiful examples of how to display both railroad lines and dance movements. And you will learn how to improve your own visualizations, such as that you should add detail to clarify and why 1 + 1 = 3 (if you have two separated colored lines, there's always a third white line between them).
  38. Adventures Among Ants: A Global Safari with a Cast of Trillions. Is a book about ants written by Mark Moffett who is also known as Doctor Bugs.
  39. Ett halvt år, ett helt liv (A half year, an entire life). A Swedish biography by a UN soldier in the Bosnian War.
  40. Chickenhawk. Is a true story written by Robert Mason, who was a helicopter pilot in the Vietnam war. The battle dramatized in the movie We Were Soldiers was one of the battles he participated in.
  41. Deadliest Sea: The untold story behind the greatest rescue in Coast Guard history. Tells the true story of the sinking of the Alaska Ranger and how the Coast Guard were trying to save the people on the boat.
  42. Black Hawk Down. Is about a failed US military mission in Somalia.
  43. Jacked: The Outlaw Story of Grand Theft Auto. Written by the same author as Masters of Doom, it tells the story of the popular game series Grand Theft Auto (GTA), from GTA I to GTA IV. It includes stories like when the GTA team hired a cop to protect them while researching violent neighborhoods in New York for the game. Since GTA is a violent game you will also learn about if you can blame the game for inspiring violence, such as an incident where two teenagers began shooting at cars on a highway after playing the game.
  44. Essential Mathematics for Games and Interactive Applications. Is a super-good book (some nerds consider it a bible) if you want to learn how to apply mathematics to games. You will learn the basics of graphics (including lightning and shaders), interpolation, collisions, and much more.
  45. Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future. Is a biography on Elon Musk. A few years ago I wrote my own biography on Elon Musk, so it was fun to compare the books.