Sunday 15 November 2020

Anything Good out of Covid? My Nails, maybe?

Yes, I've got something... Something trivial to most of you, but which has plagued me all my life.

My nails...

I'm sure a fair few of you out there do the same and I know it's terrible to watch, but when I'm sat programming and take a moment to think about something or just sat bored I chew my nails.  Really quite badly.

I'll gnaw at the nail itself, pulling around to tear off the quick, I'll eat into the skin too, I'll bit and suck and peel until my fingers bleed.

I've tried everything, no more chew stuff, I've put plastic caps on them, I've kept elasto-plasting all my finger tips.  But in forty two years it has never worked.

However, with covid I've an actual reason to NOT chew my nails, going out and touching things in stores or street furniture (like the button on the pedestrian crossing) I don't want to then stick my finger in my mouth; and I really would have before!  I am disgusting I know.

So to combat this, I wash my hands when coming in, I wash them through the day too whenever I've been out and about; which not often, but enough to make me think.

At my desk I've also taken to having a set of nail scissors too, so whenever I feel the urge, I can instead cut my nails.

I'm no expert at cutting my nails, I remember my mother doing it when I was a kid, her having me sit next to her, loop my arm under hers and she'd cut them, the scissors felt cold and alien under my nails... and I didn't like it, it scared me, someone else with a very sharp thing at my very sensitive finger tips.  And worse still she'd cut the nail and the fleshy pad underneath, it'd bleed... so I'd suck them....

Forty two years is a big habit to crack though.  However, I've done a fortnight now, in the new lockdown.  My finger nails were positively long last week, so I cut them, and I've just cut them again now.  I find it very strange to see my finger nails with actual white excess nail sticking out, as I'd have chewed th

Sunday 1 November 2020

Noise Generators & The Conservatory (Work)

That moment you tell someone you're going to go do some programming work in the conservatory during a rain storm and their mind melts as they can't figure how the sound of rain helps with your concentrating and keeping the alpha brain waves flowing....

I use noise generators whilst I'm working all the time, such as this one:

https://mynoise.net/NoiseMachines/campingRainNoiseGenerator.php

And I really like this one:

https://mynoise.net/NoiseMachines/thunderNoiseGenerator.php

But my favourite is this:

https://mynoise.net/NoiseMachines/primevalEuropeanForestSoundscapeGenerator.php

They're works of genius.

And as the new lock-down looms I'm relying on them more and more for that little taste of the outdoors whilst stick in doors.

Saturday 24 October 2020

Stupid Things I've Been Told

Throughout my life I've had moments where people simply nay-say what I've told them... This became a very real trope (until I took up a marshal art and became very good at it) in my life and lead to a loss of confidence on my part, today lets take a look at some of them which I still remember:


English (1991)    AMBULATE

I used the work "ambulate" in a sentence, I was 12 or 13.  My mother immediately said "There's no such word", and I said "there is, it means to walk, and it's where the word Ambulance comes from"... She flat refused to accept this and really made me unsure; she was wrong, she has been wrong about many things, but this was one of the earliest times I actively recall her being dead wrong.  Her response also made me second guess myself, so much so that I sat and read the dictionary, other kids at school ribbed me about this for years after, but I read the dictionary.  I was right, ambulate is a word, it does mean to walk.


Engineering (1985)    METAL SPARKS

My Dad was in the door way of my Grandfathers garage, angle grinding part of the front of the family car, and there were metal sparks flying all over the place, to the left of the closed wooden door was a fabric cover over some garden furniture.  The sparks were flying and landing on this dry fabric.  And I said "that's going to catch fire".... I was 7 years old and I could see this cascade of burning sparks would set light to the fabric if it carried on.  My Dad turned to me and said "don't be stupid, there's nothing in a spark".  As though it was a zero weight particle an ethereal nothing, of course, we all know that a spark is a red hot but admittedly tiny fragment of metal, not only could it have set light to the fabric, but it could also have gotten into someones eye... But, I was seven, I was clearly wrong... No, no I wasn't.


Electronics (1992)    CD PLAYER

I was sat in the library with a selection of the annoying, ignorant, bully children who were my class mates, when one of the boys Richard ventured something about CD's, about their spinning... of course CD's spin, we all know this, that's why they're round and the lazer is set to slide back and forth.  Richard wasn't known as a braniac, but he was right.  Immediately a boy called Zahid took the utter and total michael out of Richard, really horrible child this Zahid was and he was one of a bunch of morons in my class... Martin, Martin, Paul and Zahid were a group of utter moronic and bullies; each with their own insecurities; and they took it out most days on me, but this day they dragged this poor Richard lad into it, who looked quite abashed, I decided to stick up for him... Well, never had I been so quickly and thoroughly insulted by a moron who knew nothing but how to ride his mouth.  Zahid, I hope your now very bald head knows just how wrong you were, and what a moron you looked flat arguing that CD's don't spin, because they do.


Computing (1984)    TYPING

Sat before the first BBC Micro that the school had bought and the teacher was trying to explain LOGO to us, he was leaning over the computer typing one handed upside down, and I could tell what he was trying to type... For I had had a computer at home for the last year, and I'd been typing in simple BASIC programs, so this LOGO thing looked very rudimentary even to my six or seven year old mind.  So I offered to do the typing for him, he was copying off of a sheet, he'd have been able to tell the class the command and then see me type it in and the turtle robot (or just the screen) complete the command.  And better yet, I'd have been so much quicker making the class feel far more interactive.  This teacher, Mr Allison, turned his eyes down on me like I was a dirty stinking urchin (which I likely was) who not only couldn't understand what he was doing, but it was far far beyond anything I could ever do with a computer; see we were a school intended to produce manual workers, no-one expected a kid from that school to end up being a programmer... I'd hazard a guess that a fair few are now, and I look back on that day thinking... Why did he say I couldn't possibly type?  When I could and can....


Computing (1993)    FLOPPY DISK FORMATS

I was always curious about computers and when my senior school created a "lab" with twenty Acorn A3000 computers I was eager to give these 2megabyte machines a whirl.  My machine at home was an Atari ST and it's floppy format was compatible with the Acorn machine (they both being nearly perfect compatible matches with MS DOS's format on the IBM PC).  But this lab was always closed, not always locked, but closed... But I started to let myself in; and one day I was caught in there, learning, programming and typing notes, by one of the teachers; I don't remember this guys name, he was never my actual teacher, but his lab was his coveted land and I think he was a little put out that I was there with two of his machines going doing different things at the same time, not just that, but I was doing things so much more quickly because I'd learned that the Acorn OS came with a RAM disk, and with 2MB of RAM I could assign 500-720K and basically copy the Floppy disk straight into RAM, work on it incredibly quickly, and then sync the data back to the disk... So I could do the work I was doing incredibly quickly.  He didn't like this, he didn't want to learn, he just wanted to make me look a fool.  So he asked me what the disks I was using were.  So I showed him, "You have an Acorn at home?"  No, I have an ST... Silence, he just stared at me, and he paced off to his desk and pulled a disk out his desk... "Go home and make me 10 copies of this".. and he handed me a box of blank disks... The disk was Lemmings... This teacher was literally giving me homework to commit copyright fraud... I didn't take that disk home, but I did return to his lab... turn on all the machines, and copy the disk once.. then with the two copies copied it on two more, then on the four machines I made the next four copies, and then I had the last two machines running the write of the disk as he walked back in... A mere ten minutes later.  "That should have taken you all night!".... Why... it's binary maths... 1 becomes 2... 2 becomes 4... 4 become 8.. here's your last two... "Aren't you the IT teacher?".... he just stared as I handed him his contraband and left the room.  I didn't like the man, but I was a black-belt in karate and knew who I was by then...

Saturday 17 October 2020

Four Drives Enter, two Drives ... Well they're fine, read on

Very much like my prior post I've come to turn on the wall mounted server, which is no longer on a wall... only to find the ZFS pool is degraded.  Two drives are AWOL.

They are plugged in, the cables are checked and good, the power is good.... But for two to just vanish is a mystery, they're nice new WD Green SSD's.


And you can see the disks are added to my pool by ID, so it makes no difference which SATA port I plug them into.

I've got six SATA ports on this Motherboard, in three banks of two.  I wondered if the two other banks (as the boot and first mirror in the pool were in the first bank/pair) had gone bad, so many reboots later and checking, no it seems just these two drives are outta there.

I'm going to remove them and come back to this once I have a firm back up of the data.


Here they are.  So I bought these in June, they're marked March 2020.  My plan is, take the data off of the surviving drive in the pool, then sacrifice of of these two to the fdisk gods and see what it does.....  


There we are, that's one of the two in my SATA to USB caddy and... It's fine... Shows itself as very little use, it admittedly is a ZFS formatted drive, but the SMART information is all normal, so I'm thinking....

I'm thinking maybe the PSU on that wall mounted server is doing strange things.  Once moment, I'm going to try that hunch by removing the SATA power from the detected single drive and putting it in the other of these two I have laying here.

YES!... Right, so the disks are good, but the SATA power is on the wonk.  This is a horrid cheap PSU, so maybe time for a replacement.


Friday 16 October 2020

Phantom Recruiter Calls

This post actually got corrupted... and wasn't that funny, so I'm just nuking it.

Basically the guy called me, and I had NO idea who he was.... wasted my time, as did this post.

Monday 12 October 2020

That 32 Core build....

 I've just been sorting out the 32 core server and setting it up to do me a test build.  I chose to build the llvm-project, with clang, clang-cl, libcxx, libcxxabi, libunwind, lldb, compiler-rt and lld enabled.  As a release only....

Anyway, I had to share this awesome screenshot of the build progress window, and then the inset window of a second terminal session showing htop...



Saturday 10 October 2020

Twelve Drives Exit - Only Ten Drives Survive

 I've spent the morning doing a bunch of hard work, like using a surface compactor to lay a 60 meter gravel track... I was knackered come lunch, so I decided to have a play in the server world.

Now, some of you may know we're between properties at the moment, this means I had to take all my servers offline and move them.

However, I've been desperate to get the 32 core machine back online.

Booting up just now though and a couple of the drives had gone bad, like physically bad.  As such my ZFS pool was just a total write off, so I've decided to restore from my offline back up.  There's not actually that much data on that cluster, it was only running raid 2.... And with two disks dying in a simple move, I thought it better to go for raid3.


But remember folks, RAID is not a back up.  My important server is a triple mirror Zfs pool.  I can lose any 2 of the three drives over there, and they're brand new nice WD SSD's... plus the server is ONLY turned on for backups.

This serer is my scratch working/coding project server, on which I host my build slaves and nodes in network tests etc.

Thursday 1 October 2020

Frank Herbert....

I started to re-read Dune last week, I've read a good piece each night and finished the first book... This is ahead of the new Film adaption coming out later this year.

I first read it in the late 90's whilst at Uni, whilst reading a bunch of other classic's such as all 2001 and it's sequels.

What I had utterly forgotten was just how easy it is to read, it's what I would describe as a smooth read, you feel that you could just keep going each chapter on chapter.

Thursday 24 September 2020

The Racist Editor

I was just reading about Arati Saha, her being highlighted to me by today being her 80th Birthday and google giving her a doodle.  My target to learn about her was of course wikipedia.

Unfortunately as I was literally watching there's some racist person on there, sadly someone in the UK, who use Sky Broadband editing the page in some disgusting ways.

For example the page clear is of an Indian woman, awarded by India etc etc, she's Indian, absolutely unequivocally.

Yet this little oily turd, hiding behind the supposed anonymity of their IP address was editing it to say she was English, Scottish and Welsh.  Similarly they were defacing the page to say she was alive in 2021 and had the Nobel prize... every edit had a slightly more western bent to it.

What kind of bored, pathetic, moron defaces a page, clearly only highlighted to them by the google doodle, at 9:10am of a morning.  Can't they find anything better to do with their time?... Like post themselves to Bangalore and learn about the culture, exquisite cuisine and fascinating people of India?

Here's the "Whois" on their IPv6 address, I'd ask you all to do as I do, and send an email to sky reporting the abuse of this page by that IP address, see if in this sea of abuse and racism we can get some action from them?



Sunday 6 September 2020

Forgot to Ride a Bike... Or?

I'm totally confused.... For you see, they say once you've learned to ride a bike you never forget, and I've not forgot, not one bit... So what's the problem?  Well, the problem is that the bikes have changed!

No I'm not talking electric, no I'm not talking mountain or anything like that, I'm talking about the brakes.

You see, I'm right handed, therefore my primary braking hand is my right hand, in a car I brake with my right foot, on a bike I want to brake with my right hand, this is how it is, how it was and how it always should be.

This should be your rear brake, you brake with your rear wheel first, so you don't lock the front up and go over the handle bars.

It's simple safety and ergonomics, and sure as a kind I remember lefties swapping their brake handles.

But... but... we've bought a bike from France... From those duplicitous Francophiles at Decathlon... And the primary brake is the rear brake, but they put it on the left!!!!

They literally put it on backwards.

It does my nut in, that I have to crack the plastic on the molded handle and swap them over... And no, I can't just remove the wire and swap that, because the rear brake wire is a physically different material to the front!

It is infuriating.

Friday 4 September 2020

Great Rack Mount Mistakes #7

Today's story in the annuls of problems in IT comes from a guest editor... Mr B.... And Mr B (no relation to anyone in other stories given monogram names) works as the sysadmin and developer for the whole set of systems with his employer; unfortunately this means "it's all his fault".

So what went wrong?  Well, over night the site had a power cut and though they have a nice server, they don't have a power back up, so that server went off.

The server is essentially a java host, specifically hosting Tomcat, and it reaches out to connect to a set of third party endpoints via a restful API.

You'd think no big deal, start up get running and keep running, except that third party don't force a disconnect upon a new edition of their interface API, if you're connected to version 1.0 then you can and they will happily leave you connected to version 1.0, even if they release interim updates, add new calls and quite what got Mr B today remove a call or two.

Your session ending, and then I presume all sessions of that old version, would free their server provisioning to de-allocate the old version.  But to force users to migrate upwards in the chain their published API (so think the end point here in whatever flavour you wish) declaration changes.  Such that you re-download it upon re-connection and that's your new flavour of the month API.

The problem?  It didn't work.

So Mr B had to set about debugging this on the fly, in a live environment, which was down.  And he went through the three stages of technological grief....

1) Denial:    "This is completely illogical, my code brings down their interface, which is the only thing we connect to, it must be right, they can't miss-match them, so this must be my side or the gods are against me".

2) Investigation:  "Read the logs, make a change, nothing seems to work, the gods are definitely snickering behind that cloud of steam now".

3) Realisation:   "If it's not me, and it's not the system here, it must be their side, the huge multi-billion international must have published their API spec with a mistake or miss-match.... click.... YOU FUCKERS!"

What was the actual problem?  Well, the third party published API was actually wrong, the downloaded specification still contained several calls which were removed, when the services Mr B had written came up they checked each end point and found several calls defined which did not respond and so his software, correctly, reported that the endpoint was offline.  They were, they didn't exist anymore.

His fix was to literally tell his stuff to ignore the multi-billion dollar international service providers API spec and to "download" a copy which he hosted locally, with his own edits to it.

Now, he's a tiny fish in a huge pond here, even if he reports this miss-match said multi-billion dollar international isn't going to hear him, and by the time he does they maybe several months down the line, and other folks may have spotted this problem.  He maybe listened to, but he essentially doubts his voice would be heard.

The problem of course being how to abate this issue in the future?  How to avoid this stress?  For at one point he did say "the company is done for", because literally everything was offline, all their services were down.... And of course everyone will blame the little guy doing all the IT, they won't think that the multi-billion behemoth entity could possibly publish a wonky API spec, most of those shouting at Mr B with mouths frothing wouldn't even know what he meant when he explained this to them...

The fact that he's identified this issue, resolved it, and everything is back up within two hours won't be remembered, the glass will remain half-empty, and so it'll only be remembered that on the 3rd September 2020 Mr B's IT suite went offline.

Wednesday 19 August 2020

How much CPU?

This is a story from around six years ago, when I was given a virtual machine host on a server by the IT guy and he was a little perplexed that I actually used it... A LOT.  But we also found something out about the way his session management worked.

The host machine was some Dell server with a pair of Xeon E5 class processors, I don't know what they actually were, for I only saw a very limited guest virtual machine.

My virtual machine was some debian based distro, I think Ubuntu, but running gnome not Wayland.  because we were working on some gnome hosted front end.

Anyway, the machine was a continuous integration machine, and I immediately set to making it build the software every time there was a commit to the repo and also to build it overnight and give us a daily build and smoke test.

The problem?  Well, this was quite a lot of work.  I'd been provisioned to use two cores on the host machine and I basically maxed them out, building the whole system software and then overnight building the whole toolchain and then the system and packaging it after running a series of intense tests basically took 100% CPU for about 3 hours.

And the IT manager was a little befuddled quite what was going on when he kept getting told there was massive activity on his machines overnight.

He wondered about hackers, or some vulnerability which had let them in, of course being a windows guy and the host being windows he just blamed Linux, and I sat pondering the problem and then simply asked "Do you know what the machine is being asked to do?"

And I showed him on my workstation, which was 8 cores and 32GB of RAM... and he blanched at the amount of work... "You're only building software, why does it max out the CPU for that long?"

The lesson?  Don't skimp on your continuous integration!

Friday 7 August 2020

Ten+ Years of Phoenix : A history of a Project

The Phoenix Story.... To be clear I'm not talking about the book:


No, I'm talking about a project I worked on for just shy of 10 years, which started off as the idea to really sort out the product line we were working on, software that did end up on thousands of machines in its time; was ported to at least five different hardware platforms; but which ultimately needed replacing almost before it hit the market.

Phoenix was conceived, I think, by my then boss... We'll call him "Mr B".  And it stemmed from frustration with the previous released to the public project, which was written in a bit of a shambling mess of bad C and only one chap knew how to work with it when I joined... It might have been a little bit of C++ (I remember the chap reading the first edition of the STL book)... And then a failed attempt to make a new system in Java, a bit of C++ and some SQL.... but mainly java connected to a marathon database.

Marathon you might ask, was an open source variant of DbaseIV and had been used by one of the "senior" software engineers in her prior role.  If you google for marathon database today you'll be hard pressed to find a link to it.  There's a reason for this.... It sucks.

But before we go into the technical's here, "Senior" software engineer.... lets call her "Mrs N", really was a bit of a number, when I joined as only the fifth permanent staff (and ironically I joined as a technical documentor not a programmer) she made out she was very senior and really made out that she knew everything.... She effervesced this air of knowing and knowledge, she very much talked the talk... But did not walk the walk.  It wasn't until many years later that I learned she had only been there two weeks longer than me, a mere ten days and that she wasn't a "senior" anything, she was leveraging herself to the management regularly to make herself sound indispensable... She wasn't.... Not at all.

Back to the technical's, this marathon database was to hold ALL the information about the system state, literally it was a state machine without the words "state" or "machine" being used.  The software created a connection to the marathon driver (I can't remember if it was ODBC or ADO) but the up shot was the system ran incredibly sluggishly.  Booting windows and then the software took upwards of 5 minutes, it was a real bane and a pain to work with.

Everything, and I mean everything, went through a stored procedure; which Mrs N wrote, if she'd not written it, then you were not going to get that data and if the result of the stored procedure was not what you expected then you had to submit a new request, she never really went back and fixed bugs, things were either the way she wanted them or you had to ask for more things... so there was massive bloat and creep in this code base almost from the get go.

Bless him Mr B started to try and do code review, he had an idea of trying scrum, but it wasn't scrum, he didn't make everyone be quiet and talk one at a time, quickly then move on.. No.... And I've touched on that shambles before.

With Mrs N ruling the roost Mr B quietly (and sometimes not so quietly) retreated to his office and he would hire folks.  And at some point he hired a contractor, Mr J....

Mr J in the short term was okay, he did his thing, he knew his stuff and he had good ideas, but he was hard to work with.  But he knew this new thing called C#.  And quietly in the bosses office, on his whiteboard was born "Phoenix".

The moment of Mr J presenting this to the boss he was moved onto this super secret mission to make the new new system in C#.

Which left a development vacuum.. Mr B needed someone to use in order to hide Mr J was not doing shitty java to marathon mouth to mouth.... I was thrown to the lion that was Mrs N.

Technical documents out the window, into that position they needed a programmer and I plugged away at that system helping the web developer do an integrated menu and control system, but we constantly battled Mrs N.

Mr J and Mr B however kicked off this C# and soon they had a state machine, an actual state machine by Mr B and an event passing system by Mr J... the special thing about this event passing system was that is worked cross-process, so you could stand up a C# application connect it to listen for a message... then stand up a completely separate C# application and it could send the message to the first... This allowed for a highly modular design with each part of the system mapped down to a state machine and a connection to the message bus.

It made perfect sense, it worked, it was better than using the slow assed database as the inter-process communication bus and importantly the events could be monitored, so you could introspect what was going on.

This was Phoenix... State Machine, Inter-processing Communication Messages, Highly modular.

I would assume at some point the plan was to make things like new features modular so a customer could buy a base configured machine and opt to allow it to do whatever other functions down the line, like add accepting credit cards or add printing a ticket, whatever.  Modularize it and add it on later, or critically remove it.

The problem?  Making this highly modular effectively meant everything was highly asynchronous, and there was no way to synchronise the ballet of messages going between applications, after a few versions even something as simple as booting the module executable's in the right order became a tiresome mess.

But, the initial versions went out to customers and they did buy them, and so the product lived on.... However, a highly async process stack, running on a single core Celeron processor... isn't particularly asynchronous, there's actually a huge amount of linear ordering going on all the time and massive amounts of process context switching.... So much so that in some configurations over half the 1GB of RAM was being hogged by just passing messages to systems which had yet to be woken by the windows scheduler and clear their backlog of events.

So it was after about six years a new piece of hardware hoved into view, it was a dual core box... Immediately the systems were out of order, things were going wrong, and it was a nightmare.

To be fair, the idea was sound, the implementation not so much and the language used, though flexible incurred (at that time) too high an overhead on the hardware.

Mr B struggled with this, and then he hired a new manager, a sub-manager to himself, to control testing.  Lets call him Mr P... Mr P initially had some good ideas, he used dot to create some process flow information, he tried to control contractor Mr J (who was not a permanent member of staff as he was the only person who knew anything about the message passing) and they were all wrangling to try and make this system work on newer and newer hardware, until one day it had to go onto a wholly other machine....

None of the hardware interaction stuff was abstracted, so it was written all over, but still not abstracted... you could boot the old hardware layer or the new... or even both and make it eat its own tail.

And then there were lay offs... a bunch of the folks working for Mr P went, a bunch of the testers went, and there was a big reshuffle.... I got to work right in front of Mr B... and started to try and bend his ear, to push him in new directions and not rely on Mr J so much... There's a story in that to tell.

However, things became really interesting at the turn of the final year of the whole team being on the project, a new piece of hardware was yet again acquired and the company wanted Phoenix to run on it.

I set about making that happen, and I just ignored Mr P, and Mr J and Mr B.... I made the new hardware version and fixed a huge swathe of problems with booting and data at the same time.  I couldn't disentangle from the death embrace of the message passing and multi-process context switching, but I made things better.*

* One of the things I did was find that the C# file exists check was about 10x slower than doing it as a call to "fstat", so I made a dll with just a call to fstat exposed, loaded that DLL into C# and that made the code massively faster at boot.  I then found all the C# "image.load" functions were really slow, but the equivalent from GDI+ were much quicker, add them to the DLL and voila C# went faster.

So when at the end of Q1 the team was basically told, we're letting you all go, we need one person to keep the project tided over, they picked me... I'd demonstrated a breadth of knowledge, fixed so many problems and hey one can't easily fall out with oneself.

Looking back I think the decision to keep me shocked a lot of people who thought themselves indispensable, but the proof was in the following few months.

Where the fault rate went down from the 20% range, to 18%, then 7% and finally to sub 1% range.  We were on more machines than ever, but we'd cleaned up the code base, the three testers we had went over the systems in a methodical manner.  I instigated a policy of cleaning up the code as I went, removing inter-process communications, reducing the number of vertical slices you had to hop over to get to the functionality you required and I also wrote tooling... Event viewers.... State machine inter-process visualizers, even a GUI designer.

All to turn the human element into a tooled touch of the code, control how it's used.

That didn't ever mean the testers and operations manager (Mr D) was dettered from playing with the system, far from it... But things were better.

The Phoenix project had a legacy though, the structure and controls... The message passing, the installation process, the IPC and the state machine were all a little wonky in their quirky little ways.

So it was in 2014 I restarted my own personal effort to write a new system, at home, alone, in C++.  That was Bluebird and it has a whole other story to tell.

Tuesday 4 August 2020

Raw Graphics Engine : C++ Project

It has been a whilst since I had a personal improvement project grace these pages, so here's one I started over the weekend.... A graphics engine.

Sure this is something I play about with all day in the office, we're writing games!  That's literally my job, but I've been a system engineer for such a very long time, and I've seen all these sparkly things coming from folks working on game play and wanted some sparklies of my own.

I therefore began two projects, both are graphics engines, but they're very different from one another... one is in Vulkan, which is not what we're talking about here, no we're talking about the other one... And this is a graphics engine I've written myself.

It's gone through three phases since Saturday, Sunday and then just tonight.  The first phase was setting up the basic rendering, getting a triangle on the screen and making it flat (orthographic) projection.


The engine is written in C++, uses SDL2 for the window and renderer, but the engine itself does all the geometry transforms through linear matrix mathematics that I hand crafted, and it reaches into the third dimension in orthographic mode.



The shapes can be rotated, scaled, translated, the usual.  But before I drove myself mad with writing shapes by hand on graph paper, I wrote a very simple importer for the very simple Milkshape 3D model editor, and started with a sphere:



Milkshape has appeared on these pages before and is really the only modelling package I'm familiar with, I really do need to learn Blender don't I?

So with models loading I got a little adventurous:




This mesh really stresses my single core linear mathematics, so I started to switch it out in favour of GLM tonight:

// Model
glm::mat4 model(1.0f);
model = glm::translate(model, trans);
model = glm::rotate(model, glm::radians(angleZ), { 0, 0, 1 });
model = glm::rotate(model, glm::radians(angleY), { 0, 1, 0 });
model = glm::rotate(model, glm::radians(angleX), { 1, 0, 0 });
model = glm::scale(model, glm::vec3(scale.x, scale.y, scale.z));

So, that's been my three days.. I'm interested where and what I will do with this engine.


However, Vulkan, that's the other thing I'm learning.

Thursday 23 July 2020

Drop Ships Dilemma

I'd never heard of "drop shipping", to me it conjure soldiers in heavily armed space-shuttles being flung pell-mell at the surface of an enemy planet with the winds of plasma and fire burning all around them.
However, what it actually means; apparently; is that you've bought something - say a chair - off of a reputable site like Amazon, but you did so not from them but seller on their platform.

This seller then doesn't actually sell you anything, what they do is contact their own network of suppliers and they buy the item for you and get it shipped by that third party to you.  The drop ship being that third party, to whom you don't exist, they deliver to your address as though you and your address is the middleman you met on whatever selling platform you chose.

And apparently, this is legit on some selling platforms, Amazon, Ebay etc etc.  The former put some extra steps in there, such as if you have an issue that middleman has to accept the return and handle the shipping, but this is a nightmare, because you use something like Amazon or Ebay for the protection the service affords, the expectation of easy and care free returns.

The trouble being, this middle man is only there to cream a little commission.

So my issue was a chair, is a chair - this is still going on - which I ordered from Amazon on the 13th, I didn't even clock it wasn't via amazon themselves, this chair has a brand and a name and was set to be delivered on the 20th.

Which came and went no sign, also no tracking, when these drop shippers do their thing they can keep their cards close to their chest, Amazon just ask that they've dispatched when they say they have ditto for ebay.

Trouble was this middle-man tried to tell me that they had called and left me a voice mail, and I'd not gotten back to them... .except, I don't have a voice mail, don't like voice mails... so they lied.

During this discussion they then said (bare in mind this is the 21st, a day late and eight days since ordering, which said "dispatched") it'd not even been dispatched, indeed it wasn't expected into stock with them until the 27th.

Silence.... I want my chair, I want to know when it'll arrive.

I still don't actually know whether this is a drop shipper or a scam.

"We have another chair, I assure you it's better, more expensive which we can get to you tomorrow".

Now, just because something is more expensive does not make it better, and I spent time picking this chair out on Amazon, it has all the bells and whistles I want... four major features and a comfy shape.

This middle man is persisting to send me details of another chair, and "if you agree I'll send that next day delivery"... this seems like a scam to me, but I don't even get to choose because the information never arrived.

I never saw the info, so never okay-ed it, I never wanted anything except the item I ordered.

Just now, I'm in the kitchen and I hear the letter box flap, and a van drive away... there's been no knocking, no noise made, just a note through the door "left with neighbour".

Hate my neighbours, but go find out what this delivery was... turns out to be a chair... Not the chair I ordered.

A quite ugly square one... with two features I ordered missing, made of plastic not steel, and a manufacturing fault along the top cushion.

So I call this guy up, tell him "I was expected to wait for the item I ordered, I never got the info, never asked for this item, it's the wrong chair and missing features and made of the wrong material".

"This is a more expensive chair" he says.

It certainly doesn't look it, and even if it arrived with gold bullion stuffing the cushions I'd return it because it's not the chair I ordered.

This guy is getting on my nerves, and that's when I realize I've been drop shipped, this guy is in an office himself, this is "his business", but he's clearly at work doing something else, he's not a chair saleman, he's just acting as a middleman.

So back to the selling platform, Amazon... who... seem to be quite happy to let 48 hours pass until they will even talk to me, to give the guy time to reply to me...

I therefore am out of pocket, still without a chair, and frustrated by this whole mess.

I think Amazon need to make a very much more clear distinction between the items sold and delivered by them and items being drop shipped like this or worse.  "FROM AMAZON" in a big clear type.

There's even issues there, for instance I've seen resellers listing parts like say "Intel CPU's" and it'll be listed as "by Intel"... but it's not being sold by Intel at all, sure it's made by intel, but "John Doe Computer Tech in Driotwich" are the seller on Amazon, and really we need to be told that more clearly to avoid the kind of situation I'm now in.

Wednesday 22 July 2020

New Blogger is Bullshit (and Slow)

The new blogger interface.... Gah, so I hate it, they've moved things around and it's so very very slow, I just wrote my first blog post with it and getting the labels on took literally minutes as you type and it flickers about and then just terrible.

It was sluggish to do anything at all, including formatting.  Literally to select all then justify took tens of seconds.

It's instant in here, always has been... stupid new interface...


It's a great example of change for changes sake.

Friday 17 July 2020

Amazing Moments in Programming : Motion Detection in 1999/2000

You know those amazing moments?  They come in life, they come in love, and for me they come in programming... one of those times was the first time I ever worked out I could program a computer.... but in the programming pantheon the most impressive thing I've ever seen was a chap going away for three days and writing a complete motion detection system.

Yes, this amazed me, we're talking 1999/2000... He had a Pentium II 300Mhz with 16MB of RAM and Borland C++ Builder, and he literally went into a room alone for three days and came out with this program.

It was amazing, even capturing a digital image was novel and new to us back then, digital cameras were not common in the UK at all, and even then carried huge costs.

But this chap got the custom 320x240 pixel, black and white, video feed and he made it able to capture the motion and direction of an average sized adult human going past, so we could start to gather metrics and count the direction and flow of people around a superstore.

This was not my first gig, but close to it.  My job was to write the 2D visualizer, which we then converted into 2.5D isometric and let managers follow the major flow of customers through their store, so they could place seasonal offers to best effect etc.

But it all stemmed from that day, that little screen lit up, with the 320x240 pixel capture and little yellow lines danced over the screen and it actually detected the people.

It was amazing.

Wednesday 8 July 2020

Waste Management or Disposal

This is fine, the BBC have released this film to highlight to us mere tax paying mortals the problem affecting the environment... Personally, I loath when I see any waste discarded, fly tipping being my personal bug bear in Nottinghamshire (a land-locked county).


Good, great we all know...

But realistically what can we do about this?.... Well, we, or at least I certainly, pay my council for refuse collection services, they come each fortnight and take my waste away.  Any excess I store, compact and take to the local household waste site run by Biffa.

These are council services, they are firms whom have tended to the council to responsibly collect, manage and dispose of my waste on their behalf, and I as a customer of the council expect it to have been done responsibly.

Maybe, I should contact the council for an audit trail of where my waste goes, but I'm pretty sure the council would say "they collect it, and they dispose of it".. and way back when in the mists of the negotiations for that lowest rate possible waste collection service there was a plan probably waved about in front of a Councillor or clerk and it was accepted as the planned disposal method.

And across the whole country there will be similar, if not identical, sets ups with each and every council, from London to Llandudno, from Nottingham to Norfolk, everywhere in the UK the waste is collected and managed by councils.

So this piece of journalism by the BBC, though informative and ghastly, is really pointing the stick at the wrong folks, we can't opt out of council waste collection, one can't selectively only pay for part of the services afforded by our council tax.  If we could then one would be able to opt in and out of anything, chaos would reign.

The responsibility to dispose of this waste therefore, rather than it end up in the ecosystems of our planet, is that of the collecting agent, they took our money for it, we put our trust that its being fulfilled, and if not perhaps those councils need to be brought to account, rather than this kind of video make me feel guilt.


For I do feel guilt.


But there's very little practical steps I can take to dispose of my waste through any other channels, or companies.  I can't incinerate it myself, I can't bury it anywhere myself, I can't recycle things myself, they are large industrial tasks which is why I pay my fee and clearly hope for the best.

But the best isn't good enough.  Councils of the United Kingdom, sort this one out.

Monday 6 July 2020

Critical Customer Service

As we all move into working from home and relying more on email and text and calls some firms really Really REALLY have to up their game with communication.

So, firms out there listen up....

1. You Can't assume your customer knows what you're doing, you have to let them know...

2. When your customer sends you a text, or email, or leaves a voice mail with a clear question... Answer them, even if it's with a "I'll get back to you".  Close that communication loop every single time a customer communicates.

3. Follow up, set a time limit or batch replies to a customer together so you touch base with them in a timely fashion, if you're working day to day, reply at least every 2 days, if you're working week to week reply at a bare minimum once a week.

4. When deadlines are looming, and you're working hard to meet it, tell the customer... If you don't they're free to assume you're not working well for them.

And failing in any one of these areas of communication is, to me, a clear indication to stop using that service, in these days of need and tight budgets and failing businesses, those whom are bad at communicating will loose custom, they'll then loose revenue and they will fail, the good ones will keep custom will keep revenue and survive.

These days of strife are pushing on us an era of cutting the crap.

Companies, cut the crap customer service.

Friday 3 July 2020

The Wall Mounted Server

Something is wrong, it turns off randomly.... And I suspect the PSU, new one has been ordered... the cheapest one on Amazon, this may or may not be a good thing.... Lets see.

Thursday 2 July 2020

Rabbit Scratch


OUCH!

We've had a bit of drama with Bob, our new bunny.  First he's cut his own ear open... 


So he literally has skinned the back of his ear, leaving only cartilage.  The vets saved this and curled it back and he wore this hair roller like contraption to save the skin...

He was not impressed...
However today, after a week of healing he managed to pull the half healed skin back off!  To tomorrow he's got to have an operation to try and remove the flap without loosing half his ear.

Now, because that skin lived for a little bit and had a blood supply is has let a bit of healing start, which is good... but right now it's a bit raw until he goes in tomorrow morning.

As for his scratching my chest, I was taking him back to his hutch and he got excited to jump in and just.... yeah... Hurts like hell.

Saturday 20 June 2020

CubeWorld - Where's my key?

I bought CubeWorld back in the day, and I just heard it was actually released, this really annoys me that I've heard it's been out ages... and apparently wasn't as good as the demo even in the end.

But the really annoying thing is that apparently early buyers like me were meant to get a code to play the game?!?!

Where's my game key?.... What a total cock up he made of that game.

The Hot Water Pipe Balls Up

The worst mistake I ever made as a kid.... Was flood the house.

Yeah, so... my parents had a new central heating system put in, all the floor boards up job, British Gas did the work... and for some unknown reason they left all the floor boards up when the finished the job.

To this day, I don't know why they left the job, with hot exposed pipes in the floor space.  But they did... Pinky Swear.

So, Saturday morning my Dad set about putting the floor boards back down, he embroiled me in this, despite my not really knowing one end of a hammer from the other, he put the first board in place and started to put the nails into the holes they had come out of and tamp them down.

He handed me the hammer and said to put in the two nails at my end.... I placed the nail in and hammered it once.... Handing the hammer back to my Dad and we crawled forward to the next joist.

And then I felt wet on my knee... Water was merrily flowing up out of the nail hole and across the wood... warm musky water... heating system water, fresh fernox.

OMG!!!

But my brain said "hey Dad, there's water coming out this wood"... which in retrospect is one of the most spectacular brain farts I can ever imagine, they were the words my brain delivered so my mouth spoke thus.

Panic!!!!

We pull the board up... to put a finger over the hole... but we can't... the hole is in the side of the pipe... the nail had gone down, turned about 60 degree's and gone into the side of the pipe... how it managed this I'll never know, unless I buy that house strip that floor board out and dissect that joist.

So this hole in the pipe was well out of reach below the level of the joist in this cut, you could not put a finger in it... and the heating was on, this water was getting burning hot.

We wrapped towels around it, all sorts, i got scolded pretty badly by it... British Gas wouldn't come back, their home care insurance cover for this didn't cover us for our sticking a nail in the pipe, despite the argument that they pulled the bloody boards up why didn't they put them back down!!?!?!!

To this day I'll never understand why they were left like this.

But this all became my fault.

A plumber arrived about an hour later, he drained the system, cut the pipe, two compression joints and bosh fixed.

I never lived this down of course, this was over 35 years ago, but I still hear about it, and I've even written about it right here, so it plays on my mind.  Not for my ineptitude with a hammer... but for the physics of the thing, how did a nail, driven in straight as far as I could tell... How could it turn like this and stick into a pipe's side, it's lower radius of that side even from a straight above shot?

Pulling it out, the nail had a bend added a perfect bend, as though it had gone slightly into the joist and just turned.  The other nail was still straight and true...