Sunday, 2 December 2012

Can the world....

Can the whole world just fuck off for a few hours and leave me alone please?

I've not stopped all day, I've shopped, cooked dinner, cleaned three rooms, steam cleaned the bathroom, bleached the kitchen work surfaces and cupboards, walked the dogs (twice), taken my brother in law shopping, hoovered the whole house through, handled calls from everyone and their dog AND been nice whilst doing all this, despite running on near zero sleep because of my code kicker last night.

And, now I'm trying to get some more done, so I actually have something to show and tell tomorrow... And, so far I've gotten two functions (about 10 lines) written before I'm being disturbed...

I just want the whole world to fuck off.

Idiot C# GUI Strategy

I've had a couple of complaints about my views in the last post... And folks, I appreciate you have your views, these however are mine... Sorry...

Now, I've also had complaints that I have been knocking other peoples ideas about code and system design, certainly I have been, and I have made out that I ALWAYS get things right... I don't folks, this is one of the first things GOOD programmers will admit and great programmers know.  I consider myself good, not because of my technical ability being better than others but simply because I know I don't always have the answer and if I do have an answer someone else might have a better one.

And this is one of those times, I have been recently programming in C++, this means passing parameters and pointers and working in certain ways.  And then I've in the last couple of days gone back to making a GUI in C#...

And I came up with the data, I came up with a bunch of clever looking GUI (forms) and I have each one linked to a type of data class... And I had one instance of the root data class in the main program, but I for reasons I can't remember... Didn't decide to pass the reference to the root data around and manipulate it in each form at each step...

No, I decided it was better to keep that one root instance safe and pass dozens of delegates up into each higher user facing form to allow that form to manipulate down to the data.

The end result was a teetering  tottering, staggeringly poor implementation, unable to evolve, unable to be clearly documented, with a bloat of each layer needing to pass the values in to the preceding delegates, or set them into the succeeding layers... In short it was a bloody mess, like someone had taken a 9mm to a telephone junction box, wires everywhere but these wires were delegates.

I have of course this evening, in the last 45 minutes in fact, removed nearly ALL of this code.

And replaced it with the old standby, best practice  or passing the actual reference to the root data into each sub layer, and to allow each sub layer to see the Parent control, by passing it as the parent...

Now, from each layer, I can manipulate the data in root directly, finding and altering whatever I like in each control and form.  And I can call back down the layers to say roll back a page, or call to reset some value...

All in all, simple, clean, easier... And... I did not see that solution first time.  Everyone does it folks... No programmer is infallible, not even me.

Wednesday, 28 November 2012

Yorkshire Miners vs Working Miners

I just read this... a wailing lament of his times past, seems to be the guy is a right twisted shit, educated, trained, employed on and off, he gives no indication as to why he looses a job as a social worker, simply blaming Margaret Thatcher... He then blames her for his choosing, opting, to go drink, drug and defecate for a decade... Blaming others for himself.

Then this whole shit about Yorkshire miners... I mean he even says "They avoided working on a Monday and a Friday"... yeah, they did... But you ask a Nottinghamshire miner and they worked them... Nottinghamshire had a bigger coal workforce and coal field than Yorkshire, yet they always go on like they were the bigger bunch.

And as for him standing on picket lines... He was not even employed as a miner... No wonder the fucking Yorkshire and Lancashire mining union reps could bring flying pickets down to the Nottinghamshire pits to try and close them.

I fucking hate that article, the guy is trying to come off as some kind of working class hero, and comes off as ungrateful scum to me.

I bet someone at the BBC thinks he's a good writer, or depicting things "likes they were in t'olden days", but... The guy is basically trying to hide a life he's wasted and only turned around later.... I mean saying he went on strike because there was a Conservative government, I've never heard such bullshit outside an IT planning meeting.

Tuesday, 27 November 2012

Unstable Pi Reports


I have also spent a lot of time today talking to the hardware types who work with me, I'm very much a software guy, beyond wiring a plug or sorting out my ethernet cables I try to stay away from hardware engineering.

I have been known to assemble my own computers, some people call this making, but really you're just taking pre-fabricated items and slotting them together, the kind of hardware guy I'm talking about are the kind who tinker with soldering guns and the like.

And one thing they've overwhelmingly said about their Raspberry Pi's is how unstable they are, how they crash on them and how slow they are...

Where as, I'm a software guy, I've never had my Pi crash, I've never had it be overly slow... I admit its not quick to compile complex C/C++ languages, especially when the latter is using the Boost libraries... but it has been stable.

In actual fact I've only had it crash out once, and that was not its fault, it was the fault of the SD card going dead midway through a compile!

So... What is this difference?... Are the hardware tinkerers, playing with the GPIO port causing themselves issues?  (I think so)... 

As a software tinkerer however I have no complaints...

Monday, 26 November 2012

Hide the Incompetence... Format the server!


Here's a quick lesson  for you boys and girls... When you have been in competent and not done an assigned task, such as installing the software project you've supposedly been working on for the last year onto a server....

Have that server sent to IT to reinstall the whole thing and stall the project manager from sniffing out your duplicity.

Why do I mention this lesson?... Well, because this exact scenario is playing out before my every eyes, a Windows 2008 server has sat languishing not being used for over a year, the guy who was meant to be using it, making it a back up of our live server environment did not do so, he did however manage to waste an inordinate amount of time pretending he was doing something with the machine.

Last week, I tried to get to use that machine, and was met with a wall of shit, I mean, he threw his rattle right out his pram.  Presumably because he saw my looking at the machine; on an unrelated matter; to be snooping into what he had, or rather had not done.

So, this week, I've passed the machine on to the next step and this person has darkened the door step once again and declared...

"This is the data center edition" (is it?) "we can't afford it, send it back to IT to have it created fresh"...

And the manger has gone... "Yeah, okay, tomorrow, send it to IT".

Alsmost immediately the status of the other-other project, the long proclaimed, much hyped, and mainly undelivered project has been put to sleep and there's now a days slack to be taken up in the mad panick that is the local development schedule...

This people is what happens when someone without any balls is running a department and there's a sneaky fuck working for them.

Wednesday, 21 November 2012

Sorry, New Pi Code Readers

Just a quick one today, to say worry to the swathes of people turning up on my blog looking for "new pi code"... what that post is about is me producing new code at work for the Raspberry Pi... I'm not releasing anything for the Pi...

Well, not until next week... When I hope to release a lovely C++ class to help you people out there use a USB serial port from your Pi... I'm writing this to help me with interfacing with a null modem connection to another machine.

But it could help with anything you might want a USB/Serial converter for.

Monday, 19 November 2012

Fuck-tard Server Administrations


There's a server in our building, it was bought on a capitol expense for over £8K two years ago.

In that time, its NOT had a single thing put on it... In fact, its had something put on it and then taken off it, and that something was deemed to be mission critical enough to warrant being put onto a PC under a guys desk, with its innards spilled out on the carpet... where anyone could tread on it, cleaners could smack it, and hot drinks could pour into it... This was of course our main source code server.

Today however, after many moons of delay, the server is being put back into the server room... But its all changing...

Now, its time for me to say it, CHANGE FOR CHANGE SAKE.

The remit was to get the server back on the heavy iron in as fast and easy a method as possible... Happily the actual machine is really three virtual machines being hosted on this little gutted PC... So one would assume that to get the server back up and running as fast as possible the easiest thing to do would be to stop the virtual machines, back them up, copy them to the heavy iron and start them again?...

Yes... NO....

Clearly this was too complex a task, so instead the appointed administrator, who lets face it has failed to administrate for over a year, has decided to spend the day kicking about in the kitty litter of the interwebs, changing how the server works, how it appears on the network, how you log onto it, and hence how all the services built up over the last eight-ish years using it operate.

The net result is a server which does not work, the invalidation of about 3 months work of mine, and the seemingly unbounded immeasurable incompetance of said administrator being left unchecked as it spews through evolution after evolution of server infrastructure.

The reason for this big problem?... The actual IT Dude doesn't want to learn "sudo shutdown -r now".. That's pretty much the ONLY reason for this change which has had such drastic, terminal, effect.

So people DO NOT just change things for change's sake... and managers, when your fuck-tard employee who has failed to migrate the server for over a year decides you've actually noticed and they tell you "I have a cunning plan sir", don't listen to the smegger, go through their plan with a fine tooth comb, run it past the actual users of the machine and if its going to cause them grief get the fuck-tard to change their plan...

"I asked him to migrate it in as simple a fashion as possible"...
"Yeah, well he's fucked that up royally, I'll go back to zipping up the source code and storing it on a fucking floppy disk each night".