Tech Tuesday: Turing Machines
Posted by childofthehive | Filed under Tech Tuesday
2012 is Alan Turing year, celebrating the life of one of the founders of computing and one of the minds behind the cracking of the Enigma code. In honour of this, I’m writing a couple of Tech Tuesday posts about Turing’s contributions to computing.
This post, is about Turing Machines. He called them a(utomatic)-machines but they later became known after their inventor. To my knowledge, Turing never actually made one of these machines but he described them in 1936 as a theoretical exercise. By defining a machine that could calculate, or computer, answers to problems, he was able to know whether or not certain problems were actually solvable.
But what is a Turing Machine?
A Turing Machine consists of a few elements. First, you have a tape, broken down into equal sized sections. Each of these sections may be blank or may have symbols written in them (usually, 0 and 1, but you can have more). In general, when people talk about Turing Machines, it’s considered that this tape can be as long as necessary to complete the computation, so the tape is theoretically infinite.
The second element of the machine what’s called a head. This head is something which is pointed at a single section of the tape. It can read whatever symbol is written there as well as write a symbol onto the tape, replacing whatever symbol was there to begin with.
The machine also has a set of rules. These rules look at the state the machine currently is in as well as the symbol written on the tape and determines a next action. For example, if the machine is in state A and 1 is written on the tape, write a 0 onto the tape, move the tape to the right and go to state B, if 0 is written on the tape, write a 0 onto the tape, move the tape to the left and go to state C.
You also need to define what the starting state is for the machine and one or more stopping states. If a machine arrives at a stopping state, the calculation is over.
But why should people care about Turing Machines? Nowadays, computers can do a lot more than just move a tape back and forth. Yet Turing Machines were discussed in two different modules of my university course because they are still significant in understanding computing.
One reason is the power behind this apparently simple model. You can, in theory, calculate using a Turing Machine anything that you could calculate using a more complex computer. I say in theory because there are a couple of things that Turing Machines aren’t good at (solving two problems at the same time, for example) and because it wouldn’t be practical to use a Turing Machine as the complexity of the problem increases. While the model allows for the tape to be as long as necessary and for the machine to have as many rules as required, you wouldn’t want to build or simulate a Turing Machine with a tape twenty thousand miles long with five thousand states and a few million rules. You’d be sitting forever waiting for the calculation to complete.
Once you’ve accepted the limits of practicality however, these machines are very useful in the theory of computability. This is the study of what can or can’t be computed. Essentially, there are some problems a computer is capable of solving and some which is can’t. A problem is proved to be computable if you can design a Turing Machine that would solve it. As stated above, this isn’t necessarily practical, so a problem is also proved to be computable if you can solve it using functions which have been proved by Turing Machines. For example, it’s possible to design a Turing Machine that adds two numbers together, therefore addition of two numbers is solvable. Multiplication can be thought of as repeated addition (e.g. 3×4 is just 3+3+3+3) and since we’ve proved with a Turing Machine that addition is computable, multiplication is computable. You can do this again and again, building up the complexity until you can work out if very complex functions can be computed.
When computers were first created, they were a long way from the machines we have today. The earliest computers were machines that, as the name implies, computed the answers to calculations. Turing Machines were the first of these and so were the foundation that led to the massive range of computers available to us today.
Tags: Alan Turing, computers, Turing Machines
Tech Tuesday: Invisibility Cloaks
Posted by childofthehive | Filed under Tech Tuesday
Invisibility cloaks are a staple of fantasy. They’re also a reality. Sort of.
A Japanese group developed a coat which allows the wearer to appear transparent. The coat acts as a projector screen, displaying an image being detected by a camera on the other side of the person. This means that if you look at the front of a person, you can see what’s going on behind them.
It’s not quite invisibility and the perspective is a little skewed, but it’s a good start.
In this BBC news article, the creators say that they hope this technology can be applied to more practical uses, such as showing surgeons what’s going on in a person’s body, even when their hands are in the way.
It’s also something that the US military having been looking into to create adaptive camouflage for soldiers.
More recent research has been focused on cloaking devices by bending light around the object. They’ve apparently been able to hide a bump in a layer of gold. At the moment though, this is working in infrared rather than visible light.
So we’re a little way off having a working invisibility cloak, but we’re getting there.
Tags: invisibility, technology
Tech Tuesday: An Infinite Number of Monkeys
Posted by childofthehive | Filed under Tech Tuesday
“There’s an infinite number of monkeys outside who want to talk to us about a script for Hamlet they’ve just worked out.”
That’s a line from The Hitchhiker’s Guide to the Galaxy (the original radio play). I’m not sure whether that’s where this starts or if Douglas Adams just took something that was being discussed and made it into a joke. The idea behind the joke is that if you gave an infinite number of monkeys typewriters, they’d eventually end up typing Shakespeare just by random chance.
Someone’s put that to the test, at least in a simulated manner. Jesse Anderson has created a computer program that randomly creates blocks of nine characters (letters, spaces and punctuation) and comparing them to the works of Shakespeare. These virtual monkeys have no recreated 99.99% of the Complete Works of Shakespeare in chunks of nine characters.
OK, so it’s not the same as them typing all the plays from start to finish, but it’s a start.
Tags: douglas adams, monkeys, shakespeare
Tech Tuesday: Where Does Data Live?
Posted by childofthehive | Filed under Tech Tuesday
Watching Terminator 3, there was a moment that really annoyed me. It was a while ago I watched this film, so I can’t remember the exact line, but it implies that Skynet couldn’t be stopped because it was loose on the internet and no longer on the servers.
The reason that annoyed me is that all computer programs are, when you get down to it, data. All data has to be stored somewhere. Every piece of data on the internet, whether it’s an online game, a video of a cat fighting a printer, a website of adult content, or a chapter of fanfiction, has to be stored somewhere. Data gets stored in servers.
Every website is hosted on a server. There are companies that make their money by having a load of physical machines with lots of memory, essentially renting some of that space to website owners. If you create a website, everything you put on it gets stored as a load of ones and zeros on a server owned by one of these companies. Everything on the internet is on a server somewhere.
That’s why I was annoyed about that bit in the film because Skynet couldn’t exist as some detached entity in the void. Skynet had to be on severs somewhere. Blowing up those servers would stop it.
There would have been ways to make the plot work, even taking this into account. We’re talking a hugely intelligent AI program here that was acting as a virus. They could have said that Skynet was hiding in other computers as malware and that there was no way to erase it from enough machines to do damage before the end of the world.
This is why it’s important to get the technology right (or your historical information, or your facts about riding horses long distance, or the details of police procedures, or just about anything else). When you write a story, you will include information on a range of subjects. There will be someone who reads your novel or watches your film who really understands this topic. If you’re not careful about keeping your facts straight, someone will be mentally screaming, “That’s not right!” when they come to your little slip up.
You won’t get all the little details right all of the time, but please make sure that there are no huge errors. If in doubt, find someone who knows the subject and ask them to read what you’ve written.
Tags: artificial intelligence, computers, data, technology
Tech Tuesday: Backups
Posted by childofthehive | Filed under Tech Tuesday
I think it’s a fair bet that most novel writers do most of their writing on a computer. There will still be some who prefer to write by hand and many of us carry notebooks in case of a moment of inspiration. But the fact is that using a computer makes things so much easier. It’s easier to edit. You get such wonderfully useful tools as automatic spellcheckers. You can move whole sections of plot around. There’s even find and replace if you decide to change a character’s name after you’ve written several thousand words.
But there is a danger. If your 100000 word novel is sitting on your computer’s hard drive, what happens if something goes wrong? The something could be one of a few different things.
Your computer could get a virus. If you’re careful, the risk of this is low, given anti-virus programs and the fact that most computers will warn you if you’re in danger of infecting your computer. But the danger still exists. Some viruses are more of a problem than others, but many computer viruses will lead to corrupted files. If your computer gets infected, you might find it refuses to turn on again. In which case, your masterpiece is sitting on a hard drive you can’t get to.
There’s also the possibility of accidental damage to the computer. Maybe you’re moving house or carrying your laptop between rooms and you end up dropping your precious machine. Next time you try to turn on the computer, you see an error message or worse, nothing.
In both of these cases, there’s a good chance you can rescue your documents. The chances are that the files you want are still intact and if you take your computer into a repair shop, someone should be able to extract your files for you.
The third thing that could go wrong is more of a problem. What if your computer gets stolen? In that case, the odds of you getting your files back are only fractionally above zero. Insurance can’t help you get your manuscript back intact.
This is why backups are so important. Another benefit of writing on a computer is that it’s much easier to back up a computer file than it is to back up a notebook full of handwriting.
One of the most common methods is to do a full backup. Most computers have this option automatically, allowing you to essentially create a copy of the state of the computer. You back up to an external hard drive and, if something goes wrong, you can restore to the exact point you did the back up. This has the benefit of backing up more than just your files. You can save your programs, settings, favourites and just about everything else. This way, even if your computer is stolen, you can restore everything onto a new machine and everything will be back. Just be careful if you’re backing up to an external hard drive that you don’t leave that next to your computer. If you do, chances are that if one gets stolen, the other will be gone too.
If you’re just interested in your novel files, you don’t need to do a full back up. You can just save those files somewhere else: onto CD, on a USB flashdrive, or even online. There are various free online storage solutions, such as Skydrive or Dropbox, that allow you to store your files out on the internet. If you put your files online, then even if your house burns down and destroys everything in it, you’ll be able to get back those files.
A third, simple option is to email files to yourself. Send yourself your story files as email attachments and you’ve got a backup stored in your email system.
Whatever method you choose, the importance is to do it regularly. If you lose your files in July, you don’t want to realise then that you last did a backup in January. If you keep your backups regularly updated, all you need to worry about now is writing the novel!
Tags: backups, computers, files, technology
Tech Tuesday: Knowing how it works
Posted by childofthehive | Filed under Tech Tuesday
There a millions of households in the world that own a TV. How many of the people who sit down in the evening to watch their favourite programs understand how their television works? Some people will. Some will have a vague idea. Most won’t have a clue.
Our homes and businesses are filled with technology that people know how to operate without having the faintest idea about the science behind it.
This is a great thing for science fiction writers. It means that your characters don’t have to understand the physics behind their quantum thingamy or their hyper-dodad. They just know how to turn it on and what the machine is meant to do. When it breaks, they call the helpdesk or take it back to the shop to complain. And because your character doesn’t know the detail of the high-tech gizmos, it means you don’t have to either. The more futurist your setting, the more amazing devices you can include without needing to do the physics to work out how they, well, work.
There is an exception to this though. If your viewpoint character is supposed to be an expert in one of these pieces of technology, you can’t write about it as though you’re just making up words as you go along. The guy who makes the coffee on the spaceship doesn’t need to understand hyperdrive engines, but the chief engineer should. If you write from his/her perspective, you’ll have a much harder job sounding like you know what you’re talking about.
Tags: gizmos, sci-fi, spaceships, technology
Tech Tuesday: Mobile Phones
Posted by childofthehive | Filed under Tech Tuesday
Mobile phones are wonderfully useful devices in real life but they can be annoying to a writer, particularly if you’re writing an adventure. When you have your hero trapped by the enemy or uncovering an evil plot, he can just call the police. If you want your characters to be alone without the ability to call for aid, you have to do something about the phones.
There are various ways to deal with it. One way is for your character to simply not have a phone, but that’s exceedingly rare. Most people now will have a phone and carry it round with them as a matter of course. If your character doesn’t have a phone, there’s got to be a good reason for it and you’ve got to establish that reason before he gets in a position where he needs to make a call.
Maybe the battery can die. But in some ways this can feel like a cheat unless you’ve prepared for it properly. If your character hasn’t been home in days or spent ages talking on the phone earlier, it’s conceivable that the battery’s running low but again there has to be a reason established earlier in the story. Similarly for the guy losing or forgetting his phone. If you’ve established that the main character has a tendency to forget his notes or leave his keys in the car, then you’ve already created a person that might well leave his phone on the table when he leaves the house. Or if he’s been involved in a made escape then it’s possible his phone fell out of his pocket. It just has to be plausible.
Maybe there’s no signal. If you’ve got your characters trapped in a cave, this is possible, but even the village where my parents live has decent signal now (unless you’re in certain parts of the house) so you’d have to be really remote for this to be a problem.
If you start getting into technological thrillers, you can invent all sorts of reasons. Maybe the enemy is able to track the phone signal. Maybe the aliens are using phones to brainwash people and so the hero had to get rid of his.
However you handle it, you need to think about communication when plotting your novel. Or you could just write a fantasy novel or a historical drama and not have to worry about this.
Tags: characters, communication, technology
Tech Tuesday: Social Networking Sites
Posted by childofthehive | Filed under Tech Tuesday
Social networking sites are interesting. Yes, they can offer great ways to keep in touch with old friends from school and university, organise events and be in the know about major changes in the lives of your acquaintances, but there is a dark side to it.
If you’re not carefully about privacy settings and security, you can put more out there than you intended. There are stories about people being fired for making comments about their job on Facebook.
As if that wasn’t bad enough, things can get much more sinister. The site Evil displays the phone numbers of unsuspecting people (note: maybe you shouldn’t respond to one of those “I’ve got a new phone, can you remind me your number” groups unless you’re sure it’s private) and there are examples of people who list their full address publically and then make announcements about the fact they’re going away. That’s basically an invitation to thieves that their house is empty.
If you’re sensible, you can avoid these things but being careful about what you post and making sure of your privacy settings. But I still find the idea intriguing. This is an update of 1984 waiting to happen!
A common theme in dystopian society stories is the idea of someone watching people’s actions and listening in on their conversations. Combine that idea with social networking websites and you can have a deliciously sinister turn on technology that people take for granted.
Tags: Facebook, internet, social networking, technology
Tech Tuesday: Artificial Reality
Posted by childofthehive | Filed under Tech Tuesday
Artificial reality, or virtual reality, is a term for a computer-generated environment that people can access. Broadly speaking, virtual reality can be divided into two kinds. One fools the body, the other fools the mind.
In the first type of virtual reality, people use goggles and/or complex clothing that simulate the sense of touch. A person in virtual reality sees what’s on the goggles, hears what comes through speakers and interacts with the environment through sensors in the clothing. The clothing could be simple gloves or a full body suit.
This sort of experience is possible today. Various researchers have been working with haptics, which is the technology for simulating touch, to create virtual items which feel real through special gloves. To get out of virtual reality, you just have to take off the gloves and goggles.
Examples of this sort of virtual reality crop up in science fiction books. It’s a central theme in The Hacker and the Ants by Rudi Rucker. Snow Crash by Neal Stephenson has an artificial reality internet where people could interact using avatars. Even my own Child of the Hive makes use of this technology.
The second type of virtual reality fools the mind rather than the body. Here the technology interacts directly with the brain in order to make a person feel completely like they’re in the computer-generated world. This opens up all sorts of interesting possibilities. A common idea is for the person in the virtual world not to know it. This is a major plot point in the Matrix movies as well as in the Red Dwarf book Better than Life.
In either type, you can have quite a lot of fun with the options of blending virtual world to real.
Tags: artificial reality, future, sci-fi, science fiction, technology
Tech Tuesday: Office Web Apps
Posted by childofthehive | Filed under Tech Tuesday
This Tech Tuesday, I’m going to talk about a piece of technology which is available now which may be useful to writers out there: Office Web Apps.
I’ve been using Microsoft Word as my main program for writing stories (and just about everything else) for years. But not every computer has Word installed. When I was at university, the computers in the Computer Science building were dual boot Windows and Linux. It was really awkward if I wanted to write something or edit a document if I was running a machine in Linux. This meant I often had to do work on a Linux boot of a machine and then restart it in Windows to get to Word to write up the assignment.
Now, thanks to Office Web Apps, I can read, create and edit documents without needing Office installed on the computer. The Office Web Applications are browser-based versions of Word, Excel, PowerPoint and OneNote. Wherever I am, whatever machine I’m using, I can open up a story file. If I’ve got Word installed, it will use Word, otherwise it will open up in the browser.
When I’m done, I can save it to my computer as usual or I can save it to SkyDrive. I have two computers. One is a work computer, the other is my personal laptop. I can create a document on one, save it to my SkyDrive and access it on the other or from any other machine that has an internet connection. Cloud-based storage to go with the cloud-based editor.
The really great thing about the Office Web Apps is that they don’t change the formatting. You don’t have to convert a Word document into a new file type which loses all the formatting, as you would with Google Docs. I know that the quality of my document is going to be preserved.
The best thing of all: they’re free.
Tags: Office, technology, word processing, writing