War Games

So, what haven’t I done a post on in a while. Hmm…

Film reviewing?

WarGames was always going to struggle to age gracefully; even in 1983 setting one’s plot against the backdrop of the Cold War was something of an old idea, and the fear of the unofficial conflict degenerating into armageddon had certainly lessened since the ‘Red Scare’ days of the 50s and 60s. Then there’s the subject matter and plot- ‘supercomputer almost destroys world via nuclear war’ must have seemed terribly futuristic and sci-fi, but several years of filmmaking have rendered the idea somewhat cliched; it’s no coincidence that the film’s 2008 ‘sequel’ went straight to DVD. In an age where computers have now become ubiquitous, the computing technology on display also seems hilariously old-fashioned, but a bigger flaw is the film’s presentation of how computers work. Our AI antagonist, ‘Joshua’, shows the ability to think creatively, talk and respond like a human and to learn from experience & repetition, all features that 30 years of superhuman technological advancement in the field of computing have still not been able to pull off with any real success; the first in a long series of plot holes. I myself spent much of the second act inwardly shouting at the characters for making quite so many either hideously dumb or just plain illogical decisions, ranging from agreeing on a whim to pay for a flight across the USA to a friend met just days earlier to deciding that the best way to convince a bunch of enraged FBI officers of that you are not a Soviet-controlled terrorist bent on destruction of the USA is to break out of their custody.

The first act largely avoided these problems, and the setup was well executed; our protagonist is David (Matthew Broderick), a late teenage high school nerd who manages to avoid the typical Hollywood idea of nerd-dom by being articulate, well-liked, not particularly concerned about his schoolwork and relatively normal. Indeed, the only clues we have to his nerdery come thanks to his twin loves of video gaming and messing around in his room with a computer, hacking into anything undefended that he considers interesting. The film also manages to avoid reverting to formula with regards to the film’s female lead, his friend Jennifer (Ally Sheedy), who manages to not fall into the role of designated love interest whilst acting as an effective sounding board for the audience’s questions; a nice touch when dealing subject matter that audiences of the time would doubtless have found difficult to understand. This does leave her character somewhat lacking in depth, but thankfully this proves the exception rather than the rule.

Parallel to this, we have NORAD; the USA’s nuclear defence headquarters, who after realising the potential risk of human missile operators being unwilling to launch their deadly weapons, decide to place their entire nuclear arsenal under computerised control. The computer in question is the WOPR, a supercomputer intended to continually play ‘war games’ to identify the optimal strategy in the event of nuclear war. So we have a casual computer hacker at one end of the story and a computer with far too much control for its own good in the other; you can guess how things are going to go from there.

Unfortunately, things start to unravel once the plot starts to gather speed. Broderick’s presentation of David works great when he’s playing a confident, playful geek, but when he starts trying to act scared or serious his delivery becomes painfully unnatural. Since he and Sheedy’s rather depthless character et the majority of the screen time, this leaves large portions of the film lying fallow; the supporting characters, such as the brash General Beringer (Barry Corbin) and the eccentric Dr. Stephen Falken (John Wood) do a far better job of filling out their respective character patterns, but they can’t quite overshadow the plot holes and character deficiencies of the twin leads. This is not to say the film is bad, far from it; director John Badham clearly knows how to build tension, using NORAD’s Defcon level as a neat indicator of just how high the stakes are/how much **** is waiting to hit the proverbial fan. Joshua manages to be a compelling bad guy, in spite of being faceless and having less than five minutes of actual screen time, and his famous line “A strange game. The only winning move is not to play” carries enough resonance and meaning that I’d heard of it long before I had the film it came from. It also attempts the classic trick, demonstrated to perfection in Inception, of dealing with subject matter that attempts to blur the line between fiction (the ‘war games’) and reality (nuclear war) in an effort to similarly blur its own fiction with the reality of the audience; it is all desperately trying to be serious and meaningful.

But in the end, it all feels like so much add-ons, and somehow the core dynamics and characterisation left me out of the experience. WarGames tries so very hard to hook the viewer in to a compelling, intriguing, high-stakes plot, but for me it just failed to quite pull it off. It’s not a bad film, but to me it all felt somehow underwhelming. The internet tells me that for some people, it’s a favourite, but for me it was gently downhill from the first act onwards. I don’t really have much more to say.

Advertisements

Crypto

Cryptography is a funny business; shady from the beginning, the whole business of codes and ciphers has been specifically designed to hide your intentions and move in the shadows, unnoticed. However, the art of cryptography has been changed almost beyond recognition in the last hundred years thanks to the invention of the computer, and what was once an art limited by the imagination of the nerd responsible has now turned into a question of sheer computing might. But, as always, the best way to start with this story is at the beginning…

There are two different methods of applying cryptography to a message; with a code or with a cipher. A code is a system involving replacing words with other words (‘Unleash a fox’ might mean ‘Send more ammunition’, for example), whilst a cipher involves changing individual letters and their ordering. Use of codes can generally only be limited to a few words that can be easily memorised, and/or requires endless cross-referencing with a book of known ‘translations’, as well as being relatively insecure when it comes to highly secretive information. Therefore, most modern encoding (yes, that word is still used; ‘enciphering’ sounds stupid) takes the form of employing ciphers, and has done for hundreds of years; they rely solely on the application of a simple rule, require far smaller reference manuals, and are more secure.

Early attempts at ciphers were charmingly simple; the ‘Caesar cipher’ is a classic example, famously invented and used by Julius Caesar, where each letter is replaced by the one three along from it in the alphabet (so A becomes D, B becomes E and so on). Augustus Caesar, who succeeded Julius, didn’t set much store by cryptography and used a similar system, although with only a one-place transposition (so A to B and such)- despite the fact that knowledge of the Caesar cipher was widespread, and his messages were hopelessly insecure. These ‘substitution ciphers’ suffered from a common problem; the relative frequency with which certain letters appear in the English language (E being the most common, followed by T) is well-known, so by analysing the frequency of occurring letters in a substitution-enciphered message one can work out fairly accurately what letter corresponds to which, and work out the rest from there. This problem can be partly overcome by careful phrasing of messages and using only short ones, but it’s nonetheless a problem.

Another classic method is to use a transposition cipher, which changes the order of letters- the trick lies in having a suitable ‘key’ with which to do the reordering. A classic example is to write the message in a rectangle of a size known to both encoder and recipient, writing in columns but ‘reading it off’ in rows. The recipient can then reverse the process to read the original message. This is a nice method, and it’s very hard to decipher a single message encoded this way, but if the ‘key’ (e.g. the size of the rectangle) is not changed regularly then one’s adversaries can figure it out after a while. The army of ancient Sparta used a kind of transposition cipher based on a tapered wooden rod called a skytale (pronounced skih-tah-ly), around which a strip of paper was wrapped and the message written down it, one on each turn of paper. The recipient then wrapped the paper around a skytale of identical girth and taper (the tapering prevented letters being evenly spaced, making it harder to decipher), and read the message off- again, a nice idea, but the need to make a new set of skytale’s for everyone every time the key needed changing rendered it impractical. Nonetheless, transposition ciphers are a nice idea, and the Union used them to great effect during the American Civil War.

In the last century, cryptography has developed into even more of an advanced science, and most modern ciphers are based on the concept of transposition ciphers- however, to avoid the problem of using letter frequencies to work out the key, modern ciphers use intricate and elaborate systems to change by how much the ‘value’ of the letter changes each time. The German Lorenz cipher machine used during the Second World War (and whose solving I have discussed in a previous post) involved putting the message through three wheels and electronic pickups to produce another letter; but the wheels moved on one click after each letter was typed, totally changing the internal mechanical arrangement. The only way the British cryptographers working against it could find to solve it was through brute force, designing a computer specifically to test every single possible starting position for the wheels against likely messages. This generally took them several hours to work out- but if they had had a computer as powerful as the one I am typing on, then provided it was set up in the correct manner it would have the raw power to ‘solve’ the day’s starting positions within a few minutes. Such is the power of modern computers, and against such opponents must modern cryptographers pit themselves.

One technique used nowadays presents a computer with a number that is simply too big for it to deal with; they are called ‘trapdoor ciphers’. The principle is relatively simple; it is far easier to find that 17 x 19 = 323 than it is to find the prime factors of 323, even with a computer, so if we upscale this business to start dealing with huge numbers a computer will whimper and hide in the corner just looking at them. If we take two prime numbers, each more than 100 digits long (this is, by the way, the source of the oft-quoted story that the CIA will pay $10,000 to anyone who finds a prime number of over 100 digits due to its intelligence value) and multiply them together, we get a vast number with only two prime factors which we shall, for now, call M. Then, we convert our message into number form (so A=01, B=02, I LIKE TRAINS=0912091105201801091419) and the resulting number is then raised to the power of a third (smaller, three digits will do) prime number. This will yield a number somewhat bigger than M, and successive lots of M are then subtracted from it until it reaches a number less than M (this is known as modulo arithmetic, and can be best visualised by example: so 19+16=35, but 19+16 (mod 24)=11, since 35-24=11). This number is then passed to the intended recipient, who can decode it relatively easily (well, so long as they have a correctly programmed computer) if they know the two prime factors of M (this business is actually known as the RSA problem, and for reasons I cannot hope to understand current mathematical thinking suggests that finding the prime factors of M is the easiest way of solving this; however, this has not yet been proven, and the matter is still open for debate). However, even if someone trying to decode the message knows M and has the most powerful computer on earth, it would take him thousands of years to find out what its prime factors are. To many, trapdoor ciphers have made cryptoanalysis (the art of breaking someone else’s codes), a dead art.

Man, there’s a ton of cool crypto stuff I haven’t even mentioned yet… screw it, this is going to be a two-parter. See you with it on Wednesday…

The Myth of Popularity

WARNING: Everything I say forthwith is purely speculative based on a rough approximation of a presented view of how a part of our world works, plus some vaguely related stuff I happen to know. It is very likely to differ from your own personal view of things, so please don’t get angry with me if it does.

Bad TV and cinema is a great source of inspiration; not because there’s much in it that’s interesting, but because there’s just so much of it that even without watching any it is possible to pick up enough information to diagnose trends, which are generally interesting to analyse. In this case, I refer to the picture of American schools that is so often portrayed by iteration after iteration of generic teenage romance/romcom/’drama’, and more specifically the people in it.

One of the classic plot lines of these types of things involves the ‘hopelessly lonely/unpopular nerd who has crush on Miss Popular de Cheerleader and must prove himself by [insert totally retarded idea]’. Needless to say these plot lines are more unintentionally hilarious and excruciating than anything else, but they work because they play on the one trope that so many of us are familiar with; that of the overbearing, idiotic, horrible people from the ‘popular’ social circle. Even if we were not raised within a sitcom, it’s a situation repeated in thousands of schools across the world- the popular kids are the arseholes at the top with inexplicable access to all the gadgets and girls, and the more normal, nice people lower down the social circle.

The image exists in our conciousness long after leaving school for a whole host of reasons; partly because major personal events during our formative years tend to have a greater impact on our psyche than those occurring later on in life, but also because it is often our first major interaction with the harsh unfairness life is capable of throwing at us. The whole situation seems totally unfair and unjust; why should all these horrible people be the popular ones, and get all the social benefits associated with that? Why not me, a basically nice, humble person without a Ralph Lauren jacket or an iPad 3, but with a genuine personality? Why should they have all the luck?

However, upon analysing the issue then this object of hate begins to break down; not because the ‘popular kids’ are any less hateful, but because they are not genuinely popular. If we define popular as a scale representative of how many and how much people like you (because what the hell else is it?), then it becomes a lot easier to approach it from a numerical, mathematical perspective. Those at the perceived top end of the social spectrum generally form themselves into a clique of superiority, where they all like one another (presumably- I’ve never been privy to being in that kind of group in order to find out) but their arrogance means that they receive a certain amount of dislike, and even some downright resentment, from the rest of the immediate social world. By contrast, members of other social groups (nerds, academics [often not the same people], those sportsmen not in the ‘popular’ sphere, and the myriad of groups of undefineable ‘normies’ who just splinter off into their own little cliques) tend to be liked by members of their selected group and treated with either neutrality or minor positive or negative feeling from everyone else, leaving them with an overall ‘popularity score’, from an approximated mathematical point of view, roughly equal to or even greater than the ‘popular’ kids. Thus, the image of popularity is really something of a myth, as these people are not technically speaking any more popular than anyone else.

So, then, how has this image come to present itself as one of popularity, of being the top of the social spectrum? Why are these guys on top, seemingly above group after group of normal, friendly people with a roughly level playing field when it comes to social standing?

If you were to ask George Orwell this question, he would present you with a very compelling argument concerning the nature of a social structure to form a ‘high’ class of people (shortly after asking you how you managed to communicate with him beyond the grave). He and other social commentators have frequently pointed out that the existence of a social system where all are genuinely treated equally is unstable without some ‘higher class’ of people to look up to- even if it is only in hatred. It is humanity’s natural tendency to try and better itself, try to fight its way to the top of the pile, so if the ‘high’ group disappear temporarily they will be quickly replaced; hence why there is such a disparity between rich and poor even in a country such as the USA founded on the principle that ‘all men are created free and equal’. This principle applies to social situations too; if the ‘popular’ kids were to fall from grace, then some other group would likely rise to fill the power vacuum at the top of the social spectrum. And, as we all know, power and influence are powerful corrupting forces, so this position would be likely to transform this new ‘popular’ group into arrogant b*stards too, removing the niceness they had when they were just normal guys. This effect is also in evidence that many of the previously hateful people at the top of the spectrum become very normal and friendly when spoken to one-on-one, outside of their social group (from my experience anyway; this does not apply to all people in such groups)

However, another explanation is perhaps more believable; that arrogance is a cause rather than a symptom. By acting like they are better than the rest of the world, the rest of the world subconsciously get it into their heads that, much though they are hated, they are the top of the social ladder purely because they said so. And perhaps this idea is more comforting, because it takes us back to the idea we started with; that nobody is more actually popular than anyone else, and that it doesn’t really matter in the grand scheme of things. Regardless of where your group ranks on the social scale, if it’s yours and you get along with the people in it, then it doesn’t really matter about everyone else or what they think, so long as you can get on, be happy, and enjoy yourself.

Footnote: I get most of these ideas from what is painted by the media as being the norm in American schools and from what friends have told me, since I’ve been lucky enough that the social hierarchies I encountered from my school experience basically left one another along. Judging by the horror stories other people tell me, I presume it was just my school. Plus, even if it’s total horseshit, it’s enough of a trope that I can write a post about it.

Drunken Science

In my last post, I talked about the societal impact of alcohol and its place in our everyday culture; today, however, my inner nerd has taken it upon himself to get stuck into the real meat of the question of alcohol, the chemistry and biology of it all, and how all the science fits together.

To a scientist, the word ‘alcohol’ does not refer to a specific substance at all, but rather to a family of chemical compounds containing an oxygen and hydrogen atom bonded to one another (known as an OH group) on the end of a chain of carbon atoms. Different members of the family (or ‘homologous series’, to give it its proper name) have different numbers of carbon atoms and have slightly different physical properties (such as melting point), and they also react chemically to form slightly different compounds. The stuff we drink is that with two carbon atoms in its chain, and is technically known as ethanol.

There are a few things about ethanol that make it special stuff to us humans, and all of them refer to chemical reactions and biological interactions. The first is the formation of it; there are many different types of sugar found in nature (fructose & sucrose are two common examples; the ‘-ose’ ending is what denotes them as sugars), but one of the most common is glucose, with six carbon atoms. This is the substance our body converts starch and other sugars into in order to use for energy or store as glycogen. As such, many biological systems are so primed to convert other sugars into glucose, and it just so happens that when glucose breaks down in the presence of the right enzymes, it forms carbon dioxide and an alcohol; ethanol, to be precise, in a process known as either glycolosis (to a scientist) or fermentation (to everyone else).

Yeast performs this process in order to respire (ie produce energy) anaerobically (in the absence of oxygen), so leading to the two most common cases where this reaction occurs. The first we know as brewing, in which an anaerobic atmosphere is deliberately produced to make alcohol; the other occurs when baking bread. The yeast we put in the bread causes the sugar (ie glucose) in it to produce carbon dioxide, which is what causes the bread to rise since it has been filled with gas, whilst the ethanol tends to boil off in the heat of the baking process. For industrial purposes, ethanol is made by hydrating (reacting with water) an oil by-product called ethene, but the product isn’t generally something you’d want to drink.

But anyway, back to the booze itself, and this time what happens upon its entry into the body. Exactly why alcohol acts as a depressant and intoxicant (if that’s a proper word) is down to a very complex interaction with various parts and receptors of the brain that I am not nearly intelligent enough to understand, let alone explain. However, what I can explain is what happens when the body gets round to breaking the alcohol down and getting rid of the stuff. This takes place in the liver, an amazing organ that performs hundreds of jobs within the body and contains a vast repetoir of enzymes. One of these is known as alcohol dehydrogenase, which has the task of oxidising the alcohol (not a simple task, and one impossible without enzymes) into something the body can get rid of. However, most ethanol we drink is what is known as a primary alcohol (meaning the OH group is on the end of the carbon chain), and this causes it to oxidise in two stages, only the first of which can be done using alcohol dehydrogenase. This process converts the alcohol into an aldehyde (with an oxygen chemically double-bonded to the carbon where the OH group was), which in the case of ethanol is called acetaldehyde (or ethanal). This molecule cannot be broken down straight away, and instead gets itself lodged in the body’s tissues in such a way (thanks to its shape) to produce mild toxins, activate our immune system and make us feel generally lousy. This is also known as having a hangover, and only ends when the body is able to complete the second stage of the oxidation process and convert the acetaldehyde into acetic acid, which the body can get rid of relatively easily. Acetic acid is commonly known as the active ingredient in vinegar, which is why alcoholics smell so bad and are often said to be ‘pickled’.

This process occurs in the same way when other alcohols enter the body, but ethanol is unique in how harmless (relatively speaking) its aldehyde is. Methanol, for example, can also be oxidised by alcohol dehydrogenase, but the aldehyde it produces (officially called methanal) is commonly known as formaldehyde; a highly toxic substance used in preservation work and as a disinfectant that will quickly poison the body. It is for this reason that methanol is present in the fuel commonly known as ‘meths’- ethanol actually produces more energy per gram and makes up 90% of the fuel by volume, but since it is cheaper than most alcoholic drinks the toxic methanol is put in to prevent it being drunk by severely desperate alcoholics. Not that it stops many of them; methanol poisoning is a leading cause of death among many homeless people.

Homeless people were also responsible for a major discovery in the field of alcohol research, concerning the causes of alcoholism. For many years it was thought that alcoholics were purely addicts mentally rather than biologically, and had just ‘let it get to them’, but some years ago a young student (I believe she was Canadian, but certainty of that fact and her name both escape me) was looking for some fresh cadavers for her PhD research. She went to the police and asked if she could use the bodies of the various dead homeless people who they found on their morning beats, and when she started dissecting them she noticed signs of a compound in them that was known to be linked to heroin addiction. She mentioned to a friend that all these people appeared to be on heroin, but her friend said that these people barely had enough to buy drink, let alone something as expensive as heroin. This young doctor-to-be realised she might be onto something here, and changed the focus of her research onto studying how alcohol was broken down by different bodies, and discovered something quite astonishing. Inside serious alcoholics, ethanol was being broken down into this substance previously only linked to heroin addiction, leading her to believe that for some unlucky people, the behaviour of their bodies made alcohol as addictive to them as heroin was to others. Whilst this research has by no means settled the issue, it did demonstrate two important facts; firstly, that whilst alcoholism certainly has some links to mental issues, it is also fundamentally biological and genetic by nature and cannot be solely put down as the fault of the victim’s brain. Secondly, it ‘sciencified’ (my apologies to grammar nazis everywhere for making that word up) a fact already known by many reformed drinkers; that when a former alcoholic stops drinking, they can never go back. Not even one drink. There can be no ‘just having one’, or drinking socially with friends, because if one more drink hits their body, deprived for so long, there’s a very good chance it could kill them.

Still, that’s not a reason to get totally down about alcohol, for two very good reasons. The first of these comes from some (admittely rather spurious) research suggesting that ‘addictive personalities’, including alcoholics, are far more likely to do well in life, have good jobs and overall succeed; alcoholics are, by nature, present at the top as well as the bottom of our society. The other concerns the one bit of science I haven’t tried to explain here- your body is remarkably good at dealing with alcohol, and we all know it can make us feel better, so if only for your mental health a little drink now and then isn’t an all bad thing after all. And anyway, it makes for some killer YouTube videos…