Friday 22 January 2010

Ruby Newbie

I've just started looking at Ruby and I'm rather liking what I'm seeing, at least from a grammar-and-syntax point of view. This is probably partly due to me being an old C++ head and the object-orientation features of Ruby are quite close to those of C++ and Java.   Python is less strict about certain features like private inheritance, data hiding and encapsulation, which it doesn't really support, assuming that you the programmer are sensible enough not to stick your fingers into the whirring machinery of an object's gleaming guts.

At the moment, there's only two annoyances.  One is the performance, which for Ruby 1.8 is rather poor even compared to other dynamic languages like Python (Ruby 1.9 has a different runtime environment and is supposed to be quite an improvement over 1.8).  The other more subjective complaint is that constants are denoted as such by capitalising the first letter of their name. This strikes me as a rather easy-to-forget convention.

More (and less vague) Ruby talk if and when I learn new things.  I also have to learn how to program iPhones this weekend.

Sunday 10 January 2010

De-feeted

Ow.

I made a horrible mistake on Friday night by falling asleep on the sofa.  Waking up with the dogs snuggling up to me was sort of sweet, but this was offset late on Saturday when I made a horrible discovery.

No, it wasn't dog-hair related, nor was it a repeat of an incident in the early nineties when a famous and very talented programmer (and alcoholic) that I worked with came to work with a dried cat-turd stuck to his back after spending the night passed out on his kitchen floor.  No, this horrible discovery happened when I took off my shoes and socks.

Regular readers (heh) will remember that on Friday I went out and about in the big bad world after a week being snowed-in by er, snow.  What regular readers won't know is that thanks to a combination of unemployment making me poor and the peculiarly male habit of having as few pairs of shoes as possible, I was wearing deeply unsuitable footwear.  Instead of my preferred Doc Marten's eight-hole ankle boots, size ten, I was wearing a pair of Tesco's value trainers, price five pounds.  Oh, and a pair of Tesco's value sports socks.

Now don't get me wrong; it turns out that whatever third-world exploited labour it is that manages to produce a pair of shoes that sells for less than a tenner actually produces a surprisingly good pair of shoes. The problem is that they're not even slightly waterproof and once wet will in fact stay wet until put in front of the radiator or some such heaty thing.

Thanks to me traipsing about in the snow for several hours on Friday, my feet were thoroughly wet with the shoes and sports socks combo keeping them good and wet until I took my shoes off on Saturday night.

End result: I have trench foot of the left big toe (okay, immersion foot). Hurts like crazy as the skin has cracked and split as it dried out.

What can I say? I was very busy all Friday and Saturday and once my feet had warmed the wet shoes and socks to body temperature, I simply didn't notice how soggy my footwear was.  Now I'm walking around in bare (and chilly) feet hoping frostbite doesn't strike.  Although if I do lose my toes, perhaps it'll take me down to a cheaper size of shoe.

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".