Tuesday, 26 June 2012

Burning up, or shutting down, the Mini-Computer

I've decided today to tell a story, its a true story, and it bares some interesting information and history.  You see, I used to work for a company called "Claremont Garments", at the factory in Selton, and I worked in an IT support Role... I took over the role from a guy called Jim... The last time I saw Jim he fell out of a doorway near drunk when I picked him up for the annual departmental curry... But anyway, I was a student at the time... Studying Software Engineering.

The company ran an NCR brand mini-computer, running serial lines through multiplexors out to the distant sites, using dedicated comms lines.  Meaning in the far off factories there were green screen terminals showing the computer screen.

At the time it was the sunset of the mini-computer era, I don't think very many companies still run in that fashion, though some, like the one I work for now, do still have powerful servers running systems which are really just old software which should have a terminal, but which have been given a GUI.

But at the time, I was introduced to this NCR, and its AST backup, machine I was told it had to have an ALWAYS UP rule, I was shown how to make a call on the very expensive support contract, then told the push button code for the door, and shown inside the cave of technological delights.

It was all pretty old stuff, a wire wrack, with monitors, keyboards, UPS's and other stuff, there was networking switches running down the right of the room, and computers down the left.

But as I'm being shown what each computer does, I notice that in the stream of air from the air conditioner there's black flecks... Soot... I look at the unit, its a nice newish clean looking thing... Where's this black coming from... I glance down, nothing, glance up... There are three monitors on the top of this wrack of machines, the right hand one is on, but looks fuzzy, and the black particles are floating out of it... The ceiling tile is slightly discoloured with heat... That bastard thing is on FIRE!

Well, I shift back, and point it out, Jim to his credit dives in to his elbows and grabs this thing down... As I reach around his arms and unplug it... But now, he's holding a burning monitor over his head, and is stood in the server room... There are two doors to this room, I sling the one to the right open and Jim hurls this monitor over hand into the corridor, where it just sits black specks floating and all...

However, turning back around the chat hired to write code for the mini-computer, Don, is skidding into the other doorway and lands on the floor full length staring at the NCR... "What have you done?"  he cries "It's gone off"...

I look as puzzled as Jim, who retraces his steps... Whilst valiantly saving the server room from fire, he'd stood on a pile of wires, one of them was a coil of power lead, it was the lead from the UPS to the NCR... The NCR had lost power, instantly...

OH SHIT... Don and Jim reboot the machine, something I take care to learn about, but ironically in my whole time there, never had to do.

But then I take a look at the wire Jim "Pulled" out... it has screw fixings, it should have been screwed into the UPS and the NCR, but it wasn't... The person responsible for it not being screwed in, forever after, ridiculed Jim for unplugging the machine... But Jim had stood a good 4 feet to the side of the NCR itself... this chain of catastrophe should never had happened.

However, it did, and instead of Jim being remembered for his efforts to save the place burning up, he was always jibed and remembered for unplugging the NCR.

Monday, 25 June 2012

ARGH Using Break before Case in Switch Statements

I have a new Number 1 for my “Most Annoying pieces of Syntax use” list… A new annoying item on my personal top ten of code peeves, jumping to the number one position is this:

enum cElements {  One, Two, Three };
eElements element = <something>;

switch (element) {
      default:              throw “unknown element type”;
      break;case One:       HandleOne();
      break;case Two:       HandleTwo();
      break;case Three:     HandleThree();      break;

The most annoying thing about this is that it’s a rather intelligent attempt to solve the “default” being forgotten problem, to enforce the default as the first item in the code is pretty neat, but it appears the only reason for their doing this is so that they then use the default stanza’s “break” as the first command before the first case to preserve their bizarre formatting of the end of the last stanza (break) with the selective part of each following stanza (case)… And then they stick a finalizing break after the last case.

The lack of spacing makes the code hard to follow, indeed the use of the breaks in this way make the control flow hard to follow.

And if you don't know how this could be better structured, then please, please go learn, go find out... Scott Meyers has damn good books on C++ and they contain nice style tips!


Update - I don't know why this text has strange background colours, and the blog interface won't let me see the post in a WYSIWYG mode... grrrr.... Gief me the old interface back.

Prometheous Promise Pants

I'm going to sound a little daft here, but I went to see Prometheous yesterday, and I came out feeling... really really angry about it... I had this idea in my head of it explaining a few things with the Alien franchise, with some proper "Oh my god we can't escape this thing, oh my god no matter how careful we are, oh my god its loose" style terror... Instead I sat there, and was treated to an impressive visual display, but no real meat on the bones of the story.

The eligmatic looking "Engineers" the star jockey of Alien fame... Turns to be a really rather confused, unexplained, unfocussed character... There's no real explanation for them, no explanation for anything... Its a film without a story except to cause a follow up film, which it will...

And I sat there thinking... This is Ridley Scott... This is... This is shite.

It annoyed me on so many levels, firstly... Scientific method... There's an alien world, a archeological site, they know nothing about... "Yeah take your helmet off man"... good idea... NOT.... There's these things they change with activity... open the chamber fuck it up.... I mean Howard Carter understood the problems of opening tombs why in 2093 don't we...

Then the date... 2093.... I know Ridley Scott will be dead by then, but I don't plan to be... I'll sit there and think... "Oh yeah another spaceship film full of shit".... and that's what I think about it now.

The unexplained attack with the DNA stuff by the robot on the scientist... There was no point in that... I mean... He ends up getting fried... so why bother?... The alien in her womb... pointless... The Star jockey chasing her down... Pointless... The head of David... "I know we've had our differences"... yeah... erm... WHEN?... Did I miss part of the plot here, was the Differences CUT from the film?... Because... really... there were no differences... there were no crossed words... Save for him taking her cross off her, which he did do for a reason and nicely.

I mean... It was all hung together so precariously...

Charlize Theron's character... she didn't need to be there at all...

Guy Pearce... Playing an old man, decent make up... they made a good effort... his feet were old... But did anyone notice, as the scene flicks to the mid-distance and the Robot is handing his slippers, the feet Guy slips into the slippers were young?... It broke the illusion....

It has, for me, ruined the imagary of the Star Jockey... For that first ship was crashed on some distant, very deep space moon, and was hundreds of years forward of this shit film... This shit film was two years of intersteller travel out... two years.

You know what... I can't slate it enough... It was bad, poorly put together, poorly scripted... not terribly well cast... and ruins the work that's gone before... They'venot done a George Lucas style reworking... but they've reworked something that didn't need reworking.

Tuesday, 19 June 2012

Dirty Stink Palms...

I've brought this topic up before, and I'm sorry to lower the tone, but I really can't believe in 2012 there are still adult males out there in the population who don't wash their hands after taking a dump.

That's what I just witnessed... Someone entered the gents and took the cubicle next to me, proceeded to have an urgent sounding, wind powered, splattering droppage... and then they flushed, exited the stall and left the room...

No sink was used in this process...

There is no hand wash....

There is no alcohol rub...

I washed my hands, and used a paper towel to wipe the door handle as I exited... the dirty, scruffy, ignorant, filth mongering scum... Not washing your hands after a shit... that's the level of the place I work at... No pride... No self awareness... Minimum IQ for minimum wage.

And the company then wonder why everyone is walking around with headaches and off with fever... filthy, dirty, scruffy... Erg.

Thursday, 14 June 2012

Chronicles of IT Life

Sometimes, my eyes hurt with the way journalists present information, this one which they appear to present as fact:

Comes from a blogger at the site shown, I really didn't know that having a blog, which is hosted with its own unique URL qualified you as a valid source for quotations... Maybe I need to start stating facts at random?  Maybe my friend needs to keep up his fantasy ornithological posts in the hope of getting into Encyclopaedia Britannica...

But what has me roaring with laughter at this reporting is, sorry Anna Leach you need to hear this, the line:

"The IT Crowd and other TV shows that chronicle of life in the tech industry"

Chronicle of life in the tech industry?... Really?... Are you insane?... They're TV shows, this is a comedy show, its not a fly on the wall documentary... A real chronicle of life in the TV industry would not make it to TV, it would be more boring than watching cress grow... Channel 5 are not about to throw 50 cameras into any of the IT departments, or programming areas, I work in and have their announcer make a dogs dinner of it:

(Queue Geordie Accent)
Eight Twenty Eight Aee Eme - No one is in yet...
Nine Fifty Two Aee Eme - The first programmer arrives, blurry eyed and turns on his computer - the Coffee machine is activated.
Four Twenty Nine Peee Eme - The programmer is now out of coke and has bitten each fingernail down to the nub whilst swearing about Cee Sharp Generics...

It would never make TV, it would never make anything interesting... Not even for Open University... This is why the Computer Programme got scrapped, talking about lines of Basic, or how the filing cabinet will disappear was... boring to 99% of the population.

Even entertaining aspects of technology shows get shuffled off to channel 5, or obscure satellite channels, every main stream IT or technology related programme has been cancelled from TV...

So... We're left with comedy, parody and jokes... And this moron blogger, come charity scrounger, reckons IT Crowd is a chronicle...

Monday, 11 June 2012

Who watches the Interviewers?

The topic of jobs comes up to me once again, and I've been thinking about how I would like to work, and how I do actually work.  Not to forget what I work on, and what I'd actually like to work on.

There is a chasm between the two, however, the prospect of trying a different job, after so long in the one I'm in now, does fill me with dread, not least because her at home won't comprehend the first thing I try to explain about the anxiety I'd be feeling, nor the level of pressure to impress and show how good I can be, and believe I am, as soon as I got into an interview... let alone into the actual job.

But, I've been tentatively looking around the world for clues on how modern, hard hitting, effective CV's should look, how one should present oneself, and importantly how one can do extra curricular things... Like run a blog, or a guild in Warcraft, or some tweet feed, which impresses...

What I've found is that there are a lot of people floating around the IT world, especially the programming world, who don't have the first clue what they're doing.  This is not intentional, these people do not think they're clueless, they in fact think the opposite that their way is the right way, and I can't knock them for it, I believe my way is the right way, most of the time.

But, what I can't stand is when people, on eitherside of the interviewing desk, are clueless...

I read this quite an old post, and chuckled... I even did the fizzbuzz program for a giggle - took me about 43 seconds, excluding the time to boot the virtual machine and run the code file through a compiler... Does that mean I could interview for a programming job?... Maybe it does...

Does it mean the person on the other side of the desk is qualified to judge me?... Probably not... You see programming has become less about what you churn out, and more about what you've done in the past, what libraries, what projects, what essence you've brought to the fore, and how you articulate that knowledge... With the internet however, anyone can learn the right buzz words and get on with the interview without breaking a sweat; being seen to tick all the right boxes and hit all the right buzz words seems to be enough.

A person I worked closely with for a long time, many years ago, was one of the best programmers I'd ever seen, he knocked up a motion detection system, using C++ in about three days, including all the image loading and a driver for the camera in use, all from scratch... That was amazing then, and hard to comprehend today.  But take him out of his comfort zone, showing Java as it was then, or heaven forbid, the internet and it was aghast.

Bill Joy at Sun would apparently take the whole Unix software away and over a weekend, re-write the whole of his Unix cut, including all the Applications and Services.  That is breath takingly astounding... But would anyone be allowed to rewrite the whole system their products are based on today?... No, and would they be able to?... No.

Yet another person I worked with, who came into a "front-line" programming role, could not program for toffee, that person in fact spent nearly two years constantly asking, and re-asking, how to do things... like concatenate strings... like implement an interface... like assign or cast between types... They passed their interview, but as far as I heard when they began, their interview consisted of their explaining about the prior project they had worked on, and that was enough...

Now, in the post by Mr Atwood, he says "It's a shame you have to do so much pre-screening to have the luxury of interviewing programmers who can actually program", and he's right... But in my experience some candidates can program, like I believe I can, but we meet idiot interviewers...

Who watches the watchman?... It seems in programming interviews, no-one is watching the watchmen...

A famous one, I often tell people about was at an interview for the role of "Microsoft Visual C++ programmer" for the princely sum of £11,500 in 1998.  I went, because I needed cash, and I planned to work there whilst looking for a different job... I walked in and was presented with three men at a white board...

#include <iostream.h>

int main ()
char x = 'a';
switch (x)
case 'a': cout << "x is a"; break;
case 1: cout << "x is 1"; break;
case 0x43: cout << "x is 0x43"; break;
default: cout << "dunno what x is"; break;
cout << endl;

return 0;

The first indicated a seat, the second said "read the code on the board", the third started a stop watch... After about 60 seconds, the third nodded to the first and said "Hello, can you tell me what x will evaluate to"...

Lower case character 'a', was my rather stiff, formal reply.

"Thank you for coming, we'll perhaps be in touch", said the second...

"I'm sorry?" I replied "I thought I was here to interview for a programming role?"

They smirked, especially the middle of them, and he said "You were yes".

I sat a little firmer in the seat, you're using the past tense, so I'll assume I've not passed the interview, but might I ask why?  Hello, I'm Jonathan by the way, might I ask your names?"

They looked very concerned by this, I don't think they expected me to ask them anything, and had infact expected me to see my idiocy and leave the room.  But, I was mid-degree, looking for work, and a placement, I wasn't going to give up, I had nothing to loose, so as per our lecturers advice I asked why I had failed the interview.

"This is a test of your ability to comprehend code, and you've not comprehended it."  The middle chap said, with a touch of theatre and a smirk to his friends.

"Fair enough, I'll ask about the code in a moment, but why have I failed the interview?  If anything right now, you gentlemen have failed my interview, so we may as well accept I'm not going to work here, not ever going to see you again, and get down to brass tacks.  Why have I failed this interview?"

They were gobsmacked, but the guy in the middle rallied.

"Its a trick question, this code won't compile, let alone evaluate x as a".  He folded his lanky legs over one another and folded his arms staring down his nose at me.

"Well, it will compile, and it will evaluate to x in MS C++, it'll be fine as a case statement in Pascal and Turbo C too..." I returned his owlish stare "but this isn't your interview surely?"

The chap on the left introduced himself as Simon from HR and said that the interview process was based on my CV, manner and ability, this was the ability section of the interview and to avoid "interviewing anyone who can not program, we've selected this particular question to demonstrate ability, and I'm sorry to say you did not pass".

"Right, but your question is at fault, that will compile, on... well on every compiler I've used, and in at least three languages I can think of with syntax very much like that." I looked up at the code again and then gave up the smart pretense and leaned back folding my arms.  "Go get a PC with a compiler and I'll show you, if you prefer?  And remember, I don't want your job".

They refused, "you can not place a character into a switch statement in the C or C++ languages, they are all we care about", and they sent me out, and I walked back to the bus stop puzzling.  When I got home I ran that code through Turbo C for Dos, Turbo Pascal for DOS, Visual C++ 6.0 and Borland C++ Builder.... All of them evaluated it...

The guy was wrong, yet he was interviewing others...

Saturday, 9 June 2012

Eve PVP - No-one Engages

As you all know, I'm a big fan of the style of PVP in World of Warcraft.  Not the outcome of that PVP, as I'm alliance and played on two servers where alliance couldn't fight their way out of a wet paper bag, but that you can queue up and dive into things.

In Eve however, you have to look for trouble, be surprised by trouble, or simply not get into trouble, to have PVP arrive.  I have spent about 65% of my time (over the last three hours) tempting people into trying to fight me... They see right through this and refuse, they're not dumb... But, then they're trying to chose the battlefield, and there seems little leverage to make them fight me, unless they want to...

And it seems, even -10.0 rated pirates don't want to fight me...

I had my armageddon out, I checked out a local 0.4 sec pipe and went for a jolly, first I checked there were pilots there, and indeed their were... a couple of dil-holes with "We are Angry Fuckers" style corps, and a few miner style players who were not out mining... presumably because of the first lot of 'tards.

Anyway, I loiter around, I move between several low-sec systems and no-one challenges me... I even sit slow boating, as if I'm on autopilot... No-one comes to even take a look... I know this because I could see them on my scanner, not coming to look, they were just "looking" with their scanners... which means they weren't cloaked and already looking, nor were they off changing ship to challenge me.

So, driving up and down, down and up, that's what I've done... waggling my eye lashes, and looking, for all the world like a pointless target, I even shot some belt rats with only one gun, to make me look like I was struggling... hoping to have them engage...

But, they didn't...

This has always been the way with Eve for me, either you are out trying to earn a living, not looking for trouble, and trouble appears... Or... No trouble comes your way, when you're looking.

Point of fact, I went to the system in question because I had a really good fight there once, I was returning from a mission and three guys jumped me, and I tanked and killed a couple (chasing one off) in a mission fit battlecruiser... It was a good fight, and I decided that day to park one or two PVP fits in the region... But all to no avail...

I'm beginning to wonder if I should just go join the Red Vs Blue thing and call is quits on roaming PVP in Eve... I mean, I'm no Garmon, or Kil2, but if people won't engage... What is a pilot to do?

Friday, 8 June 2012

England Football Squad Disadvantaged

Well, Euro 2012 just kicked off, literally.  Poland are playing Greece really well, but something about modern football has been itching at me, England... We never do overly well... And I have a theory why... Apart from our players being tired, injury rich and over paid (and hence rather lazy in places).  But everyone else on the pitch speaks English...

They can hear our shouting the plays, they can understand everything our team is doing...

Look at the Poles... I very much doubt many, if any, of the Greeks playing speak Polish.  And vice versa, I doubt any of the Poles speak Greek... The two teams play their way, and can communicate without any fear of the opposition intercepting the information and gaining an advantage.

This could perhaps be seen, back in the 60's when England played so well, English was not very common in post-war Germany, maybe more so than twenty years before, but certainly German TV was German, German Media was German, the lingua fraca was not yet English.

With the invasion of American TV in the 70's, shows like Miami Five O, Dallas and then the flood of American TV in the 80's the English game suffered, as the language homogenised so did reading the intent of English football players.

Mix into this slide that most the decent players around the world make their pilgrimage to play in the birth place of football, working in the Premier and whatever leagues of English football, and so further pick up the language and the rhythm of the English style of play, is it any surprise that the England football squad find it hard to out perform the opposition.

We'll see how this goes, with our first game on Monday, against France.  English is not wholly ruling the roost in France, despite the entente cordial the Queen herself still turns to speak French to their dignitaries, not theirs speaking English to us.  But many of the good French players play in England, or have played recently in English clubs.  So this can only benefit them.

I'll always support England, but I can't help but make this observation.

Wednesday, 6 June 2012

Docking Accepted....

It has been nearly two years since I played Eve.  I quit to play Star Trek online, being very unimpressed with Star Trek and finding my then corporation in Eve becoming more and more inactive I didn't return to the game... I was a huge player of Eve, I had at one time three accounts, all with two years of training time on them, and one with a lot longer than that.

I had industry down pat, and ran an industry organized corp, I had a carrier and a POS out in low-sec, I had a fleet of battleships for running missions, and even indulged in some PVP from time to time... But the PVP in Eve always made me nervous... You actually can loose ships, and working alone I always found it hard to deal with the myriad of other fittings one found out in space.

Unlike WoW where I was a PVP diva, you just get killed, jump up and re-spawn with no harm, in Eve getting shot at, or loosing when you started shooting, was a real bummer.  But the thrill was there... It really was.

One of my accounts was a pirate, I use the past tense, because really I was coerced into a Pirate Corp as a three week old noob, what had happened was that I was out ratting, and did not know that 0.4 was like dangerous, I was a noob... So I was shooting shit in a belt when two guys jumped me... I was in a terribly fitted Amar battlecruiser, and they were in moderately okay fitted Gallente cruisers.  The fight was close, but I lost my Battlecruiser, but I chatted to them and they ended up inviting me...

The net result was three weeks of struggle, I bought a battleship, lost it, bought another, lost it, bought a set of frigates, never flew them... and the corp moved location, I moved out there, they dropped us off and then moved somewhere else, leaving me with a -0.95 rating and nowhere to make money...

I tried to repair that character reputation, but it was all to no avail, the history was indelibly there, I was a pirate... Things got worse, when I found some friends in 0.0 space, and set up working with them, then one day I got shot at by a guy far from their space... but I killed him... YAY a KILL!!... Only to get back to my friends to find out they were more friendly with him and they blew me up.

Utterly dejected I left this character, sent his ISK to an alt and set up trading a while... ending up at the start of this post with a new character, and two other accounts, running missions and mining for a living.

However, this week, I have the urge for more internet space ships... I have the urge for some pew pew... I've actually got all three accounts restored (but not subscribed) and each is offering 15 days free play time.

There are two or three new places for PVP in Eve... The empire war is still going on (this was started when I was still playing) but I found that joining a certain nation limited my trading and mining opportunities, especially when shipping a freighter around the universe.  The new avenues for combat are a little more up my street... One is called Red v Blue... 

No, not that Red v Blue... this is a player run initiative, to create to corporations in Eve, one called "Red" the other called "Blue", and the two are at perpetual war with one another... This means one is able to wage a limited war of opportunity, jumping in and out of the corporations at will, and doing it all whilst not getting overly exposed to low-sec or 0.0 ganking.

This appeals to me... It also appeals to me to carry out the last thing I had on my Eve agenda, before I quit, this was to find some empire mining operation, which was definitely linked to the low-sec or null sec big boys, and declare war on them, making it hard for them to move their goods around.  This idea of mine came about, because my mining corp was being pressured to leave the high-sec and low-sec areas it worked in.  We were being pressured even off of the exploration find we were uncovering, and it was all getting very silly... 

Working so hard in high-sec to find an exploration target, only to settle in mining and find the neighbours burrowing into your fat asteroids as well....

Unfortunately before I dive back in I need to get to grips with the vast number of changes to the game, there have been two major updates, and around five complex patches and balance changes to the game since I departed.  Everything from types of ships, to module roles, to the shape of the universe itself have been changed.

The most interesting thing I saw as an ex-mission runner was the idea of new tier-3 battlecruisers, able to fit battleship sized modules... The idea of having my main tanking (shield) ship running missions (level IV - so a battleship) backed up by a faster, more manoeuvrable, hard hitting gunship battlecruiser was very interesting.

So, this leaves me in the precarious position of wanting to look at all this, knowing what a huge time sink it is, and how little time I actually get on the computer at home...

I'm going to take out a trial account and get used to the new user interface first... and I also stumbled over this active blog, to update my knowledge of the system:

Tuesday, 5 June 2012


I hate to bring things on this Jubilee weekend down in tone, but I have an announcement... I have the squits, or as a medical journal; sat open not far from me; states "hyper-defecation".

Apparently this is not diarrhoea, just more regular movements.  The reason for this maybe that I've had gummy sweets, cream cakes, cola, kebab, chocolate and biscuits for the main part of my diet for the last four days.  Or it could be that I got a real bad chill (yes a chill; in June) on my kidneys today... Or it could be that the roast potato's I was served with dinner last night were no where roast enough, still being icy in the middle...

Whatever the cause though, I'm feeling weak, and very sorry for myself.  The net result of which however has been a lot of time reading on the loo, reading on the loo is a great pass-time for many men.  Its the place for example that I make most use of my Linux Format subscription, and by use I exclude wiping with it.

Anyway, to bring the mood back up to a higher brow conversation level, I got a new C++ book winging its way to me in the post.