we wanted to open up the process of code-breaking to the audience. There is a tendency sometimes in pieces like this to (let) the characters jabber technical gibberish that no one in the audience will understand. We wanted you to be able to follow it.Maybe one day the people of Hollywood will learn to respect their audiences, or at least learn how to render technical 'gibberish' into more understandable gibberish. I believe it was Feynman who was of the opinion that if a subject could not be taught in a manner appropriate to first year college students, then that subject was not really understood at all. Code breaking can be taught in a manner appropriate to first year college students (indeed, cryptography is usually at least mentioned to first year computer science students), and I personally wanted more technical 'gibberish' from the film and less emotional fluff. Personally, I think the problem is not so much the audience as that the writers themselves do not understand technical things, and so of course they can not render it as anything other than the gibberish they understand it as.
Showing posts with label computers. Show all posts
Showing posts with label computers. Show all posts
Monday, December 29, 2014
The Imitation Game and a Lack of Respect for Audiences
Deadline has an interview with the maker of The Imitation Game. The following quote made me sad:
Sunday, December 14, 2014
The Imitation Game: The Betterment of the World Because of Alan Turing
Alan Turing is my hero. He is the intellectual progenitor of my science, a war hero who never held a gun, a rallying cry for the injustices perpetrated against LGBT* folk, and an all-around amazingly smart yet tragic person. Some time back, someone asked me what I thought of Benedict Cumberbatch starring in a movie about him. I hadn't heard of either Benedict Cumberbatch or a movie about Alan Turing, but I promptly started watching Sherlock specifically to judge how I felt about Cumberbatch as Turing in the then only forthcoming Imitation Game. Now that The Imitation Game has been released, albeit in a limited way, I have been talking about how much I wanted to see it and I finally managed that at an advance screening an hour's drive away.
Despite all that, I wasn't really sure what exactly I wanted from this film. I knew two things I didn't want, those being a lurid focus on either homosexual romance or suicide. Concerning the former, I wouldn't mind a torrid steamy romance story here, but if we have learned nothing else from Brokeback Mountain, it is that Hollywood will use even gay cowboys as an excuse to have women taking up most of the topless screen time. Concerning the latter, Turing's death was slightly foreshadowed, but I doubt I would have picked up on it had I not just happened to have known how he died, and because of that, I could be reading in a foreshadowing that isn't actually there. Either way, his death is dealt with respectfully, and his sexuality is addressed as a non-issue that people make a fuss about.
Furthermore, I was deeply concerned that Mr. Cumberbatch would play Turing the same way he plays Sherlock Holmes, by which I mean an I-am-smarter-and-better-than-thou with weird twitchy habits and the camera wanting us to believe that his prominent cheekbones are just irresistibly attractive. Fortunately, he mostly did not, though when he did it was particularly bad, since most of the film portrayed Turing as being almost completely unable to understand human interactions. In fact, one scene had Turing explicitly stating that he didn't know how people could say something other than what they meant yet still be understood. Then toward the end of his life Turing was shown as sarcastic and superior and rather Sherlock-esque, and I have no idea when the transition happened.
I was pleasantly surprised in some things. I have very low expectations of American movies, but that this is a war message the unapologetic message of which is that force is bad and will be defeated by intellect was delightful, unambiguous, and accompanied by masterful cuts between war scenes and a mathematician hard at work. The other thing I really liked was the subplot of Miss Clarke's (played by Keira Knightly) struggles to have her very serious intellectual work taken seriously because she was a woman. We need more movies that push the narrative that sexism is bad and intellectualism is good.
What I didn't like was that the movie wasn't particularly intellectual, despite its obvious moral. The writers had only sorta kinda done their research. They conflated Turing machines with the code-breaking work he did on Enigma, which were two separate endeavors. The writers seemed to almost realize how big a flaming deal it was for mathematicians rather than linguists to be doing cryptographic work (it marked a major shift in thought about codes) but didn't quite get there. Likewise, the writers seemed to almost get to putting in Turing's Polite Convention (which states that we cannot actually tell if anyone besides ourselves is actually thinking, but we politely assume that we do) but stopped at having him say that we all think in different ways, so why can't machines think? Finally, and this angered me a little, they subverted Turing's best known (though not the most important) work, that is the Turing test, in order to make a statement about not judging people. Turing's arresting police office in the film states that if asked to judge whether Turing was machine or human, he could not possibly judge. Not being able to tell is a result,not, in this context, a statement of being non-judgmental about homosexuality. Can we please make points about tolerance without sacrificing our grasp of science? I realize I'm a computer science nerd who basically worships Turing, and I'm probably not the film's target audience, but still. There are multiple ways to say everything, what is wrong with the factually correct ways? At least there was a good and mathematical explanation of why brute force methods in science are untenable because large numbers.
I also didn't like the way the story was handled. A (by the accounts I've read) quiet and reserved mathematician published a seminal, but not really at the time recognized as such, paper on constructing imaginary machines that demonstrate important things about determinism, then goes on to crack the most mathematically advanced code at the time, then is tortured into suicide by the British government, that is a story in itself. Yet the film pads it with lots of conflicts between Turing and colleagues and introduces an element that I really hate by having Turing anthropomorphize the machine he built into the image of his dead childhood love Christopher. No. Just no. I cannot sufficiently express the amount of no that I have in response to a Hollywood Turing having a creepy and weird romance with a machine named Christopher. But besides that, the whole film felt a little short on substance, and even short on manufactured interpersonal drama.
So, it had some of the things I wanted. Hollywood is actually making a war movie the message of which is that it is better to use intellect than force. It was even a nuanced movie, that did not pretend that one intellectual victory would magically make all problems go away or that war comes without horrific and loathsome moral dilemmas in which there is really no way to actually win, there are only ways to lose less badly. Where less badly still means fields full of graves. The film had two women characters who talked to one another (but about a man. So close to a pass of the Bechdel test). The film takes an unambiguous "discrimination and sexism are bad" stance. It may have felt a little short on substance, and uninformed on science, but it exists and makes statements that should be more prevalent. Ultimately, The Imitation Game is not the story I would like to see told about my hero, but it does contain a moment in which Joan Clarke says to Alan Turing "the world is a better place because you were in it." Yes. It is. This world was not only changed irrevocably because of the scientific achievements of Alan Turing, it became a better place because of his efforts. We need more people like him.
Despite all that, I wasn't really sure what exactly I wanted from this film. I knew two things I didn't want, those being a lurid focus on either homosexual romance or suicide. Concerning the former, I wouldn't mind a torrid steamy romance story here, but if we have learned nothing else from Brokeback Mountain, it is that Hollywood will use even gay cowboys as an excuse to have women taking up most of the topless screen time. Concerning the latter, Turing's death was slightly foreshadowed, but I doubt I would have picked up on it had I not just happened to have known how he died, and because of that, I could be reading in a foreshadowing that isn't actually there. Either way, his death is dealt with respectfully, and his sexuality is addressed as a non-issue that people make a fuss about.
Furthermore, I was deeply concerned that Mr. Cumberbatch would play Turing the same way he plays Sherlock Holmes, by which I mean an I-am-smarter-and-better-than-thou with weird twitchy habits and the camera wanting us to believe that his prominent cheekbones are just irresistibly attractive. Fortunately, he mostly did not, though when he did it was particularly bad, since most of the film portrayed Turing as being almost completely unable to understand human interactions. In fact, one scene had Turing explicitly stating that he didn't know how people could say something other than what they meant yet still be understood. Then toward the end of his life Turing was shown as sarcastic and superior and rather Sherlock-esque, and I have no idea when the transition happened.
I was pleasantly surprised in some things. I have very low expectations of American movies, but that this is a war message the unapologetic message of which is that force is bad and will be defeated by intellect was delightful, unambiguous, and accompanied by masterful cuts between war scenes and a mathematician hard at work. The other thing I really liked was the subplot of Miss Clarke's (played by Keira Knightly) struggles to have her very serious intellectual work taken seriously because she was a woman. We need more movies that push the narrative that sexism is bad and intellectualism is good.
What I didn't like was that the movie wasn't particularly intellectual, despite its obvious moral. The writers had only sorta kinda done their research. They conflated Turing machines with the code-breaking work he did on Enigma, which were two separate endeavors. The writers seemed to almost realize how big a flaming deal it was for mathematicians rather than linguists to be doing cryptographic work (it marked a major shift in thought about codes) but didn't quite get there. Likewise, the writers seemed to almost get to putting in Turing's Polite Convention (which states that we cannot actually tell if anyone besides ourselves is actually thinking, but we politely assume that we do) but stopped at having him say that we all think in different ways, so why can't machines think? Finally, and this angered me a little, they subverted Turing's best known (though not the most important) work, that is the Turing test, in order to make a statement about not judging people. Turing's arresting police office in the film states that if asked to judge whether Turing was machine or human, he could not possibly judge. Not being able to tell is a result,not, in this context, a statement of being non-judgmental about homosexuality. Can we please make points about tolerance without sacrificing our grasp of science? I realize I'm a computer science nerd who basically worships Turing, and I'm probably not the film's target audience, but still. There are multiple ways to say everything, what is wrong with the factually correct ways? At least there was a good and mathematical explanation of why brute force methods in science are untenable because large numbers.
I also didn't like the way the story was handled. A (by the accounts I've read) quiet and reserved mathematician published a seminal, but not really at the time recognized as such, paper on constructing imaginary machines that demonstrate important things about determinism, then goes on to crack the most mathematically advanced code at the time, then is tortured into suicide by the British government, that is a story in itself. Yet the film pads it with lots of conflicts between Turing and colleagues and introduces an element that I really hate by having Turing anthropomorphize the machine he built into the image of his dead childhood love Christopher. No. Just no. I cannot sufficiently express the amount of no that I have in response to a Hollywood Turing having a creepy and weird romance with a machine named Christopher. But besides that, the whole film felt a little short on substance, and even short on manufactured interpersonal drama.
So, it had some of the things I wanted. Hollywood is actually making a war movie the message of which is that it is better to use intellect than force. It was even a nuanced movie, that did not pretend that one intellectual victory would magically make all problems go away or that war comes without horrific and loathsome moral dilemmas in which there is really no way to actually win, there are only ways to lose less badly. Where less badly still means fields full of graves. The film had two women characters who talked to one another (but about a man. So close to a pass of the Bechdel test). The film takes an unambiguous "discrimination and sexism are bad" stance. It may have felt a little short on substance, and uninformed on science, but it exists and makes statements that should be more prevalent. Ultimately, The Imitation Game is not the story I would like to see told about my hero, but it does contain a moment in which Joan Clarke says to Alan Turing "the world is a better place because you were in it." Yes. It is. This world was not only changed irrevocably because of the scientific achievements of Alan Turing, it became a better place because of his efforts. We need more people like him.
Sunday, June 22, 2014
Facebook Footballing: Doing it Wrong
I try to not be judgmental about how other people use the internet. There is no One True Path to internetting happily, and I find it's much better for my peace of mind to block people than engage with them, but sometimes, people are just wrong on the internet.
I am currently irritated with the large numbers of people I have noticed on my Facebook feed complaining they don't like the World Cup because they don't understand the offsides rule. If it was just people that didn't like the World Cup, I don't care. Americans aren't interested in football or the metric system. I get it. If, however, the stated logic for not liking something is a lack of understanding it, I get annoyed when this statement is made on a web application. If one is connected to the greatest repository of knowledge and cat pictures ever created by humanity, and uses this to complain about ignorance rather than as a remedy, that's just a waste.
I get that looking for credible information on the web is a learned skill. I am trying not to be judgmental about people who struggle with this skill, because I have been called upon to teach this skill, and utterly failed because I search without thinking about it and don't have any intuitive (or, frankly, intellectual. I just don't get it.) understanding of what exactly the problems are that many people face. However, football is kinda the world's most popular sport here, not some esoteric little-known thing that must be assiduously hunted with just the right combination of search terms. Typing "offsides rule" into any search engine should turn up something useful. I really can't manage to not be judgy here. This is not a topic like vaccines or genetically modified crops; there aren't a lot of quacks filling up search results with claims that the offsides rule is doing terrible things to children and something something chemicals.
I realize also that disliking something due to a lack of understanding is a human tradition that I would guess is older than cheese. Note that cheese has been dated back to at least 7-8000 years ago. However, we ought to be able to examine our traditions and discard those which are useless (anti-intellectual xenophobia) while continuing to embrace that which is glorious (cheese).
I am currently irritated with the large numbers of people I have noticed on my Facebook feed complaining they don't like the World Cup because they don't understand the offsides rule. If it was just people that didn't like the World Cup, I don't care. Americans aren't interested in football or the metric system. I get it. If, however, the stated logic for not liking something is a lack of understanding it, I get annoyed when this statement is made on a web application. If one is connected to the greatest repository of knowledge and cat pictures ever created by humanity, and uses this to complain about ignorance rather than as a remedy, that's just a waste.
I get that looking for credible information on the web is a learned skill. I am trying not to be judgmental about people who struggle with this skill, because I have been called upon to teach this skill, and utterly failed because I search without thinking about it and don't have any intuitive (or, frankly, intellectual. I just don't get it.) understanding of what exactly the problems are that many people face. However, football is kinda the world's most popular sport here, not some esoteric little-known thing that must be assiduously hunted with just the right combination of search terms. Typing "offsides rule" into any search engine should turn up something useful. I really can't manage to not be judgy here. This is not a topic like vaccines or genetically modified crops; there aren't a lot of quacks filling up search results with claims that the offsides rule is doing terrible things to children and something something chemicals.
I realize also that disliking something due to a lack of understanding is a human tradition that I would guess is older than cheese. Note that cheese has been dated back to at least 7-8000 years ago. However, we ought to be able to examine our traditions and discard those which are useless (anti-intellectual xenophobia) while continuing to embrace that which is glorious (cheese).
Tuesday, November 26, 2013
Copy Machines Part 2: Now with More Gorillas
This is a mountain gorilla in Uganda. The photo has a resolution of 72x72ppi, the same as the giraffe photo. |
As suggested, my verticalstreaks error function has been modified to use prime numbers.
def verticalstreaks(img):
px=img.load()
width, height=img.size
rand1=random.randrange(1,523)
rand2=random.randrange(1,653)
#print rand1, rand2
for i in range(width):
for j in range(height):
h=5
if j%rand1==0 and i%rand2==0 and i+h<width and j+h<height:
for k in range(h):
px[i,j+k]=(0,0,0)
px[i+1,j+k]=(0,0,0)
return img
Now for results. I am just using this with errors that should be invisible to a casual copyist, because again, if you noticed problems you would try it again, right?
![]() |
Copied 50 times. |
![]() |
Copied 100 times. |
![]() |
Copied 250 times. |
![]() |
Copied 500 times. |
So there you have it.
Wednesday, November 20, 2013
Computer Problems: A Lack of Blinking Lights
Warning: possibly incomprehensible computer words and a little navel-gazing
I have a beautiful Alienware m18x laptop, the most important feature of which, besides the 500gb ssd, is the LED backlit keyboard. I love this keyboard. The lights can be set to specific colors! In sections! You have no idea how much I love this keyboard.
The problem is that I have GNU/Linuxified this laptop. The proprietary manufacturer program for changing the LEDs only works on Windows. It's hard to find nice GNU/Linux programs for changing the lights that weren't built specifically for a Debian distribution. I am running Fedora, not a Debian distro. Fortunately, nice and really smart Germans have noticed that the backlit keyboard is a usb device and reverse engineered all the operating codes that Alienware won't just release. Other nice people have provided some example C code free for download that is easily alterable. The only problem now is that the it's an 8-bit color system, which I so don't know the codes for, but Wikipedia has the color chart for that.
Someone told me if I put GNU/Linux on this machine I would spend half my life trying to get the lights changed. It really only took a few days of reading the internet and sporadic work, attempting the manufacturer program through WINE and a VM, trying to get alienfxlite.jar to work, discovering that the pyalienfx package won't work because libusb on Fedora is different from the one on Ubuntu, and by the way unless you download libusb-devel you won't get the necessary header files.
So if anyone else is wondering if the lights on an Alienware will still work under GNU/Linux, the answer is yes, but you have to use C to write directly to the USB device.
I have a beautiful Alienware m18x laptop, the most important feature of which, besides the 500gb ssd, is the LED backlit keyboard. I love this keyboard. The lights can be set to specific colors! In sections! You have no idea how much I love this keyboard.
The problem is that I have GNU/Linuxified this laptop. The proprietary manufacturer program for changing the LEDs only works on Windows. It's hard to find nice GNU/Linux programs for changing the lights that weren't built specifically for a Debian distribution. I am running Fedora, not a Debian distro. Fortunately, nice and really smart Germans have noticed that the backlit keyboard is a usb device and reverse engineered all the operating codes that Alienware won't just release. Other nice people have provided some example C code free for download that is easily alterable. The only problem now is that the it's an 8-bit color system, which I so don't know the codes for, but Wikipedia has the color chart for that.
Someone told me if I put GNU/Linux on this machine I would spend half my life trying to get the lights changed. It really only took a few days of reading the internet and sporadic work, attempting the manufacturer program through WINE and a VM, trying to get alienfxlite.jar to work, discovering that the pyalienfx package won't work because libusb on Fedora is different from the one on Ubuntu, and by the way unless you download libusb-devel you won't get the necessary header files.
So if anyone else is wondering if the lights on an Alienware will still work under GNU/Linux, the answer is yes, but you have to use C to write directly to the USB device.
Tuesday, November 19, 2013
Fabulosity for a Tuesday: Mavis Batey
One of the last survivors of Bletchley Park has passed away. The Boston Globe has a lovely piece written about her. She is quoted as saying that neither her legs nor her German were good enough for her to be Mata Hari. But more fortunately for posterity, she participated in the cryptography project of the century. Rest in peace, Ms. Batey. The work of you and your colleagues helped to bring us the information age.
Thursday, November 14, 2013
The Questions that Keep Me Awake at Night: Copy Machines
Not having an actual photocopier that I can abuse, I'm going to have to emulate this, which means I am going to actually have to have some sort of understanding of copy machine resolution and what sort of generation loss I can expect. That's the hard part. The easy part is building an emulator, which will be a Python script that take in some jpg or whatever, applies an entropy function, and outputs the resultant jpg or whatever. Turing bless the PIL [Python Imaging Library], which is going to do all the heavy lifting in the code without making me bother my pretty little head about the details.
I selected a sample photocopier to emulate on the extremely rigorous basis of the first thing that came up at Amazon when I searched for a copy machine. The important thing to note here is that the photocopy resolution is 600x600dpi. Because I don't understand the complexities of dpi vs ppi, I am going to claim that in this case, there is actually a 1 to 1 conversion. That's true in some cases at least Feel free to tell me in the comments how wrong I am for making this assumption. The image below is 72x72 ppi, thank you GIMP print resolution feature. It is well within the resolution limits of my imaginary copier.
Now, what can go wrong with in the process of copying? The digital process of storing and copying an image should not have any inherent generation loss, provided the resolution of the image is not above the resolution of the copier. There is some evidence to suggest that sometimes characters will change into other characters depending on what sort of compression algorithm is being used. Xerox claims that this can all be avoided by changing settings. Since this isn't a Xerox machine I'm emulating, I think I'm going to ignore this.
Based on that pinnacle of internet research, howstuffworks.com, the process of copying is complicated and involves a lot of different things like lights and toner all working properly. I don't know how failure of any one piece translates into image quality when copying. So I got the user manual for this copy machine and looked at the trouble shooting section to see what commonly goes wrong and came up with the following list and hacked together some functions that will produce each effect.
- uneven printing
- white specks
- vertical streaks
- smudges or spatters appearing
- printing is dark
- bottom edge has smudge marks
- portion of the page not printed
None of the individual functions will produce much of a noticeable effect. If something went horribly wrong, you would redo the copy, right? The question is, I think, how quickly small accumulating errors lead to completely terrible resolution. The only assumption I need to make here, is how often such a small error will occur. I am going to claim an error happens 4 times out of 10. If this seems arbitrary, that's because it is.
Now for my emulator. At each copy pass, there is a 40% probability that an error will occur. An error will be chosen at random from the above list. Each error has an equal probability of occurring in my emulation.
Below are my results
![]() |
Copied 30 times. |
![]() |
Copied 50 times. |
![]() |
copied 100 times. |
![]() |
copied 500 times. |
If I adjust the numbers such that visible (to the casual eye) errors are made by the error function, illegibility happens a lot faster.
![]() |
Copied 10 times. |
![]() |
Copied 20 times. |
![]() |
Copied 30 times. |
To make this smell like science I'd have to fiddle with a lot more of the variables, but I think I'm bored at this point. So I'm going to leave this as is.
Copied below the fold is my code, for anyone interested.
Subscribe to:
Posts (Atom)