Wednesday, May 19, 2010

Nightingale in a Golden Cage

A nightingale in a golden cage
That's me locked inside reality's maze
Come someone, make my heavy heart light
Come undone, bring me back to life

Last night (monday) my actually unfinished 3-sat solver correctly identified as solvable or unsolvable every problem I threw at it. All...ten of them. Tonight I spent somewhere near three hours writing java code to unzip and untar files in memory because all of the benchmark 3-Sat problems from satlib.org were compressed, and I was on my windows laptop, and windows fails at compression (as well as everything else) and the copy of 7 zip I downloaded was...something weird was going on with it. Oh and I was also writing and debugging a .cnf parser. Cnf files are text files containing 3-sat problems and they decided to use "c" instead of "#" for comment lines. They also decided to have lines containing just a "%" which the website with the cnf specification didn't tell me about. I had a lot of fun running back and forth between my windows laptop with my broken cnf parser and my linux desktop that could actually read the files. You might be wondering why I didn't just work on the program on my linux box. I'm sure there was a good reason.

Also, by the way, none of the zip compression libraries for java (that I found) provide any useful means of answering the question "is this a gzipped file?" or "is this a tar file?" They expect you to know ahead of time. I searched for something like "java identify a gzipped file" and found nothing but websites enumerating various fallible file name conventions, with helpful tables for stupid people that contained entries like ".gz | this is a gzip file." Except that any idiot could rename a .png to a .gz, rendering your ignorant table invalid. So then I decided my test program just had to automatically and correctly identify the file type now matter what file I gave it, because that is like the bare minimum a good program would do.

But no one on the internet seemed to share that opinion. In fact if you googled for "java correctly identify a gz file" you might think the world was run by ignorant windows users. Apparently everyone else thinks its cool to just assume that the suffix in the name of the file is somehow related to its contents. Because idiots could never rename a file. So I started doing it on my own. I got about 90% through RFC 1952 when I decided that relying on the filename would be just fine.

So then I began testing my solver against real data. I gave it a score of known satisfiable problems and it told me they were satisfiable. Then I gave it a score of known unsatisfiable problems and it told me...they were all satisfiable. I was defeated by a tiny little file called uuf50-0218.cnf. Actually, its not that tiny. It has like two hundred lines, which I now have to analyze exhaustively to understand why it isn't satisfiable. It looks satisfiable to me. This problem involves 50 variables, which means using my algorithm to solve it by hand will requir about...125,00 cardboard boxes from staples. That can't be right. There's only 200 clauses in the entire file. Ok, so I'm going to need 200 boxes.

You could say I completely underestimated 3-sat. And I don't know why my approach doesn't work. I have to know, and more importantly I have to see it. This may require building some kind of 3d 3-sat exploration program that will project the hypercube into various sets of 3 dimensions, letting you navigatie it like a boolean version of Han Solo. "I solved 3-sat in less than 9 arc-seconds!" However, watching my dumb little program fail to solve what is probably every single problem in the sample unsatisfiable set was enough to kill my motivation. Maybe this will become like a hobby or something. I just need to learn how to excercise some modicum of self control when I think about this problem, and finish the part that actually prints the solution. On the bright side, this was less painful than pining after some girl.

In other news, my day job has suddenly become boring. I think I convinced myself that it wasn't boring before, for some combination of 3 reasons: 1) it didn't involve painful and frustrating projects with the worst code I've ever seen and wasn't allowed to fix, 2) I left almost all of my friends and various other hundreds of people that I actually liked talking to (or dancing with) and moved 2,000 nautical miles away to a city where the fucking people wait to cross the street even if no cars are coming and 3) people keep asking me how I like it out here and if I like my job, and I don't like telling them it sucks. Well, it doesn't suck but its very boring. From a computer science point of view, a lot of the code I work on literally does nothing. Nothing important. Like if you were going to write down the algorithm in math, you would have an empty piece of paper after skipping all the unimportant parts. Programming in large companies seems to drown you in the unimportant parts. We are shoveling data around, mapping from one poorly designed, legacy/deprecated/the-guy-who-wrote-the-code-is-gone data format to another. Or maybe I'm ninja-ing the existing, crappy design of a piece of software into what was a nice, new design for a piece of software because we can't get rid of the old one. Or maybe I'm scheduling "deployments" of this crappy messaging software that I'm supposed to manage that my team didn't write and has no control over, but which has the power to bring our system down. Then there's all the damn bugs in the system that I probably shouldn't be mentioning it here. Most of them involve some team we've never heard of making a major screwup, which is not detected until the data goes through a ton of systems and ends up at ours, and then blows up. There is a phrase for getting paged in the middle of the night because someone else's mistake broke your software, which you must keep running. We call it "operational pain." Another description that comes to mind is "bullshit." Also my boss is actively trying to get me to take more responsibility, and develop more cross-team interpersonal whatever skills, and like fifty other things that don't make me a better programmer--just a better drone.

This has caused me to ask the question: is there any substance on earth that can remove boredom? I drink a lot of caffeine at work so I don't fall asleep at my desk, but while it inhibits sleep it doesn't make anything I do more interesting. Every other mind-altering substance on the planet sounds like it would ruin my ability to concentrate.

Sometime I get to write code. But unless I'm working on some side project, as in, something I'm not supposed to spend time on but can get away with because I'm pretending to do it on my own time, then I have to be writing code using these ancient, overdesigned and poorly designed libraries with in-house developed tools that...well, they make Eclipse look like a good development tool. Imagine standing up a brand new service, and as soon as you run it, it starts spitting out, to the log file, a hundred useless and unwanted lines of crap per minute, and thats normal. So no, I don't like my job. 3-Sat has probably just made me hate it, in fact. I don't like staring at my screen wondering how this next piece of undocumented crap I'm supposed to use works. And the money isn't that great. I have about the same commute as when I worked in Philly, and I'm still breaking even money wise; the only difference is the federal government is stealing a higher percentage. I wish I could just take things from people. "Oh thats an awfully nice car you have there. I'll have a third of it. Nice house! My agents will be here in April to remove that south wing." I'd love to find out how all this tax money gets wasted, but every damn time I talk about politics with anyone, someone comes at me with some oddball claim I've never heard of that forces me to experience cognitive dissonance when their story contradicts everything I've ever heard on a subject. Oh, you think Cuba is a panacea of medicine fields? That's totally plausible. Or you're claiming some ridiculously bold conclusion about the Puritans/Pilgrims based on some audio book that conflicts with the history channel documentary I saw when I was up all night being sick from The Cheesecake Factory. Or you just trump me by taking the conversation to some minute cultural detail of a country I've never been to. Or you look down upon all religions, but you also look down upon other people that look down upon other religions, but you yourself believe in ghosts. Thats fun. I wonder if I could memorize a set of trigger phrases that could turn every conversation into a heated debate about something. I could be like a conversation ninja, darting from group to group of people, assasinating all non-useless discussion. I guess I really shouldn't complain; I used to read slashdot.

We played volleyball tonight as well. My team lost every game. I think if we work hard enough we may have a shot at being the worst team in the league. I actually just caught the ball once, after only two hits, because I didn't feel like flailing at it and sending it way out of bounds. My team didn't like that. Whatever. We lost anyway. Its depressing to realize that you are so bad you get intimidated when the other team has mastered fundamentals like bumping, setting, and not hitting the ball wildly out of bounds on your first hit.

Oh, and I walked by that dance studio across the street during one of my mad dashes into the outside world for some food. I caught a glimpse that one girl I was interested in. I think I called her red shirt girl here. Apparently she is still on that dance team thing. I'm not sure how this affects me. I was talking to one of my female friends out here after she'd had a bit of wine and discovered that I still lack the ability to determine if a girl is interested in me. I mean, I can determine if she's interested...just not in polynomial time.

No comments:

Post a Comment