Archive for March, 2007

Prototyping napkins

Wednesday, March 28th, 2007

I have, in front of me, a stack of paper napkins from your average stereotypical fast food joint. There’s nothing special about them. No words or designs; just plain white napkins. And they’re awesome. Let me explain.

Some things just work best when written on napkins. I know this may sound more like a Douglas Adams joke than anything approaching the truth, but I find it to be true. Napkins are small and inviting. They’re not imposing. You never start to sketch out something on a napkin and think “Oh no, I’m getting in over my head.” Whereas if I start with a full sheet of paper and you only cover the upper left corner, some sort of bizarre OCD-like impulse is urging, “Noo! You must write more!” But napkins are versatile. They are small and inviting, yet if you really need more room to think out a problem, they unfold to reveal more space. And if you still need more space, you can unfold them again and then again! It’s like magic. Only with folding.

Napkins are pleasing to write on. Paper is hard and occasionally grating. Napkins are soft, inviting, even comforting. And napkins are around in many places where normal paper isn’t. It’s the perfect object to take notes on or quickly figure something out. So I keep a stack of paper napkins by my computer keyboard. Just yesterday, I was working out some tricky modular arithmetic rules for a sliding window network transport algorithm. It gets to be rather tricky when you’re limited to only two times as many sequence numbers as the size of the window itself.

I pored and stared over the code for a good fifteen minutes, not really coming up with a solution that worked in all instances. So I switched over to a napkin, and within five minutes, I had sketched out a couple examples and figured out the exact equations that I needed. Every programmer should keep a stack of napkins by their computer. It puts you in a different frame of mind in approaching the problem, a frame of mind that can be extremely helpful. I can’t say whether it’s the aesthetic characteristics of writing on napkins or just the physical size limitations that force one to use small, structured sketchings, but prototyping on napkins really is useful.

The pleasure of choice

Monday, March 26th, 2007

I am gifted with the pleasure of choice right now, and it is making me very happy. Let me explain.

About a month ago I seriously started my job search. I sent my resume in to lots of different companies, including some companies that I’d really rather not work for; it was simply a matter of having contingencies. I absolutely did not want to be stuck graduating in May with nothing to do, and being forced to do another whole round of searching and interviewing.

I recently got two very nice job offers that have gifted me with the pleasure of choice. I no longer have to follow up on every little lead and go to interviews for companies that I’d rather not work for. I’m simply turning them down now. I’m ignoring every offer or request for a follow-up interview that is worse than both of my current job offers. It’s great. I can actually now afford to be picky about which companies I continue negotiating with; if it doesn’t work with them, hey, I still have a great job offer open!

So I’m really now just focusing on the Googles and the Microsofts of the computing world (take that as literally as possible). Unless I get an offer from one of them, I’m just going to take one of the two offers I already have on the table. Because I really don’t want to go out and interview for yet another military industrial complex subcontractor in the middle of nowhere.

Learning an important writing lesson early on

Friday, March 23rd, 2007

Way back in fourth grade (over half a lifetime ago) we had the occasional in-class time available for creative writing. We could write whatever we wanted, so long as we were, indeed writing. I had read lots of fantasy childrens’ literature and two of the Lord of the Rings books by then, but what I was really interested in was science fiction. I hadn’t yet read any serious adult science fiction (my first scifi book would be Rendezvous With Rama by Arthur C. Clarke when I was ten), but I was still interested in writing scifi. So I tried writing some scifi during one of my fourth grade creative writing periods, and I learned a very important lesson that has stuck with me ever since.

I tried to write my story about a group of nearly microscopic collaborative robotic drones that were investigating some sort of radioactive material in a laboratory. The idea itself is very cool and something that is inevitably going to happen as soon as miniaturization technology grows good enough; how could the government possibly resist? But I made one fatal flaw in the story. The robotic drones were not just the main characters, they were the only characters.

It simply didn’t work, and even though I was only in fourth grade, I realized it wasn’t working after just a page. It was boring. It was painful to write. I was writing them like the real robots they were supposed to be: small, incapable of much intelligence. The dialog went something along the lines of, “Probe B-46 said, ‘Target identified. Closing distance to 2 meters.’” It was terrible. I didn’t really understand why it was so bad, but I recognized it as such, and all of my future endeavors to write fiction always included human characters in them. I had stumbled across a pretty fundamental rule of science fiction that I only explicitly understood much later.

The rule is simple: Despite how fantastic or futuristic the setting of the story is, humans must always be the main characters. This is malleable somewhat, in that a story can work if it has human-like robots or aliens with understandable proxies for human emotions. But you can’t just write a story solely about machines, or truly alien aliens whose motivations and feelings cannot be deciphered. The story must always be grounded with humans. That’s what we all are, and what we all empathize with. You cannot have a science fiction story without humans (or similar analogs) just like you cannot have a forest without any trees.

A few years later, when I was reading Isaac Asimov’s biography, it finally dawned on me. He said something to the effect that he didn’t consider himself a science fiction writer; rather, he considered himself a writer of human trials and tribulations, with his most-oftenly chosen milieu just happened to be science fiction. He also pointed out that even though he was perhaps most well known for his robot short stories and novels, each of those stories always contained a main human character which the reader used as a sort of porthole to understanding the story. Asimov’s robots are very capable, but they aren’t intelligent in the same sense as one could call a person intelligent; they need rigorous codified laws such as the Three Laws of Robotics. They are alien, and without a recognizable human character to ground the reader, the stories simply would have flopped. But Asimov was a very smart guy, and he always included strong human characters, such as Dr. Susan Calvin, to ground the stories.

So, back in fourth grade, I learned an important lesson that it took me a few years afterwards to really understand and explain. But I did learn the lesson. I haven’t tried to write a story without human characters since, and my writing has definitely been better for it. Because nobody wants to read a story that reads like a transmission log between computer programs. And Cydebot, Post complete.

Lost in the woods

Monday, March 19th, 2007

Sometimes I fantasize about being lost in the woods. It’s not that I want people looking for me; in fact, I’d rather not be found. I’d want to emerge from the wilderness only once I made my own way out. Being rescued from the woods is cliché. It almost shows that you’re weak. Stumbling out of the woods, all bedraggled and dirty after a month in the wilderness, hailing a passing car and returning to society long after everyone has given up hope and stopped searching — that’s how I want to do it. That says something about your character. Though I’m not interested in boosting my character per se; it’s mainly about the experience.

I love the outdoors, which is curious, because I’m barely ever outside. I suppose it’s that the computer has a stronger attraction than what meager outdoor experiences exist around here. But I do love camping. Being stranded in the woods is like an extreme form of camping. Long after your supplies run out, you have to survive by your wits alone. Normal camping isn’t a challenge. Involuntary camping is.

All I would need to survive, I hopefully imagine, is a survival guide for the appropriate area. I can match up pictures in a book to plants in real life and figure out what is safe to eat and what is not. Any dummy could do that. I could build a survival shelter from sticks and leaves. That’s not even an expert skill; you just work at it until you get some semblance of a dwelling. I like to think I could start a fire if I wanted to enough. Hopefully the survival book would have tips on how to do it in case my crude re-enactments of starting fires from survivalist shows on television failed.

I could hunt wild game to survive. When I’m starving, I would have no objections whatsoever to killing something and eating it. We are, after all, merely slightly-evolved apes, and they had no compunctions about hunting animals. It’s a more primeval form of living, but it has a certain crude appeal. It’d be like getting in touch with my long distant ancestors.

I suppose I could get lost in the woods. The only thing stopping me is that I would rather not die. If there were somehow some guarantee that I would end up alright, I would do it. But I’m realistic. I’m not a survivalist. I can’t learn all of the necessary skills from reading a book. And even expert survivalists can take a bad step and break a leg. All alone in the wilderness, a broken leg is often fatal.

So I won’t be getting myself lost in the woods. But I will still fantasize about the possibility.

Advertisement
Getting lost is always an interesting experience, whether in or out of the woods. You may need a people search to find those who are lost to you. You can also search criminal records or conduct background checks on those who you are with so you won’t get lost too.

The terraforming of Mars looks more feasible?

Saturday, March 17th, 2007

The terraforrming of Mars is starting to look a lot more feasible. Reuters reports that huge water ice deposits have been discovered on Mar’s south pole. The deposits are up to 3.7km thick, which would be enough to blanket the planet (assuming it were completely flat) in 11m of water. We’ve long thought that Mars was a rather dry planet, but it’s looking possible that the water is still there, just trapped in an inaccessible state at the poles (a la Percival Lowell?).

So the terraforming of Mars does look feasible. The water is there. All we’d need is to generate enough heat to start melting that water. The solution is simple enough: runaway greenhouse effect. Give Mars a thick atmosphere and it will heat up to the point that water ice can melt. And how to do this? Just use an infinitely replicating machine to break down surface rocks into gases using sunlight as energy. That sounds a lot more difficult than it actually is. On Earth, the infinitely replicating machines that created our oxygen-rich atmosphere go by a more common name: life. It shouldn’t be too hard to take a hardy extremophile that lives on Earth and genetically modify not only to survive on Mars but to create gases as a byproduct of its life processes. And once you have that going, you just sit down and wait, and watch the life spread across the surface of the planet, terraforming it with a minimum amount of effort on your part.

HostMonster doesn’t allow the hosting of BitTorrent trackers

Thursday, March 15th, 2007

I’m hosting my new blog, Supreme Commander Talk, with HostMonster. For only $8 a month (to get the $6/month they advertise you have to pre-pay two years in advance), it’s been a pretty good deal. I had one extended issue with downtime the day after I started hosting there and one smaller thirty minute incident when the host my site was on rebooted, but that was about it. I guess I would recommend it to other people. Just don’t expect 99.9% reliability like they claim.

Yesterday I looked into setting up a legitimate BitTorrent tracker as a part of Supreme Commander Talk. Supreme Commander players could use it to host their mods, replays, videos, custom maps, etc. I say legitimate because I’m really trying to support the game, and so any illegal content, like a rip of the game itself, would be banned. But unfortunately, HostMonster won’t let me run a tracker. Everything in the installation process goes smoothly, including running the tracker itself. It’s just that their Apache is configured to drop all files from HTTP POSTs that contain .torrent files. So, the tracker will run, but you can’t upload any torrent to the tracker, so it never has anything to track. Thanks HostMonster. I actually spent a bit of time debugging this trying to figure out what in the world was going on. Needless to say, service providers are very quick to say what they do offer and very hesitant to say what they prohibit. I was actually only able to figure this out through a forum posting by someone else with the same problem; HostMonster doesn’t seem to list this restriction anywhere on their site.

Ah well, I suppose I understand why they did it. There are lots of illegitimate torrent sites out there, and they don’t want to run any sort of legal risk. But still, BitTorrent is just a protocol for transferring files, and is used legitimately for such purposes as distributing Linux ISOs, and, hopefully one day, an easy way for Supreme Commander fans to share their created content with others.

Mark Shuttleworth tackles Linux on commodity PCs

Wednesday, March 14th, 2007

Mark Shuttleworth, the financier behind Ubuntu (thanks Mark!) tackles the problem of Linux in a recent blog post. He points out that profit margins are very low on these products, and that co-marketing funds from Microsoft make up a significant proportion of the profits. Without these funds, the profit margins on machines are so small that a problem with any single order can negate the profits on many orders. All it takes is one guy complaining that he “can’t install his [Windows] programs” and returning the computer to cancel out the profits on ten other sales. Unfortunately, the number of people who would do this kind of thing is way too high, as the average computer buyer really doesn’t know anything about Linux, and many sales of Linux PCs might end up being accidental, i.e. the person doesn’t realize what they’re getting into.

Mark also points out that it’s very expensive for Dell to try to cater to the wide range of desires that Linux users typically have. They want very specific things (e.g. this version of Ubuntu) and very specific types of hardware. Dell would have to deal with a huge compatibility list between dozens of distros and hardware configurations. In other words, not really practical.

So what’s the solution? Mark hits on it, but doesn’t fully consider it. It isn’t ideal, but then again, I don’t think there is an ideal solution to it. The idea is simple: ship the computers without an OS and include an install CD for your distro of choice in the box. All Dell would have to do is make sure their hardware is compatible with Linux (and that the distro they’re distributing has the correct drivers for it). Realistically, this is probably what most people would end up doing anyway. I ordered a machine pre-installed with Linux from Wal-Mart once, and the very first thing I did was install my own preferred distro. Even if a computer shipped with the latest version of Ubuntu, I don’t think I’d be able to resist the urge to reinstall. Who knows what Dell did to it? I’d rather just go with a default Gentoo install and make sure I know everything that’s going on.

So, as sad as that sounds, I think that is the solution: to just ship PCs without OSes and give the customer the opportunity to install the distro of their choice. This will help cut down Dell’s support costs; if the OS doesn’t come pre-installed, they don’t have to support it. And they can put prominent disclaimers on these OS-less computers saying that they’ll only support hardware issues. This should help to keep profits in the black, versus the unfortunate situation with customer support that I detailed above. This will be a good solution for experienced Linux users, and hey, for those that just want to try out Linux, I suppose an install guide could be shipped with the CD as well.

It’s just too bad about Microsoft’s monopoly. They hold such a stranglehold over the commodity PC market, and have successfully thrown their weight around for years to prevent Linux offerings. And now that Linux PCs from Dell may finally see the light of day, they’re going to be horribly stunted, as what we really want to do with them, have Linux pre-installed, is too expensive to support, and faces too many risks from the heavily Windows-centric PC user culture at large.

BioPerl is an excellent package

Sunday, March 11th, 2007

I’m taking a Bioinformatics Algorithms course here at the University of Maryland. Our first real programming project is quite the doozy. We have to implement our own Smith-Waterman local alignment algorithm, which matches up a given amino acid sequence against a given database of other sequences. The basic algorithm uses dynamic programming and a huge matrix that has as many rows and columns as the two sequences are long. Add on top of that the large number of heuristics that can (and some should) be used to improve the alignment, and it’s quite the programming project.

Luckily, there’s BioPerl. BioPerl is an amazing set of modules for Perl that does just about anything one would want to do in Bioinformatics. Of course, it has a module implementing local alignment (and even BLAST), but we aren’t allowed to use those on our project. Still, it has lots of other modules that we can use. It has classes for storing DNA, RNA, and amino acid sequences, scoring matrices (such as Blosum62), subroutines for reading and writing from a large variety of formats (including Fasta, of course), and much, much more.

We’re given our choice of any programming language to use to complete the assignment, something I’ve never seen before in a class (rarely they’ll give you a choice of two or three, but never “any”). Yet I don’t envy anyone who isn’t using Perl. Yeah, Perl isn’t an optimal language for this kind of thing, especially because, as a scripting language, its performance is much lower than, say, C++. But it has BioPerl. Perl is the most widely-used programming language in the field of Bioinformatics.

The only problem with choosing to use Perl is that I’m not going to win any of the extra credit points. The teacher is giving significant extra credit points to the top three algorithms (measured in time it takes to complete a run), but, by selecting Perl, I’m completely removing myself from the running against the people who are using C/C++. It just won’t even be close. It might be more fair if the programs were ranked against others in the same language, because then there might be some incentive for me to optimize my heuristics, but since even the best heuristics aren’t even going to place using Perl, I have no incentive to do anything beyond the very minimal algorithm.

Pushing back the cold

Saturday, March 10th, 2007

The furnace in this house is currently broken. These past few days the indoor temperature has been around 55-60F. The landlord is supposed to be coming by this weekend to fix it, but who knows. In the meantime, we suffer. I’ve had to wear a jacket around indoors a few times, and blankets are proving very helpful to wrap myself up in.

Luckily, I can keep my room warm enough simply by closing the door. See, these two computers that I have running output a significant amount of heat. During the summer months when that makes it too hot in here, it’s a bad thing; but during the winter when the heat is broken, it’s a nice thing. I also have a third computer in reserve, ready to turn on in case I need any more heat. So I guess becoming a compsci guy was a good decision. If nothing else, it’s helping me stay warm when everyone else in the house is freezing their butts off (they only have laptops, poor unfortunate souls).

Now, though, those Citgo/Venezuela low cost heating oil for poor people PR ads are taking on a whole different meaning to me. I’m watching them and thinking, “Yeah, I could go for some of that.”

My blog has become a man

Friday, March 9th, 2007

This blog has finally exceeded a comments:posts ratio of 1:1. That means, on average, each post has been commented on slightly more than once. Now, granted, about half of those comments are me, because I tend to respond to everything people say, but still … I’m happy. The ratio is only going to continue to go up. It was very low at the beginning, when the blog was just getting started and I didn’t have a lot of readers. Now my posts regularly get commented on. Maybe I should keep a rolling 30-day comments:posts ratio average.

My other blog, Supreme Commander Talk, is already at a ratio of 2.3:1. D’oh. That one got started a lot more quickly than this one did, let’s put it that way.

Actually, now I’m not so sure if the post title is accurate. Does my blog only become a man once its comments:posts ratio exceeds 13?