Saturday, November 6, 2010

My Desktop

So a few days ago I was trying to think of a topic to blog about, and checked the NaBloPoMo homepage, since they post a prompt every day. That day, it was to write about a piece of jewelry that I own, which was a little bit less than helpful. >_> But then, Kiriska suggested that I should write about a piece of hardware that I own. I don't think she was serious, but you know what? That'll totally work. XD

I've owned my desktop computer for about eight years now. None of the parts are original, but the spirit of it lives on!

Origins

So back in the eighth grade (around 2001 or 2002), I had heard about this newfangled "Linux" thing, and I wanted to try it out. With little or no thought as to the consequences, I downloaded an ISO (Mandrake Linux, if you're wondering) and installed it on our family computer. (This actually took several months - we take broadband for granted now, but have you ever tried to download a Linux ISO over dial-up?) Immediately, problems: I set up the dual boot properly, but nobody else in my family was able to figure out the GRUB boot menu, and as a result nobody was able to use the computer unless I was around to boot it up. (I didn't think it was too hard - you go down to the item labeled "Windows", and hit enter - but whatever.)

I'm not sure, but I think this episode contributed a lot to my parents agreeing to let me build my own computer a few months later. I went online, picked out parts from a ton of different websites (either Newegg didn't exist at the time, or I didn't know about it yet), and ended up spending about $600 on my first computer, if I recall correctly. Back then, that got you an Athlon XP 1500 processor (actual speed 1333 MHz - this was the beginning of AMD's labeling shenanigans), 256 MB of RAM, a 40 GB hard drive, and various other bits.

Ever since then, it's been my primary machine, and also a testbed for every crazy idea that I've ever wanted to try out. (When you're me, you have a lot of crazy ideas, apparently.) To be honest, I think that most of my current skill with Linux comes from trying out something a little bit too crazy, and then fixing everything that breaks as a result.

Operating systems

So I mentioned that I started off on Mandrake. After a while, I switched to Red Hat; Mandrake was never especially great, and Red Hat seemed pretty solid. (An aside: Red Hat 8 or 9 was when BitTorrent actually hit the mainstream - every official download mirror was crawling at dial-up speeds, but the BitTorrent download was working just fine. This was when a lot of people sat up and noticed it.) Red Hat (and later Fedora, a spinoff of Red Hat) was nice for a while, but around the middle of high school I decided to take it to the next level. I switched to Gentoo.

For those of you unfamiliar with Gentoo: it is hardcore. Graphical installers? Feh! Installing Gentoo involves downloading and extracting an extremely minimal base system (about 100 MB), and then building the rest of the OS as you see fit from the command line. Prebuilt packages? Decadent! On Gentoo, you build every single piece of software you install from source code. (Sometimes it's overkill, but it's become the defining characteristic of Gentoo.)

Gentoo has this nice property called "rolling releases" - basically, they don't release major versions every once in a while like other OSes. All updates to the system are distributed incrementally through the existing update mechanism. This is useful - it means you never have to reinstall your OS, unless you really want to (or, in my case, really screw it up). End result: After using Gentoo for something like six or seven years, I've only actually had to completely reinstall it once.

Current Incarnation

Today, my desktop has a dual-core 2.5GHz Athlon 64, 2 GB of RAM, several hard drives (the exact count depends on your definition of hard drive), and I think it's about due for another major upgrade. It's on its third CPU, its fourth motherboard, its third case, and in fact I don't think there are many parts that have only been replaced once. Yet somehow, it's still the same computer it was when I first built it all those years ago.

Friday, November 5, 2010

Pirate TV

BitTorrent is a pretty amazing way to get "completely legitimate" TV recordings. Using it, you can distribute bits around a network so efficiently that a several-hundred-megabyte file can be distributed to tens of thousands of people within an hour or two. It's not perfect, but it's so close to optimal that nobody's been able to improve upon it significantly in the past decade. That's pretty amazing, given the speed at which technology advances - ten years is an eternity.

So. What would it take to significantly improve upon BitTorrent in this space?

I have this crazy idea for a protocol that should allow for secure p2p-style live streaming video. Basically, you'd have a single video source, streaming through a tree of nodes that act as stream multipliers to get it widely distributed. Repeaters within the network would have the option of restricting client access based on whatever they wanted - invite-only access, or an add-supported stream, or a micropayment scheme (let's pretend I didn't just open up a can of worms), or something else. All connections would be SSL-encrypted (using both server and client certs would be used, since clients need to be authenticated as well), and some sort of forward error correction encoding would be useful too, I guess.

Inevitably, The Man is going to try to shut this down, so we need to think about defenses. One of the weaknesses of BitTorrent in this area is the tracker, which works by giving out users' IP addresses to entire swarm to facilitate downloads. With connections managed by the user, the data on connections remains a lot more private, so users can't be easily tracked.

The video source needs extra protection, because it represents a single point of vulnerability for a network. The easiest way to track it down would be traffic analysis. This can be mitigated by having a network of a few dozen fast machines (the video source among them) all start sending data to each other at once; most of the data being passed around will be garbage data, but an eavesdropper can't know that because all connections are SSL-enabled. Thus, a dedicated attacker could narrow the source down to one of several nodes, but its location within that group of nodes can be effectively hidden.



I'm not arrogant enough to think this protocol is any good, to be honest. (The incentives are incredibly sloppy, for one thing - it's an area that I hadn't started thinking about until yesterday.) The point I really want to make here is that better p2p protocols that BitTorrent exist; they just aren't being deployed because BitTorrent is widely-used and good enough. It's something that anybody who works against piracy needs to keep in mind: the successor to BitTorrent is going to be a lot harder to shut down, and it's going to appear out of the woodwork as soon as BitTorrent is no longer an attractive option for pirates.

Thursday, November 4, 2010

An Increasingly Frantic Search for Novelty (or: Philosophical Segfaults)

...or at least that's how life feels some days.

I am, in general, a purpose-driven individual; as long as I have something to be working on I'm pretty contented. The flip side is that, when I actually don't have anything to be doing, I handle the listlessness pretty poorly.

About a year and a half ago, I went through a pretty dark spot when I started wondering about my overall purpose in life; what was I actually aiming for? Up until that point, I had sort of powered through school on a weird mixture of arrogance and obligation. That had started to crack as far back as high school, though, and so I decided: I would figure out my purpose in life!

As it turns out, this is a terrible idea. Because, after not finding an answer for a while, I started to wonder about my life so far. Maybe everything I was doing was actually meaningless, maybe everything I had done so far in life was meaningless, maybe there wasn't a point to doing anything anymore, because I couldn't find a reason for any of it... It was the philosophical equivalent of dereferencing a null pointer.

Eventually, I grabbed at a lifeline. Forget about the long term, I decided, because I could just do whatever seemed interesting in the short term, and keep going like that until I found a better answer. It was a total cop-out, but it also got me out of the pit I had dug for myself, and keeps me out when I wander too close to it.

This story has no resolution; I'm still basically operating in magpie-mode, chasing after whatever looks shiny when I find myself with nothing else to do. The alternative is to seriously think about the possibility that there is no purpose to what I'm doing, and that I'm just an empty puppet acting out a script that was written over the past billion years of evolution. (I'd rather not.) It's not exactly fulfilling, but then again, fulfillment isn't a thing I expect anymore.

Honestly, this blog post is about as close as I feel like coming to the topic, and even writing this much sent me on about an hour's worth of meandering melancholy mental tangents. I can't say that I've given up on the problem, that I'm satisfied with not having an answer, without setting off the intellectually honest part of my brain... but if I end up living my whole life without actually finding a reason for having lived it, well, I think I've made my peace with that.

oh god did I just write a blog post about the meaning of life, dammit I think I did

Wednesday, November 3, 2010

An obsession with unpopularity that is, frankly, a bit creepy

A few months ago, I picked up a copy of 2600. (Yes, an actual physical copy. Ironic, right?) I got it at Book People, if I recall correctly, and if you're ever in the Austin area looking for a cool bookstore, Book People is the place you want to be, I think. I could digress for paragraphs about why it is a cool place, but I think I will get to my point instead.

Anyway, it was a pretty neat issue, especially the article about hacking Bluetooth. There was another article, though, wherein the author just talked about how he was picked on in high school, and how now that he was a hacker, he was going to get back at all the people that had wronged him. And you know what? That article creeped me the hell out. Partly because the guy sounded like a total psychopath, but mostly because it crystallized my general unease with how easily geek culture has absorbed the Disneyfied high school narrative of geeks getting picked on. Hold up, that deserves some explanation.

An Aside on my Longstanding Objections to the Generic Disney Channel High School

Have you ever noticed how far divorced the Disney channel is from reality, when it comes to high school? I don't just mean the liberties that they've had to take to fit various shows into a TV format; I mean the fact that what they portray as high school is completely and tragically divorced from reality. I'm mostly referring to the concept of well-defined and insular cliques, and the social structure that implies - the rest of how they portray high school is equally messed-up, but tangential to my actual point. They've created this parallel universe that's sort of like high school, and they apply it so consistently to all their shows that I actually wonder sometimes if there's another country where school actually is like that, and all their writers just happen to be from that country. Then I realize that it's much more likely that all their writers grew up watching movies like Animal House and Revenge of the Nerds, and thought they were hilarious, and are unconsciously trying to emulate a parody. BUT WHATEVER.

So back on topic:

What is it with geeks and this particular kind of martyrdom?

Another example: various slashdot comments which have creeped me out in the same way. (Entirely too lazy to find links.) You will, with alarming frequency, find comments on "geeky" news sites where people assert that geeks are driven toward technology because they're picked on and unpopular with their peers. There are also plenty of creepy misogynistic comments about women only wanting "bad boys", at the expense of geeks, who are the "nice guys"; another narrative that falls more in line with the Disneyfied high school than any real one. I don't know where all this is coming from, but it worries me.

Another example: The second episode of the third season of Leverage, a show that I otherwise admire entirely too much. The plot: the team has to con a software executive, and the only way to get inside his head is through high school, because he's totally obsessed with high school! Because he was picked on in high school, and now fantasizes about showing off to everybody how successful he is now! Because he's a Geek!

(The worst part is, it was otherwise a good episode, but I couldn't enjoy it because of my all-consuming rage at the blatant stereotyping going on >_>)

So, stereotypes I can understand. They happen all the time, and it's not exactly mysterious why they happen. What I can't understand, though, is why geek culture has adopted this particular stereotype.

Attention, geeks everywhere! The "high school martyr" trope is a bad thing, and kind of creepy when you pair it with "but I'll show them all!" later on! It might even be worse than the "geeks = autism" trope, so let's stop perpetuating it, k?

Tuesday, November 2, 2010

Building a storage cluster (on the cheap)

So RAID is one thing, but (as I found out the hard way, recently) you're still screwed if the computer you put the RAID in starts going flaky. Now that I have a bit of cash, I decided it was time to take things to the next level. :O

My initial plan was to build a super-awesome NAS - basically an external hard drive that you plug into the network, so you can use it from multiple computers at once. After a lot of thought, I abandoned this plan. I don't trust commercial NAS systems (though the Drobo looks pretty sweet, I must admit), and building my own would have been too expensive. It'd also be kind of a pain to add storage - take it offline, install a new hard drive, mess around with cables (possibly forgetting to plug some in, which actually happens more often than you'd think >_>), and when you fill up the box, you either start throwing drives out (wasteful!) or upgrade the entire thing. Plus, a NAS is still a single point of failure, which is lame! I can totally do better than that.

So the new plan is to build a Ceph storage cluster. Ceph is a relatively new distributed filesystem that one of the Dreamhost guys did for his PhD thesis. It's Linux-based (and even included in recent kernels), actively maintained, well-designed (aside: I'm still pretty grateful to the distributed systems class I took at UT; without it, I probably wouldn't even know what well-designed meant in this context), and generally meets most of my standards for a distributed filesystem. At the time, it seemed like a pretty good option, and it still does! Now, if only I could find some ridiculously cheap computers to use as servers...

It was at about this point in my thought process that I discovered that Jetway makes some ludicrously cheap minimal servers. You know that plug computer that Marvell came out with the other year? Jetway's thing has much higher specs, runs x86, has a full complement of ports and room for a hard drive or two, and is well-reviewed on Newegg. The only thing Marvell's plug computers really have over it is that they're ridiculously tiny, and who really needs that?

So, long story short: I pick up two of those plus some RAM, add my desktop machine, and I have a three-way storage cluster that's infinitely expandable, open source, has no single points of failure (except for the network parts, maybe? but those things last forever), and ended up costing less than even the cheapest Drobo.

Belatedly, justification

Somebody is inevitably going to comment that I'm trying way too hard, and that backups to an external are cheaper. The trouble with doing your own backups is that you actually have to pay attention to them. My goal here is to get a system going where I don't actually have to think about it day-to-day - everything should just work.

Somebody else will probably say that I should just store everything in the cloud - then I wouldn't have to worry about anything, because they'll certainly take better care of my data than I could. The trouble with the cloud is that it's too expensive (about an order of magnitude more than I'm paying to buy my own storage cluster, which is a lot more than I'm willing to pay). Plus, there aren't any cloud storage providers that I actually trust not to snoop around in my emails, or whatever.

Monday, November 1, 2010

Dogs and Cats Living Together

It's November again! Time for another round of NaBloPoMo. So I recently found out that NaBloPoMo is no longer just a November thing, but you know what? I sort of don't really care. It is a Thing I Do In November, and I don't see any reason to change. :D Plus, there's also the fact that it coincides with NaNoWriMo. By blogging, I sort of feel like a casual jogger tagging along with people who are running a marathon - I know that there are people (hi, Kiriska! :3) that are doing a lot more work than I am this month, but I'm going at a pace that I find comfortable.

In past years, I've written a post or two ahead, so that I'd have a buffer in case something unexpected came up and I didn't have time to blog. I don't think I'm doing that this year. First, it sort of feels like cheating, and second, now that I'm actually working I have a much more predictable schedule.

Anyway, to kick off this month, I'll write about an idea that's been knocking around in my head for a while now.



Everybody loves puppies and/or kittens! This is an Inarguable and Incontrovertible Fact. However, a lot of people aren't in a position to own a pet (particularly those living in college dorms), and others don't really have the time to take care of one properly. What I'm proposing here is really, when you get right down to it, just a way to let college students play with cute animals; therefore, it cannot possibly fail, and might even end up being profitable.

I'm envisioning a big, lounge-type room, with comfortable chairs everywhere, and lots of dogs and cats. (Thus, the name: "Dogs and Cats Living Together".) The animals would all be adopted from local shelters, naturally. There would be chewy things for the dogs to play with, and random structures for cats to climb around on, and all the furniture would be the cheap stuff because there's no way it'll last very long. People would be able to come in and play with the animals whenever they wanted, without any of the worries that come along with taking care of them, or cleaning up after them.

(So who would take care of all the animals? That's the beauty of it - I can't imagine that you'd have any trouble finding applicants for the job on a college campus, when the job description is basically "taking care of dogs and cats".)

As far as actually making money, there are a lot of ways. You could charge a few dollars at the door. You could sell snacks (for both humans and pets!) once people are inside. You could let people adopt the animals, if they really wanted to. There are merchandising opportunities - cat calendars are a dime a dozen, but a cat calendar where you can actually go and play with the cats in the pictures might be enough to set it apart, I dunno. And, as a last resort, you could train the animals to rob banks - wait, pretend I didn't say that one. >_>

Anyway, yeah! I think that'd be pretty neat.

Friday, October 15, 2010

The hardest thing is to go to sleep at night, when there are so many urgent things needing to be done. A huge gap exists between what we know is possible with today's machines and what we have so far been able to finish.

--Donald Knuth

That said, having programming as a hobby is sort of troublesome when you also program 9-to-5. So I think I need a new hobby, preferably one that doesn't involve computers in any way, and ideally one that involves me getting some exercise. >_>

Anybody got suggestions?