INCLUDE_DATA

Explaining

Distinguish all those floods that are

Posted in Explaining on August 27th, 2008 by avi – Be the first to comment

People often say that computers are “all ones and zeroes”. While factually correct, I’ve never been sure what kind of impression that leaves in the mind of those who are not too familiar with the technical details of computer internals. I’m going to try here to explain in a little bit more detail what exactly we mean when we say “ones and zeroes”. To begin with, let me simplify my language a little bit and from here on in I will use the term “digital” to mean “containing ones and zeroes”.

Very nearly everything in and around your computer is digital. That is to say, they represent information as sequences of things that can be either on or off, with no other possible states. Imagine bits like pieces from Reversi, with the black side being “on” (think of it as being filled in) and the white side being “off”. If you arrange those pieces in a row, then you would have a reasonable facsimile of the storage system of your computer. Of course, in order to equal the data in, say, your iPod shuffle, you would need 125 million Reversi sets which would cost you over a billion dollars, so it’s good that real computers use a more efficient storage mechanism.

So, what does your computer do with all of these bits? At a very basic level, it uses them to represent different numbers using the base-2 or binary numbering system. A lot of people get confused by the idea of binary numbers, so let’s go over that quickly. We’re all familiar with base-10 numbers, so let’s start there. When you see the number “2183″, you know that the “1″ represents the number of 100s, the “8″ represents the number of tens and the “3″ represents the number of ones, meaning that “2183″ represents a number equal to the sum of:

(2 * 1000) + (1 * 100) + (8 * 10) + (3 * 1).

What you will see here is that the numbers we’re multiplying by are increasing powers of 10. 1000 is 10 cubed, 100 is 10 squared, 10 is ten to the first power and any number raised to the 0th power is always one. The same pattern applies to binary numbers; for example, the number 10101 in binary is equal to:

(1 * (2^4)) + (0 * (2^3)) + (1 * (2^2)) + (0 * (2^1)) + (1 * (2^0)).

If we remove anything multiplied by zero and calculate the powers of two, we get:

(1 * 16) + (1 * 4) + (1 * 1).

Which is just equal to 21. This is the system that allows your computer to represent any number using only “ones and zeroes”. And just like a 3 digit decimal number allows us to represent any number between 0 and 9999 (which is 10^4 – 1), a 3 bit binary number allows us to represent any number between 0 and 2^4 – 1, or 15. So the difference between a “32 bit” computer and a “64 bit” computer is that the 32 bit computer can only handle numbers as big as roughly 4 million at one time, whereas a 64 bit computer can handle numbers as big as roughly 10 septillion (that’s a 1 with 19 zeroes after it).

I’ll talk more later on about how this kind of representation is used by various parts of your computer to store data and perform calculations.

And darkness ends in everlasting day,

Posted in Explaining on July 2nd, 2008 by avi – 1 Comment

One measure of the impact of a scientist is how many numbers, theorems and other concepts have been named after them. In the field of mathematics, Euler is a leader in this. In computer science, we have Alan Turing. He didn’t invent computers, nor did he pioneer the use of computers in science and industry, but contributions to the field cannot be overstated and his work is absolutely fundamental to all work down in computer science today.

I’m not going to go into depth on his contributions to the endeavor of computer science, as it would take too long and be even more dull than we’re already dealing with here. I will say that he was instrumental in the success of Bletchley Park, the center in the UK that broke much of the Nazi’s encrypted messages and gave the allies a decided advantage in the later days of WW2. Of course, it was this work that led to his groundbreaking theories on computing.

Turing was also a homosexual, which was illegal in the UK until 1967. He was discovered in 1952 and sentenced to a program of chemical castration which caused a variety of unpleasant side effects including gynecomastia. His military clearances were also repealed and he was rendered unable to continue his work. In 1954 he committed suicide by taking a bite from an apple into which he had injected poison. Thus we have:

Apple Logo

I draw no morals from this story.

Stand in the desert. . . . Near them, on the sand,

Posted in Explaining on January 16th, 2008 by avi – Be the first to comment

I had two interesting subtitle experiences recently.

The first was while watching a making-of documentary about Wong Kar Wai’s movie, In the Mood for Love. (Which is, for the record, amazingly good.) (And also I got for only $15 at Half Price Books which is a great deal for a 2-disc Criterion edition movie.) (Anyhow.) On this documentary they’re interviewing on of the actors in the piece, who happened also to be the prop master. In an interview he says (or rather, he said some stuff in Chinese and the subtitles read):

“I was the prop master. That means that I am in charge of all the props.”

My second encounter was in Kurosawa’s Stray Dog. This movie was in Japanese and the following exchange occurred (paraphrased):

“You’ll want to see a gun dealer.”
“What’s that?”
“A person who sells guns.”

Both of these examples serve to illustrate the difficulty in translating idiom and slang. I’m sure in Chinese, the term for “prop manager” in no way inherently tells you that it’s a person who manages props, and similarly the Japanese term for a gun dealer gives no clues to its actual meaning. However, there’s no other option open to the translator when translating these terms, and then the next few lines are unavoidably confusing. For an example in English, the head electrician on a movie set is known as the “gaffer”; his head assistant is called the “best boy”. If someone were to translate that previous sentence into another language, you can surely see how a similar piece of confusion may arise.

I actually just remembered another example, that I noticed as a young child watching some black & white Japanese monster movie on Sunday afternoon TV one day. I forget the name of the movie (some internet searching leads to believe that it may have been Son of Godzilla, but I can’t be sure), but it was about a group of Japanese scientists on an island filled with giant insects. At one point, while observing some giant mantises, one scientist says to the other (again, paraphrased):

“Johnson’s been calling them ‘giant mantises’. He came up with that term by combining the words ‘giant’ and ‘mantis’.”
“That Johnson’s a whiz with language!”

The memory’s stuck with me because it seemed so strange to me at the time, but of course I understand now what was going on.

The very deep did rot: O Christ!

Posted in Explaining on October 4th, 2007 by avi – Be the first to comment

I’m a fat dude. Have been for a long time. It never really bothered me much, and while I made plans to start a “real diet” after my 30th birthday, that never really happened. About 8 months after that date, however, I started experiencing some fairly painful gastrointestinal issues (the details of which I won’t go into here.) My doctor told me that the best way to fix these things was to lose weight and said that all I needed to do to accomplish that was to eat 2000 calories a day, stay between 20% and 30% calories from fat, and get some exercise every day. This seemed simple enough, so I started doing it. Counting all those calories was a real pain, though, and so I wrote some software to help me keep track.

Meals CGI - Daily Summary

This first shot is the daily summary screen for a day back in August. I wanted to show a typical day of eating for me, and it turns out I have very few of those. On this day, I had a bowl of cereal in the morning, went to Subway for lunch, had a burger, french fries and broccoli for dinner, then had a waffle with peanut butter and figs for a snack later. Figs are really good. Even later, I seem to have eaten a curry bao.

Meals CGI - Add Food Event - Choose Category Meals CGI - Add Food Event - Choose Item Meals CGI - Add Item

Here are three screens, showing various edit features of the software. The first two show parts of the process to add a “food event”, essentially one of the line items in the first screenshot. The third shows the screen for adding a new food item. This process is not very interesting.

Meals CGI - Weight Graph Over Time

And here’s a graph of my weight progression. For a while the average was 0.33 lbs per day, but I seem to have slowed down somewhat. I hope I’m not decelerating. The hump in the middle of the graph is where I got a cold and couldn’t really work out for about 4 days, and also decided not to count calories those days. I was a little bit disappointed that I gained so much weight in such a short period of indolence, but I was able to take it back off fairly quickly.

Anyhow, that’s just a little peek in my insane anal-retentive nerdiness.

Which Love had freighted, safely sped,

Posted in Explaining on September 19th, 2007 by avi – Be the first to comment

One thing I really like about film making is that it’s an inherently collaborative art form, in a way equaled by no other. Other art forms can involve more than one person; the painter can have someone to clean brushes, or the sculptor someone to carry away detritus, but all of the artistic work is done by essentially one person. Even when you look at something like a mural, each artist has taken their section of the work as separate from the others’ and while you end up with a single collaborative work, each piece of it is distinguishably “owned” by a single painter.

In a film, it is very rare to see the work of just one person at any given time. While there is some notion that the director of a film owns it single artistic vision, and in some cases you have a single person who is director, writer and actor all at once, there is still the contribution of everyone else involved in the film to consider. You have other actors, camera operators, set designers and costume designers to consider, along with a host of post-production artists like editors, composers, foley artists, sound mixers and various special effects creators. Even the smallest production is going to have at least half a dozen people with their fingers in the artistic pie, as it were.

This brings up a lot of interesting problems that never existed before; for example, we have the issue of credit. You might not be aware of it, but there are volumes of rules surrounding proper crediting; each job on a film has an associated guild (or union), and each guild stringently enforces who must be credited for what, and various complicated procedures for resolving conflicts. It is, I hear, a pain sometimes, but it avoids situations like Boris Karloff’s after making Frankenstein: he was credited simply as “?”, while a cute joke for the audience, not great for his own career.

I’m not sure where I’m going with this. Anyways, I think collaborative artwork is cool, and I think filmmaking is a good example of that.

Cops patrol and we’re locked in

Posted in Explaining on September 11th, 2007 by avi – 1 Comment

I love movies. I watch them all the time, sometimes 2 or 3 in a day. I love to think about them, make them (when I get the chance) and examine them in minute detail when I get the chance. What’s rare is for me to really identify with a movie; I find myself immersed in some (the better ones), but it’s not often that I really feel a connection of any kind of the character or situations portrayed.

There are, of course, exceptions. Recently I’ve noticed two major ones: The Station Agent and The Man Who Fell to Earth, I’m going to go into a plot synopsis here, but both films have, in some ways, very similar main characters. They’re both the other, both separated from society not just by choice but by their inherent being. This uniqueness and separation makes them both stronger than those around them and weaker by degrees. They can see more than others and are yet in many ways more limited than the rest of the world.

The two movies approach the topic in different ways, of course. Station Agent is a more typical movie; he meets a woman, falls in love, reconnects with society while overcoming his own personal barriers, etc, etc. Of course, the end is somewhat ambiguous, but the basic message is that he’s better off being connected instead of being apart. Contrarily, in The Man Who Fell to Earth, he is poisoned by society almost from the first moment he encounters it. Every contact he has with the world around him weakens and cheapens him. He does everything in his power to escape, but in the end is trapped forever, earning victory only by outliving his captors and sending a final nearly futile message out of his prison. I’ll let you decide which ending I liked better.

I took me almost 2 weeks to write this entry.

With inborn strength mysterious depths explore;

Posted in Explaining on June 10th, 2007 by avi – 3 Comments

I guess I haven’t typed into this thing for a while. I should try to avoid these kind of lapses.

Recently I’ve been watching this TV show called The 4400, a sci-fi adventure show set in Seattle. Of course it’s filmed in Vancouver, which at least is better than having a show set in New York and filming it in Vancouver, or a show set in Truth or Consequences, NM and filming it in Vancouver. Mostly they pay lip service to the Seattle setting, with the occasional stock footage shot of the Space Needle, or mentioning that they’re heading off to Queen Anne or something. The whole thing is generally underplayed.

However, in the last few episodes we’ve seen in Season 3, something odd has been going on: whenever they need to make a throwaway reference to a location that they’re heading to or where something is happening, instead of using a place that exists in Seattle, they have been using the names of places in Pittsburgh. They’ve discussed visiting Schenley Park, Forbes Avenue, Munhall and Liberty Avenue. The first time it happened, I just thought to myself, “Isn’t that interesting that there’s a Schenley Park in Seattle too. I’d never heard of it before.” But, after a few more times, I went and looked them up and none of those places exist in Seattle. I don’t know why they did this; it’s like for a short period of time, they were using a list of Pittsburgh place names when filling in the blanks, instead of a list of Seattle place names, and they didn’t notice until after it was to late (if at all).

Overall, however, The 4400 is a pretty good show. It’s no Sopranos or anything, but it’s a reasonably well-done science fiction series, with interesting plots, good over-arching storylines, decent acting and effective (if fairly low-budget) effects. I’d recommend giving it a try if you’d enjoyed shows like Babylon 5, Battlestar Galactica or The X-Files.

These words in somber color I beheld

Posted in Explaining on August 18th, 2005 by avi – 4 Comments

I finished Rifts: Deception’s Web by Adam Chilson today. The only good thing I can say about it is that it was marginally less excruciatingly terrible than the previous book in the series. In fact, that’s all I really want to say about it, and instead I am going to write a little bit about its setting, the Rifts universe.

I bought these books because I enjoyed, in my school days, playing the role-playing game they’re based on, Rifts. I’ll be the first to admit that it’s a pretty immature RPG (as these things go), but it had an interesting and fairly unique back story, and lots of fun guide books to read and collect, and so I enjoyed it. I won’t apologize for that.

The story is that, at some point in the past (our future), there was a war, leading to a massive, unilateral nuclear assault. 90% of the world’s population was killed in just minutes. This just happened to happen at a time of great celestial alignment (or something), and so all of the spirits of the dead at that moment funneled into the ley lines (zones of mystical energy) that gird the planet. Usually these lines are just areas of slightly increased magical energy, and where they meet are only slightly more powerful. However, all of the magical energy of the spirits rushing into them causes them to flare hugely, pouring cast amounts of magical energy into the world. At the nexuses, the magical energy is sufficient to tear holes in reality, letting beings from other dimensions through and onto Earth. These are called rifts.

The RPG (and the books) take place about 200 years “post-rifts”, so things have settled down a bit since the tumultuous events. What they get from this setting is a really interesting melange of different genres — there’s futuristic weaponry, robots, vehicles and powered armor. There are mutants, psychics, aliens and being from other dimensions. There’s magic, wizards, witches, dragons, orcs and all the other things you’d expect in a fantasy setting. The great difference in setting also allowed for some varied genre concepts — there are giant cities run by totalitarian governments, small farmsteads living in a lush and magical realm and blasted desertscapes where people fight tooth and nail just for water to survive.

Anyways, this Chilson clown uses all of these settings, he just does so incredibly poorly. My book now is called Close Encounters of the Third Kind Diary, by Bob Balaban. It’s great.

Of fancies floating through the brain,

Posted in Explaining on November 14th, 2004 by avi – 12 Comments

I’ve been having trouble sleeping lately. I’ve been thinking too much.

read more »

And the tide rises, the tide falls.

Posted in Explaining on October 18th, 2004 by avi – 41 Comments

I wrote this program today to find what I’ve been calling “combo words”. Basically, you find one word that ends with a certain sequence of letters and then another word that begins with that same sequence of letters and it smushes them together into a fancy, new word. I’ve found that there are plenty of really dumb and boring examples of this, for example, “daydreaming” (daydream + dreaming). However, there are quite a few very amusing ones:

elephantoms
circumspectroscopy
bittersweetener
floundertaking
transpacification
permissionary
benedictionaries

etc, etc. Come up with your own! It’s fun! You can also run my program to get a big list and cheat, like me. :)