Saturday, 9 January 2010

Horrible Insights, also lots of Television

I hate it when I finally put two and two together and come up with a horrible insight into how my mind works, A.K.A. four.

Last weekend I was watching 30 Rock for the first time ever, it being about the only programme that didn't involve talentless dribblers vying to become Britain's latest America's Top Got Talent Model in the Kitchen.  After a couple of episodes I was deeply in love with Liz Lemon.

Smart, thirtysomething, geeky glasses-wearing brunette, what's not to love? Nothing really, except that I also have an embarrassing telly crush on Lisa Cuddy from House, M.D.

So, I have a thing for smart, successful brunettes (who in real life would never touch me with a ten-foot bargepole, unfortunately. C'est la vie), what's the problem with that?  It's got to be better than when I was in my teens and was magnetically attracted to any female with red hair, dyed or not. Everyone knows red-heads are craaaazy, man.

The problem is with the characters they both play.  They act as enablers, allowing their male counterparts to run around being idiots and horrible to people whilst protecting them from the results of their behaviour.  It seems that what I really look for in a woman is someone who will let me do my idiot nerd thang and rescue me when I get myself in trouble whilst giving me all the glory for my successes.

It's probably a good thing I'm single.

Friday, 8 January 2010

Out and About

Dear blog, today I went outside.

Running critically low of dog food, I finally plucked up the courage to travel the Arctic wastes in search of supplies.  

First came digging out the car. This took half an hour as I had to dig out the driveway and half the road, where passing cars had squished the snow into huge ruts that had frozen overnight into concrete-hard tank-traps.  I rapidly regretted my long standing glove-boycott when I lost all sensation in my delicate pink fingertips.  I regretted it a hell of a lot more when the feeling started to come back.

Next came getting into the car.  This turned out to be a problem as the locks were frozen solid. I couldn't remember whether or not pouring hot water all over the locks was listed in the manual under "ways to make your car not work anymore", so I compromised by using warm water instead.

Anyway, I eventually got in and started 'er up. Reversing off the drive was fine until I got to the icy pavements of wheelspin city.  I managed to creep back onto the drive and then reverse with a bit of momentum across the pavement and onto the road where I blocked the non-existent traffic for a while until I wheel-spun my way out of perpendicular with the road and into parallel.

My first port of call was the local DIY superstore for some Compression-fit Stop End plumbing goodness, along with plenty of Teflon tape. As I rumbled onto the car park, I passed a huge sign saying "NO GRIT, SALT OR SHOVELS!"

Next came some proper shopping. Plenty of dog food for the idiot dogs, plenty of idiot food for the resident idiot, some shampoo, some deodorant (Old Spice, because I was feeling sassy) and a big bundle of socks.  

I got home just in time for a sit-down and a cup of tea before a Telephone Interview with a potential employer, which went quite well.  Next came the plumbing.

A couple of minute's wrestling with an adjustable spanner and some pliers, and I had the burst pipe for the garden tap all fixed!  Well, fixed if you just count "not leaking" as fixed. The tap itself no longer works, but now I don't have to fill the kettle from upstairs and the washing machine works, so tomorrow should be Clean Clothes Day!

And that was that.  The only notable thing to report is that the BBC and other news sources keep blathering on about how last night was colder than at the South Pole, without pointing out that it's the middle of summer in the southern hemisphere. Seasons are wacky like that.

On the plus side, BBC 24's Wilds-of-Scotland correspondent is exactly the sort of lassie I'd be wantin' to curl up with on a winter's evening.

Wednesday, 6 January 2010

Big Fat Liar

The job hunting continues apace.  Today, I got all excited for ten seconds after receiving an email inviting me to a meeting with a company to discuss career opportunities.  Then I realised that generally, top-rank software engineering companies don't use AOL email accounts.

A few moments Googling revealed that the company in question is one of those silly multi-level marketing schemes, this particular one being based around the sale of Aloe Vera.  Now, aside from it being a miracle ingredient in hair care and skin products about ten years back (since replaced by Boswelox, Fraudulin and anything Nano-flavoured) and a way for me to annoy the hell out of a perky little test-lady called Vera back when I ran the Y2K test environment for North West Water, I have no idea what Aloe Vera is about, how to compile software for it, or if it tastes nice on Malt Loaf.  Why I'd want to sell it to other people is a mystery.

Actually, why I'd want to sell anything to anyone is a mystery.  When I was a kid, I used to make stuff up all the time, writing in my schoolbooks about how I'd had to parachute out of a burning plane that weekend, but I was all right now, how I was going to America for my summer holidays to visit NASA and fly the space shuttle for them because all their astronauts had the AIDS from being bitten by space-monkeys and so on.  This continued up into my teens when I finally found a legitimate use for my unbridled creativity (i.e. really unbelievable lies) in the form of the Pen-And-Paper Role Playing Game.

Yeah, computer nerd what played Dungeons and Dragons. What a surprise!

Surprisingly, I didn't play Dungeons and Dragons that much.  Mostly we played more modern or SF games as Fantasy games have Elves and Hobbits in them and Elves and Hobbits  (sorry, Halflings) are about the worst, most la-di-da hippy flowers-and-fairies nonsense ever; a teenaged me would probably have accused them of being gay, but I was an obnoxious little sod who hadn't actually met any gay people yet and have since matured considerably.  Anyway, the long and short of it is we preferred things with manly guns and rocket-ships which aren't at all Freudian symbols for anything, no-sir.

With all this healthy sublimation of my hitherto-uncontrolled creativity, I made a conscious effort not to go around telling lies any more, no matter how harmless. This turned out to be a wildly successful strategy for someone in a field that values accurate information above everything else and one I've stuck to ever since, honest.

It's a deeply ingrained part of my personality these days and frankly it's not without problems. Relationships are a nightmare, as you might imagine.  "Hey there, how about coming round to my place for a thoroughly unremarkable night that you're probably too drunk to be overly disappointed by?" is not the best chat up line ever.  Even assuming that a relationship gets past the first awkward encounters, any variation of the classic "Does my bum look big in this?" is basically Doomsday waiting to happen, although if I ever do find a woman who laughs at "Not compared to the Death Star, no" or "Why, are you seeing Sir Mixalot on the side?", I am probably going to marry her. Assuming she can cook.

One of the problems I'm having with honesty is in the jobs market.  No, it's not about my CV (which I think is ace, even if employers have yet to agree), it's to do with me looking for a temporary job in the meantime to pay for some C# or Java certification courses to help with the ol' prospects, since C++ for Symbian seems to be a dead end outside of India.  You see, most of the temp jobs round here involve sales, a career path noted for its reliance on a certain flexibility with the truth.  

Note to the hypothetical reader who is a salesman, outraged at my attack on his personal honesty: I don't think all salespeople are bare-faced liars; some will be, but the best presumably are able to use the truth as their main weapon with a little creative editing around areas concerning how much owning a slap-chop will really change your life.  

My problem is excessive honesty.  If I become a computer salesperson, for example, I would try to find out the person's needs, how much price was an issue and then sell them the computer that met those criteria.  Fair enough, but there's the concept of upselling, where you induce the customer to buy a more expensive item than they strictly need, or want.  Plus 3-year warranties and extra cables with gold-plated connectors.

Now me, I couldn't do that.  Half the time, I'd wind up talking people out of buying pointless and expensive things.  Or I'd be telling people the truth about how useful I think a 3-year warranty is on an bottom of the range, end-of-line graphics card.  Employers really don't like it if you're going out of your way to do the opposite of your job title.  "But they asked my opinion!" doesn't really seem to be an adequate excuse.

It never is.  Most people with opinions should keep them to themselves; at least, that's my opinion.


Tuesday, 5 January 2010

SNOW CRISIS 2010: SNOW HOPE

Someone out there likes me.  I can't think of any other reason that the weather pixies would send me so much snow last night; they want me to be happy and go outside to frolic in the winter wonderland which they have created.

Basically, I woke up to find the world covered in snow. Lots of snow.

Okay, not that much snow if you live in Greenland or Alaska or some such place, but if you live in the suburban jungles of Greater Manchester, six inches of snow falling overnight is more than enough to shut down the airport, the roads, the pavements and worst of all, my satellite TV.  

Seriously, how am I supposed to cope with being snowed in if I can't watch telly?  I can just taste the snow madness coming on.

My biggest fear about the current state of emergency has to do with the phone lines.  Somehow the snow has managed to stick to the damn wires and they're hanging precariously low.  Any moment now, there's going to be a horrible snapping noise and I'll lose my precious internet too.

Anyway, I've taken some pictures with my cellphone.  If they're any good I might post some of them.

Monday, 4 January 2010

Welcome to 2010

Four days in to the new year and I can tell that my run of terrible luck that lasted all through 2009 hasn't broken yet.  It's been achingly cold the last few days and last night I heard a horrible dripping noise in the kitchen.  A few minute's probing under the cabinets and I find that water is slowly dripping down past a pair of mysterious copper pipes that run from upstairs.  

This morning, I'm getting dressed in the kitchen (that's where Mr Tumbly-dryer lives and he has all my clothes) when I suddenly hear a horrible noise like the washing machine filling up, only from under the cabinets near where the dripping was.

Investigation shows that the dripping has stopped and that there isn't any obvious flooding, but that the strange noise seems to be coming from through the other side of the wall.  I hate to admit how long it took me to remember that there's a tap on the outside wall for running a garden hose.

Sure enough, the outside pipe for the tap has frozen up and burst.  Perfectly in time to make me late for going out.  Well, last night I spotted a pair of mysterious stopcocks under the cabinets, so I try turning them off for the sheer hell of it.  Happily, one of them turns off the outside tap, so the patio stops flooding and I can go out.

When I get back, I take a look at the pipe.  After digging through layers of bubble-wrap and lagging, I find that instead of the pipe splitting (which happened a few years back), the solder joint has failed in a way that looks like I might be able to fix it.

Assuming, that is, I find a way to afford pipe-soldering gear.  

Oh, and my car was a solid block of ice- the door seals had frozen up and it took me ten minutes to even get in.  I'm beginning to dislike winter.

Edit: The stopcock that turned off the garden tap also turned off all the cold water in the kitchen, which I found out when I tried to make a cup of tea.  I definitely dislike winter.

Duly Noted

From the small print on a car air freshener: "Air fresheners are not a substitute for proper hygiene practices".

Monday, 26 October 2009

I love Python

Today's distraction is Python and scripting languages, so non-programmers should probably go browse YouTube while the nerds get their freak on.

Back in the day when I had a job, I found myself assigned to a long-running major project that relied on lots of special scripts to help the build, validation and release processes. The problem was that the project was so long-lived that the people who had written those scripts had left ages ago and had taken their specialist script-writing skills with them. Since everyone else was so busy writing the project code, they had no time to spend on the scripts and besides, they were C++ wonks and treated the build scripts as magical voodoo that either worked, or didn't. Increasingly, they didn't.

As the project had grown, it had changed. Source code wasn't where it used to be. New types of resources were added in new subdirectories and the scripts weren't updated to process them. Additionally, poor design required stupid bodges like the source tree being subst-ed to a specific virtual drive on everybody's PC, or the script simply wouldn't work.

Shortly after I joined the project, I was asked to run the validation software over our source code, so we could send a report to the customer showing them how full of quality it was, which it was, it was just the non-deliverable scripts that we'd let ourselves down on. Anyway, I dug out the validation script, ran it and was rewarded with abject failure- the script couldn't find PC-Lint.

Digging through the script revealed a number of horrors. PC-Lint was installed on a single machine for licensing reasons (presumably) and was called remotely by the script. Problem was, the company naming scheme for PCs had changed since the script was written, so the script could no longer find the computer with PC-Lint on it. I fixed the broken link and realised that the machine with PC-Lint wasn't even a server, but was some engineer's desktop PC. Better still, the engineer had switched projects and as required by our security standards had wiped his PC and installed a clean image onto it, without PC-Lint. Where's the installation media for PC-Lint? Best ask our tech support people, they'll raise it as an issue on their magical issues database and ignore it.

The other major horror I found was the script itself; it was written in Perl. Perl is a wonderfully powerful language and I'd always wanted to learn it, so here was the perfect excuse... er, opportunity.

The problem was that I was trying to learn Perl by trying to fix a complex existing script rather than by writing my own stuff from scratch. Perl's philosophy is "there's more than one way to do it", which means that it makes very little demands on how the programmer writes his program. You can write very cleanly and elegantly, or you can write an incomprensible mess (like this post, but with more $, % and &). The code in question was very much of the second variety. Very clever code, but practically incomprehensible to any poor sod other than the original author. Great for job security, except that I collared the original author to have a look over it and he couldn't understand it either- too much time had passed between writing the code and re-reading it, he'd forgotten his original chain of thought.

I got it working eventually (after a certain amount of complaining from management that the other guy used to only take an afternoon and why was it taking me so long?) and delivered the report that proved how ace our proper code was, but after that, I started getting assigned all the script-fixing tasks by my team leader who unlike upper management knew exactly why it had taken me so long and why no-one else had run the script in over six months despite it being a weekly deliverable. Time and again, my mental gears clashed because all of a sudden the original programmer had suddenly used an unless statement instead of an if, which is even better in a one liner, because then the conditional unless is after the conditionally-executed statement...

Anyway, I began to wonder if there wasn't perhaps a better way to do things. A cleaner way. A way where an engineer could write a script, then six months later a completely different engineer could look at it and actually not have to spend the day flicking back and forth between the editor window and the language documentation, looking up obscure forms of use for common language features. Eventually, I looked into Python.

In contrast to Perl, Python's philosophy could be described as "There's one way to do it". Python code is generally a lot more readable than the average Perl script. Yes, you can write clean, readable Perl, but it requires discipline from the programmer that often isn't there. Generally, it's a lot quicker to get the gist of a Python program than for Perl, even for developers who don't have any background in either language (at least it was for the poor sods on my team that I tried my ideas out on). Sure, a lot of programmers will throw a fit at the idea that indentation matters, but if you threaten them with a really messy Perl script with plenty of regexp line-noise in there, they eventually give up and see things my way.

I rewrote a few of our Perl scripts in Python in my spare time and found that while a lot of text-processing tasks are easier to write in Perl, the Python equivalent is often more maintainable; six months later, I could still understand how the script worked. Perl makes for brilliant hacker-ish programs, Python can make for maintainable code, which is immensely important for a software engineering team, if you can convince people to get past installing yet another scripting language.