Prometheus has it easy   Leave a comment

If you think there are no uninteresting things then I might have a job for you.

Tuesday the 17th was a very tedious day.

The cause of this was work. I had a thing to do that was almost purely UI based, and I hate UI coding. The actual problem was changing a single field in a specific record in the database. The field was a number, and could be either negative, zero, or positive, depending on what it represented. The code that does the work is all of eight lines, and the SQL is straight up UPDATE [table] SET [field]=[newvalue] WHERE [primarykey]=[keyvalue]. Easy.

Well, kinda. That code solves the problem, but to make it do anything you need to build a UI for it. And there be the rub.

Drawing such a simple UI isn’t much of a problem; a few text- and combo-boxes, some option buttons, a clicky button; not even I can get it too far wrong (except forgetting to fill in the tab stops properly. I never remember them). A bit of drudgery, like drawing without any kind of fun or interest or worth, but it only took ten minutes. Once I finally stopped putting it off, anyway. Alas, it still doesn’t do anything.

And it won’t do anything, until you write the code that wires it all up. This is the really tedious bit. It’s not hard in any way; hard things are often quite interesting, after all. And if it were just typing, that wouldn’t be a problem; I’m not the world’s fastest typist, but can get by at something like twenty or thirty words per minute, even in somnolence. Really concentrating, I peak at seventy or so, assuming I’m not having to think at all, and that’s the problem. Writing UI code has absolutely no challenge or problems to solve; it’s all just making sure the right buttons are enabled, the lists contain the right data, and VB’s crazy event system isn’t causing things to happen more often than necessary. But this makes it require just enough brainpower to be mentally painful. Mind-numbing doesn’t cover it. It’s more like a sharp ache inside your skull, as if something were boring (pun intended) into your brain.

And this means that anything is enough to distract you from it. Never mind the web or the radio; I was literally staring at my wall in order to avoid writing any of that tedious, pointless rubbish. The wall’s surprisingly interesting, when you pay it some attention.

In the end I did it. It took until one in the morning, and far too many sweeties, but it was done. On top of the 110 lines that define the form, there are 120 lines of code. Just to change one number. Ugh.

If people would just learn some simple SQL this rubbish wouldn’t be necessary, and maybe I could write some code that actually did something occasionally. An algorithm, perhaps. I’ve not written one of those for work for… Months, at least. Years, maybe.

Greek myths written today wouldn’t have boulder-pushing and liver-pecking as punishments.

Anyway, while I was avoiding doing work, Mum visited and dropped off some ham. She’d cooked one leftover from Christmas, and they’d got sick of eating it. So at least I had something tasty for dinner. And I went to the gym, figuring that not only wouldn’t I get any work done there, but I would also get some exercise, making it twice as efficient as staying at home.


Posted 25 January 2012 by Colthor in Diary

Tagged with , , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s