Sunday, August 15, 2010

Rise of the Velomobile

The velomobile will be the next great technology to reach ubiquity. 

(Assuming that everybody behaves in a perfectly rational manner, which is not a safe assumption, unfortunately)

Near the beginning of August the web was abuzz with news that obesity incidence in the US has continued to increase; more recently, it was suggested that obese people visit general practitioners more frequently than smokers and generally unfit folks. Obesity is bad, this is not news--with the distributed costs of public health care, obesity is even worse. Another bit that isn't news is that a moderate, sudden, and sustained escalation of petroleum prices, perhaps as a consequence of finite/dwindling supply, would likely lead to cataclysmic economic destabilization because of our profound reliance upon it--a point practically self evident in the most rudimentary economic perspective. Of course for whatever reason many more people have petroleum centric anxiety manifested as fear of global warming, for which the more dire consequences won't happen until a fair while after we've already run out of gas if we keep increasing our consumption.

But for a culture in which the automobile was supplanted by the velomobile, these problems amongst many others would be made irrelevant.

What is a velomobile? It's a pedalcar, resembling a grown-up soapbox racer with bicycle pedals. This is a velomobile:



The typical modern velomobile is little more than tricycle recumbent with a fairing, but these two things together make for something of an advanced vehicle. Here's what it looks like in the cockpit of a good DIY velomobile that was constructed for under $1500 (full flickr here):



Recumbents are increasingly popular as they can provide more comfort than the usual bicycle and also utilize the mechanical advantage from having lower back support while pedaling. The fairing adds the benefit of aerodynamics, a good thing as air is the principle force that slows a cyclist. But the fairing does more than that: by enclosing the tricycle, it is suddenly a vehicle equipped to ride in inclement weather; perhaps even more important, what was a bike now strikes the casual bystander as a car. Unfortunately the fairing adds weight... and with intuition it becomes clear that with the minor addition of a small electric motor, this vehicle is the most sensible form of transportation ever devised.

On flat terrain with no wind, an average person can sustain 25 MPH in a velomobile without much difficulty. With an electric motor I'd expect one would be able to sustain 25 MPH while going up a decent hill.

There are many exciting things about velomobiles--by my figuring they potentially represent the cheapest, safest, cleanest, healthiest, and most sustainable form of transportation ever conceived--but the most exciting thing about it all is that like bicycles there's already an international legal precedent for their use on public infrastructure. In the US a velomobile is classified as a moped, as long as it has pedals and doesn't exceed 20 MPH (varies by state). Because of this a velomobile can be piloted on public roads with all the rights of a cyclist, which tend to be more generous than the rights of motorists, no registration or insurance necessary. Newer velomobile designs incorporate headlamps, turn signals, and brake lights; with an electric motor you could drive with city traffic as though you were one of the internal combustion monstrosities. The biggest problem with velomobiles is that they haven't caught on yet, and as part of that, nobody has been able to produce one on a large scale for a price within reason.

This is an incredible custom velomobile, replete with water-filled airbag suspension (full flickr here):


This velomobile is somewhat commercially available, total price >$6000 (retail site here, worklog here):



With the widespread adoption of velomobiles our country could reap the benefits of increased general health with vastly reduced vehicle related expenditure, and thus an increase in overall prosperity. Perhaps even more important, we'd reduce our exposure to calamity by decreasing our extreme dependence on a steady (and foreign) supply of petroleum at a steady (and low, and further subsidized) price. Not that I think adoption should be limited to US.

Saturday, July 24, 2010

Predictive prose

One of the great things about a software keyboard (and open software) is that a different keyboard can be had with no more than a download. What is even more interesting is that by digitizing the keyboard, it can easily function in ways that were previously impossible. Recently I downloaded the beta for SwiftKey, an android software keyboard that aims to improve with a feature whose removal I've long bemoaned: predictive text. The short story is that I'm (naturally) very interested in the behavior of this software, and simultaneously impressed and disappointed at its performance. Quickly it became clear to me that I was witnessing artificial intelligence/machine learning, and aloof with a sense of uninhibited exploration I sought to set free the voice inside the machine. With minimal input, I guided the software in constructing sentences, in the process revealing patterns that were part of prior training. This is what my keyboard had to say:

My plan relied on Sunday morning, so if we could find a little bit more time to get a chance to win. I am feeling very well presented and I will be in a few weeks. Hey, you're sure that you are interested in joining us? I think we should be able to make a difference. I am going to have the capability to be a great deal of More information on this one. I am a beautiful place on the web, and I will have a great time. Hey everyone, I have a good idea to advertise. Good luck with the word of mouth upon discovery of the many authors, and thats what you think about this product. Good morning!! Good morning 2,I. Good luck with the latest version of the week. Good luck with your own virus checking software. Good luck with the new year. Good morning, but it feels like a plan to use the search page, or if you want me to come over? Just wondering if you have to get the most popular videos. Is it possible to get a bit of funding for balsa wood and aluminum foil balloon attached to the following models of common knowledge and experience of the day off, but it feels like a good idea to me. We will be able to make it go faster before it finishes and then we can get some work done. I think, and I am. I am feeling very tempted by electric bike kits. I am going to be a good idea to advertise your company slogan. I am a beautiful person. I am a man who has been a bit of a question about the whole thing was that the top prediction for the letter i when following for is instance ; most other times the recommendation is simply " I. I am a bit of a question about the whole thing was that the top prediction for the letter i when following for is instance ; most other times the recommendation is simply " I. Hey, your skate is still on the web, go to the list. I am feeling very tempted by electric bike kits. Hey guys. Hey everyone else. Hey everyone, I am a beautiful person. Hey everyone, I think I have to retake calculus 2,just. Hey, you're way amazing and the rest of the many advantages of open software, new research has revealed that the top prediction for the letter i when following for is instance ; most other times the recommendation is simply " I. Thanks for the next few weeks. Thanks, but I think I'll be back for more information about yourself and your function in the morning, and thanks for the next few weeks.

Tuesday, July 6, 2010

Matter and Electromagnetism

With precisely 20 minutes of focus anybody can come to know a very significant portion of the foundation of our physical reality.


Saturday, July 3, 2010

Motorsport: Rally

Despite my fervent conviction that cars should not be used as they are, I'm actually something of a sucker for motorsports. In particular, it is with ceaseless amazement that I witness rallying. As far as forms of vehicle races go, few are in the same league as rally racing; certainly none require traversing such a diversity of surfaces, including none at all.

The World Rally Championship (WRC) is the best known international rally series. This video clearly shows that being a rally driver requires equal portions of insanity and talent, and, in the case of the co-driver, the ability to maintain literacy while under extreme duress. Coincidentally, the song played for most of the video is one that has also been showing up in my Pandora.

Friday, June 25, 2010

Regarding Grammar Nazis

i gotta wunda yzit dey tinkin wedadumwuns wen ryting disway canb far moar efishunt and expresiv. peepol who thro a fit abowt sumdin liek da cowrecked form uv ther mussb dadumwuns cuz da meenins clear frum contxt... uddawyz ther, ther, an ther woodall sownd diffrnt to. point izat if i sed ther sittin ova ther on ther lawn, yad no wat i meen, so ynot makit da same for rytin.

There are occasions that call for communicative and thus linguistic precision, which demand the correct use of words, syntax, grammar and so forth. However the notion that any non quantitative language can be used with maximum communicative efficacy is foolish. For instance, a studied linguistic prodigy could write a whole story with what was intended to be communicated hidden (but nonetheless objectively discernible) in the etymology of choice words while maintaining a coherent facade--in other words steganography by etymology. Similarly a word might be used such that several of its meanings yield sensible interpretations. The mere fact that many words have multiple distinct meanings is enough to indicate that absolute precision in communication by this language is unlikely. Despite this lack of objective precision, communication is surprisingly robust; people often use words thinking they mean something other than what they actually mean, yet the intended meaning comes across (more often than not, in my experience). The modern paragon of this situation is the phrase "beg the question," commonly used as though it means "causes the question to arise." This usage is unequivocally false: the phrase comes from formal logic as the fallacy of assuming what is to be proven, first defined by Aristotle ~350 BCE.

It's not just the uneducated masses who abuse conventions, a good number of celebrated authors have as well: Emily Dickinson's work is superficially characterized by a distinct misuse thereof, Jose Saramago won the Nobel Prize for literature for a book that abandoned all rules regarding punctuation of speech, and for his best known work "A Clockwork Orange" Anthony Burgess successfully discarded much tradition in favor of a largely fabricated and evocative lexicon. Even authors for whom the principle intent is not to explicitly subvert tradition will occasionally see fit a bit of unrestrained expression. Intentional subversion of convention is not necessarily better than the accidental, as the important consideration is efficacy of communication; if technically incorrect writing communicates more effectively than the cowrecked alternative it must be qualitatively superior. Objectively the rules of writing should only matter as much as they aid in communication since it is the primary objective. This is a good thing, as the rules of writing are so complicated that even professional authors require editors to point out all the errors. If technical proficiency is more important than communication then language kinda loses its point, amirite?

Clearly there are cases in which abandoning standards is more effective or desirable than abiding by canonical stricture, thus rendering the concern at hand nebulous. Are we simply to assume that people who replace 'because' with 'cuz' are idiots, or is it possible that certain other people are inflexible pedants unable to realize that 'cuz' is an efficient, effective and unambiguous replacement of 'because'? The truth is that language is evolving, as it has from inception, the only difference being that presently it is happening fast enough for crotchety pedagogues to notice and complain. If it weren't for such odd sociological pressures I think this evolution might happen much faster, at the very least cuz it does (with intriguing results) when distinct languages intersect.

Some portion of people who started reading this won't make it to this point cuz of my possibly disconcerting choice of ostentatious diction (further rent til but a tortuous enigma did remain :P), which is too bad because they don't get to see this part where I expose my erudite articulation to be a Planck thick veneer over an idiocy so profound it is capable of using cuz and emoticons, and in, liek, a run on sentence. Another portion will get here having not fully understood what I've intended to communicate. Notice that for both of these cases it isn't my failure to comply that causes a communication breakdown but my technically acceptable overzealous use of multisyllabic words that might appear on the GRE.

To me the emergence of glyphic phenomena such as lol, \o/, :/, :|, :), :D and :P indicate a previously irrelevant deficiency in the ability of our communication medium and language to express ourselves sufficiently; in other words it's really hard to convey any emotion in the terse typed (not even handwritten!) form which has recently rapidly grown to unprecedented ubiquity. To not recognize the validity of these modern phenomena even in traditional print just seems stodgily conservative. Similarly if my use of unconventional symbolic representation lowered a persons judgment of my already limited intellect, I'm afraid I may no longer consider their ability to judge sound.


I cannahelp but tink dat deybdadumwuns tinkin as dey do dat da comma is anemor dan vizul garbish.

Wednesday, June 16, 2010

Garrett Lisi: Unification Theorist

Garrett Lisi is a particle/theoretic physicist who has come up with a very intriguing theory, one that mathematically unifies the quantum and relativistic branches of physics. The theory is fascinating and attractive, despite being essentially beyond comprehension. I had read about his theory at some point a while back and found it of general interest and know I've brought it up in discussion many times. Those times though my recollection was poor and didn't communicate the very important bit that is the author's name, but now I don't think I'll forget.

Unification is of course the holy grail of modern physics, an achievement similar in magnitude to curing cancer. A great thing about Lisi's theory is that it makes predictions which should be answered when the LHC makes it to full power. I have mentioned already that the theory is naturally appealing, and I wasn't lying: his paper is the most downloaded of all on arXiv.org, which is probably the largest online collection of pre-print scientific articles.

At the 2008 TED Lisi gave a presentation, his attempt at a lay explanation of the theory. You might want to take a moment to breathe deep and clear your mind before you watch...


Saturday, June 12, 2010

A Million in a Briefcase

A million dollars in a briefcase is almost the ultimate cliche, and accordingly diverse in its performances. Cliche is usually regarded as derogatory, but I must disagree--after all, where would we be without a million dollars in a briefcase? It is certainly cliche, but not in the sense that it is indicative of an absence of creativity; the briefcase by itself is totally ambiguous, lacking narrative, but it has strong potential to characterize any scene that it is placed in. In this sense the briefcase is more a character than a simple plot refrain.

For the other half of the brain: have you ever wondered if a million dollars would actually fit in a briefcase? These things are easy enough to figure out these days. The dimensions of US currency (from here) are about 6.1 x 2.6 x 0.0043 inches, and a common briefcase size is 18 x 13 x 5 which is enough space to hold around 17,450 bills. If each of those were hundreds, that would be $1,745,000. In fact a slim 3-inch briefcase can hold a million dollars. If someone really wished to avoid being cliche they could take the money in pennies, though it would be a poor choice; a hundred million pennies weighs just over 550,000 lbs, and all of them stacked would make a tower almost 79 miles tall.

Saturday, May 22, 2010

Google Shenanigans

Google has been all over the news today for making their homepage logo into a playable Pac Man game. Something I find interesting is that while none of the news I saw mentioned it, Google is also running a round of voting for the selection of drawings submitted by primary school children to be used for the logo at a later date. The contest is called Doodle 4 Google and is run in partnership with Smithsonian. The drawings are a handful selected from over 33,000 entries under the theme "If I could do anything, I would...," each with a short statement. I found the remaining candidates interesting despite what seems to be an obvious presence of bias in the selection process prior--I would love to believe that around 40% of US children have the restoration and preservation of Earth as top priority, but I have a feeling that on the whole entries might have been more along the lines of the finalist who answers with "...go to Japan," but with less deft artistry.

It seems that most of the time I see Google in the news it is over some imagined privacy theft, as though Google is secretly plotting to shame everyone on Earth at the same time by revealing our most incriminating queries (or what have you). Clearly in this case they are harvesting the unbounded imagination of our children... who knows what nefarious deed Google might conspire based on the suggestion to build subsidized housing for the homeless on the moon. And not only that, but Google with their unquenchable lust for data couldn't help but steal our opinions on this information too, as if their stated plot to give away 3 laptops, 80 netbooks, $15,000 scholarship, and a $25,000 computer lab grant weren't nefarious enough.

Actually I am somewhat disappointed by those figures, they seem a bit paltry (relative to Google); $15k wouldn't even pay for a degree at an in-state public university. Voting takes place here and is only open 5/18-5/25.

Wednesday, May 19, 2010

Mandelbrot Composition

Some more results of exploring reflection and the Mandelbrot set:



Thursday, May 13, 2010

Iteration

I've added threaded scene capture to my ray tracer so that I can make animations. Combine this with a map of the Mandelbrot set, and you can do things like this:


This animation also uses the reflection model of the ray tracer to complicate things a bit near the end, as you may have noticed.


One of the first animations I got out plays like a short film:


This result was accidental, I had meant to iterate by floating point values but was casting to integers at the wrong place; as it turns out, some interesting things happen around integral values.

If that's a short film, this might be a summary of that film:



note that I practically always display the set with a basis orientation contrary to convention--this is mainly because the blobs lend themselves more readily to anthropomorphizing than the alternate, and are thus naturally more aesthetic.


The following shows the set lights off and lights on:


In fact, the only difference between the two (IIRC) is that for the second I added an additional light to the ray tracer.

Saturday, May 8, 2010

Deepwater Horizon

The recent explosion of Deepwater Horizon and subsequent venting of crude oil has garnered a lot of coverage lately, and rightly so. However, there's an interesting perspective to this story that I think has been overlooked.

Consider that the estimated minimum leakage rate is 5,000 barrels of crude oil every day (according to Reuters). Is this a lot?  The daily consumption of petroleum in the US is somewhere around 19,500,000 (2008 data, from EIA); 5,000 barrels is 0.00026% of our daily consumption of refined petroleum.

There's a really important point in this: a sleight 5,000 barrels of crude oil per day seeping into the ocean is enough to do quite a bit of damage. With that in mind, doesn't it seem reasonable that the gases seeping into the air from burning 19,500,000 barrels every single day would probably have some consequences?

If only all consequences were as obvious as tar covered wildlife washing onto our doorsteps. There was a time, not long ago, that we could get away with pretending that the Earth was an infallible provider of infinite resources. That time has now passed, and the oblivious industrious bustle of humanity elicits tacit threats of autocataclysmic destabilization, by endeavors of awe-some magnitude undertaken at unprecedented pace with slightest regard for the fragile ecosystem from which we emerged. I'm immensely saddened to see the failure to  prioritize the maintenance of viability for life on Earth, particularly when it is overlooked for something as senseless as one more quarter of profitability. If only corporations were most interested in ensuring the future of life, if only...


*update*
New estimates place the rate of flow around 200,000 barrels a day. Even though that's a mind boggling amount of oil, it's still only 1% of the daily US consumption--and worldwide consumption is a fair bit more than that.

Wednesday, April 21, 2010

The Secret to Weight Loss

This is a "common misconceptions" post that I've been meaning to do for a long time, and thanks to a recent article in The New York Times I finally have a good reason. More on that later.

Everybody knows weight loss is a big deal, the fact is obvious from the astounding range of products/services with weighty promises (lose 30 pounds in 30 days!!!); the advertisements assault us constantly, from every possible angle. Given that the majority of US Americans are considered overweight in a culture with highest regards only for the exact opposite build, it's really no surprise that weight loss is big business. The real surprise is just how successful such ventures are when practically all of them make explicitly outrageous claims and just as many (if not more) are wholly ineffective. The truth is that with few exceptions commercial weight loss products are simply fraudulent--they are designed to take your money, not to help you lose weight.

I know the secret to losing weight, and I'm willing to share it... for free! It is very simple, and not simple in the subtly very complicated way, just simple. Ready?

How to lose weight:  Eat less.

 It's a matter of physics. Imagine an extreme case where a person doesn't eat or drink anything; by the very laws of nature and obvious from elementary intuition, it is impossible for that person to gain weight. This would be just like setting a scale in a sealed room: it would be very silly to think that the scale might at any point suddenly measure any more weight than it has all along. Humans are magnificently, extraordinarily, incomprehensibly complex systems, but that doesn't exempt us from the laws of physics. Unless more stuff is added to a body, that body will either maintain or lose weight. In case it isn't obvious, let me remind you that abstaining from all consumption for longer than a little while is a bad idea--remember, the rule is to eat less, not to eat nothing.

Let's explore the physics in slightly more detail. The main reason we eat is to supply our body with energy; our bodies need fuel to keep the magic alive, just like a car needs gas to move. Clearly it would be a bad setup if the energy we consume couldn't be stored, like a car without a gas tank we wouldn't get very far. There are a variety of ways the human body can store energy, but the presently relevant one is best known as fat. Call me crazy, but next time you see that extra bit of flab, try being grateful--if it weren't for that "unsightly" bit of excess, a few missed meals would result in death. I don't know about you, but I'd rather have a less than optimal social image than be dead.

So fat is stored energy, but what's this energy? Is there any way to quantify it so that its consumption might be regulated? In fact, yes, there is! The energy in food is also known as Calories, which is actually a kilocalorie or 1,000 calories. A calorie is a unit of energy, just like an hour is a unit of time. If you eat 2,000 Calories in a day and only use half of them, the rest will be stored, with some portion of them being stored as fat, it's as simple as that! If you are gaining weight and it's not because you're building muscle mass, you are eating more energy than you're using. Here's the Eureka moment!

How to lose weight (revised): Eat fewer calories than you use.

But wait, what about fatty foods, exercise, and metabolism, don't these play a major role in weight loss? Lets look at each of them.

Fatty Foods
One of the strongest diet related misconceptions around is that eating foods with excess fat, saturated, unsaturated, or otherwise will lead to increased body fat. This isn't true, food fat doesn't automatically turn into body fat. Perhaps this misconception arose because lipid nutrients and adipose tissue are both known colloquially as fat, but the notion that consumed lipids will transform into adipose tissue is as silly as the notion that eating brain will make a person smarter. Anybody can eat pure fat every day and lose weight, because the amount of fat in a food doesn't matter for weight management, what matters is the amount of Calories in the food and how much food (ergo how many Calories) is consumed. It's true that fat, with 9 Calories per gram, has a higher energy density than protein and carbohydrates, which have 4 Calories per gram, but for the purposes of weight loss this is moot--all Calories in a food, regardless of the source, are accounted for by the "Calories" figure on every nutritional label. Predictably there's a fair degree of complexity in how effectively food energy is captured, but the given number of Calories represents the maximum; if you closely regulate energy intake, you will realize there are no magical foods that cause body fat. Often, however, energy intake is far from regulated, far even from monitored, and it is very easy to underestimate how many Calories are eaten in a day. One case deserves special mention: high-fructose corn syrup (HFCS), the modern sweetener du jour, has been shown in a recent Princeton study to lead to more weight gain in mice than equal amounts of cane sugar. The theory I've heard is that HFCS is far more easily digested than cane sugar, and since digestion requires energy, HFCS results in more energy than an equal amount of sugar.

Exercise
When people think weight loss, they usually think exercise. It's always a point of contention when I say it, but exercise does very little to hasten weight loss. The reason is that the body burns a lot of energy no matter what its doing; for most people exercise causes only a marginal increase in energy consumption from the already high baseline. Remember the NYTimes article I mentioned? Here's a quote from it:
“In general, exercise by itself is pretty useless for weight loss,” says Eric Ravussin, a professor at the Pennington Biomedical Research Center in Baton Rouge, La., and an expert on weight loss.
The exception here is athletes, whom require many more calories than everybody else. This is because athletes have bodies that are especially efficient in utilizing energy--in other words, they have a higher basal metabolic rate. For those of us who aren't professionally physically fit, the connection between exercise and weight loss isn't anywhere near as clear cut. For more information on this topic I recommend reading the aforementioned NYTimes article: "Weighing the Evidence on Exercise." Beyond weight loss, keep in mind that frequent aerobic exercise is universally acknowledged as a critical component in the maintenance of cardiovascular health.

Metabolism
One of my pet-peeves, if you can call it that, is when people disseminate false information. We live in an age when almost the full knowledge of Earth is accessible on demand, so the reasoning goes that it's time we stop defaulting to wild speculation and just google it. Of course I have nothing wrong with wild speculation, my displeasure arises when the speculation is presented as fact. I'm bringing this up because it's relevant to the topic at hand, metabolism. Everybody has heard the word, it's used all the time, especially in regard to weight management, but what does it mean? What is metabolism? For all the mention it gets, I'd think everyone would be familiar with what exactly was being referred to. If you visit the Wikipedia page for metabolism, you might find that the subject is rather complicated; the summary refers to cellular respiration, metabolic pathways, and the carboxylic acids that are part of the citric acid cycle. That doesn't sound like weight loss! Metabolism is something of a shotgun term that refers to the chemistry of life. The basal metabolic rate is a bit more specific, as it refers to the amount of energy an organism expends while at rest and in a post-absorptive state. Since basal metabolic rate is roughly energy expenditure, it must be able to indicate how many Calories are needed to manage weight, and indeed it does. Interestingly enough, metabolic rate is strongly correlated with lean muscle mass and the same figure has been arrived at for all people: 16 Calories per pound of lean mass per day. This means an estimate for how many Calories you need each day can be found by multiplying your lean mass by 16. This also indicates what has been shown in other studies as well: the best known way to increase the basal metabolic rate is by increasing lean muscle mass.

Just one final note: losing more than a pound or two a week is neither healthy nor permanent.

Sunday, April 18, 2010

Nexus One, an Android

I've had an iPhone since shortly after they were first released, nearly three years now. For the most part, I've enjoyed it. These days, particularly when it comes to electronic devices, three years is a really long time; as such, it's almost difficult to recall why the iPhone had the hype it had. One thing to recall is that the app store, which is now probably the most attractive and well known feature of the phone, didn't exist when the phone first came out. The reason the iPhone was viewed as revolutionary (and that it was) was because it was the first cell phone to give what could be called functional access to the Internet, where most all websites were available to a mobile phone without any modifications. Clearly the Internet has revolutionized society; the movement from being available only on home computers to being available almost anywhere with cell reception is undoubtedly a movement that has been similarly transformative.

The availability of the whole content of the Internet, many Terabytes of information, on a diminutive device feeling like a polished stone, is practically inconceivable to me. But the notion is one conceived many times over in the science fiction canon. The most obvious example I know of is the device which shares the name of the book in which it resides: The Hitchhiker's Guide to the Galaxy. In his remarkable series Cosmos, Carl Sagan repeatedly fantasizes about perusing the fundamentally similar, fictional Encyclopaedia Galactica, a compendium of all the knowledge gathered throughout the existence of an intergalactic species. Both of these bits of media originate around 1978, a time in which something like the iPhone and the Internet must have been considered far out by any reasoning; it is apparent that at least two foraward thinking people saw such a device as a product of civilizations living on a galactic scale.

From 1978 the iPhone must have been a long way away, considering the primitive original Apple Macintosh didn't even hit the market until January of 1984, though development started in 1979. The Macintosh had an 8 MHz processor, 128 KB of RAM, and a 9" 512x342 monochrome display. Fast forward 23.5 years, and though our progress in intergalactic exploration hadn't much changed from naught, our computers had made unexpected advances! The original iPhone runs at 412 MHz, 128 MB of RAM, and a 3.5" 320x480 18-bit color display--it's roughly 52 times faster, has 1,000 times more memory, and a far superior display. It fits in a pocket and can run all day without needing a charge, it can replace books, newspapers, televisions, and the list goes on beyond any reasonable expectations.

Three years later, the revolution of Internet on a phone has taken place, and giant leap taken all that remains is incremental improvements: the Nexus One. This past December there was a buzz about the web as rumors of a Google phone spread. The buzz persisted for a little while and then mysteriously subsisted. The Google phone arrived almost as if it were secret all along, almost as if it remained a secret--from what I've read, the sales of the device aren't remotely as impressive as those for the iPhone. But for what it lacks in popular perception, it makes up for in spec: 1 GHz processor, 512 MB RAM, 3.7" 800x480 display, or about twice an iPhone. Having just recently mentioned that GHz isn't a very important measure, I'd be foolish to regard that as a concrete measure of performance; it isn't, but the Nexus One noticeably outperforms the iPhone in every respect. Interestingly enough, the Nexus One matches or exceeds the recently released iPad in almost every spec except for screen resolution--it's truly a remarkable device.

One of the things about today's cell phones, also called smart phones or super phones, is that they're actually powerful little computers masquerading as phones. The iPhone does a very good job at hiding the power under it's hood, and this is very much one of the reasons I chose to go with a Nexus One over another iPhone; the Nexus One has only a thin veil to hide the fact that it's a computer running a version of Linux. In order to write an application for the iPhone, one needs to pay Apple about $100 to apply for the opportunity. If they choose to accept you, there are a number of steps to follow, including authorizing a particular device, associating it with a particular machine, writing particular code, and accepting a very hefty agreement which includes conditions such as not displaying your device in public and the right of Apple to take ownership of your code without notification or recompense. The $100 only covers one year--every year requires another $100 to continue participation. I did go through this process at some point, but I didn't get as far as getting code onto a device before my membership expired; after that, I gave up. The Nexus One is a different story: anyone can write anything and put it on their phone at any time, for free. The first day I had my new phone I had a custom application uploaded to it. The second day I gained root access, installed a custom bootloader and a modified version of the Android operating system known as CyanogenMod; in other words, I now own my phone.

The subject of science fiction is relevant for one last note: the name Nexus One comes from the most advanced android in a story called "Do Androids Dream of Electric Sheep?" better known as "Blade Runner," by Philip K. Dick.

Nothing says "I'm a geek and I know what I'm doing" like a command line:


One thing that really stands out about the Nexus One versus the iPhone is the much higher resolution display (click to see a version large enough to tell the difference, also note that some aliasing in the form of red, blue, and green banding may appear depending on your monitor):



Here's a side by side comparison:



There are still a few things I like about one more than the other, but the power of the Nexus One is that I can change nearly everything as I see fit--the same most certainly cannot be said for the iPhone.

Monday, April 12, 2010

Music for a Season

I can't speak for the daylight hours immediately passed thanks to a fittingly peculiar sleep cycle (which I happen to appreciate despite, or perhaps for its general incongruity), but early this morning I emerged from in-doors to find the weather teetering upon perfection. It was the type of occasion that calls for the composition of a remarkably accessible, evocative, and timeless piece of music; fortunately for me, given my lack of musical training and the otherwise moderate difficulty of composing such a sound, someone has already taken and decidedly owned the feat. Thus it is with endless gratitude to, and for the inspiration of, Antonio Vivaldi, paragon of baroque classical composition, that I present music fit for this season, the 3rd movement of Spring, from The Four Seasons:

Wednesday, April 7, 2010

SparkFun SEN09423 integration issues

Anyone seeking to use SparkFun's SEN09423 breakout board for the LPY530AL as a position sensor should be advised that the two 4.7 µF capacitors (C1 and C2 on the schematic) used for the high pass filter need to be removed and the contacts bridged. This image shows which tiny bits are of concern, however note that it seems the resistors indicated therein do not need to be removed. This information comes thanks to a few people who know what they're doing (which excludes myself), as discussed on the SparkFun forums here and here. From what I gather this may be an issue with numerous (all?) SparkFun breakouts including ST rate gyros, the two threads alone implicate boards containing LPR530AL or LPY530AL, including the IMU 6DOF Razor. This is a particularly odd case because Inertial Measurement Units are mostly used for dead-reckoning, and the inclusion of these caps will effectively frustrate anyone with such an intent. As far as removing them, good luck! Here's my own picture of how gigantic these caps are:


I found the best luck (given a fine tip soldering iron) with adding a little solder to one side so that solder wick can get most of it. Then just heat up the other side and push gently. The first one I removed took the contact pad with it, if that happens to you you may or may not be high and dry. I managed to salvage the situation by drawing between the appropriate areas with a pencil. In case you weren't aware, graphite is conductive--clearly this is a handy bit of information on occasion.

For a slightly more general audience, here's some interesting information. The capacitors pictured are about 0.065 inches wide, or 1.66 mm; the skinny dimension of the penny pictured is about 1.52 mm. I said these capacitors are gigantic, and relatively speaking this is true! Relative to molecules, light rays, and subatomic particles sure, but also relative to the vast majority of capacitors out there. We will get to how in a minute, but first a brief overview. The electronic components most of us are used to seeing are the ones attached to those (usually) green boards also known as circuit boards, like this one:



These days most circuit boards we encounter are printed circuit boards or PCBs, called such because the production process resembles printing to varying degrees. The principle elements of a PCB are, put simply, fiberglass, copper or other conductive metal, and solder mask. The fiberglass makes up the board-ness, the copper is akin to wiring for conducting electricity amongst the components, and the solder mask, the colored part, is a coating that solder doesn't stick to, in place so that connections aren't made accidentally by wandering solder. Not too long ago, I thought the PCB was made of silicon; after all, electronics are associated with silicon, and from a naive perspective the shiny green board looks like something that might be called silicon. But if that's not it, where's the silicon? In an IC of course! These days most all the action of an electronic device happens in an Integrated Circuit, which looks something like this:


Inside that chunk of plastic there's a wafer of silicon, which could contain anywhere from hundreds to Billions of electronic components. Wouldn't it be nice if there was a window that showed the silicon? Like this one?



Instead of discrete components like the capacitors I shared above, these components are formed by spraying (very precisely) successive layers of various chemicals in a process called photolithography, resulting in something like a miniature PCB. The CPU is the biggest, most complicated IC in the box that is your computer (unless you have a very fancy video card), and because of this it looks different than all the others. For one, you can't even see it, it's hidden underneath a big heatsink, which is there to help get rid of all the electricity that turns into heat in the CPU (the process is conceptually similar to heat generated from friction). CPUs generate so much heat that one would burn itself to a crisp almost instantly without a heatsink. But even if you remove the heatsink (after you've turned off the computer), modern processors have another metal plate which hides another sealed package that finally contains the silicon. Here we're finally at the land of magic: as of now, April 2010, Intel has a 32 nm manufacturing process, which means that the typical component width is less than 32 nm. This also means that the 1.66 mm wide capacitor above is about 52,000 times wider than a single component on a 2010 Intel CPU, or, relatively gigantic. Granted, most things we know are relatively gigantic compared to 32 nm, particularly since that's quite a bit smaller than the shortest wavelength of visible light--violet, at 400 nm. Reality check: we're making electrical components so small that a ray of light can't even hit them, so small that even the most powerful microscope couldn't see them, way smaller than the average bacteria. Really!? Apparently that's not enough, industry projections have us with 11 nm chips in 2022, which would make each component about the same width as 55 carbon atoms. Interestingly, the first time a single carbon atom was photographed (after a manner) was 9/2009. Of course, there are certain problems that what we know as computers, that is Turing class machines, can't solve--certain problems that could be described in a hundred or so lines of computer code that would take a computer the size of the universe longer than the universe is supposed to exist to solve. Not content to take limitations as they're handed to us, work is well under way to develop a different class of computer: the quantum computer. Quantum computers are very different in that they can take very specific problems, like the one I just mentioned, and solve them instantly. I don't know enough about quantum computation to judge if they'll ever reach the ubiquity our Turing machines have, but I can say one thing for certain: there's not much certainty in the future! Intel will probably plug ahead and reach 11 nm in 2022, but the real question is will that even be relevant? I'm willing to bet not, it almost seems like sitting in 2002 and projecting that by 2012 our CPUs will run at 11 GHz; as it turns out, GHz aren't all that important. Take a top of the line 3.8 GHz Pentium 4 from 2004 and I assure you a 1.8 GHz chip from today will outperform it. Maybe the state of the art in 2022 will be a 100 MHz chip with a million cores--only time will tell.

Thursday, March 25, 2010

Computer Graphics

As part of my course on computer graphics this semester the class has been writing a ray tracer. The details of ray tracing aren't really worth going into, instead I'd rather share a picture (more technically a rendering) that is the result of my work.


If you are particularly learned, you'll recognize this figure as the Mandelbrot set. In case you didn't recognize it, at least you will in the future! This version in particular is really an abuse of the ray tracing engine we've developed; typically other much more efficient means are used to generate an image. However in using the ray tracer I'm able to generate images that simply couldn't be done with the more traditional methods. For instance, this rendering uses a reflection model to add an additional layer of the delicious recursiveness that characterizes fractals. Though you could do the same given the more traditional code, simply having the code alone versus a ready-made rendering program allows me to color the actual Mandelbrot set, which is almost always left black:



For the sake of completeness, here's a more traditional ray traced image that specifically includes a good variety of capabilities a ray tracing engine made in a single undergraduate semester has:


As you can tell, my cylinder code still has some issues that need to be resolved.

Tuesday, March 23, 2010

By the Numbers

I presume most people recognize that there is a vague connection between statistics and probability, but, having taken a course in probability theory, I'd be willing to bet the farm that very few people realize the full breadth of intimacy between the two. This is true in particular because despite having studied both, I'd count myself as one amongst the naive. From the outset probability is simply difficult, and often counter-intuitive. Not only does probability proceed in ways contrary to our intuition, it does so in such an amazingly tricky way! Maybe it is a function of how easy it starts out: given a typical six sided die, most everyone knows that the chance of guessing which number comes up is one in six. Easy enough, you pick one side out of a total 6, so the probability is 1/6. The common understanding of probability stops there, for the simple reason that any situation even marginally more complicated than that becomes remarkably more logically and mathematically sophisticated. Suppose I'm flipping a coin and you're guessing the results. For some reason you're having terrible luck and you've guessed wrong 10 times in a row, what's the probability that you guess the next flip wrong as well? Think about it for a minute and when you've logically arrived at what must certainly be the answer, highlight the following space for the answer:  1/2

Next, try to logically deduce the probability of guessing incorrectly for 10 coin flips in a row. Answer:   1/1024

It only gets so much worse from there, to the extent that I'm really not confident I could present the correct answers myself! Even admitting that I can't help but try for one more. Assume that 4 out of 5 people prefer Crelm toothpaste. What's the probability that from a selection of 5 people 4 of them prefer Crelm? Answer (I think): 256/625

The important notion here is that a probability says something both nebulous and concrete about reality. If a truly random die is thrown 6 million times, in all likelihood each number will have come up about 1 million times. If 4 out of 5 people really do prefer Crelm, then the chance that a randomly selected person prefers Crelm is 4/5 or 80%. As much as we all like to think that the statistics don't apply to us (because we're special), if the statistics are accurate there's no way to escape them. Most of the time this is a banal statement, as when referring to whether or not you prefer Crelm--either way it's not exactly a big deal. But then... there are the other statistics. "Around 50% of US marriages end in divorce" can be a pretty hard pill to swallow for a couple walking down the aisle. I have reason to believe the number of couples who'd figure they end up on the successful half of that statistic while exchanging vows is much higher than 50%--clearly if they thought it wasn't going to last they'd probably not be entering the commitment in the first place. Similarly, doubting the success of the marriage from the outset probably isn't going to increase the chance of a favorable outcome. What's left is an awkward position, objectively maybe the best one can think is that at least the odds aren't as bad as they could be, better than any casino game. However marriage is a particularly special case for a number of reasons, the primary one being the shift in locus of control which is applicable to all interpersonal relationships; though a bit less severe, anyone who's been dismayed by the lack of a second date (etc.) knows the score. To be fair the actual divorce rate changes based on many factors, where 50% is just the overall rate. The lowest divorce rates are found in each of the following categories: first marriage, atheist or agnostic, age 30 or older, residing in the Northeast and no cohabitation prior to marriage.

Uncontrollable statistics naturally lead to other more personally manageable probabilities. For instance, 28% of car accidents in the US happen while at least one of the drivers is using a cell phone. This is the part where I reiterate: we love to think we're special and that the statistics don't apply to us, but it just doesn't work that way. We are all special, I'm fully on board with that, but that doesn't grant any of us statistical immunity. Using a cell phone while driving (even with a hands-free headset) substantially increases the chance that you will be in a car accident, which could result in your death, or, arguably worse, the death of another/others with the accrual of manslaughter charges and the lifelong burden of knowing that you've killed someone. It's very simple: while the car is in gear, your phone doesn't exist. There are absolutely no excuses.

Friday, March 19, 2010

Technology II: State of an Art

For today's exercise, please read the following passage and give the question at the end a sincere and thoughtful rumination. Once you feel you've thoughtfully ruminated enough, watch the video.

Imagine a modern machine, one that could be called a robot, that consists of a three fingered hand mounted at the end of an arm with a range of motion similar to our own and a single camera. Given the present state of technology, which any sensible person would describe as "quite advanced," what might this arm to be capable of?




It is astounding, yes, no less should have been expected, but there is something a bit backwards about it. Traditionally machines are constructed and used because they can do some certain task vastly better than we are able to. Naturally the machine's form and means of manipulation don't resemble ours in the slightest, otherwise we'd probably not have needed it in the first place. A good number of years ago, enchanted by the ideas of Isaac Asimov, I had a strong interest in androids--humanoid robots. But even before I knew the beginning of the true technical challenges behind building an android I realized something: a person desiring to make a passable humanoid machine would save themselves a lot of effort and greatly increase their probability of success by doing so the old fashioned way, that is by seeking a viable mating partner and letting nature run its course. At the time the thought was conceived mostly as a joke, and though it's still humorous, it's also quite sensible--practically speaking I think we have more than enough roughly human shaped objects with adequately human like capabilities. Nonetheless it is almost certain that many will continue attempts to build an android, and it's far from difficult to imagine that one day a result could be described as nothing other than successful. However one thing will remain true even then, even when androids exceed our capabilities: the human form can't do everything. No matter how dexterous or sophisticated, our fat fingered mechanical offspring won't be able to manipulate the atoms of a molecule unaided; even less technical, these two handed automatons will have just as much trouble as we doing the work of three hands. This will be a small victory for three handed people as they will get to remain not yet obsolete longer than the rest of us, at least for the few moments it takes to add one more hand to the robot. All silliness aside (well ok just most of it), there's clearly a huge number of tasks which won't benefit from the superhuman but still human capacity of these imaginary androids unaugmented. This represents a significant relief since we aren't stuck waiting for these super androids to come along (which nonetheless probably isn't too far off, though given the rate of technological progress, relatively probably quite a ways off). In summary, I've basically stated in a very roundabout way that we are free to continue to augment our own similarly limited mechanics the same as we have since the invention of the first tool; we can use our already inconceivably sophisticated body of technology to extend and enhance our capabilities. Case and point, the da Vinci surgical robot. Surgeons are essentially required to have superior motor control as even the slightest irregular movement could result in a fatality. However, no matter how talented the person holding the knife with intent to open you up, there is a fundamental biological limitation to the amount of accuracy they are capable of. Rather than just hoping their home life isn't distracting them and that their cup of coffee wasn't abnormally strong that morning, the da Vinci confers peace of mind with a laundry list of features specifically designed to maximize precision by counteracting the inherent imprecision of human hands. There are over 700 worldwide, and though it is only approved for a limited number of procedures, the number is expected to continue increasing as rapidly as it has been. While it's already on it's second version, I think it's a safe bet that further enhancements will be rapidly forthcoming. Of course, the proof is in the numbers, and the numbers are unambiguous--given the choice between traditional and robot assisted surgery, choose the latter! Here's a video of it peeling a grape on live television:


In conclusion, I'm compelled to once again say the same thing I've said previously: over the past few decades in particular we've been developing foundational technologies. Because each of these have such vast potential for application, the first and most obvious few applications took hold and found success. Being as we are focused on a multitude of things wholly different from the vastness of yet unrealized and incredible possibilities that these technologies enable, it is natural to unconsciously assume that what we see is more or less the extent of what technology can offer, but this tacit assumption is, in my opinion, absolute rubbish. In particular the most overlooked and underutilized technology is cheap and powerful microprocessors; everyone knows that desktop processors keep getting more powerful without getting more expensive, but the bit of interest is that the processors of yesteryear continue to get smaller and cheaper. This fact in itself isn't unacknowledged, actually there's a well known meme that suggests a common calculator found in a high school today has more processing power than the space shuttle that delivered the Apollo astronauts to the moon and back. The overlooked bit is that that little processor can do an awful lot more than help with algebra homework. Like what? Well, I have a video demonstration of one such device, but before you watch it consider that the processor in the device shown is essentially as powerful as a 1986 state of the art desktop that cost $6500 (the Compaq Deskpro 386), can be had for around $3, and is smaller than a dime. The whole device could probably be made wholesale for under $10.

Thursday, March 11, 2010

Electronic Music

Vitalic is a musician that constructs and delivers frequent variations in air pressure in a manner with a rather more contemporary lineage than what I've shared prior.

Thursday, March 4, 2010

Ramachandran on the encephalon

Vilayanur Ramachandran is a neurologist. What's more is that he has a very keen insight, and a particularly effective ability to communicate. Given that the nervous system (including the brain) is naturally and rapidly a profound topic of consideration, such a person as Ramachandran could really make 20 minutes intriguing. Well it was 23 actually, but I'm willing to wager nobody in the room wanted him to stop.