June 7, 2009

The Megastore killed the Traveliing Salesman

I spent a fair bit of time not only reading the content of this weblog post applying Traveling Salesman to the transportation of produce, but also the extensive comments. The idea is that one hears people say that locally grown produce has less of an environmental impact, but when you consider the transportation of food for all people, you probably ought to be minimizing the fuel spent across the entire community, which may not be the same as minimizing the fuel spent to get food to a single individual. Essentially - that distribution centers add fuel efficiency.

I think it is clear, and the comments point this out, that this is not really a condemnation of buying local produce. Fuel expenditures are not the only reason to do so. The distribution center model may be perfectly sustainable on a regional level but become more problematic on a national or international scale. I think the question the post is really wanting people who focus on buying locally, and specifically at farmer's markets, to ask themselves is - are you doing this out of an intuitive sense that local means traveled less far means less environmental impact? And if so, you may want to think about whether you are following the best route to accomplish your goals. I believe that you can come back to saying you want to buy locally and support farmers markets - because you know the food is at least from this region and not the other side of the world, because you can have first hand knowledge of how your food is grown, because you may be able to buy varieties of food that would not ship as well under a distribution model, because it helps keep local farmers in business, etc. But I enjoy seeing this type of analytical approach applied to social behavior because of the deeper conversation that you see cropping up in the comments of the post about why this should or should not be done.

June 6, 2009

25 Years of Falling Blocks

I love the Google logo for the day - not just because it looks great, but because it kept me from missing Tetris's 25th birthday. Like, well, everybody I remember losing hours and hours to playing Tetris.

I remember exactly where I first played it - in the summer of 1990 I was at the PA Governor's School for the Sciences on the CMU campus, and Tetris was installed on the computers at the tiny computer cluster just down the hill from our dorm. It was an odd little computer cluster, shoehorned into a storefront space next to a laundromat across from various food vending trucks that never seemed to actually be open that summer. But we would go down there to work and end up playing "just one game" of Tetris that would turn into two, or three, or four - or as we got better that would go on for almost as long as endurance would allow. You got to develop a style - did you play it safe, laying down solid rows and clearing line at a time along the bottom? Or did you strategically form deeper holes that would let you plonk down the perfect piece and clear four rows at once? I think all of us had the experience of the cluster closing before our game had. At the time I was surprised they let us play on the cluster computers, but looking back I remember the many "No playing Netrek on cluster computers signs and remember that that was the era of schools suffering bandwidth issues because of MMORGs and other online games, and a few kids playing Tetris on localized machines on a summer evening was the least of their cluster abuse concerns. As an aside, I had no idea that Netrek was still up and running - nor at the time did I quite grasp what a technological innovation Netrek was. Modern WoW addicts and other online gamers owe a lot to that game.

Somehow after that summer, I ended up with a copy of Tetris on my Mac at home and I played it constantly. Even when I would grow bored, i could always sit down, weeks or a month later, and play a game and fall right back into the pattern. It was the first game that I would play to the point that I would go to sleep and dream the falling shapes and the patterns of rotation needed to play the perfect game. In college, the year I had to upgrade my computer past compatibility with my copy of Tetris was actually upsetting, and I think it is then that I ended up with a copy of Super Tetris 2, which spawned another "dreaming falling blocks" level addiction with the game.

It is the many, many variations of Tetris that keep coming out that convince me I am not the only one to have had that experience. I would be surprised if there was a platform that it was not ported to. You can access a version of it through emacs. You can play it online in a million places. You can play it in an unrealistically huge format. You can watch a Tetris game as recreated in stop motion by people in colored shirts (and how perverse that even in that format I have to grit my teeth at some of the stupid "moves" being made). You can decorate your house with Tetris furniture.

Excuse me now - I am off to put on my Tetris/Escher tshirt and play some Tetris.

May 28, 2009

Robots will kill them all!

Science fiction sometimes seems to simply pick between whether it is the robots or the aliens who are going to kill us all, so it is refreshing to see a headline warning us that the robots are killing the aliens. It is actually not a particularly fear-mongering story though. Instead, it is a nice article talking about how the fact that there is has been a complete lack of any organic found on Mars is in fact odd given the likelihood of transfer by asteroids or comets. This had let scientists to speculate that the perchlorates on Mars, when heated, are destroying any organic material that may be there to find. This suggests new ways of looking for organic materials in future rovers that will not result in destroying what is being looked for. There is an interesting mix here of wanting to collect data about Mars as a new environment, but also having to make some assumptions about Mars in order to plan out and revise the data collection procedures being used there.

May 22, 2009

Not nearly as cute as Aibo

I defy you to watch this video of a, sort of, robot dog and not be creeped out:

I have only heard of the uncanny valley being applied to people, but this has that same feel of being just natural enough as to be disturbing. In the first shot of the thing walking up the hill I wasn't entirely convinced it wasn't some poor real dog with a few artificial legs. It's an impressive feat of engineering though - watch through to where it gets kicked while trying to walk on ice. The recovery it goes through to avoid falling is amazing.

April 20, 2009

Not really a recipe

I have been trying to get into the habit of taking a real lunch to work with me, and making up a batch of brown rice for the week that I can top with stuff seemed like a good idea - it would be filling and easy to throw together in the morning. Unfortunately, while I know brown rice is much better for me than white, I have not yet come around to liking the taste as much. So I decided I needed to make something aggressive enough to put on brown rice, while still being compatible with its flavor. I settled on making a spicy batch of vegetarian chili. Chili is fun, because I just go to the store and wander the aisles looking for stuff I want to throw in. Today, I ended up with:

  • a large red onion and a couple of cloves of garlic, sauteed together in olive oil until well cooked,
  • two huge carrots shredded finely, two green peppers, two "long hot peppers" (that is what the Giant Eagle called them - no idea what they actually were), and a cup of rehydrated TVP, all cooked in with the onion and garlic for about five minutes until softened,
  • two cans of kidney beans, a can of black beans, and two large cans of crushed tomatoes, brought up to a simmer,
  • a handful of oregano, basil, and chili powder, two handfuls of cumin, and about four chipotle peppers, after which the whole thing simmered through two periods of hockey.

The end result had a really nice texture (I chopped all my veggies very fine, and while I find TVP fairly flavorless I really like how it binds something like chili together) and a great flavor. It was also incredibly spicy; I have always associated chipotles with a smokey flavor, which the chili definitely has, and didn't think about the added heat. I don't mind, but this is definitely a chili to serve over something, not just to eat a bowl of plain. It also is an insanely huge batch of chili - I can never make a dish like this and not end up with enough for a week of meals and plenty to freeze. Fortunately, chili freezes wonderfully, and I am going to make up containers that I can thaw out and use to make up two or three lunches out of. Next time I would probably leave out the unknown hot peppers and remember to throw in shredded celery as well.

April 17, 2009

Yeah but assignment operators are cheap...

Coding Horror is often fun, and a good read, particularly for aspiring techies who want an inside glimpse of some of the details that would make up your life if you pursue that path. But when I read Jeff's post on spaces versus tabs in code formatting I both cracked up and immediately thought of one of my Data Structures students who has to reformat any piece of code he is given before he starts working with it. With my students deep into their team projects, I wonder if they are running into the conflict that Jeff claims is inevitable:

The only programming project with no disagreement whatsoever on code formatting is the one you work on alone. Wherever there are two programmers working on the same project, there are invariably disagreements about how the code should be formatted. Sometimes serious disagreements. The more programmers you add, the more divisive those disagreements get. And handling those disagreements can be .. tricky.

He goes on to discuss the pitfall of team members taking it upon themselves to "fix" each other's code - not just spacing, but even variable name conventions and the like. It may seem odd that such computationally trivial decisions (I mean, we all know the compiler doesn't care...) could cause so much interpersonal strife on a team. But if you've ever really gotten into programming, the idea that someone else might be messing around with your code, after you get it how you like it..... well, it is probably at least a little agitating. And Jeff cites the classic "The Elements of Programming Style" to illustrate that these style principles actually do matter when it comes to code as a tool for comprehension and communication. Which is particularly key on a team project.

In their book called The Elements of Programming Style, Kernighan and Plauger also identify what we would call discourse rules. Our empirical results put teeth into these rules: It is not merely a matter of aesthetics that programs should be written in a particular style. Rather there is a psychological basis for writing programs in a conventional manner: programmers have strong expectations that other programmers will follow these discourse rules. If the rules are violated, then the utility afforded by the expectations that programmers have built up over time is effectively nullified.

I am now curious to see how my students navigate this problem - if they try to get consistency or not, and if the most obsessive person in the group just wins (I fear I have one group with people who don't care that much and one group with people who do). And it makes me think about the style guidelines I set out for code in my introductory class, and that perhaps sharing some of this research would make it clearer why I have those standards.

April 6, 2009

My Body My Data

Medical databases are one of the huge trends in IT right now, and there are a lot of people looking at how to make national, integrated personal medical information databases a reality. There are also a lot of people looking at the special requirements for accuracy and privacy when building such databases. I like this person's comments, from a patient's perspective, on the importance of sharing ownership of the records with the patient. The comments were triggered by someone commenting that they signed up for Google Health and found it to be a combination of inaccurate and with troubling omissions - basically, a health record that would likely be worse than nothing. The system is still in beta, but it is troubling to see partial data being provided by hospitals/pharmacies, as compared to simply declining to provide information unless it is complete. Even if this is improved, as it likely would be before it left beta and hopefully before any doctor relied on it as a source of medical information, the conversation about participation in the data collection and maintenance is a good one. It is troubling that any doctor would be wary of a patient seeing their own lab results, though perhaps they would like to be able to ensure that they are presented with enough context to be meaningful. But I think we have to insist that information about ourselves and our health is our information, and just as we have a right to see what is in our credit report and who has been looking at it, and a process for correcting it if necessary, we have a right to the same control over our health records. Given the nature of the information, I think we also need a system more effective than the current credit history system, and we ought to have it in place before these systems are widely adopted.

Amanda is a college professor, artificial intelligence researcher, and long-time geek. She's been weblogging at Screenshot since July 1998. You can contact her at maxsroom@gmail.com.

Be sure to also visit:

Recent Reading

  • The Future of the Internet - and How to Stop It; Jonathan Zittrain
  • Booked to Die; John Dunning
  • Shadow Puppets; Orson Scott Card
  • The World Without Us; Alan Weisman
Powered by
Movable Type 3.31 All content copyright 1998-2007, do not copy or reproduce without my permission.