Friday, 29 July 2016

Gaming : - New Personal Best

Just shy of 20 minutes growth... Not bad... Died to a super snake, he clipped the last of his fifth gold tokens as my venom spit struck, and... boom I popped, but I was quite happy with this performance.

Tuesday, 26 July 2016

WebSense Low-jinx

I've discovered today that WebSense is automatically killing off many links to many articles in my blog...

I covered this happening as a joke back in 2010... Six years ago!...

But today it seems the moronic thing has listed a whole plethora of my pages as "Sex"!

This blog is anything but!

And they're owned by Raytheon now, you know the US defence contractor, the ones who make missiles!... How can you trust any of their code when it does this amount of false positives, and is doing six whole years after I first pointed this out?!?!?!

Monday, 25 July 2016

Amazing Developments #2

In the second of my postings, for this series, I've come across "ThorsHand11"... Not only do I like his approach, but I do enjoy his interaction with the community, he's willing to give and receive feedback live and makes it part of his work flow... Plus his work looks like games I used to play years ago, and I've a real soft spot for that.


He's creating a procedurally generated RPG, and you can check out his live stream here.

Wednesday, 20 July 2016

Gaming/Software Engineering : The State of Testing

I'm going to have to be a crusty old bloke for this one... But bare with me... When I was a lad you had a 3.5" disk delivering your game to the customer (I was that customer), when I was a kid you had that audio data cassette delivering your game... If you had a bug, you had a problem, because that game never worked for your customers.

This trend, this ethos that you had to test your stuff was necessary, critical even, and I think rightly it was a corner stone of my computing education.

Yes, when I started to program I would just throw a few lines of code together, but as soon as that became a formal skill, with formal training, I had to start to test my code, I had to start to make sure things worked and not just in the normal everyday ways, but obscure, off spec and all possible ways.

This has become a core skill, and I'm sure I annoy some of my younger colleagues when they have a problem; which they have done their due diligence on but they have no idea what their bug or problem is; and I walk along listen, look at it, and come up with the answer, and if not the answer at least a plausible set of leads for investigation.

Its understandable, after all these years, I do know what I'm doing, I have dealt with systems, and hardware, and people and things going wrong so many times, in so many ways sometimes you can just feel what's going to be wrong.

The trouble today I find is it is very hard to express this skill onto others, you can't just impart all your experience to them, and when you sit and write down some of the more off the wall, but important examples, people don't believe you.  Or they believe that you're exaggerated, or they simply don't want to listen.

And so I'm seeing a generation of developers whom don't look to test, I've seen them release, to customers, some horrible, terrible code, which was buggy, broken and even tantamount to criminal.

What do these developers expect to happen?... Well, unfortunately, the half dozen or so I have been dealing with, their 20-24 age group mantra, seems to be "it's Alpha" or "it's Beta" and then the death nell for their credibility from me is "the customers will find it".

The customers will find it... Not the volunteer testers... Not the testing department... Not themselves... the Customer, someone whom has paid for, or bought into, their ideas.

Too many times, too often, and too readily, developers are passing the testing phase from themselves to others.

This was a good thing, about five or ten years ago when this trend began, programs and systems went through some form of testing and then went to open testing, to volunteers, to start that feedback cycle.  But all too often today, it's written and thrown back out there.

I hate it, I really hate it, I really wish some of those developers could stop, look at their projects; and they're good, if not potentially great projects; and then fix their shit.

Monday, 18 July 2016

Amazing Developments #1

This is a new, off the cuff, series of posts, within which I'm going to bring you some of the best developments I find being performed in public... Today's lucky, and our first, showcase developer is:

William Chyr

I literally just stumbled over his live stream this evening over on twitch, links below, but his amazing looking game is:

Manifold Garden

Check out the awesome site itself here, and Williams live stream of development here.

Tuesday, 12 July 2016

Software Engineering : Arduino Uno - Flashing Clock

What is this flashing clock?  Well, it's just an arduino uno, with three LED's, one each for the seconds, minutes and hours.  They don't show the time, they just flash as each period they're counting passes.

So, we're going to count the seconds and flash just the second LED.  Then each 60th flash, we reset the seconds counter, increment the minute counter and have the minute LED flash.  Ditto for the hour counter each 60th minute.

I've got the LED's VCC legs connected to digital pins 8, 9 and 10, with the other connected to the three grounds.  When I come to make this an actual board I can have a single ground pin being used up, rather then using all three on the board.

An important part of the code to focus on is how to turn on each light in turn...

If you want to turn on the second, the minute and the hour LED all at the same time, you could have some horrid "if" statement controlling them, but much more clean looking is this:

// Turn lights on
    case 2:  digitalWrite(HourPin, HIGH);
    case 1:  digitalWrite(MinutePin, HIGH);
    case 0:  digitalWrite(SecondPin, HIGH);

So, the count is reset to zero each cycle it is incremented if we add to the minutes, and incremented if we add to the hours.

The switch statement then drops through, notice that there are no "breaks" on the 2 and 1 (hours & minutes) cases.  So, if we have incremented the hour, we have a count of two and so we set the HourPin High, drop through to the MinutePin High and finally the Second Pin High before we break.

Likewise, if we only set the minutes this cycle, then the count will be one, so the switch statement will drop down to the Minute Pin high, skipping the Hour pin totally.

The effect of this is to seemingly instantly turn on all the LED's each cycle as they are needed together, there is no humanly noticeable staggering of the lights coming on, as one might get with an if statement, or once might get if one were to set the LED as we increment the values.  Doing Lights on when we increment actually clearly shows the LED's going on and off in a staggered pattern.

Our task after turning all of them on is to just wait a short time (100 milliseconds) and then turn them all off with another switch statement.  And with them all off again simply wait for the remainder of the second (i.e. 900 ms).

Keep this in mind as you read the following code:

// The pins
int SecondPin = 8;
int MinutePin = 9;
int HourPin = 10;

// The counts
int CycleCount = 0;
int SecondCount = 0;
int MinuteCount = 0;
int HourCount = 0;

void setup() 
  // Setup the pins
  pinMode (SecondPin, OUTPUT);
  pinMode (MinutePin, OUTPUT);
  pinMode (HourPin, OUTPUT);

void loop() 
  // Increment the counts
  CycleCount = 0;
  SecondCount = SecondCount + 1;
  if ( SecondCount > 59 )
      SecondCount = 0;

      if ( MinuteCount > 59 )
        MinuteCount = 0;

        if ( HourCount > 23 )
          HourCount = 0;

  // Turn lights on
    case 2:
      digitalWrite(HourPin, HIGH);
    case 1:
      digitalWrite(MinutePin, HIGH);
    case 0:
      digitalWrite(SecondPin, HIGH);

  // Light are on for 1/10 of a second

  // Tuen lights off
    case 2:
      digitalWrite(HourPin, LOW);
    case 1:
      digitalWrite(MinutePin, LOW);
    case 0:
      digitalWrite(SecondPin, LOW);

  // Lights all off for 9/10 of a second
  delay (900);

If you found anything of use here, please return again, and don't forget to check out my other YouTube videos.

Sunday, 10 July 2016

YouTube : Logo/Banner Design

I have been working hard to update the styles and appearance of both here on the blog and my YouTube channel.  I figured with some videos having 10K views it was time I made the effort.

The problem however is I'm not artistically able, at least not on the computer.

So I figured I'd pay someone to do it, I figured a couple of hours of someones time, an hour to jazz through with me what they can give and taking my ideas on, then an hour to do the job.

The problem... No-one out there seems to read anything, which bodes pretty badly for my blog here.

I posted the job to "freelancer", and waited, within seconds I had people professing to be able to deliver.  They'd not read the job spec, they'd just bid.  And assumed based on the title, what was required.

People, let me share with you a nugget of wisdom: "Assumption is the mother of all muck ups"... Feel free to exchange that 'm' with an 'f'.

To assume what I want based on three words was utterly wrong... the three words were "Design a Logo".  But the meat of the task was "YouTube Channel Banner".  No-one got this.

When I took a screen shot, stuck arrows on it, and posted the spec from google, and even recorded this video:

Look at that carefully, can you spot what I spotted?... yes, despite making the video, and giving the link to 3 potential designers of my stuff, NONE of them watched it... NONE of them read the job spec.

It go so bad an experience so quickly that I pulled the plug on the task.

No-one read the job spec, no-one read what I wanted, and even the later applicants for the task hadn't read anything I had posted.

I may try again, but certainly not on Freelancer, I might find someone via deviantart.

Saturday, 9 July 2016 - Still Going

New High score... level 50...

I actually made it to level 55 before something lagged out and I hit a wall... 

Thursday, 7 July 2016

Three Games I Can't Face (Again)

Three games I often think about, but which I could never return are raising their heads with me lately, the first being Eve-Online.

I was invited back by a friend, whom wanted me and my three decently trained (for 2012) accounts to go back in to the game, and run mining operations for him.  If you're not aware, mining in Eve is pretty much staring at rocks, you have to be in a special place, and busy with other stuff to let your game time turn into this monotony.

He assured me there's loads of new stuff, "since you like mined Xel, there's loads"... But my heart just wasn't in it.  I did install the game, and try a free account for like 25 minutes, until I got utterly bored with it and had to stop.

My main problem is probably the style of game play, I loved Eve, I played way back before the new engine.  It was a clicky menu fest then, and it seems twice as much so now.

Though I still love the Armageddon!

The next is World Of Warcraft, I don't often get invited back to WoW nowadays, but when I initially quit I was asked perhaps every other day.  With the release of the movie however, my interested was peaked, and so I took a look... 

What have they done to my beloved Stormwind?

I just can't, I can't face it.  But I look back on my appearance on "Shut Up We're Talking" (which incidentally spawned this very blog) and I remember saying that damage & level inflation would devalue and dumb down the game... Boy, was I right, or was I right?

The third, and final one, is CubeWorld.  I was big into this when it came out, I begged a friend to lend me his account before I bought it (which he wouldn't - *cough* tight wad) but buying into it, was great.  It mixed Zelda with Minecraft with a proper olde tyme Adventure feel.

I had high hopes it would become part of my regular rotation, unfortunately, development seems to have utterly stopped, and it blows in the wind like dust from my gaming bones.

Do you miss an old game?  Do you insist you have quit a game, or stopped subscribing to it?... Let us know what it is in the comments below!

Friday, 1 July 2016

Software Engineering : My History with Revision Control (Issues with Git)

I'm sure most of you can tell I'm one of those developers whom has been using Revision control systems for a long time... So long in fact, that I wrote a program for my Atari ST; whilst at college; which would span files across multiple floppy disks and use a basic form of LZH to compress them.

Later, when I graduated I worked for a company using a home-brew revision control system, imaginatively called "RCS".  Which basically zipped the whole folder up and posted it to their server, or unzipped it and passed it back to you, there was no way to merge changes between developers, it was a one task, one worker, one at a time system; almost as lacking in use as my floppy based solution from six years prior.

During my years at university, revision control was not a huge issue, it was NEVER mentioned, never even thought about.  Yet today we, sometimes happily, live in a world where software engineers need to use revision control.  Not only to ensure we keep our code safe, but to facilitate collaborative working, to control the ever growing spread of files and the expanding scope of most all projects beyond the control of a single person.

Now, I came to using professional grade revision control with subversion, in early 2004.  I think we were a very early adopter of Subversion in fact, and we spent a lot of time working with it.

If you've ever taken a look around my blog posts you will see Subversion is mentioned and tutorials exist for it all befitting for nearly twelve years working with it.  And unlike the comments made by Linus Torvalds I totally believe Subversion works, and works well.  It is not perfect, but I find it fits my ways of working pretty well.

Perhaps after twelve years my ways of working have evolved to adopt subversion and vice versa, but whatever the situation, I'm currently being forced  down the route of using git a lot more.

Now, I have no issues with git when working with them locally, ALL my issues are with using git remotely, firstly the person whom (in the office) elected to use git, started off working alone, he was creating a compiler project with C# and so he just had it all locally and used Visual Studio plug-ins to push to a local repo, all was fine.

I've used git with local repos without problem.

All the problems come with pulling and pushing, with remote, and controlling that access.  Git intrinsically fails to protect the access to the repo easily, relying instead on the underlying operating system.  Which is fine, when you have a controlled, and easy to manage user base as with a Linux server, however, with the minefield of integrating with Active Directories, domains and whatever on windows based infrastructure nothing but problem comes up.

The next problem I've had with Git has been the handling of non-mergable files.  We have lots of digital files, movies, sounds and plenty of graphics.  As such we've had to work around git, by having people work on files one at a time, and to cross reference which files they are responsible for.  With an art crew of five people, this means a flip chart or white board is constantly listed with the media files, and someones initials are next to it, just to help control access.

"Surely git should be able to lock these files", they constantly cry.  No, how can it, how can a distributed control system manage locks across five or more repos's which are not talking to one another, and if you did elect one to be considered the master, how do you then transmit out to the passive clients every time you lock or release a file?  You can't, the artists would each have to remember to pull, or shout to each other to pull now!  It simply doesn't work.

And as a way of working the white board is pretty poor, but it's all we have right now.

The next problem we had was the massive amount of disk space being used by the repos.  We boot our machines off of very small (128GB) drives, then use either NAS or SAN for our main storage.  This was fine, and efficient, and critically it was all well backed up on the infrastructure we use, and it worked for twelve years with subversion.  However, with Git our huge files are constantly being snapshotted, this growth in the size of the overall repo is replicating files over and over and over.

In short, despite someone else, and the world at large turning its back on Subversion, we here in my area are strongly drifting back to Subversion.

Trouble is, it feels as though we're swimming against the tide, despite all these slight deficiencies in Git, the over all organisation; and even external projects I'm working on; are pushing Git.  Torvalds himself calls people still working on Subversion "brain dead".  But has he thought about the short comings?  Or these case-studies we can give where subversion is a better fit for our working style?

Above all this wrangling internally has been my problem expressing our situation with Git to both the initiated and uninitiated.  When talking to those advocates of Git, all sorts of acronyms, actions and comments are made "use git this", "use git that".  The problem being, there are something like about 130+ commands in Git, that's a huge amount of things you can work with.  But, we can break down what we've done as "git init", "git checkout", "git add", "git commit", "git push", "git pull" and "git status" (as I've said merging utterly failed, so I'll gloss over that right now).

Given this huge scope of possible usage, and such a small exposure experience it's hard to put words against why things were not a good fit with Git, the initiated always seem to argue "you didn't give it a good crack of the whip".  But we don't work in an environment where we can try one thing and then another, it's an old working structure, which has evolved over time, people are used to it; and I'm nearly 40 yet I'm the youngest guy here!  Training those around me in new ways of working is very much an uphill struggle.  So, when introducing something as alien to their mindset as Git, it was always a loosing battle.

To express this to the uninitiated is even harder, they don't know what an RCS does, nor what we mean by centralised or distributed control, they just want to see our work kept safe, and our work to be released to the customer.  Gripes about Git and Subversion make no in roads with them, they're just unimpressed when you explain that these solutions are both open source and have no support.  The fact that they're free has been wildly ignored, yet I could - for the price of the support contract of another system here - easily buy and operate a whole new SAN just for our needs!

Lucky for me though, after struggling with this issue, I ran across Peter Lundgren's post on the same topic, of expressing what's wrong with Git.  He doesn't advocate Subversion, or anything, over Git, he just lists the problems he had with Git, and he crosses much of the same ground I have had to.