Pages

Thursday, May 26, 2011

The Number ...

... 8128

I have an affinity for the number 8128. Sometimes people ask me why. I apologize in advance for the self-aggrandizing nature of this post.

Back when I was a skinny, sports-averse lad of 12 or 13 years old, I read a lot of books. Reading was a lot more fun than standing out in left field praying that nobody would hit a softball in my direction, and then when it happened, acting like I was trying to catch it when, in fact, I really just wanted to get out of the way and avoid getting beaned or worse.

I read a lot of science fiction. I mean, a lot of it. I also read other things, including books about math. Not math textbooks, but things like George Gamow's One Two Three ... Infinity and the like. I don't remember which book specifically brought up the concept of "Perfect Numbers", but the concept resonated with me. For whatever reason, any book I found only listed the first 3 numbers in the series: 6, 28, 496, ... . I found this maddening -- what's the 4th number?!

You have to recall that this was circa 1973: we had a rotary phone, there was no internet or WWW, I was too young to drive so getting to the library took some effort, I lived in podunk where there were no bookstores, much less bookstores that had a "Computers" section, etc. I was pretty much on my own.

But at about this time I also got interested in computer programming. My family lived near a branch of Southern Illinois University, which had recently acquired a Control Data Corp Cyber mainframe, and was using it as a timeshare system. Through a friend I got access -- actually, people were extremely casual about usernames and passwords and you could find them written on abandoned punch-cards etc, I eventually had quite a collection. I realize that nowadays this is frowned upon, even illegal, but back then it was considered "cute". Before you condemn me, know that I had certain ethics about it, and I never deleted people's files or caused any kind of trouble. Mostly what I did at first was play games -- things like the old BASIC Star Trek game.

But eventually I wanted to know more, so I asked the wonderful lady (Mrs. Whelan) at the public library if she could find me some books on "basic computer programming". And in about a week she had a couple of books for me with titles like "Learning BASIC". I ate 'em up.

Yes, I was a serious geek as a boy. Geekitude was not popular in the small midwestern town in which I lived; the other kids gave me hell, I was "weird" and so forth. Today, it seems like "geek" is simply one of many accepted sub-cultures (like "jock", "goth", "rocker", "preppie", "skater", etc) that kids may identify with. I'm happy about this -- I think of myself as an "early adopter". But back in 1973, reading science fiction and writing computer programs just got you sucker-punched.

Anyway, long story short (and you can probably see where this is heading), one of the first things I did when I learned to program was write a program to generate the 4th Perfect Number. It was not especially efficient, but it chugged along and popped out 6, then 28, then 496, and then ... after a pregnant pause ... 8128!

Natch, first thing I did was rewrite the program to spit out the factors so that I could check the answer -- hey, it was an early effort! -- but 8128 checked out.

I went on to learn a whole bunch of different languages like FORTRAN and SNOBOL and LISP and APL (where, since I didn't have APL keyboards, the operators were all represented as escaped digraph "symbols" like $UP$ -- some things are too tedious even for an obsessed 13yo), and wrote a number of programs to play Conway's Life and several Turing Machine emulators and other nerdy delights. And this led to going to college and getting a couple of degrees in Computer Science, which have been "beddy beddy good" to me.

But at the beginning of it all was that 4th Perfect Number, 8128. Which, lest I sound too impressed with myself, I note that the Wikipedia article on Perfect Numbers says:

These first four perfect numbers were the only ones known to early Greek mathematics, and the mathematician Nicomachus had noted 8,128 as early as 100 AD.

Then, in 1456, an unknown mathematician recorded the earliest reference to a fifth perfect number, with 33,550,336 being correctly identified for the first time.

So it's not like I was blazing new trails on the frontiers of mathematics. But still, I've sort've 'adopted' the number and tend to use it in places where I need a handy integer. Like, for instance, a blog name. Although for obvious reasons I never use it for passwords or pin-codes or anything like that.

Anyhow, love it or hate it, that's the story.

Monday, May 23, 2011

Asshole Crime

So, the trial of Dharun Ravi is moving along. Ravi, you'll recall, is accused of driving his college roommate, Tyler Clementi, to suicide after he used a webcam to spy on Clementi having a homosexual encounter. Ravi also twittered about it and allegedly live-streamed a portion of the encounter out to his twitter followers (who must be a real classy group, I'm sure). So now as a result he's being charged with 15 counts including bias intimidation, invasion of privacy, witness and evidence tampering, and other stuff that nobody seems to want to list. The "bias intimidation" charges carries a maximum penalty of 10 years in prison.

The entire situation sucks. Even as a parent myself, I can only imagine the nightmare that Clementi's parents are living in. I'm sure Dharin Ravi's family is going through some tough times, too (I really know nothing about them, maybe they're rich and it's no big deal -- or maybe not, and they're mortgaging the house / tapping into their retirement nest-egg to pay legal expenses). It seems like many in the gay community want to see Ravi hang.

This is just me, but, having carefully considered all of the facts available to me, I've concluded that Ravi is guilty of being a Big Asshole. Additionally, while I don't have perfect knowledge of the events, it seems unlikely to me that Ravi could have predicted that Clementi would commit suicide.

Keeping that in mind, 10 years in prison seems excessive. I mean, here's a guy in New Jersey who got 4.5 to eight years for driving drunk and killing a 13yo girl. And apparently this is considered a tougher-than-average sentence for such a crime. Don't get me wrong, I'm not shrugging it off as "oh, kids do that stuff", I believe Ravi deserves some kind of punishment. But -- 10 years? What kind of justice is being done here?

This kind of thing comes up again and again and again in the news: Asshole Crime. Some asshole -- okay, let's be polite and call them a "Jerk" -- some Jerk gets somebody else hurt or killed, and DA goes through the statutes with a magnifying glass to come up with a set of charges that a jury might buy. I mean, "bias intimidation"? I'm not sure I even know what that means, much less that there's apparently a law against it (in NJ, at least). I think this is a waste of the justice system and taxpayer money. Perhaps it's the engineer in me, but I don't see any value in locking a jerk in prison (save "punishment for punishment's sake"), but I think society would be better served if the jerk could learn to change their ways and become a non-jerk. And for this, I have two suggestions, one "real", the other "imaginative". I'll use the Ravi / Clemente case as an example, but I'm sure you can think of any number of other examples that qualify.

First up is the Civil Suit. Ie, the Clementi family sues Dharin Ravi for driving Tyler to suicide. The jury awards damages as they feel appropriate. It's neat and simple, and even the worst of jerks hates getting hit in the wallet. Getting sued and paying damages can be a serious "learning experience".

Second, and more fun: what I really think this country needs is a Federal Asshole Registry (sorry, "Federal Jerk Registry"). The idea is, somebody does something jerk-ish, they get their name etc in the Registry for a given amount of time. And during that time, they have to go around and introduce themselves as a Registered Jerk to their neighbors (just like sex offenders). Potential employers would use it for background checks, etc.

Actually, we more-or-less sort've have a de-facto version of that right now, with Google: Search on someone's name and if they've committed any serious jerkery they'll often come up. But a genuine government-sponsored Jerk Registry would be better: it'd be harder to "game", plus it'd contain info on jerks who are deserving of the name, but somehow managed to avoid local or national news coverage, or are buried so deep in the search results list that nobody ever notices them.

Admittedly, this still leaves the problem of just how do decide who deserves a place in the Jerk Registry, and for how long. That'll take some pondering, and so I'll leave it for a future entry.

Friday, May 20, 2011

From Agents To Apps

"According to IDC, smartphone manufacturers shipped 100.9 million devices in the fourth quarter of 2010, while PC manufacturers shipped 92.1 million units worldwide. Or, more simply put, smartphones just outsold PCs for the first time ever." (source: New York Times, 8 February 2011)

And also:

"Amazon ... is claiming that Kindle e-books are outselling hardcover and paperback print books on its Website." (source: eWeek.com, 19 May 2011)

So, call me Captain Obvious, but this mobile computing stuff really seems to have caught on. And hey, I'm a fan. For all of its deficiencies (dropped calls, poor reception, yaddayadda) the cellphone has made the world a safer, more efficient place. 15 years ago, if your car crapped out on you at 3am in some strange place, you had a "situation". Nowadays help is literally a phone call away. Which is why I get irate when my wife and kids go out and don't take their cellphones with them -- I mean, why are we paying for these things anyway?!

One of my favorite writers put it thus:

Stories set in the Culture in which Things Went Wrong tended to start with humans losing or forgetting or deliberately leaving behind their terminal. It was a conventional opening, the equivalent of straying off the path in the wild woods in one age, or a car breaking down at night on a lonely road in another. A terminal ... was your link with everybody and everything else in the Culture. With a terminal, you were never more than a question or a shout away from almost anything you wanted to know, or almost any help you could possibly need.

There were (true) stories of people falling off cliffs and the terminal relaying their scream in time for a Hub unit to switch to that terminal's camera, realize what was happening and displace a drone to catch the faller in midair; there were other stories about terminals recording the severing of their owner's head from their body in an accident, and summoning a medical drone in time to save the brain, leaving the de-bodied person with no more a problem than finding ways to pass the months it took to grow a new body.

A terminal was safety.
--- The Player Of Games by Iain M Banks

But I digress. The real reason I'm writing this is to comment on how personal computing today varies from how people thought it would be twenty-odd years ago.

Once upon a time, everyone thought The Future was going to be "agent technology" -- that is, we'd all have one or more personal 'software entities' (ie 'agents') that would go out and do things for us. You'd say "I need to meet with Steve Jobs -- set up a meeting, book a flight and a hotel room and a car, and oh yeah Billy's birthday is next week so buy him that home chemistry set he's been wanting". And your Agent would go do all that stuff for you.

You can see how this hasn't exactly worked out. For one thing, the idea of buying a home chemistry set scares the bejeezus out of people for fear of getting flagged by Homeland Security or the DEA. But more to the point -- think about how someone today would go about executing on the tasks given above:

First off you'd pull out your smartphone and look up Steve Job's phone number in your smartphone's Contacts list. Then you'd give him a call and set up the meeting, and then put the meeting into your smartphone's Calendar, then you'd set up the flight, hotel, and car, either by using your smartphone's web browser or, more likely, "there's an app for that". That settled, you'd use the Amazon app to browse for chemistry sets, select one, buy it and arrange to have it shipped. And you can do all this while you're sitting in the waiting room at the doctor's office.

The point I'm trying to make is that apps have supplanted agents as the future's way of getting things done. Or, to look at it another way, instead of telling an agent what we want, we interact with a smartphone plus apps to get things done. Which, if you think about it, is probably a superior way to do most things: given the current state of the art in artificial intelligence, it's unlikely that anyone would trust a piece of software to set up a business trip for them. Smartphone apps hit the "sweet spot": they allow people to perform tasks both trivial and difficult, but they keep the human in the loop just enough to ensure desired results. AI deficiencies aside, this probably also makes people feel more secure, knowing that they've supervised the job enough that they're confident they'll achieve the results they want and expect. It's a "trust thing": you had no idea that some chemistry sets are priced at over $200, and so you're pleased that you were involved in the purchase and picked the one that cost $35.

For sure, agent technology might someday arrive. But I think there's going to be a significant "human factor" that will need to be surmounted. I guess if I were a rich fart or a corporate executive who was comfortable with handing out short, imprecise orders to my staff or my secretary, an agent would be a natural, easy thing to work with. When and if we ever get usable agents, I suspect that they will be highly personalized to 'fit' the person they work with -- sort've like how a travel agency keeps track of whether a client prefers smoking or non-smoking, window / middle / aisle seating, etc -- but in a lot more detail. And these personal databases, full of random and extremely personal trivia about an individual, will need to be very, very secure. I mean, imagine that business trip above except the command ends with "and book me some entertainment while I'm out there" and the agent helpfully sets up an appointment with a call-girl, knowing that you prefer short blondes with a C-cup. Now imagine that a newspaper reporter or your wife gets hold of that database.

So what does the future hold for smartphone / app technology? My guess for the relative near future is that smartphone devices will be given more latitude to wake up and notify us of events of interest. An example I like to use is: you're at your hotel, resting up for the big meeting with Steve Jobs the next morning, when you're jarred awake by alarms -- the hotel is on fire! You're on the 10th floor, and you need to get out, fast. So you grab your smart phone and turn it on and bring up your Hotel Fire Escape App, which uses GPS and other techniques to guide you to the exit.

Well, okay, not quite -- most people are going to at most grab their pants and head out the door. But imagine that instead your smartphone wakes up with the alarm, sounding it's own alarm to make it easier for you to locate it, and runs the Escape App automatically. You grab the phone and it's got big green flashing arrow directing you out the door, down the hall, and to the stairs. This is example is admittedly contrived, but I think we'll be seeing more and more of this kind of thing in the next few years: our smartphones will become more "context-aware" and will initiate user interaction when appropriate.

(You may think the hotel fire rescue app is silly, but I'm told that navigating dark, smoke-filled rooms and hallways is not easy. A number of hotels are moving emergency exit signs down to near floor level, where they can be more easily seen if (God forbid) the smoke is so thick you find yourself crawling on your hands and knees to keep out of the smoke. If a smartphone app can help people survive that kind of dangerous situation, more power to it!).

Friday, May 13, 2011

My Talented Kids

You may want to skip this one if you're not a relative of mine -- this is just Dad taking a moment to crow about his talented kids.

For his final art project, my son Aidan took one of his guitars apart and sanded down the body and "swirl-painted" it. His first attempt, so it's not a perfect "swirl" but the result is still pretty gosh-darn cool. Yes, he got an A.

(oil paints on wood)

These are a couple of freehand drawings by my daughter Miranda:

(pencil on paper)
(ink on paper)

(Alas, not the best digitization of those past two images; I'm a bit loathe to run them through our scanner for fear of destroying the original).

I'm pretty happy that both of them are very creative (although in very different ways). I hope it's something that stays with them their entire life.

Wednesday, April 27, 2011

Goodbye SETI

The SETI Institute has fallen on hard times:

In an April 22, 2011 email ... SETI Institute CEO Tom Pierson described in detail the recent decision by U.C. Berkeley ... to reduce operations of the Hat Creek Radio Observatory (and thus the Allen Telescope Array) to a hibernation state effective this month. NSF University Radio Observatory funding to Berkeley for HCRO operations has been reduced to approximately one-tenth of its former level and, concurrently, growing State of California budget shortfalls have severely reduced the amount of state funds available for support of the HCRO site.

This makes me sad. I know that in the past I've expressed some rather pessimistic views on the topic, but I've got no problem with passive scanning: it's safe and cheap, and (even though it's admittedly a long-shot) it has the potential to change humanity's outlook on the universe forever. I mean, can you imagine waking up one morning to see a headline like

INTELLIGENT ALIEN LIFE CONFIRMED!
We Are Not Alone!
(film at 11)

?

But maybe some eccentric millionaire will save the day. Ex-MS honcho Paul Allen has already given them $30 million to fund the initial array of telescopes. "In for a penny, in for a pound" -- maybe he'll pull out the seat-cushions on his sofa and dig around and find an extra $5 million to keep SETI running for a couple more years. I really hope so.

$5 million, though ... it's like pocket lint compared to the, what, $6+ billion that's been spent on the Large Hadron Collider? And SETI is a whole lot easier to explain to the average tax-payer. Although maybe that's a problem and not an advantage. Cynic that I am, if you tell Joe Citizen that "SETI is the search for intelligent life out in space", what he hears is "SETI wants $5 million to hunt for flying saucers." Which is probably not helpful.

On the other hand, if you tell him "The Large Hadron Collider will address some of the most fundamental questions of physics, advancing the understanding of the deepest laws of nature" ... well, hell, I'm not sure what the average person thinks of that. Probably something like "I dunno what it is, but all these science guys are backing it, so it must be a winner." The nice thing about basic pure research is that you never really know what's going to come out of it. So when people ask you questions, you can say pretty much anything you want: "it could lead to unlimited free energy", "it could solve global warming", "it could lead to new medical techniques", etc etc and so forth.

This is not to say that pure basic research is easy to fund -- just look at the poor Superconducting Supercollider that lost its funding in 1993. But SETI has connotations of "flying saucers" and "little green men"; The LHC is all about "the God Particle" and "Baryonic Matter" and cool impressive terms like that. Even Conan O'Brien couldn't make a good joke about Baryonic Matter. (The best I've ever managed involved the "Mushroom Mattar" at the local Indian buffet).

*sigh* Five million dollars. It seems like a trivial sum in some contexts, but I know from practical experience that It's Hard To Make Five Million Dollars. "Well, duh!" you say. But ... my day job involves working for a very large international corporation, one that grosses billions of dollars in revenue every year. A few years ago I was sent to South Korea to assist on a project, one that I can't talk about except to say that it was a very small piece of a much larger project that involved building a new city. My project had an estimated cost of $5 million USD. I met all kinds of VIPs and bigshots, was shown all manner of plans and forecasts and models and whatnot. There was a *lot* of money involved. I figured it was a no-brainer that my measley $5 million project would get approved -- probably rubber-stamped by some junior assistant project approval guy in a basement cubicle.

Boy was I wrong. There were endless meetings, demos, justifications, presentations. And every day the project team grew -- I never figured out what role 3/4s of them were supposed to be doing (although I had been forewarned by someone with prior experience: "Korea? Oh man ... you're gonna love the way they manage to squeeze in all of their cousins and uncles and friends on every deal" and as near as I could tell, he was totally (if not politically) correct).

Anyhow -- in the end, the project never happened. I was surprised: I thought that billion dollar corporate entities would trade off "minor" million dollar projects like pocket change. There's a classic sales principle wherein you attempt to sell the big dollar item first -- a $2000 suit, for instance, and then hit the customer up with $50 cufflinks, a $75 cravat pin, etc, which somehow seems less expensive in the wake of the two grand you just dropped. But that didn't seem to happen here.

In truth, I never did figure out what happened to kill the project. When I was over there, I saw a museum quality scale model of the proposed city, complete with lights and working bridges and cranes and such, it was about 15 meters long and probably cost at least a million bucks. So someone was throwing money around. Maybe my team just never met Daddy Warbucks. There was, frankly, a lot of stuff I never quite figured out: the Korean language is composed of about 5% English "loanwords", which means that if I listened very carefully, I could almost kinda get the feeling that maybe I understood about 1/20th of what people were talking about.

All in all, a most educational experience, I learned much. I learned that I could drink most Koreans under the table, and that I don't like Korean food. But the most important lesson I learned was: It's Hard To Make Five Million Dollars.

Good luck, SETI.

And now for something completely different: while Googling for something else I randomly encountered this gem: The Aesthetics Of Science Fiction Spaceship Design, which is the Master's thesis of one Kate Kinnear at U Waterloo. It's a 26MB PDF but fairly easy reading, and the topic is Pure Fun. It must be nice to have a Master's Thesis that other people will actually want to read. I stuck a $10 bill in my (paper) thesis back in 1985 and 4 years later I came back and checked and it was still there. It's probably there now.

Sunday, April 10, 2011

Cyberpunk at the Movies

What do the following four movies have in common?

If you said Jason Statham, you're 3/4s correct (Statham didn't appear in Death Race 2, which is a prequel to Death Race).

If you're into movie soundtracks you might guess "all four movies were scored by Paul Haslinger (ex-Tangerine Dream)". And despite impressing me, you'd still only be 3/4s correct -- Haslinger did brilliant scores for Crank and the Death Race movies, but Crank 2 was scored by the one and only Mike Patton (Mr. Bungle, Faith No More). Which was a good choice given the amount of over-the-top mayhem in the film.

This is admittedly a highly-subjective appraisal, but I would submit that these are four of the best cyberpunk movies to come out of the studios in recent years.

"Cyberpunk?" you say, incredulously. Yes, cyberpunk. Here's a few selection lines from the Wikipedia article on the topic:

Giant, multinational corporations have for the most part replaced governments as centers of political, economic, and even military power.

... many cyberpunk protagonists are manipulated, placed in situations where they have little or no choice, and although they might see things through, they do not necessarily come out any further ahead than they previously were. These anti-heroes--"criminals, outcasts, visionaries, dissenters and misfits" call to mind the private eye of detective novels. This emphasis on the misfits and the malcontents is the "punk" component of cyberpunk.

The settings are usually post-industrial dystopias but tend to be marked by extraordinary cultural ferment and the use of technology in ways never anticipated by its creators ("the street finds its own uses for things"). Much of the genre's atmosphere echoes film noir, and written works in the genre often use techniques from detective fiction.

Of course, I am (what fun!) picking and choosing and ignoring certain elements like direct neural connection into a mutual hallucination (ie, "cyberspace") and god-like Artificial Intelligences who manipulate humans for their own unknowable ends. But cyberpunk isn't a hard, fast set of rules; it's a set of (highly engaging) tropes that tend to pull us into the struggle of the "little man" against The System, and (we hope) allows us to share as he ultimately raises a defiant middle finger to the Powers That Be.

It's good stuff. And while I don't want to give away any spoilers, every one of these four movies tips its hat in one way or another to William Gibson (Neuromancer), Richard Kadrey (Metrophage), and Neil Stephenson (Snow Crash). Street culture, "grunge" technology, a manipulated anti-hero who nonetheless manages to "win" in some manner -- it's all there.

Crank 2 -- arguably the most outrageous of the four films, features a great musical score plus a number of cameos by some interesting figures in the music industry, namely Maynard James Keenan (Tool, A Perfect Circle), Danny Lohner (Nine Inch Nails), and Chester Bennington (Linkin Park).

It's just nice to see cyberpunk done right. It's been attempted before -- Vin Diesel's Babylon A. D. (2008) comes to mind, and the post-apocalytic Eastern Europe in the first half was quite well-done. But once the action shifted to New York, things quickly slid downhill.

Finally -- while we're on the topic of cyberpunk -- it's strange to me to hear people refer to Bladerunner as a "cyberpunk masterpiece". The Syd Mead production design gave the movie a dark, noir-ish texture that had something of a cyberpunk "feel" to it, no argument there. But the actual plot of the movie itself was basically "cop tracks down bad guys". And -- maybe this is just me -- the first time I saw it, I found myself hoping that Rutger Hauer would kick Harrison Ford's ass.

I've noticed this tendency of late for high school english teachers to put Dick's Do Androids Dream of Electric Sheep on student reading lists, and it makes me wonder if there is a sad "group-think" dynamic going on here. Dick wrote a lot of books, and DADoES is most certainly not one of his better works; it's simply (thanks to Bladerunner) his most well-known book. He's written much, much better: A Maze of Death and UBIK come to mind, as does A Scanner Darkly, which is a dark, serious book about Dick's life in the 70's drug culture that carries an anti-drug message about as strong as Hubert Selby Jr.'s Requiem for a Dream -- yet I fear that most people won't read the entire book and thus miss the point. It reminds me of that time in 1999 when David Howard, aide to the mayor of Washington, D. C., used the word "niggardly" while discussing a budget.

Of course, no discussion of cyberpunk in the movies would be complete without a mention of The Matrix.



I can't resist a final comment: if you like cyberpunk or the Death Race or Crank movies, you owe it to yourself to check out Richard Kadrey's novel Sandman Slim:

“The most hard-boiled piece of supernatural fiction I’ve ever had the pleasure of reading. … all confident and energetic and fresh and angry. I loved this book and all its screwed-up people.” (Cory Doctorow)

“The best B movie I’ve read in at least twenty years. An addictively satisfying, deeply amusing, dirty-ass masterpiece, Sandman Slim swerves hell-bent through our culture’s impacted gridlock of genres…it’s like watching Sergio Leone and Clive Barker co-direct from a script by Jim Thompson and S. Clay Wilson.” (William Gibson)

Sunday, March 27, 2011

Terms of Enrampagement

I've grown to be a huge fan of Archer (Thursdays at 10pmEST) on FX. It's an animated show about secret agent Sterling Archer and -- well, you just have to watch it yourself. It's raunchy, foul-mouthed, twisted, and hilarious. The two-part "Stage Two" and "Placebo Effect" that aired recently were amazing; "Placebo Effect" had some jaw-droppingly outrageous over-the-edge writing: Archer (who is fighting breast cancer) finds that criminals have been replacing cancer treatment drugs with sugar pills and Zima, and the result is non-stop violence and ethnic slurs and medical marijuana as he "rampages" his way to the top of the criminal hierarchy. Interrogating criminals by pretending to play Family Feud and blowing out their kneecaps with a shotgun probably doesn't sound like a recipe for comedy gold-- but it had me rolling on the floor. That's only a small part of the extremely "non-PC" frolics that the show pulls off, ending with a warm homage to one of the most memorable Magnum, P. I. episodes ever. Some of the very best television I've seen this year.

It sure ain't Little House on the Prairie. It may not work for you. But if you like television that pushes the boundaries, you really need to check out Archer.