Friday, October 23, 2009

Software Engineering

For my Software Engineering course we are spending the whole semester developing educational software as small groups. Each group was given the choice between math or spelling oriented software for 1st to 2nd graders. Our group chose math, since it is inherently easier to deal with numbers than words in programs. The course calls for 3 releases, or waypoints at which we demonstrate our software and, since they are in place of what would typically be exams, our software is supposed to meet criteria we determined for ourselves at the beginning of the semester. Thus far there has been one release, and two of the three groups had very visually limited programs, instead focusing on the backend. My group, however, was the complete opposite. This was not a mistake, either. If you know me well enough (or have read enough of my blog), you'll know that I am very critical when it comes to design, and this project is no exception. Initially I was hesitant to work in a group, as I've never handled group dynamic as well as I should, and indeed at the start of the semester it seemed as though the influence of the group was resulting in nothing short of chaos. However, when it came down to assigning the tasks, I ended up with about 90% or more of the work. While that meant a lot of chairtime, it also meant that I got to design the foundation of the project without any interference, so I decided to take it as a positive thing.

Until the demonstrations for the first release came, I honestly hadn't even considered the difference between focusing on back and front end, but in retrospect I think that's because all the back end in the world isn't going to make a first grader want to play your game! Minutes prior to our group's presentation, I jotted down a few ideas about my design objectives. What I came up with was that calling what we were making a game failed to represent the magnitude of our undertaking; what we were doing (in theory) was taking part in the earliest exposure and formation of the foundation of childrens' experience with mathematics. Framed in this way it is easy to see that our software being designed as best as possible is critical. What we want to do is create substantive, positive, memorable experiences involving math, in such a way that in the future these children might not run in fear from math (as many of us do now) but instead view it as an exciting and fun thing. Thus my aim in constructing the front end was to craft sensational experiences... I got a few laughs when I said that, but my guess is because people misunderstood: by sensational, I mean of the senses. Given that we are limited to merely 2 of 5 senses, it is extremely important to emphasize those senses, yet being mindful so that the experience doesn't get so chaotic that it is overwhelming and stressful as this would subvert our purpose.

I was part of one of the very first generations to have computers available in elementary school; Jordan and I were remeniscing the other day about playing those green screen computers with the floppy disks that were actually floppy in elementary school. Thus, my design objectives drew heavily on my own vivid memories of using computers to play games in school. For instance, the music in SimCity 2000, first experienced at school simply had a profound effect on my entire life. I still remember receiving SimCity from my grandparents as a Christmas gift some time shortly thereafter; obviously it was cause for substantial excitement given the detail that I can remember this event despite it having happened more than half-my-life ago. Accordingly I made certain to pick suitable music (light ambient) and sound effects... and ours was the only group to have any sound at all. Can you imagine, completely ignoring half of the senses you're given to captivate first graders?? Anyway, there's no good way to put our game online yet (there might be nearer the end of the project), so here are some screenshots:



Not only did I handle designing the game mechanic, choosing the music, and actually programming the game, but I also did all the art. With the exception of the menu screen image (from wikicommons) and a few standard fonts, I drew everything, even the animated monkey. I probably don't have a future in professional graphic design, sure, but I'm quite proud of what I've done--particularly given that I did essentially everything.

The reason I'm bringing up my homework is that release 2 is coming up quickly, we basically only get 2 weeks to put it together, and I set the bar high enough for the first release that I've got a lot of work to do! Fortunately the work was divided up a bit better this time, so I'm mostly in charge of the graphics. Nonetheless it's 3:45 AM and I'd been drawing for about 12 hours straight so it was time for a break. Yes, I'm really wishing my chair was here... and now you can see where all my complaining about design and chairs came from; you try sitting in the same thoughtlessly designed chair for 12 hours and see if you don't get a little grumpy! I think that waiting for this chair has probably been the most painful anticipation I've experienced, literally and figuratively.

Moving on, I wanted to mention that I've been spending so much time in GIMP (the GNU Image Manipulation Program, GNU stands for GNU's Not Unix), that I've actually been getting much better images out of it. I've learned a few basic techniques from some well written GIMP tutorials that have made a huge difference. While I haven't used anything from it for my own purposes, the results in this tutorial on drawing your very own planet starting with just a blank canvas are stunning, especially since the process isn't very complicated. I've also learned how to use a few of the tools better and found some other less than obvious features that have helped me get some results I'm very happy with:




There's always room for improvement, but I'm excited to see how it all comes together!

Tuesday, October 20, 2009

Economic Doom & Gloom?

I've decided that if I've put the time and effort into writing something moderately interesting, I may as well post it here. Recently I received an email from an acquaintance that suggested with urgency and confidence that because of the current debt financed federal deficit and the associated cost of interest the US economy will probably collapse within the next decade. What a terrifying prospect! For my own peace of mind and some hope of bringing another perspective to the grim proposal, I decided to do my own analysis.

First, a few items of business. I'm not an economist by a long shot. The extent of my economic training is an elective course titled Economics as a Social Science, in which I got a C. Next, as clarification, the federal deficit and the federal debt are two distinct things: the deficit refers to the difference between expected yearly income and expenditure in the government budget, which is usually what's in the news and also is typically "in the red," otherwise we'd know it better as the federal surplus. The federal debt, on the other hand, is the total accumulated debt, which has been in the red for the majority of the history of the US. According to the US Debt Clock, our national debt is currently very near 13 trillion dollars. This is an unintelligibly large number, obviously, but it's all relative. One of the more useful perspectives of this otherwise ambiguously huge figure is as a percentage of Gross Domestic Product (GDP).

Find the relevant bit of the email and my response after the jump...

Pumpkin Carving!

It's that time of year again, when a good number of North Americans prepare for all sorts of bizarre and hilariously entertaining rituals surrounding the end of October. The extent of my Halloween celebration usually matches that for all other holidays, as in not doing anything, but I have a soft spot for carving pumpkins. For reasons unknown to me, pumpkins seem to be my optimal artistic medium. Honestly I'd prefer it be a more lucrative medium, but I suppose I'll take what I can get. Despite the joy carving pumpkins brings me, lately I've been forgetting to do it... I can actually say for certain that since 2005 I've carved two pumpkins, and the only reason I remember that is because both of them were memorable. Ok, actually now I'm remembering that technically that's not true, because I carved two in 2005, but both of them were virtually identical. The concept I went for with those two was some mix of Golem and an angler fish. I wasn't completely thrilled with the outcome (thought it could've been much better), but it nonetheless won a fairly informal competition on campus in addition to making it into the yearly selection (for 2006, inexplicably) on, probably one of very few sites dedicated to pumpkin carving. Honestly there are people out there who are much better than I at carving pumpkins, but that's ok with me--I do it because I enjoy it. I don't care if the result is the best or worst pumpkin ever. Enough talk, here's some walk:

Moving on, my latest pumpkin was done last year, and I'm a bit more pleased with how it turned out. One of the things I had in mind was the effect it would have glowing, which came out just as I had hoped.


I confess, in order to get it to light up like that I had to use more than a tealight, but getting the walls thin enough for the tiny bit of light a tealight puts out to show through would have compromised the structural integrity. Also, I'd like to point out that while it wouldn't fool even a bad neuroanatomist, I did do my best to represent the major sulci (fissures). A true representation was out of the question, as a simple matter of time! There are way too many sulci in the brain, at least enough in my own to convince me that there are better ways to while away a few hours. Perhaps if I had used a dremel or other power tool, but this was done entirely with good old manual knives. It's not looking like I'm going to have a stab (pun!) at a pumpkin this year, but who knows, maybe some time will present itself.

Saturday, October 17, 2009

Reproducing Foods

Every so often I find some irresistably scrumptious item available exclusively at some restaurant nearby. Recently this happened with the "mocha blender" at Einstein Bros. Bagels and I found myself more or less addicted. Such a habit can become expensive quickly, so I sought to reproduce it at home. The last time this happened was with a smoothie from Jamba Juice, which was easy to reproduce almost exactly given that they put all the ingredients together right in front of you. However, this was going to be a bit of a challenge, because the ingredients as put together in view consisted of ice, Hershey's chocolate syrup, and some liquid poured from a generic carton. My less than trained gustatory instinct pointed to most of the desirability being from the texture, unusually velvety for a smoothie--closer to a milkshake, which it definitely isn't. The obvious next step was to seek nutritional information, which I found after a quick google. Unfortunately, due to poor pdf formatting, some portion of the ingredients for the liquid of interest, "cappucinno base," were cut off, but my suspicions were nonetheless confirmed as there were several thickening agents visible: carageenan, guar gum, and locust bean gum. The use of whey protein probably also plays an important part in the final experience, otherwise it seems to be sweeteners, stabilizers, and the ubiquitous, impossibly ambiguous "natural flavors." As far as these flavors go, I don't think they have much if anything to do with espresso.

Given that I don't have easy access to any of these commercial thickeners, I had to improvise with powdered sugar for its corn starch content. Here's what I've come up with so far, texture-wise it seems pretty close:

8-10 oz. whole milk
Equal part or more ice (a lot).
Espresso to taste
Hershey's chocolate syrup to taste (probably about 2 Tbsp)
1/2 scoop whey protein
2 Tbsp powdered sugar
1 Tbsp granular sugar

This is the result of only my second attempt, so there's probably improvements that can be made. I think the most promising avenue is the addition of some salt to drop the freezing point of the mixture. The flavor is still way off, but the only thing I can think to make it closer is just removing the espresso altogether.

Thursday, October 15, 2009

Thoughts regarding the poor sense of probability

As a homework assigment for my probability class, we were asked to respond with our thoughts concerning the following TED talk.

In the interest of availability, persistence, and my efforts not going to waste (on the off chance someone reads my blog at some point), I've reproduced my responses after the jump with minor edits so they might make sense outside of the discussion amongst classmates.

Saturday, October 10, 2009

Nissan Succumbs to Logic

Making the rounds on the web is a new Nissan Land Glider concept vehicle. My opinion is that this represents the first indication of a correct step towards a sustainable near-range vehicular platform from a major automobile manufacturer. Included with all the sites discussing it are a few pictures and the following video (which has a very interesting choice of music with what I'm quite certain is the avant-ambient work of Steve Roach):

Get more after the jump!

Thursday, October 8, 2009

Telescopes in Space

At first the idea of a telescope floating around in space is absurd, but any marginally knowledgeable astronomer can profess that it's a fantastic idea. Astronomy at the most fundamental level is the study of space, everything and anything that's not Earth, and it's one of the oldest realms of intrigue known to humankind; it was popular long before the scientific method wandered onto the scene, despite being very much a scientific pursuit. On one hand, that space is an old interest isn't surprising--anyone that has turned their sight to the sky on a clear, dark night knows exactly why. A gaze into what might as well be the infinite unknown, the act itself as simple as a glance at our own hands, has a way of inspiring speechless profundity in even the most uninterested amongst us. On the other hand our primal fascination with space is surprising for its distance, simply far removed from our experience and altogether relatively bland to the naked eye for its expansive empty darkness excepting the occasional tiny point of light. I find it interesting that this practical void drew fascination more readily than the exceptionally vibrant and astonishing diversity of phenomenon on Earth which we can easily approach and examine. I suppose it's another case of obscene acclimation leading to an almost humorous misplacement of gratitude (or the frog in slowly heated water, though I'm not a fan of the literal part of the notion when put that way). Nonetheless, space is a fascinating place, especially when explored with our modern technologically augmented senses, the subject of this post.

As it turns out, Earth is a lousy place from which to explore everything that's not Earth. The telescope, primary instrument of astronomers, is often incapacitated by the humble cloud, and it is increasingly difficult to find a spot where light pollution (that light from the ground which obfuscates the much fainter light from billions of miles away) isn't a problem. But even on the highest, most remote mountain on the clearest night, a telescope on Earth is substantially limited by a variety of factors, and thus the idea for a telescope in space. Space telescopes were proposed by at least the 1920's; the first (Hubble) was funded in the '70s but took about twenty years to get into space, in 1990. Of course, 20 years from paper to space is ok by me, given that it's a hulking monstrosity, nearly 25,000 lbs of technical wizardry. It may have launched as early as 1986 if it weren't for the Challenger disaster, which put Hubble in cold storage but to the tune of $6 million a month, not your everyday storage unit. Nonetheless, the time investment seems to have paid off, as the Hubble is very near entering its 20th year of functionality.

Despite the near 20 years of development, shortly after launch the images Hubble was transmitting indicated a serious issue, with quality far less than expected to the extent that it performed similarly to ground telescopes. Before long it was discovered that the main mirror was shaped incorrectly. Telescopes depend almost wholly upon the precise shape of the main mirror, and the precision of the Hubble's is astounding--it was perhaps the most precisely manufactured mirror ever made, with a deviation from the intended curve never more than 10 nanometers. In other words, the shape was at most off by a length about 40 times shorter than the shortest wavelength of visible light (the color violet, at 400 nm). To give you some kind of perspective, nothing skinnier than about 400 nm can be seen with our eyes, no matter how powerful a microscope you can find: the problem is that for something under 400 nm, visible light can't hit it, which means it can't bounce back and into our eyes. So given a mirror so amazingly precise, how could it possibly have been so bad? Well, the mirror was very precisely manufactured to the wrong shape!

Here's a question: how do you fix a ~7ft diameter mirror that took 5 years to manufacture, stuck in the middle of a technological marvel which is hurtling through space at 17,000 mph?? There were two backup mirrors made, but replacement wasn't an option. Fortunately, the Hubble had a strength, a unique design choice: it was built so that it could be serviced by astronauts. After extensive analysis of the problem, a surprising solution was conceived--new sensor instruments, something like the chip in any digital camera, would be  specifically designed to be flawed in a way that would be the anti-flaw of the mirror, thus cancelling out the effects! It reminds me very much of doing the same thing to both sides of an equation in math; you can do whatever you want, as long as you do it to both sides (note that this isn't always true). This story is one that I find informative and inspiring, I hope you can find similar value in it. I also recommend taking a look at the Hubble Space Telescope page on wikipedia, as there's a lot more generally interesting stuff to know. Surprisingly, the Hubble is just one of around 100 space observatories past, present, and future. ~45 of them have been terminated, ~15 are planned for the future, and this year alone stands to see the launch of 8 new observatories!