Sunday, August 29, 2010

Tacit assumptions

How much of the strife that arises in our daily lives is attributable to the assumption that we understand what we are experiencing? How much can a person recognize their own assumptions? How much do we assume?
Probably just about everything.

This isn't necessarily an insurmountable flaw, given the remarkable success of humanity, but at the same time I doubt anybody is unwilling to abandon whatever flaws they can. Recognizing assumptions is very difficult because they are by nature not questioned. Take for example the thought experiment that led Einstein to his celebrated theories; it isn't extremely technical, but rather something that had just never been considered. Mr. X explains better than I ever could, so, from episode 8 of Cosmos (feat. a song familiar to this blog already, coincidentally) (also on Netflix on demand):



The next part is equally engaging and descriptive, visualizing the surprising effects of traveling at C, the speed of light.

Thursday, August 26, 2010

What's in a Thing?

The process of philosophy is unfortunately often an exercise in mincing words across numerous tangents while the original topic fades into oblivion; this is not surprising, as definitions tend to be important in the process of understanding. However there is a systemic fault in relying on words to define our experience, namely, that words are objectively meaningless. In order to define a word words must be used, and these words have definitions themselves; the image then is of a cloud, a highly connected network that has no foundation--it depends entirely on itself for structure, like Boyle's self flowing flask:



Suppose that a Thing starts as not understood but can become understood, and that each Thing has a definition, which is a specific collection of Things. In order to understand a Thing you must understand at least one of the Things in its definition; if a Thing has no Things in its definition, it is not understood (naturally). Do you see the problem? With this arrangement of rules understanding seems entirely impossible because each definition invariably leads to more definitions. But all is not lost.

Suppose that there is a property called self evident, which is the very special occurrence of a Thing that is in its own definition; a self evident Thing is understood by default. With the inclusion of self evidence defined Things become understandable.

What is an example of a self evident Thing? Pick a number, any number!

Foundationalist philosophers seem like proto-mathematicians--a consequence of not recognizing that self evidence doesn't need to be proven, as it is enough to simply assume for the sake of argument. In an axiomatic system, the axioms are always assumed to be true. This is not done in order to answer the questions that the axiom might pose ("do parallel lines ever cross?"), but in order to derive many more interesting implications. The geometry that most people are familiar with is Euclidean geometry, and every single fact in Euclidean geometry can be proven to be a consequence of five axioms:
  1. Two different points can be connected by one and only one line.
  2. A line segment can be extended to produce an infinitely long line.
  3. A circle can be described with a point and a radius.
  4. All right angles are equal to one another.
  5. The parallel postulate: If a line segment intersects two lines forming interior angles that sums less than two right angles, then the two lines will intersect on that side of the segment.
From this simple set of rules, an obscene amount of useful consequences have been derived. In order for an axiom to be such, it mustn't be false according to any of its axiomatic peers, but there is nothing about these axioms that make them universal and inviolable outside their own system. The truth is that there's nobody more critical than a mathematician, and as a critic it is expected for them to raise objection: "Regarding axiom 5, what if two parallel infinite lines eventually cross?" or "What if all the conditions of axiom 5 are met but the lines still don't cross?" What this represents is not idle trolling, but rigorous curiosity. The objection is actually a new postulation that can be tested, and if ever a contradiction arises as a consequence of the postulation, the whole axiom can be rejected. In fact somebody raised this very objection, and after much time and effort no contradiction was found; instead, an entirely new branch of mathematics had been formulated. This non-Euclidean geometry would have no known real world application for more than 60 years, until it became the mathematics necessary to describe Einstein's theory of general relativity. Similar to mathematics, science is the process of discovering physical, measurable Things that are self evident--physical laws--that will not only explain all previous observations but also expose physically meaningful logical consequences.

The applicability of mathematics to reality is regarded as a great mystery. However, in terms of the rules above the applicability of mathematics to reality makes sense; indeed, how else might we know the universe? If there were no people around, it would be clear that reality isn't expressed in words. What we have come to know is that our experience of reality is the reception and translation of numbers and mathematical structure. When I suggest the color yellow, the thought of yellow occurs, maybe yellowish things: sunflowers, dandelions, etc, but yellow isn't defined by yellow things. What we've named yellow is actually photons oscillating with a wavelength around 570 nanometers--colors are by definition numerical, despite our experience of them as a visual cognitive phenomenon.

The case of colors is particularly interesting, because without the use of science to establish a self evident, or experimentally verifiable, numerical fact (wavelength) it is impossible to define color. There is an idea called qualia, which refers to some kind of purely subjective experience; for instance, even though most people will call a primary color by the same name, there is no guarantee that we experience the same thing. In other words, I might experience roses as what you see for the blue wavelength, but since Roses Are Red and everything I see that's called red is the same color as roses, my blue is your red. We will still agree on what items are red and what aren't, despite the fact that my subjective experience is not what you'd describe as red based on your subjective experience of light. Consider the following questions: What does pain feel like? What does a violin sound like? What does sweetness taste like? Qualia can be regarded as a word for the confusion and difficulty that comes with trying to answer these questions, particularly evident if these questions come from someone that doesn't possess the sense in concern, and thus can't gain understanding on the basis of related sensations. Qualia is still fiercely debated, and I'm not much surprised; behind every big debate there is a very ill posed question, but this doesn't imply that our experience is unquantifiable.

Consider the humble computer desktop: without a monitor, the modern desktop is apparently nothing more than a metal box that uses a lot energy in the form of electricity to warm the air. Without special tools, the only indication of activity is a light that's on when the machine is blowing out warm air, and a light that blinks at apparently random intervals when the first light is on. If this headless desktop were an alien instrument, deciphering its function would be extremely difficult. Even looking deep into the hottest part of the machine there would be perplexity abound, and a robust overwhelming with the realization that each of the over 2 billion elements might change state more than a billion times every second. Measuring the states of all of these elements at every step would be difficult given that each feature is smaller than the shortest wavelength of visible light. Even if that problem was solved, making sense of 1 second worth of data would require analyzing around 2*10^18 binary elements, which would require over 227,373 terabytes, or 222 petabytes. Even Then, the bits zooming around a CPU and patterns of gates give essentially no indication of what a computer is used for. Binary is just another way of representing quantity or number; we use decimal, which is base 10, which is kind of like saying we represent numbers with 10 different inherently meaningless symbols: 0 1 2 3 4 5 6 7 8 9. Binary is base 2, the only symbols are 0 and 1, but those symbols are equally sufficient to represent integer quantities. Thus, were you to look at the innermost workings of a CPU, what you'd see is voltages passing through a grid, sometimes changing and sometimes not. The problem is that seeing these voltages as decimal numbers wouldn't bring a modicum of sense to the madness. Even deciphering the relatively simple outbound digital video signal would be an uncanny feat; it would require a leap of imagination something like listening to Morse code and thinking that what you were hearing was actually triplets of values for a large array of photon emitters, plus whatever communication is part of the digital video standard. Some standards require two way connections, which means that before you could even draw the principal signal you'd have to have a precisely correct conversation with the machine that you're trying to figure out in the first place.


Consider the humble human being... I bet you see where this is going. Without motor function, the modern human is apparently nothing more than an elongated tube that uses water and a lot of energy in the form of food to warm the air and make fertilizer. Without special tools, the only indication of activity is from autonomic nervous function. If this were an alien instrument, deciphering its function would be extremely difficult. Even looking deep into the hottest part of the machine there would be perplexity abound, and a robust overwhelming with the realization that each of up to 100 billion elements might change state as many as 100 times every second. Assuming only full action potentials matter, and that this results in a binary signal, making sense of 1 second worth of data would require analyzing around 10^13 binary elements, which would require over 1 terabyte to store. Even Then, the bits zooming around a brain and patterns of neurons give essentially no indication of what a brain is used for. Were you to look at the innermost workings of a brain, what you'd see is voltages passing through a grid, sometimes changing and sometimes not. The problem is that seeing these voltages as decimal numbers wouldn't bring a modicum of sense to the madness. Even deciphering the relatively simple outbound analog audio signal would be an uncanny feat; it would require a leap of imagination something like looking at a continuous squiggly wave and thinking that what you were seeing was actually combinations of patterns for an abstract representation of physical phenomenon, plus whatever communication is part of the social standard. Some standards require two way connections, which means that before you could even draw the principal signal you'd have to have a precisely correct conversation with the machine that you're trying to figure out in the first place.

Is it possible to quantify the chemical senses of smell and taste? There are multiple ways on multiple scales, the most obvious: scents and flavors are particular molecules which are specific arrangements of atoms. Every atom is defined by quantities (mass, charge, etc), and the specific spatial arrangement of atoms that defines a molecule can also described mathematically... so even chemical sensation is merely an interpretation of numerical and mathematical structure. It may seem as though the mathematical definition of chocolate cake wouldn't make for much of a treat, but I'm suggesting that the mathematical definition is in fact the tasty part; there is no such thing as chocolate cake, only a variety of mathematical structures that are referred to as chocolate cake. If someone were to condense the sophisticated structure of chocolate cake down to a few succinct mathematical theorems written on a page, you wouldn't call the page chocolate cake, you'd call it a recipe; the recipe is a way to translate and understand chocolate cake, but without the quantization of the cake in some form, memorized, written, or otherwise recorded, there would be no cake. This comes across as very absurd, but consider the fact that there is no such Thing as chocolate cake; because "chocolate cake" can be interpreted as an exceedingly large range of Things, there is no objectively consistent Thing that is chocolate cake. This is different from self evident Things, which are objectively consistent; light with a wavelength of 570 nm will be light with a wavelength of 570 nm, even if you name it chocolate cake. Without a numerical level of specificity there is little assurance that everybody can and will interpret correctly.



We may never know...
Take the example of the aged philosophical question: "what is the meaning of life?" Perhaps the reason it has gone unanswered for so long is because it's an ill defined question--perhaps the question doesn't even make sense! Just because it is frequently repeated doesn't mean it is well defined. Do any of these similar sentences make sense?
  • What is the meaning of rock? 
  • What is the meaning of light? 
  • What is the color of life?
  • What is the interpretation of life?
  • What is the sound of a vacuum?



On an almost entirely unrelated note, I was pleased to find that Google had the wisdom to include the ability to search for images free for re-use, which made it very easy to produce the above image without fear of accidentally stealing the intellectual property of some profitably litigious organization. Lately I've seen this practice of open and alternative licensing (Creative Commons, GNU General Public License, etc.) referred to as copyleft. What that means I amn't certain, but regardless this free functionality provided by Google offers me a modicum of comfort given that the FBI is apparently more concerned with copyright violation than identity theft and missing persons, as noted on /. recently. As usual the law is really too complicated for "free for re-use" to make much sense; for example the fair use doctrine, which may or may not save one's ass in court if it comes to that.

    Tuesday, August 24, 2010

    silly cyclists sick music

    The compression of this data and the characteristic effects of lossy transcoding actually enhance the aesthetics of this particular audio signal, imo. Recommended signal transduction via nothing less than 5" stereo drivers capable of 50 watts RMS (roughly). It's White Rhino by Trans Am:

    Monday, August 16, 2010

    Spectrogram of a Swept Triangular Wave

    I was going about in my typical atypical way and by chance did discover a very attractive fractal that is the frequency spectrogram of a swept triangular wave. I made this quick and dirty animation of a ping-pong zoom of it:



    This was done with Audacity, GIMP, and NCH Tone Generator, all of which are free--my thanks to everybody who ever contributed code to any, it should be known that my thanks is an exponential function, for anybody who may have contributed to more than one. Also, thanks to anybody who understands any of what I write.

    It should be noted that a number of other interesting fractals can be generated, depending on the wave type and the sweep.

    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.