Rohit's Realm - Computer Science

// / archive / category / cs

February 19, 2003

To Stress... Or Not?

My three day weekend concluded on a positive note, with Jim's second party, although it was rather harsh to have to go into work on Monday. After work on President's Day, two hours were spent in the computer labs in Cory, working on an EE 20 lab. I must say that I much prefer the Soda labs to those of Cory, despite Cory's computers being a hell of a lot nicer. I guess I have just grown accustomed to the Soda labs after my fun filled 40 hour weekends spent there during summer taking CS 61B.

March 11, 2003

Is There No Sacred Place Left?

Everywhere I go, I'm hounded by the self-righteous, incompetent political activists and in my eyes, their equivalent counterpart, the unfriendly, completely insane bums that traverse the streets of Berkeley, reeking havoc on all who dare to WALK in the city in which they pay taxes. I've grown accustomed to dealing with their shit on Sproul Plaza and now Dwinelle Plaza. I figure, it's my fault—I know this as a hotbed of morons and if I choose to walk through this area, in order to save time/energy, I take the implicit risk of being harassed by one of the freaks.

March 29, 2006

Condescending to the (Techno-Illiterate) Masses

Hi, my name is Rohit, and I am a closet elitist. There—I said it. Man, it feels so great to finally let that out. I know it might be hard for some of you to believe, especially since I spend so much of my time trying to conceal that fact, but it is true. And I am not just one of your garden variety I'm probably smarter than you elitists, either; oh no, I am something even worse. I am a techno-elitist.

February 01, 2007

On Madness and Gulliver's Travels

This might very well be the final evidence one needs to confirm that I have, in fact, totally lost my mind, but last weekend I had a long nightmare about Gulliver's Travels that actually caused me to wake up sweating. The catch: I've never even read Gulliver's Travels.

February 09, 2007

A Perl Programmer on Ruby (On Rails), Part 1

Having just put the finishing touches on my largest—and most time-consuming—personal project (i.e., V2), I have recently found the time to educate myself on the latest Internet fad (already ripe with a slew of ill-informed fanboys): Ruby and its Web 2.0 manifestation, Rails. The next few posts will document a staunch—some would say evangelical—Perl programmer's journey through the fog and hype of Ruby (On Rails).

February 13, 2008

A Programmer's Achilles' Heel

With all this recent talk about politics and social welfare, complacent readers may have been lulled into believing that the sun had (finally) set on mind-numbingly arcane entries laden with techno-babble that only my equally geeky homies from my days at Cal could enjoy (or understand)—and which pervaded this blog in its earlier years. Yet, nothing could be further from the truth: I am, first and foremost, a colossal computer nerd. And consistent with this blog's theme of highlighting its author's soul-crushing failures (both with women, and in life in general), today I will discuss my greatest failing as a programmer, or in other words, my proverbial Achilles' heel.

February 16, 2008

Barack on Sorting Algorithms

I am normally not a huge fan of posting videos (other than those produced over at 1524, of course), but for all the incorrigible (computer) nerds out there, the follow clip from Barack Obama's interview with Google CEO Dr. Eric Schmidt is awesome:

May 05, 2008

Stable Marriage and Information Failure in the Social Marketplace

Standing around at a bar last Friday night, sipping a dirty martini and semi-engaged in a lackluster conversation with some random woman I had met approximately ninety seconds earlier, I felt my thoughts drift almost involuntarily from trying to figure out whether she was attractive or I was hallucinating, to the Stable Marriage Algorithm and pervasive information failures in day-to-day existence. This is only one of the many reasons why I do not have a girlfriend.

October 17, 2009

Contemplations on Corporate Crime

For anyone who has been with me (and the wretched conglomeration of loneliness and despair known as the Realm) long, the knowledge that I am irrationally obsessed with criminality and lawlessness should not come as a surprise. Indeed, I have on two previous occasions forayed into the emerging field of lawlessness and economics (L&E for short), first in 2004 by considering the possibility of a career in selling smack, and then in 2008, by pondering the viability of an otherwise upstanding young gentleman1 as myself pursuing a life of computer crime. Today, I expand on these seminal works through a groundbreaking analysis of yet another excellent opportunity for those with lots of good ol' American ingenuity, few morals, and an uncompromising work ethic, namely financial crime.

September 13, 2010

The Decentralization Epidemic

In a previous entry penned some three years ago, I discussed paradigm shifts (in molecular biology and elsewhere) and more generally our inability to properly comprehend contemporary events for which we are present with the same analytical rigor we are able to apply to the past. (Schrödinger's Cat was also mentioned, but that's mostly because quantum mechanics is awesome.) In this post, I will cover a new paradigm shift of sorts that seems to be all the rage in fields as disparate as politics and computer science: decentralization.

At the outset, two articles appearing in the August 14th issue of The Economist must be considered. (And yes, I am a couple weeks behind due to the twin malaises of exhausting travel and overwhelming laziness, but bear with me.) The first is an article on latest developments in artificial intelligence and the second is one on the transformation of Britain underway since the Conservative–Liberal Democrat coalition took power. So, what does artificial intelligence based on hive algorithms and the devolution of power from 10 Downing St have in common? Everything, really. Allow me to explain.

September 24, 2010

Fun with Flex, Bison, and Friends

The past month has been particularly prolific for me, if this (worthless) site is any indication. I wrote more regularly in the last three weeks elapsed than I had in the past three years.

But the all-consuming dragon of existential angst that is a mainstay of my most trivial and farcical condition in this miserable life is not easy to slay. So in addition to readin' and writin', I have also been spending some quality time with a dear old friend of mine from a past life: the C programming language (not quite arithmetic, but close enough). It's hard to contemplate killing oneself when all your ire is directed at gcc.

In this post, I discuss a particularly pernicious bug that has plagued me into the wee hours for two days in a row with flex/bison. (Most of you, therefore, can safely skip this entry. But I warn you: nothing invokes the disaffection, misanthropy, or self-loathing for which this site is renown quite like computer science.) The problem and (hopefully) its solution after the jump.

October 24, 2011

Introducing LawTeX

Well, dear readers, it has been a long while—almost two months to be precise—and if it were not to ring utterly hollow, I might even be willing to apologize for my absence. But, as with many things in this (necessarily futile) life of mine, I am over apologies. Having last left you with a discussion of video games, moreover, I see no reason why I shouldn't mark my return with a discussion of something far more esoteric: LaTeX, or more specifically, the software I developed in law school to facilitate the use of LaTeX in a world dominated by (loathsome) WYSIWIG products. (That, by the way, would be the cue for most—if not all—of you to stop reading if you hadn't already.)

November 28, 2011

Recent Mod Perl Woes

I would imagine that most of you (insofar as there are any of you) who read this most miserable of blogs do so with some kind of feed reader. And as you should: the code running this decrepit site has not been updated in almost five years—an eternity in the Internet era. One problem with running such an old site is that when things break, they break badly. That was precisely what happened this past weekend when what should have been a routine security upgrade of my webserver (Apache) instead took out my whole web presence.

And while I'd like to say I have fixed things, alas it isn't so. I have merely hacked them so that they are again functional; a fix, unfortunately, is still missing. For anyone experiencing issues recently with Apache and mod_perl, I have outlined the issue below. (That past sentence, by the way, should be taken as a sign for most—or all—of you to skip what comes next.)

August 21, 2016

An Update (of Sorts)

Well, hello there, dear readers. It's been a long while, has it not? Nearly three years to be precise and, really, quite a bit longer than that (tepid book reviews hardly count). And while I primarily decided to return to this site after so many years to test that the bug fixes I implemented over the weekend were working, I thought I might as well also put out an update (of sorts) while I'm at it.

June 03, 2017

Learning the Hard Way: Postgres Recovery from the File System

There are some lessons in life that are perhaps better learned the hard way. That you should have a proper backup system for your data is not one of them. And it's especially not a lesson to learn the hard way when you have been building and working with computers for nearly two decades. But so it goes.

Earlier this week, I had a hard disk fail in one of my servers that doubles as my main workstation. It wasn't the first time I have had a disk fail (or even the first time one has failed in this particular machine), but it was by far the most damaging instance. For reasons that now escape me, I never bought a second hard drive to setup a RAID 1 mirror when I upgraded the system a couple years back (which I normally always do for this system), nor did I ever get my regular backup system running after the upgrade. Even more inexplicably, during that same time period, I went from using that machine solely for development to using it host my definitive photo database (described here).

So you can imagine how I felt when the computer refused to boot after an update. After several consecutive nights of staying up into the wee hours, I can say that I've almost brought things back to normal. No part of the process was pleasant, but by far the worst of it was trying to recover the Postgres database cluster from the file system because my database backups generated by pg_dump were too old.