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.