Tuesday, 29 January 2013

Why do engineers feel a visceral urge to frack with things that work?


Ok.
I'm old.
But seriously.
Why do engineers feel the urge to frack with stuff that works?
It's not broken, so just don't fix it.

Example 1:
Decades ago when most people wehere struggling to get to grips with Windows 3.1 I was administering hundreds of Unix workstations across dozens of minesites across Australia.
Mining engineers aren't dumb.
And they have this visceral urge to change stuff.
To fix stuff.
Stuff that don't need fixing.
So one day, around 1990 I think, I turned up at a minesite and was given the task of figuring out why this program wasn't working.
I looked at the code and thought "Ah. This is C. I know C."
I tried to figure out why the program wasn't working.
We didn't have IDEs in those days (unless you include VisualAge) so all I had was vi.
Nothing worked.
It wouldn't compile.
The error messages didn't make sense.
After about 10 minutes I looked at the code in detail and saw that it was including a header.
Which was a *massive* list of macros.
Which made Pascal look like C.
WTF?
Why?
If you're writing code in C why use a pascal compiler?
If you have to macro a language to look like another you're using the wrong language.
Needless to say I fixed it...
But I asked myself: "Why the frack do people frack with stuff?"

Example 2:
On another minesite.
I sat down in front of this machine.
I opened an xterm and typed a command.
Utter garbage.
I stared uncomprehendingly at the keyboard.
WTF?
It took a while before I realised that the main user of this machine preferred French.
So he had remapped every key on a standard US keyboard to a French keyboard.
Why?
Needless to say I fixed it...
I asked myself: "Why the frack do people frack with stuff?"

Example 3:
Yet another minesite.
I opened an xterm and typed a command.
Utter garbage.
I stared uncomprehendingly at the keyboard.
WTF?
The user had a shed load of aliases that changed just about every Unix command to a DOS command.
Worse they had remapped every key to do something Emacsey.
Home? No... That means history -25 lines.
Left arrow? No... That means last command.
Why?
Worse was that he had aliased vi to emacs.
WHY?
Is it that hard to type emacs instead of vi?
Needless to say I fixed it...
I asked myself: "Why the frack do people frack with stuff?"

IT FRICKIN WORKS OUT OF THE BOX.
STOP FRACKIN WITH IT.
DEAL.

And that brings us to today.
I'm ripping our humungous DVD collection to drobos.
So I have a Mac with NO CHANGES AT ALL.
My /etc/bashrc and .bash_login are minimal to say the least.
The only changes I make are to map MP3, M3U8 and M4V to VLC.
Ok.
So I enlist my husbands Mac to help rip some DVDs.
Sit in front of it.
Log in.
And stare uncomprehendingly at the screen.
He's mapped every hot corner possible.
He's changed the Application menu to something incomprehensible.
He's changed just about everything that can be changed.
WTF?
Why?
STOP IT.
JUST STOP IT.
PLEASE.
FOR WOTANS SAKE.
It's not necessary.
And it makes life frackin difficult for others.
JUST STOP IT.
IF IT AIN'T BROKE DON'T FIX IT.

Friday, 18 January 2013

MineCraft: Crack for Engineers.

Oh Lord.
I am sad to say I've become yet another statistic.
Along with Sweden (who recently added minecraft to their school curriculum) I have now become addicted.
Sad.
But fun.
But sad.
On the plus side, I would say it is a cure for alcoholism, over eating and in fact any human activity.
The dying words of a minecrafter would be:

"Just... One... More... Block..."

It started just before Christmas.
My brother came over and was frackin desperate to show his creations.
He is a frackin genius architecturally and his creations are pure brilliance.
We had steadfastly refused to even look at MC, but he persevered and we got the XBox 360 version on his insistence (read coercion).
To his chagrin it didn't support connecting to his favorite server.
In any case, in the days that followed Ben started playing.
First he ended up on this island.
With a mountain in the "way".
"Well," he said, "It'll have to go."
So dig, dig, dig.

Some 12 hours later he had excavated an ginormous cavern that you could land B52s in.
Dr No would have a conniption and envy fit.
It could easily house several Saturn 5's.
Or just a couple of Vostoks.
Multiple levels, and since we were just learning, floating candles at all levels.
Benworts or Benhalla.
Take your pick.
You get Vertigo.
Looking... Up.

Despite my best efforts I became involved.
And so we built a tunnel spanning a massive distance.
Underwater.
And established "KimTopia" in a desert biome.
(I have a fondness for Dune, so my village is named Arrakeen)

Exasperated at the lack of functionality in the XBox version we purchased a 'normal' client.
And then.
Of course.
We're engineers.
So...
I built and configured a server to run MC.
On which Ben and Jon and I have created huge creations.

So.
It's sad.
But kind.
And sad.
And you find yourself saying things like this:

"I just need to get 6 raw fish so I can train an ocelot to scare creepers. Oh and I finished the apartment block and the coffee shop for the villagers. We now have three iron golems and a shed load of kiddie villagers running and madly dashing about as kiddies are wont to do. Can you dig out that chasm and get some lava so we can create a wall to burn the frack out of zombies. I have finished getting rid of the sand and cactii so the villagers will be happy. Oh and can we make a marina for them? I have some ideas about making a version of Cardiff harbour so we can fit the Doctor Who and Torchwood sets into it. Damn but I'm tired. What's the time? 2am? Oh well. Maybe another hour. BUT NO MORE THAN THAT MKAY?"

3am:

"Damn. Just... One... More... Block...."

Bzzzzzzt.... Snore... QWERTY embedded into face....

Friday, 11 January 2013

Logs in the river

Hmm.
What do I mean by the the title of this post?
Well.
Imagine yourself on the edge of a wide river.
Sitting.
Quietly.
Just sitting.
Noticing the whirls and eddies of the river.
You watch as it the swirls and whorls and runs towards the ocean.
You notice...
You see...
You see a tree log roll gently as it encounters some hidden eddy or obstacle and it rolls over.
You know...
You just know...
There's something there.
Right there.
Just there.
You could reach out and...
Wait...
What caused that log to roll?
You know you have to be careful.
And aware.
Of the hidden obstacle that caused that log to roll over just there.

That's what it's like examining software.
Sometimes you have to just...

Stop.
Wait.
Think.

And watch.
And see.
Not just see, but *SEE*.
And see the logs.
And take note of the hidden obstacles.
They're there.
Just there.
Under the surface.
So when you decide to run a minecraft server for example.
Just watch.
Read the logs.
Watch.
Watch.
Think.
Sit back.
Patience.
Sadly lacking...

Or you could short circuit the process and watch the BBC series Sherlock.
And then go back and re-read the "Collected works of Conan Doyle".

Or whatever.

Nah. Better to just randomly change parameters in the RC script right?

Sunday, 11 November 2012

I made a cardboard castle for the kittens

Had some time on my hands this morning waiting for rows to import into a database.
So I grabbed three cardboard boxes, a cutter and sticky tape.
And made this:


It's crappy, but the kittens love it.
They were flaked out after a meal from mom, but I'll take photos when they are playing in it.

If you do this yourself, make the holes HUGE.
Don't skimp.
I did and had to go back and carve chunks out of the cardboard so they could fight and tussle in the openings.

Sunday, 4 November 2012

Ok. IT officially sucks.

I had a need for a bad ass server to help with some database work and also give me a staging platform for a project I'm working on.
So I dusted off a 3 yr old PC which I vaguely remembered being loaded for bear. Ransacked and re-organised my work room re-routing power, changing to an 8 port switch, dug up MS kbds and mice, power cables etc.
Put together an Ikea coffee table to hold it, powered it up.
3hrs work.

And my gasts were utterly flabbered.

Two things. a) 1Gb of RAM? and b) 1Gb of RAM?
I thought it appropriate to make that point twice because it was so... so... WTF?
1Gb?

When *EVER* did I think 1Gb was a lot?
When did that happen?
Frickin 'ell.
My Jurassic era Mac Mini has more grunt.
So...
Advice.
New MBoard, buckets of fast RAM.
Ubuntu 12 64bit server.
Suggestions?

Wednesday, 31 October 2012

OS X jruby 1.7.0 "require: command not found"

Had tons of trouble with this.
I have rvm and "raw" installs of ruby and jruby.
I do this so I can simulate a live environment.
Our servers don't allow rvm installs, but I like to use it to test stuff.
So I have to have an install of jruby like this:

bandit:~ kim$ ls -l /opt
...elided...
lrwxr-xr-x   1 kim     admin    11 30 Oct 23:00 jruby@ -> jruby-1.7.0
drwxr-xr-x   9 kim     admin   306 30 Oct 22:59 jruby-1.7.0/
drwxr-xr-x   9 kim     admin   306 11 Oct 15:43 jruby-1.7.0.RC2/
...elided...

This allows me to switch back and forth.
The problem arises when you have your path pointing at /opt/jruby/bin and install rails.
When you verify all paths:

bandit:~ kim$ which jruby
/opt/jruby-1.7.0/bin/jruby
bandit:~ kim$ which rails
/opt/jruby-1.7.0/bin/rails
bandit:~ kim$ rails -v
/opt/jruby-1.7.0/bin/rails: line 10: require: command not found
/opt/jruby-1.7.0/bin/rails: line 12: version: command not found
/opt/jruby-1.7.0/bin/rails: line 16: syntax error near unexpected token `('
/opt/jruby-1.7.0/bin/rails: line 16: `  str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding'

Which is a pain in the ass.

The issue is sort of to do with the environment.
I was first was led down several garden paths regarding interference from rvm.
That's not the case.
At the top of the /opt/jruby-1.7.0/bin/rails script is this:

#!/opt/jruby-1.7.0/bin/jruby

What happens is that the jruby script has this at the top:

#!/usr/bin/env bash

This starts a new bash with virtually no included stuff.
You can try it yourself by doing "env bash" and when the shell starts, poke around in the path.

And that's the problem.
OS-X has an primitive install of ruby, rails etc.
You can check it yourself.
Just do a "ls -l /usr/bin/r*".
You'll see rails, rake and so on.

So how do you fix this?
Simple. Change the line at the top of the /opt/jruby-1.7.0/bin/rails script to this:

#!/usr/bin/env jruby
#!/opt/jruby-1.7.0/bin/jruby

Just leave the old line in for reference.

bandit:~ kim$ rails -v
Rails 3.2.8

Patched.

Caveat: You'll have other issues with rake et al.

Saturday, 20 October 2012

Apologies for not doing more "normal" posts

For the last two weeks I have been very, very busy.
As such, I have only been able to provide the interesting news links and only "short" versions.

Two weeks ago, my mother had to be hospitalised again due to shortness of breath.
So she had to go to dialysis more times than normal to get the fluid off.

Then we signed up to foster cats.
So we had "Butter" for 2 weeks while he recovered from flu.
Seriously demanding little fuzz ball.
Now we have a 2 year old mother and her 5 kittens to help.

On top of that we have a deluge of work!

So apologies!

I promise to get back into writing normal posts soon!

Thursday, 11 October 2012

Worst Marketing Fail I've seen in Years!

Went to a "reject" store today. And saw the worst marketing fail we've seen for years. It's no wonder this isn't on the shelves at your local supermarket. What the hell were they thinking?


Monday, 1 October 2012

Buddha was a programmer and used twitter

Well...
Think about it.
Most of his quotes are under 140 characters and have a distinctly hacker flavour:

"Do not dwell on PHP, do not dream of Ruby, concentrate the mind on the money."

"C++ is more to be feared than a wild beast; a wild beast may wound your body, but C++ will wound your mind."

"Three things cannot be long hidden: C, Java, and Ruby."

"Better than a thousand hollow words, is one word that brings peace. Ruby."

"All wrong-doing arises because of PHP. If PHP is transformed can wrong-doing remain? Yes. It is called C++"

"I never see what has been done; I only see what remains to be done. Polish that turd"

"No one saves us but ourselves. No one can and no one may. We ourselves must walk the path to TDD."

"There are only two mistakes one can make along the road to truth; not going all the way, and not starting."

"A jug fills drop by drop. RTFM"

"It is PHP, not his enemy or foe, that lures him to evil ways."

"I do not believe in a fate that falls on men that do not test; but I do believe in a fate that falls on them unless they test."

"Even retirement is not to be feared by one who has coded C++ wisely."

"It is better to test well than to deploy suddenly."

Streams of Unconsciousness

Well, it's the first of the month.
So I'm starting a new tradition.
I'm going to gather all my lunatic blonde moment FB status updates together so they don't get lost.
So here they are:


9:30pm. Recovering. Still in pain but exercise and hot showers have reduced it. Reason: 75kg person tries to pick up 40kg bag of potting mix. Result: Spends rest of day and evening in bed in the dark with back pain and massive headache. Misses out on mexican dinner. Moral: I'm a frickin' idiot. Donut privilege rescinded.

Been going through our DVD collection. Did "Mon Oncle" by Jacques Tati. We watched it last night over fish and chips. Fantastic. The phrase ROTFL was completely physically correct. I loved the dogs and the whistling thing. If you want to weep with laughter, find a copy of it.

Holy crap.
http://nextbigfuture.com/2012/09/harold-white-warp-field-mechanics-update.html
Warp fields? Ok. Ok. This is not an easy paper to read. But... Warp fields? Holy crap!

Ok. This is weird.
http://dp-img.com/2009/07/20-Creative-and-Funny-Toilet-Signs-008.jpg
Who goes fishing in a loo?

Ah. Classic. Came home. Nipped upstairs to check email etc. Came downstairs. Ben flaked out on sofa with lights off. Drank some wine. Tip toed around. Drank some wine. Put dinner making stuff away. Drank some wine. Went upstairs. Drank some wine. 9pm Ben wakes up. Too late for dinner for me. Ben berates me. Drank some wine. Check FB. Drank some wine. Far too late for dinner now. Drank some wine. Might have some cheese. Drank some wine. Screw it. Rip some more DVDs. Drank some wine. Time for bed. Another day without food. Such is life. Drank some wine. Yey!

Oh. Even more classic. Ben had kittens that I was prepared to eat nothing tonight. So he's cut a bun up into strips and toasted it. And buttered them. And put cheese (Vintage Tasty and Double Gloucester) out with Dolmades and what I call Frickin HUGE beans. He's so good to me. Love.

Just finished watching Cannonball Run.
Captain Chaos will save you!
Frickin' love it.

Ok. This really sounds like fun. For some values of fun that include being ostracised from society (and FB) that is.
A free guide. Actually it's a startling good guide on how to start ANY business on the net.
I'm thinking Diesel Powered Nuns as a starting point. Wonder what Google AdWords will show up...
http://startapornsite.smutnode.com/

Ok. This is a wait. What?!? moment. Seen the FB ads down the right hand side? Dunno if it's just me or demographics or what, but I keep seeing these ads with "Mom reveals XXX way to get rid of fat..." with varying degrees of credulity. But the thing that gets me is that most of them seem to require the use of a fruit that looks like a deep sea ocean nightmare. Fruit? That's not a fruit! It's a frickin' torture device used in Abu Graibh. If some cosmetician (or whatever the frick they call themselves nowadays) came at me with that demonic fruit in their hands I'd demand an exorcism on the spot. That while calling in a drone strike of course...

With my donut privilege re-instated, I decided to try some glazed donuts instead of the normal cinnamon ones. So we stopped by Krispy Kreme as I had been to their stores when I lived in the US and the range was amazing.
Phhhhbbbttt. Wrong. Thought: what the hell, and got 6 glazed ones. Bad move. I have to say the KK donuts are rubbish. I know there was donut dough in that morass of icing, but be buggered if I could find it. Hurt my gums like the devil. Won't be going back. Ever.

Ok. Here's an opportunity too big to miss. I NEED someone who can crochet. Why? You ask. Because I NEED THESE: http://www.geekologie.com/2012/09/i-need-those-on-my-feet-now-panzer-tank.php The problem is that you can only get the designs. Not the actual product. ARGH! I NEED SOMEONE TO CROCHET THESE NOW!
Why? They're frick'n tanks! On your feet! How could you not understand? I'd Frickin' wear these to work. Miranda? Please? I'll Pay! I'll promise to wear them to work!

Having to fix some PHP code. I really hate PHP sometimes. There's a switch statement about 60 lines long that could have been done in one line!

Oh the irony. At least I think it's irony. Maybe just "real" you know.
http://cdn.ientry.com/sites/webpronews/pictures/psychicfair5_616.jpg

I don't have a mouse MAT. I have a mouse RUG. Persian of course. And I've been eating potato chips. I now need a very small vacuum cleaner.

Charles Nutter remarked that the Œ symbol reminds him of a space invader or a jelly fish. I suggested that it looks like the Enterprise from above. What are your thoughts?

Ben gets so pissed off about chess puzzles. Mate in 1. But bug in program. Rant! Rant! Rant! It's a bug! Seriously. Bug. Don't stress.

Oh lord Cthulhu. Let me sleep. Questions. Can Rails3 successfully cache and chunk 2m mp3s? And how much porridge can you fit in a cat? And Ben wants to know whether inserting porridge into a cat is a challenge, question or a T-Shirt. I favour challenge.

Well that sucks. Ben has beat me 5 to 1 on dominos. I normally wipe the floor.

a) PHP sucks. Distracts you from what you want to do by making you go mad. b) There's a fly in here. Driving me nuts. c) So is the PHP.

Ah. Lost and confused. Just like the rest of us. I'm handbraking Dawn of the Dead right now. It's good to be confused.
Confused saves you from dealing with the loonies running the world. Like Romney. What is that all about? President Mit?!?.
Sounds like something you'd get in a german restaurant. "Bratwurst? Mitt Romney?" "Nein. Nein Romney." Confused yet? Go Bill Bailey!

If you stand on a robots toe and it says "sorry" can you conclude it's made in Canada? (Probably won't mean anything to any but Americans and Canadians)

Ok. This won't mean anything to any but IT and Sci-Fi nutters.
What names do you give your servers?
We have MOYA, LEXX, NOSTROMO and SULACO for example.
Really like 'Lewis & Clark', but it makes a tough name so we used them for two servers. Pop Quiz: Name the movie!
Be damned if I'll have 'Hunter-Gratzner' but it was the best cinematic spaceship crash of *ALL* time IMO. Blew the budget for the film on the crash!
"Don't you touch that lever Fry!" (Kick, Kick, Frickin passengers, Kick, Kick)

Ben is playing his new game. Borderlands 2. Love it. A Bazzilion guns and loads of Sci-Fi memes hidden away in plain sight... Saw the claptrap doing the Mars Attacks woman walk! Cool.

Just went out the back for an oral suppository and a fruit bat tried to crashland into a tree. I emphasise "tried". Hit every branch it sounded like. But it's valiant attempt to salvage some dignity was ruined when it was brought to a halt by a cabbage. Yes really. Went straight through the tree and hit the ground. It's dark so I can't see it, but I imagine it's doing what cats do when they do something similar: start licking their chests. Wait. Do bats lick their chests? Kinda interested to see that if they do.

Now this is interesting. Found this site. zombiestat. You enter the domain and it tells you what your miserable life^h^h^h^hsite is worth and tells you whether your site is 'safe'. The amount of telephone number dollar amounts shown is kinda cool. So my blog is worth $480. And ranked 1,279,778 in the world. Meh. Do I care? Actually 'yes'. Yes I do. Because I intend to get the site up to the one millionth rank. Challenge Accepted!

You know what pisses me off? Everything. For example: I was asked why do even bother to write things like this. So I said "I've lived long and prospered. Might as well write about it." They didn't get it.

Wow. Now there's a surprise. Go to google and type "mad squirrels" and view the images. There's some seriously psychotic rodents out there. Don't ask me why I typed that btw. Someone has to ask these questions.

Did you know it's possible to toast rye bread? You know that really dark bread seemingly made of mashed seeds?
Anyway, I went downstairs because I needed a Vegemite fix and discovered we had no "ordinary" bread.
We did have some buns, but my attempt to cut them sideways convinced me that toasted blood flavoured buns were a no-show.
But we did have rye. Challenge Accepted! First attempts were a fail. Think I discovered an organic substitute for bricks. Albeit small bricks. Trying to eat them was like trying to eat a slice of gravel. Although a house made of them would be kind of spectacular. Certainly you'd get an audience of birds.
Anyway, you have to watch the slices like a hawk and you can do it.
Unfortunately they don't go well with Vegemite. Fail!

Went to pay a ticket online (1st in 25yrs) and examined the document in detail today.
Under one section named "Evidence" I saw a single scrawled word: "Loser".
My blood began to boil at that point and I started hunting around the website trying to find a way to complain.
Fortunately sanity raised it's annoying head.
You know that little voice that keeps tapping on the back of your head saying "Heeeeellllooo! Wait you dumbass! Think!"
I examined the scrawl again and there was a faint little tick at the bottom of the "o".
I collapsed in laughter.
So.... Not "Loser" but "Laser" The speed gun thing.
Phew...