This is a read-only archive!

46 Posts Tagged 'Windows' RSS

Clojure, SLIME, ODBC, SQL Server

I had a lot of trouble connecting to an MS SQL Server at work via Clojure. Java 6 comes with a JDBC-ODBC bridge which worked fine from a Clojure REPL at a command prompt, or from inferior-lisp in Emacs, but in SLIME it would hang every time I tried to connect and I'd have to kill Java. Couldn't for the life of me figure out why.

I got it to work eventually by using Microsoft's own JDBC driver, which you can download here.

Once you put the downloaded .jar file on your CLASSPATH (in my case, sqljdbc4.jar) you can connect like this:

user> (def db {:classname "com.microsoft.sqlserver.jdbc.SQLServerDriver"
               :subprotocol "sqlserver"
               :subname "//server_hostname;database=SomeDatabase;user=SomeUser;password=SomePassword"})
#'user/db
user> (use 'clojure.contrib.sql)
nil
user> (with-connection db 
        (with-query-results rs ["SELECT * FROM whatever"] (prn rs)))
... results ...

Posted for the sake of Googlebot and for my own future sanity.

June 26, 2009 @ 4:27 AM PDT
Cateogory: Programming

Internet Explorer 8 Review

I installed Internet Explorer 8 today. I need it to test the websites at work. I couldn't care less if my personal sites render properly in IE at this point, but I must accommodate people at work.

I should mention right off the bat that given the way Microsoft takes a dump all over web standards and the hours and hours of grief as a web developer trying to get sites to look proper in IE6, unless IE8 crapped gold nuggets every time I clicked a link I don't think I'd like it.

Installing

I wasn't disappointed. IE8 is hate-worthy. A steaming pile of offal. First there was the joy of trying to install it.

Why does installing a web browser require checking my computer for "malicious software"? Why can't I opt out of this? In any case I didn't have to worry about it, because the first time I tried the install, it bombed before it got that far, and demanded that I go to the Windows Update site and install some patch for IE7 before I could continue. Note: I don't have IE7 on my computer. This is a work machine that I kept IE6 on for testing our company websites. This blew my mind.

So I tried to download this patch for IE7, but I couldn't, because I had to get Windows Genuine disAdvantage first. Rage filled me at this point to the point of overflowing. If it was my home computer I'd have stopped right there. But I need this garbage for work, so I held my nose and did it.

Of course the patch required a reboot. Reboot #1.

Now I was able to continue with the install. A slow, plodding download; I think it took 5-10 minutes to do its thing, but it's hard to tell. There was no progress bar to show me how far along it was, nothing to tell me the elapsed time, no indication how large the files were that were being fetched. There is something resembling a progress bar, but it doesn't actually show you much in the way of "progress". Instead a little green thing bounces around like the car from Knight Rider. How much cocaine do you need to imbibe to invent a GUI like this?

Of course IE8 itself required a reboot. Reboot #2.

Why? Installing Firefox and Opera don't require reboots. They download as self-contained .exe installer files. I run them and software appears. This is 2009, for the love of God. Maybe in 20 more years Microsoft will finally manage to re-invent emerge or apt.

The IE8 install, including patching and reboots, took me 45 minutes. If I had to do this on more than one machine, I'd probably jump out the window. How much time have you sucked out of my life, Microsoft? To compare, I decided to install Opera. Opera took less than one minute to download AND install and didn't require a reboot.

Features

When you first open it up, it sends you through a wizard and asks you if you want to enable a bunch of crap. I said no to everything. What the hell is an "Accelerator"? I assumed it was something that tried to make web pages load faster, like the download accelerator scams you used to get popups for all the time in 2001. So I said no.

Turns out "Accelerators" are plugins. Why didn't they call them Plugins? Did some marketroid decide "plugin" wasn't EXTREME enough, so decided to make up their own word? Why do I have to relearn the English language every time someone releases new software? Not Invented Here syndrome?

Windows tried to default me to Live Search, but I give it credit for being upfront in allowing me to turn that crap off and use Google. (No doubt thanks to US anti-trust court proceedings.) 473 wizard dialogs later I had a browser.

The next thing I noticed is more lame attempts to push more Microsoft services at me. In the URL bar every time you type anything, you see this:

Awesome. Is there any way to remove this spamvertisement other than installing Windows Search? If I planned to use IE8, which I don't, I imagine I'd inevitably click that by accident, which is probably the whole idea.

IE8 also added a bunch of useless garbage to my bookmarks toolbar which I insta-deleted. Or tried to. My favorite feature of IE8 by far is this one:

Apparently deleting things from the bookmarks toolbar is just too much for a modern 4-core CPU to handle. Congrats Microsoft. Hang, crash, boom.

There is no menu in IE8 by default. No wait, there is a menu. It's just in the wrong place (lower right side of the top browser area), and instead of readable text it's mostly unlabeled buttons with tiny arrows next to it.

It's like a traditional menu and a fun mystery novel combined! What is in the dropdown next to the house? I'm sure it's a fun surprise.

And actually you can get the old menu to appear too, if you press Alt. Insanity. But it doesn't appear at the top, it appears under the URL bar. One of the few arguably good things about Windows is that programs have consistent GUI parts and work the same way: they have a menu at the top, it's always in the same one place, there's a File and an Edit, and it's predictable. Thanks Microsoft for getting even that wrong.

When I highlight text on a web page, a little blue thing appears that I think I'm supposed to click on. The icon is a bunch of lines and squiggles and an arrow or something. There's no indication what that thing actually does. I clicked it out of curiosity and get a menu full of a bunch of random options like "Search for this". I think this is where ACCELERATORS are supposed to pop up, or something, who cares?

Fonts in IE8 look fuzzy. As a bonus, after installing IE8, fonts in a bunch of other programs (Outlook) are fuzzy now too. Hurrah! IE8, like its predecessors, apparently extends its tendrils into every nook and cranny of your system, corrupting and perverting as it goes. Maybe that's why it needed to reboot my computer twice to install it.

IE8 comes with a Firebug ripoff, which is better than View Source invoking Notepad, but took a full 2 minutes to load when I tried to open it the first time.

IE8 does render my blog properly, which is good. IE7 does too, I think, I only tested it once. I'm not losing sleep over it. Thank you Firefox and Opera: if you didn't exist and put the pressure on, we'd all still be using IE6 and I'd still be writing all my web pages twice to make sure they work in Internet Excrementplorer. As much as I detest IE, if people migrate to IE8 from the shard of utmost evil that is IE6, I'll be happy.

March 20, 2009 @ 5:35 PM PDT
Cateogory: Rants

Interview with a new Linux user

After countless, endless hours of nagging on my part, my girlfriend finally put Linux on her laptop. I thought it would be interesting to hear what a long-time Windows-using non-programmer thinks of Linux (Kubuntu in this case) after a few weeks of use. So I interviewed her. Read on. My thoughts and conclusions are at the end.

Q1: How would you describe your level of expertise or skill level when it comes to computers in general?

A: I think I'm better with computers (at least Windows) than the majority of my classmates (I'm starting third year accounting next week). I know my way around the internet, I'm decent with programs like Office and GIMP, and I know how to fix most problems that affect me as a lay user. As for Linux, I would know how to look for help, but I probably wouldn't understand it yet.

Q2: You used Windows for a long time in spite of my constant pestering. What kept you from using Linux until now?

A: A few years ago you tried to get me to use Gentoo. I was younger, and apparently Linux in general was more difficult to use, so I got frustrated pretty quickly. A lot of my reluctance was from remembering that time. I was also worried that I might do something wrong and lose all my schoolwork. At least in Windows I know it wouldn't be directly my fault if that happened (disregarding the fact that I'm slow at backing things up).

Q3: You decided to use Kubuntu. Why did you pick that distro instead of another?

A: I heard it was easy for Windows users to pick up. It's also the one you have on your laptop, so it's easier to get tech support.

Q4: Why did you pick KDE instead of Gnome, XFCE, or some other desktop environment / window manager?

A: I don't remember. Something about having multiple wallpapers on multiple desktops and being able to make them change randomly whenever I want. There might've been other reasons, but that one is the most enjoyable so far.

Q5: How hard was it to install Linux? Compared to Windows?

A: It was about the same.

Q6: How hard was getting everything set up the way you like it after Linux was installed? How long did it take you?

A: There's always a lot to set up on a clean install of anything. It took me a few days to find something I'm comfortable with. I mostly just ripped off your setup because I liked it, though, so that made it a bit easier. Getting SKIM to work was quite difficult, though, since I couldn't find good instructions for my version of Kubuntu (or Kubuntu at all, really). I think I just ended up making you fix it.

Q7: Does Linux have any features or applications you really enjoy, that Windows is missing? Can you do anything in Linux that you couldn't do (easily) in Windows?

A: Even just doing a small amount of image editing yesterday, I'm beginning to see the appeal of multiple desktops. I also like how easily it's detected various wireless networks so far. The package manager is pretty nice too. I wouldn't have a Gmail checker if you didn't write one for me, but the one you wrote is better than the one I was using before.

Q8: Do you miss anything from Windows? Is there anything you could do in Windows that you can't do (easily) in Linux?

A: It's easier to install programs in Windows than it is to install non-package programs in Linux. I still don't know the difference between a source and a binary. I don't miss playing games too much, since I'm more of a console person. But I do miss OtaClock. The default clock is boring and not cute at all.

Q9: How comfortable are you with using a command prompt?

A: Not very. I know how to chmod things, but that's about it. I need to look for a guide for basic bash commands that explains them in plain English.

Q10: How do you like the general look and feel of the Linux desktop compared to Windows?

A: It's a lot nicer looking overall. I like being able to use all the Buuf icons easily. At first I was resistant to using anti-aliased font, but it's growing on me. Windows displayed aliased fonts so nicely, and I still kind of miss it.

Q11: You have a dual-boot set up. What do you still plan to use Windows for?

A: I have a couple games that don't work in Linux. I also use my laptop for school, and my university is dominated by Windows, so I feel comfortable having it around for compatibility purposes if I ever need it.

Q12: It's been a few weeks since you switched to Linux. How has it been overall? Do you plan to stick with it long-term?

A: Overall it's been about the same as Windows. Something about Vista still creeps me out, so it feels good using an OS that doesn't feel evil. I like being able to get pretty much any program I want free and on demand.

Here are some Linux programs I know you've used... tell me something you like and something you dislike about each one.

  • Dolphin It's minimalistic, but it doesn't have the view options I like.
  • Konqueror I can get all the info on a file that I need just by mousing over it. It took me a while to figure out how to both display thumbnails and then sort them by size or date, though. I'm quite obsessive about collecting and sorting pictures, and in Windows that was how I used to see which pictures were new or duplicates.
  • Gwenview It finds duplicate pictures for me, making the above method obsolete. It even finds similar pictures, which is pretty intersting. So far I can't think of anything I don't like about it.
  • Amarok Win-B is my friend. There's too many unnecessary features for me, though. I don't care about album art or smart playlists. It's good that I can just ignore them.
  • Kopete It has custom themes. I really like the Metal Gear theme you made. For some reason I can't figure out how to make our text different colours, though. The text is different for my friends who use the real MSN, but for you it's the same colour is mine, so it's harder for me to read.
  • Kate It's like tabbed Notepad. I'm one of those people who actually likes Notepad, since I don't do much coding at all. I can see where Vim is better, but Kate is fine too.
  • KDE as a whole When it's set up properly, it looks really nice. The amount of stuff I needed to change to get it to look nice was quite overwhelming, though.

Thoughts and conclusions: I used to try to push Gentoo on people, and that was a mistake. Gentoo isn't for everyone. A bad experience can kill people's opinions of Linux.

It's a lot easier to make a big switch to a new operating system when you have knowledgeable people to back you up and help you out. This is one area where Linux shines: There are a LOT of people willing to help newbies. The community aspect of Linux is by far one of the best parts of using it. We're all doing this because it's fun and Linux people like to share the fun with others.

Is Linux ready for the desktop? I think so; I think it has been for a while now. A Windows power-user can find a lot to like in Linux. There are a lot of features and apps in modern desktop Linux that offer a lot of things many people would find very appealing if they only knew they existed.

August 30, 2008 @ 2:53 PM PDT
Cateogory: Linux

Stupid Vim trick (and mental illness)

The OS on my first computer was Windows 3.1, and I lived with Windows 95/98/ME for a long time. When you live their formative years in this kind of environment, you develop an obsessive need to save your work all the time, because at any moment, the program you were using could crash. With Vim, a save is just a :w away. I hit that combination so often it's a wonder I haven't worn a hole through my w key yet. It takes no effort or thinking at this point, just a quick reflex flick of the wrist.

Did you ever wonder just how often you save your work in a given day? I wondered, so I put this into ~/.vimrc:

cabbrev w <c-r>=(getcmdtype()==':' && getcmdpos()==1 ? 'W' : 'w')<CR>
command! -nargs=* W :execute("silent !echo " . strftime("%Y-%m-%d %H:%M:%S") . " >> ~/timestamps")|w <args>

Now every time I do :w, it will append a timestamp to a text file. It's not quite perfect and :w won't work right in certain cases but it was good enough for a quick hack.

I let Vim go like this for one whole day at work. I got in a good six and a half hours of coding on Tuesday (keeping in mind that I was using other programs all day too, messing with our DB, running and debugging the script I was writing, responding to emails, and so on).

It turns out I hit :w 356 times that day. Here's a chart of saves per hour.

Saves per hour

Clearly either my productivity or my data-loss paranoia increases as the day progresses. I think I got up to make a cup of tea at around 2:00 so that may explain the fall-off. And the last hour isn't quite a full hour of work because I went home.

So as a rough estimate, it looks like I save my work about once per minute. Looking at the data, it's not at all uncommon for me to have saved my work twice within a 5-second period of time. There are even a few cases where I saved twice within two seconds.

July 10, 2008 @ 9:48 AM PDT
Cateogory: Programming

Cool feature in Vista

Vista has this really cool feature. When I log in to work via VPN and then close my laptop's lid to put it to sleep, when I open the lid later, I get the CTRL+ALT+DEL login screen as normal, except that my mouse cursor is now invisible! If I can somehow manage to position the invisible mouse cursor over a button, let's say the one to shut the computer down, and I click it, Vista says something about not having enough memory to perform that operation, and crashes or hangs!

Oh wait, that's not a feature. That's a big hairy stinking bug. My mistake.

June 01, 2008 @ 3:05 PM PDT
Cateogory: Rants

FAT

I had to undelete someone's files from a FAT partition today. My first thought was to use good ol' Windows to do so, given that Windows is the unholy ground which spawned FAT to begin with. I remember there used to be an UNDELETE command of some sort in some old version of DOS. But this doesn't seem to exist in XP any longer.

There are however lots and lots of third-party "shareware" programs which can do this kind of thing, as Google reveals. There is in fact an overwhelming number of such shareware programs. Most of these programs are total crap and cost around $30. One program required me to burn a CD and reboot my computer from the CD before I could run it. Many of the programs "intelligently" scan a partition looking for chunks of things that look like JPEGS or WMVs. I tried a few "demos" before I gave up, not having an hour to waste finding the one program that would work. Thus bringing the current score to Windows: 948, Brian: 0.

Instead I brought the drive home and plugged it into Gentoo and used this post as a guide. I dd'ed the partition to a file, fscked around with it a bit, mounted it via loopback, and had my files back. Took 10 minutes, and worked as expected. And it didn't cost me $30.

The moral of this story: I need to burn a Knoppix disk to take to work with me.

My only quibble is that I can never ever remember what Gentoo package contains fsck.vfat. Note to self, it's dosfstools. I can never think of the search terms even to locate that package. I had to google it.

May 05, 2008 @ 10:13 AM PDT
Cateogory: Linux

Windows Vista: Offal

It took me a while to think of a good word to describe Vista in the title for this post. I went with offal because "the parts of a butchered animal removed in dressing; viscera; refuse; rubbish; garbage" at least approximates the smell of Vista somewhat accurately.

How can Microsoft so consistently make such garbage-quality software? It's not like I'm looking for things to hate. I really wanted Vista to be sort of good. Heck, I had to buy a copy of Vista for work, and I don't like thinking that I wasted my money. I'd love to love Vista. (If not for the fact that spending money on Windows helped me get jobs that more than made up for the price of it, I would definitely consider myself to have lost money.)

But no. Here are the things about Vista that annoyed me, JUST TODAY, during the two hours it took me to backup my files in preparation for installing a dual-boot of Ubuntu on it.

  • The mouse speed when I use my trackpad in Vista is about 800% slower than when I use a USB mouse. I can't figure out why. This problem does not exist in Ubuntu, where both work fine and at the same speed.
  • About once every second, Vista accesses my hard drive. I hear "click"... "click"... "click"... "click"... incessantly forever. I don't know what running process is doing this. I killed everything I could think of. I turned off indexing of my files. I thought it was the Sidebar for a while, but nope. Still it does this. Lo and behold, the laptop doesn't do this in Ubuntu. What the hell is Vista looking for on my hard drive all the time? How much has my HD's lifespan been reduced by this?
  • I tried to burn a DVD to back up my files. A popup bubble near the taskbar told me I had files waiting to be burned. It's a good thing too, because the enormous freaking window where I was dragging and dropping files wasn't enough of a reminder. This reminder bubble kept appearing, disappearing, appearing, over and over and over. I don't know why. When I say "disappear", I don't mean instantly disappear. I mean a slow, sluggish, jittery, gratuitous fade-out animation which clearly left Vista out of breath due to the struggle of the demanding computational feat of displaying a 100x200 pixel transparent rounded window.
  • Vista failed to burn the DVD, without giving any error message other than that "burning failed". Then it told me to insert a new disc. I did. It made some noises, spit it out, and said "No disk inserted, please insert a disc". I tried 3 blank DVDs and all were rejected. I used Roxio in Vista and it worked OK (on the first DVD I tried to begin with), though Roxio itself is trash and was filled with links to get me to "Upgrade" (probably spend money; I didn't click them). (It's been YEARS since I've had a problem burning a disc in K3B. I'm using Gentoo for God's sake. I compile my own kernels and have to pick my device drivers from big lists of things I don't even remotely recognize. Think of how many things I could've done wrong setting up Gentoo that would prevent my DVD burner from working. I'm practically BEGGING it not to work here, and yet it does.)
  • Every time I rebooted, Vista reminded me again that I had files waiting to be burned, until I double clicked the DVD icon in Computer and deleted the ghost-files that appeared there in spite of there being no DVD in the drive. Once the last ghost file was gone, Vista immediately asked me to insert a DVD(????).
  • I used Vista's built in sucky Disk Manager to resize my Vista NTFS partition to make room for Ubuntu. It would only let me reduce the size of a 100GB partition by 30GB, even though 80GB were free in that partition. Googling reveals that this is a well-known limitation of the Disk Manager. Because Vista is a well-known piece of feces. I am actually one of the lucky ones, apparently. For many people, Vista just flat out refuses to resize a partition at all, regardless of how much space is free. If not for the fact that Ubuntu only takes 2.5GB fully-installed (including my boot partition, OpenOffice, Firefox, Gimp, and TONS of needless packages Ubuntu provides by default) I might be in trouble.
  • While trying to make a backup of my files, I noticed that one of my folders had a random empty My Music subfolder in it. This folder didn't appear when I looked in Explorer, but it appeared magically in certain other file selection dialogs. Apparently my laptop is haunted by evil spirit folders, attracted by the pure evil that Vista radiates in all directions.
  • I tried deleting a folder full of music files. As always, this stretched out into a 10-minute operation. Eventually, Vista dramatically warned me about deleting desktop.ini because, as we all know, it's VITAL to the workings of my system. I told it to delete it. Then it warned me that some of my folders were too big to fit in the recycle bin and would have to be deleted immediately instead. Gasp. I told it OK. Then it told me that one of my music folders was shared, and deleting it would stop it from being shared. You don't say! How this folder became shared, I do not know; never have I accessed this folder from another computer. I told it to go ahead and delete it. Then it repeated this warning about sharing, for the next folder. And then again, FOR EVERY SINGLE FOLDER I WAS DELETING, one by one. This is all with User Account Control DISABLED. If I had it enabled I'd be sitting there clicking OK in prompt after prompt until tomorrow morning. Eventually I went to DOS and tried rmdir /s /q *. This didn't work, I believe because it couldn't find a folder called "*". So I had to rmdir /s /q each directory manually. Thankfully Vista's tab-completion is gimped enough to make even that more difficult than it should ever be.
  • All the while, I experienced random lag and slowness and horrible pain. This is such a standard problem in Vista that it's almost possible to forget that the lag exists, until you boot into Linux and see how stupidly fast your computer runs in comparison.

My coworkers report that some people at work who got new laptops and requested Vista are having such problems that the laptops are almost unusable. Apparently 1GB of RAM isn't enough. If my computer is any testament, neither is 2GB.

When I got into Ubuntu for the first time, I immediately noticed that the latpop FLIES. Which is to be expected with a fairly new Core 2 Duo machine with a fairly nice video card etc. etc. Amazing. I even put big fat bloated Compiz on here running on top of big fat bloated Gnome, with all kinds of ridiculous desktop apps and file-indexers and God only knows what else Ubuntu is throwing at me, and it still runs perfectly. Only thing that didn't work out of the box was my wireless card, which took me 15 minutes of googling to find an easy solution for. (For googlers: Dell Vostro 1500 is my laptop. Ubuntu works on it perfectly well.)

In three years when Microsoft releases their next stinker OS, I'm probably going to be forced to buy that one too. The joys of a world where everyone uses Microschloft Office.

March 10, 2008 @ 4:13 PM PDT
Cateogory: Rants

Stable like a two-legged chair

We got a new laptop at work with Windows XP. Our company like so many others wouldn't touch Vista with a 12-foot pole. Not sure how much good that policy is doing us; I got three BSoD's in 15 minutes. Thanks, Microsoft!

Yesterday one of my coworkers asked me to look at her laptop. Power was on, but there was a nice black screen and no response from mouse or keyboard. I put it out of its misery and rebooted. Thanks, Microsoft!

Couple days ago, I turned on yet another laptop and was greeted with some kind of "RESUME FROM HIBERNATION FAILED" message as the laptop froze. Took it out back and shot it and rebooted. Thanks, Microsoft!

I came in to work this morning and my desktop machine gave me a screen on which my desktop wallpaper showed, my mouse cursor was present and responsive, but there was no login window. Wouldn't respond to keyboard commands, CTRL+ALT+DEL, ALT+F4, nothing. I ended its life and rebooted. Thanks, Microsoft!

I ended up teaching everyone at work the "If your computer is completely unresponsive, hold the power button down for 10 seconds" lesson. How sad that this should be necessary. All of our machines at work run XP and are kept quite up-to-date on patches. Some are old, some are new, and they span a wide variety of brand names and hardware configurations. Our IT guys seem very competent and on top of things. And yet, the computers are fickle and crash-prone and I often hear complaints about how unresponsive and unreliable they are.

February 13, 2008 @ 4:41 AM PST
Cateogory: Rants
Tags: Windows, Rant

A rant about rants

I was just working on an Access DB, and I noticed that it's now somehow 415 MB. Want to know the funny part? There's no data in it. Not a SINGLE ROW. Just two EMPTY TABLES. HOW?! Someone was paying me to do this as a side-project, and I'm going to have to tell them tomorrow that I've completely and utterly failed. I simply cannot get Access to work. There are two possibilities as to why: either Access 2007 is a piece of garbage, or I'm an idiot, and I don't think I'm an idiot in this particular case.

Having gotten that out of the way: if you read through a few posts in this blog, you'll probably quickly come to realize that my blog is approximately 97% rants. In this case it's about something I truly hate (MS Access). Most of the time I'm really just being silly. I don't really hate Emacs or Python or most of the other targets of my ramblings. They're well-developed, useful, successful open source projects.

I have to hope and pray that most other people feel the same way. Even people who participate in the infamous Vim vs. Emacs wars or the Linux distro wars or the Ruby vs. Python vs. Perl wars or whatever, even those people I think would admit that deep down, they don't really hate the opposition. I really hope that's true. (Except in IE vs. Firefox/Opera/anything else wars, in which case yes, IE deserves to burn in web browser hell for all eternity.)

Why the rants then? For me, it's because I have a love-hate relationship with computers. I think that anyone who spends a lot of time dealing with them eventually will end up feeling the same way too.

Imagine a carpenter who is forced to use a hammer that on 19 swings out of 20, misses whatever he's aiming at. Or the head flies off and hits him in the face. That's the process we go through as programmers every day.

We put spend hours and hours training ourselves to be good programmers, bending our minds in all kinds of pretzels, learning the minute esoteric details of exactly how to write and format code in some programming language so that not a single character is out of place. Then we put forth all kinds of thought and effort and creative energy to produce something useful and powerful and maybe even a little bit artistic. And then we try to run our shiny new program, and we're treated to a screenful of "WRONNNNNNGG! SYNTAX ERROR!!!!!! UNDECLARED VARIABLE!!!!!! CORE DUMP!!!!! UNHANDLED EXCEPTION!!!!" Over and over and over, eight hours per day (at work; more at home at night if I'm in the mood).

Some people can deal with that, and some people can't. I've seen non-programmers try to do something as simple as write a web page in HTML. I'm not surprised at how quickly the task reduces most people to foaming-at-the-mouth, frothing, psychotic rage.

I've long believed that it takes a special kind of personality disorder to be a programmer. It takes an obsessively over-active attention span and a willingness to subject yourself to a very mild yet unrelenting form of mental torture. It's not that programming gets any less frustrating. It's that we learn to accept and even welcome the pain of it. Most good programmers I've met are a cynical, sarcastic, somehow cheerfully pessimistic bunch.

So at some point after the seventh or eighth hour in a row of non-stop code-writing, it's no longer about solving a problem or having fun. It's about revenge. Anger and hatred take over as motivation. The problem is simply going to be solved, even if I have to rip the computer apart with my bare hands and divine the answer on its entrails. Picture Office Space, a couple of geeky guys going out into the field with baseball bats and letting the printer have it. Everyone who's written substantial amounts of code knows exactly what that's like.

Yet at the end of the process, having experienced failure after failure after failure, eventually there will come a point where you hit Enter, and against all expectations, completely by surprise, your program works. Glorious streams of correct output flash across the screen. Is that moment worth all the anguish to get there? It must be, because I keep doing it.

I think in the end I do love programming. I'm lucky to have a job where I can do it every day. At the same time, if you ever come into my office and I'm curled up under my desk in a fetal position, laughing maniacally, try to look the other way.

December 16, 2007 @ 7:51 PM PST
Cateogory: Rants

: (

I'm working on an Access database for work using Office 2007. This is probably the most painful thing I've had to do in a long, long time. Oh the things we do for money.

Do you want to know how to get Access to crash? Step 1: Add a label to a form. Step 2: Delete it. Step 3: Try to undo. Crash.

Here's another way. Step 1: Add a bunch of text fields. Step 2: Highlight them all. Step 3: Click this big "Control Padding" button. Step 4: Watch the applicaiton hang, then put it out of its misery.

Did you know in Vista when you crash an app, the "fatal error" popup dialog box gives you a helpful option to restart the app? See, Microsoft anticipated the problem of instability, and gave us a fix. What more could you want?

I added a bunch of fields to an Access form, and they all auto-appeared stacked directly on top of each other. I tried to auto-size some text fields via some cryptically named "To Fit" button, and it made them all 1000 pixels wide, with 1000 pixel wide labels beside them. I think they're trying to boost computer monitor sales.

I accidentally added too many columns while designing a table (there's a limit to how many columns can appear in a table, and it's not hard to hit). So Access wouldn't let me save the table. It started complaining about there being too many indexes on the table. Then it just complained about there being too many columns. I started deleting columns. It still wouldn't let me save because it thought some of the columns I deleted were still there. I deleted almost all the columns but it still wouldn't let me save it. I had to delete the whole table and start over.

There's this thing on the left that's supposed to list your tables and forms and queries. It took me 15 minutes to figure out how to get it to show all three of those things at once. The menu that lets you pick what to display is like some kind of sadistic logic puzzle with no answer. Picking one option suddenly makes a bunch of other options disappear or rearrange themselves. Some things in popup menus look exactly like options but are unclickable.

Really it's like every single minute part of the Access GUI was specially designed to behave differently than every other part. It's like they didn't have a widget toolset to pick from so everyone made up their own widgets. I honestly couldn't make something this hard to use if I tried. But Microsoft has billions of dollars of resources to throw at the problem I guess.

Buttons on the magic ribbon are sized according to how important they are, I guess:

The huge labeled "Logo" button on the left adds a pretty decorative icon to the top left corner of the form. The microscopic button last thing on the right lets you view and edit source code for the form.

I just noticed that my "Form Footer" actually appears ABOVE my form right now. ...I'm speechless. (I'm actually not speechless. I'm sitting here cackling madly, on the brink of losing my wits.)

Make it stop hurting. Why won't it stop hurting?

November 25, 2007 @ 11:05 AM PST
Cateogory: Rants