Software to Business

This article started as a rant (no, me?) about software development being too complicated nowadays and how the kids should get off my lawn. But it turned into more of an exercise in self reflection…

Many, many moons ago when I starting programming, the number of hops between me and the CPU was only two or three. When playing with Z80, 6502 or 68000 assembly language I had a small bunch of commands, a book that described the CPU and other chip features and how to poke them to get results and that was about it.

The skill was in being efficient, in working out how to build complicated things with simple tools. For example, if your chip doesn’t have the ability to multiply how do you do it? By using a combination of looping round a ‘add X to Y’ a number of times or by shifting the binary bits to the left which multiplied the number by the power of two for each shift made.

It was comforting to know that all the information was there in front of you in those couple of books and if you couldn’t work something it out it wasn’t because there was some piece of information missing. It was down to you.  With no internet.

Back then it felt like it was possible to truly understand the environment you were developing in. The commands were simple and well documented. And didn’t change. The computer architecture and chips available to command were also well documented and unlikely to change.

 

 

 

 

Aside – It’s just dawned on me that this is probably why whenever I start learning a new technology I always try to start as far down the stack as possible. Which is hard work given the number of layers everything has nowadays. It’s dependancies all the way down.

Peering over the top of my rose tinted specs for a second I can see that it took an age to write anything and it was hard to debug stuff. But things started simple and worked up, rather than starting complicated and getting ever more complicated as you tried to resolve things down to the metal.

Fast forward to today and I’m currently developing a project using the fairly standard Microsoft .NET web stuff with a SQL database at one end and ASP MVC at the other, and about half a dozen intermediate layers in-between.

The problem as I see it, is that each layer is in itself so complex that it could be a specialism on its own, yet to build anything useful needs a degree of competency in every layer.

Starting with the database I need to come up with a sensible data model that at least raises an eyebrow at the 12 rules of Codd and won’t hamper things later when it comes to saving and retrieving data. Then I need some way of reading and writing the data so I chose Microsoft’s Entity Framework ORM, and a sprinkling of LINQ.

Next my application needs some overall approach to using data objects, so do I use the repository pattern or not? What about dependancy injection to allow for unit tests etc.? There are loads of choices there too; Ninject, Castle Windsor, new built in stuff in ASP Core? Again, there are many books on each individual option.

What about the web stuff? I kept it simple and used the standard MVC Razor HTML templates, based on the Bootstrap library. CSS? Sure, but do you want to use LESS, SASS, or whatever the newest tool is for building it? What about being responsive – you know, so it adapts to smaller mobile devices automagically? Best go read up on that too.

Javascript, a language in it’s own right is unavoidable. But if that’s too concrete for you, how about coffeeScript or TypeScript that are their own languages but ‘compile’ into javascript? Again, there are many books and online tutorials in each and every option within each layer.

And so on.

Oh, and if that’s not enough, what about hosting in the ‘Cloud’? Solutions like Amazon’s AWS or Microsoft’s Azure could help, but each one is a career in itself with associated books, courses and conferences. If you know it all by now, don’t forget the container options like Docker or the concept of ‘serverless’ code which has already become out dated in the time it took me to type that, being ousted by FAAS. (Functions as a Service).

And that’s skipping a few layers and options along the way, including the language itself, C#. And the IDE Visual Studio.

And then factor in the notion that each option within each layer has it’s own development cycle which can mean monthly releases to keep up with across all of them.

And it’s not limited to web development. I did a bit of iOS coding a while ago, initially drawn to it by the fact that it was a smaller domain with a known, limited set of target hardware. (I think it was around iOS6 that I started). Now that space has exploded in complexity with numerous device capabilities and sizes, operating system functions and library APIs. There’s even a new language, Swift, to learn.

I’ve been pressing buttons for a living for long enough to know I’m never going to master each option within each layer. There’ll always be someone who’s spent more time focusing on a particular option and will make me feel dumb about it.

Instead I spend time keeping up with the bigger picture. In my job as part developer, part sales, part solution architect I can use all my button pressing experience to help de-risk our projects and work on the bigger techie / commercial pictures. Whilst I’m doing that I can take comfort in the knowledge that those developers who have more experience of the details within each layer will do a better job of those aspects than I could.

Thinking about it as I proof read this article, it seems like I’ve got from one end of the software business, namely the machine code, all the way to the opposite end; the business. Software->Business, if you will.

To illustrate the change, here are the books I’m currently reading.

 

Under(steer) Control

After playing Gran Turismo Sport with six-axis tilt steering on the PS4 controller I was impressed at how well it compared to using my Logitech G29 steering wheel. Great I thought, I can play Project Cars 2 downstairs on the sofa and not have to re-arrange my office to set the wheel up all the time.

Then I tried to actually play PCars2 like that.

Jeez, how can it feel so bad compared to GT Sport?

And so began the long and tedious process of changing the settings, trying it out, swearing, going back to the options, tweaking again, saving, trying… repeat until rage quit. Wait a few days then start again.

I spent ages doing this. So long in fact that a game update was published in the meantime (1.4.0.0) that added a new option – Opposite Lock Assist.

After much reading and experimenting I found out two things…

  • The opposite lock assist is related to the Speed Sensitivity setting. (Ok, this wasn’t hard to find out – it’s right there on the settings screen)
  • The Speed Sensitivity settings don’t feel the same for all cars.

The second point was the key. I’ve had to change the speed sensitivity setting depending on the performance of the car I’m using. Between road cars and GT4 class, it feels great with the settings specified, but anything faster than that and even at slow speeds the steering doesn’t respond quickly enough or far enough to allow the car to make tight turns.

For now I’ve settled on these settings as a decent compromise, presented here for others to try and so I have a record of them for when I inevitably make things worse by tinkering again later.

Steering Deadzone    5
Steering Sensitivity    37
Throttle Deadzone    0
Throttle Sensitivity    15
Brake Deadzone    0
Brake Sensitivity    30
Clutch Deadzone    10
Clutch Sensitivity    25
Speed Sensitivity    75
Controller Damping    60
Controller Vibration    100
Minimum Shift Time    0

G29 Wheel (-y good) Fix

This is how I fixed my Logitech G29 steering wheel whose left paddle shifter was intermittently unresponsive. If I pulled the paddle say 10 times, it would register the click about 3 times. Not good when it’s the downshift in a racing game.

I’ll cut right to it…

Step 1
Take the wheel off the spindle to access the micro switches. There are loads of step by step videos on Youtube. It’s just 6 screws from behind the wheel, then the circle of bolts on the front around the logo. Oh, and unclip the short ribbon cable connection the wheel to the hub.

Mine seemed to be stuck in the bottom right of the red rotator switch (as you look at the wheel) but it was just a small clip inside that unclipped when I took a brave pill and pulled it harder.

Step 2
Once you’ve got access to the micro switches that the paddles click, spray contact cleaner into the switch. I used the gap around the ‘clicky’ bit that sticks out under the metal spring lever.

Step 3
Gently bend the metal spring out away from the plastic switch body so it needs a bit more force to click. Not sure this is 100% necessary but it makes it feel a bit better when used.

Step 4
Put it all back together. Job done.

That fixed it for me, but obviously your mileage may vary.

And just in case you’re America – Any disassembly you perform is on you. I’m not responsible for any damage you may cause, warranties you may invalidate or injuries you may cause to yourself or others. And if it doesn’t work, that’s not on me. If you don’t agree with any of that, then leave the screwdrivers alone and walk away.

Form over(priced) Function

Writing this article makes me sad. It’s like my dog, if I had a dog, had gone and killed next doors pet rabbit. Not my doing, but still saddens me.

When it comes to techie things I’ve always tried to be fairly agnostic and go for the best tool for the job when it comes to choosing a platform or manufacturer. After rage quitting Windows XP many moons ago after a nasty virus infection I went to Linux. Unfortunately I arrived at a time when Linux was mired in package dependency hell and the desktop applications really weren’t mature enough. So I bit the bullet and bought my first Apple computer. It was a PowerPC based Mac Mini & I loved it.

Since then I’ve used MacBooks. My current machine is the first aluminium unibody model from late 2008 packing a massive 4Gb memory and helped along by an SSD upgrade. And it’s fine. Just about fast enough for all I need, including Xcode development work.

But being pre-retina it’s a bit of a struggle to develop user interfaces for retina iPhones – when simulating an iPhone for example, only a quarter of the phone screen fits on my laptop screen. It’s also the first model that isn’t able to run the new macOS Sierra operating system.

So I reckoned it was time for an upgrade. I’d saved some money in anticipation of the new MacBooks being announced. I watched the event ‘live’ on Apple TV as they were revealed, and by the end of it I had my head in my hands.

Apple, you dicks.

I was geared up to by a new 15” Macbook Pro for pretty much any price, within reason.

You priced them outside reason.

I don’t give a monkeys about how thin it is, or how heavy it isn’t. It’s a computer, not an After Eight fucking mint. It’s a tool that should be able to do stuff. The doing of said stuff isn’t helped by removing all the ports used to connect it to other things that do other stuff.

MacBook Pros were the tools of choice for most iOS developers, a huge number of Photoshoppers and a whole bunch of musical type too. See that? I called it a TOOL. It’s used to create things.

By turning it into some flouncy extension of Jony Ive’s inner being or some such crap, Apple have stuck two fingers up to all those people who needed something useful.

So what do I do?

Well, Linux isn’t for me. Windows is looking more interesting, but I need Xcode. So it looks like my only real options are a second hand retina MBP, or stick with my current model.

If anyone is selling, let me know. I have a stack of cash waiting that Apple don’t seem to want.

Virtual Progress

I’ve been a gamer for over 30 years. Mainly because I’m raving old and, well, I’ve enjoyed playing video games since I was a kid.

A long time ago on an 80’s computer far far away, I played a Star Wars “game” that involved trying to shoot down a Tie Fighter that looked like this:

(<>)

Amazing huh? To be honest, it might have looked like this:

<*>

It was a long time ago and I can remember the specifics, but it was definitely ASCII characters that flickered across the screen in black and white. A quick image search came up with this, which isn’t the Tie Fighter game in question, but it looks familiar and shows the hight of gaming graphics at the time.

 

 

Yes, that’s a full screenshot, not a close-up of an iOS icon.

Fast forward to now, and my recent purchase of Sony’s new Virtual Reality headset peripheral for the Playstation 4.

I’ll spare you all the many, many years of ZX Spectrum, Commodore 64, Amiga, 486 PC, Pentium PC, Playstation 1, Sega Dreamcast, Sega Something else, Nintendo 64, Nintendo Gamecube, Playstation 2, Xbox, Playstation 3 and Xbox 360 gaming in-between.

(Most of those are still in the loft!)

I’ve said for a while that in-game graphics are peaking and the next big things in gaming will be Virtual Reality and Artificial Intelligence.

A.I. because it’s all well and good having a photo realistic rendering of a bad guy but the immersion is ruined when he doesn’t seem to notice a fellow baddie being shot in the face right in front of him. I guess he just might not care enough to react, but either way it breaks the spell and detracts from the game.

And VR because whilst the constant upping of resolutions and frame rate is welcome, the pictures you look at in glorious high resolution are still constrained by the size of the rectangular screen or three sat in front of you.

Once the practicalities of things like hardware capability and affordability are sorted and the pesky chicken and egg matter of nobody risking developing VR games until the predicted sales are enough, and nobody buying VR hardware until there are enough games available is cracked I think VR will take off.

Sony’s kit was released 10 months ago and I’ve been hovering over the ‘buy now’ button ever since. Last week I gave in and the next day a nice man in a white van handed over a couple of parcels.

After revelling in the new gadget smell and wrestling the octopus of new cables, it was all set up and I gave it a go.

Holy crap.

I know the resolution is relatively low and it’s expensive and the cables are annoying (to those who are easily annoyed) but the level of immersion is incredible. The kind of experience that prompts an actual laugh out loud followed by an incredulous “F**k off…..!”

In my case anyway.

It’s hard to describe the sensation but I’ll give it a go:

Imagine putting your head up inside a large, upside down goldfish bowl, but instead of the bowl being transparent, someone has projected an image around the whole of the inside of it. As you look around inside the bowl, you see different parts of the image covering your full 360 degrees of head movement.

Now, imagine that bowl picture shows the inside of a car. It feels a bit like you’re in the car as you turn your head to look out of the side windows or behind you to look out the rear window.

Next, imagine that it’s not a static image but a video that shows the car moving along from your drivers viewpoint and you can still look around.

Finally, imagine it being interactive. It’s not a video, but a game that you’re playing. You’re driving the car and can still move your head about and look around.

That’s VR.

Instead of a goldfish bowl surrounding your whole head, it uses a couple of small screens right in front of your eyes and fancy head tracking to see where you point your face and changes the projected images in real time to show you the bit of the bowl your face is pointing at. You can’t tell it’s doing this and the sensation is that you’re ‘in’ whatever it’s drawing around you.

The effect is so convincing that driving games make your stomach lurch as you catch air over jumps and vertigo is a real issue for new users. In one game where you have to lean out over a balcony it’s almost physically impossible to step ‘off the edge’. I know I’m playing a game but the immersion is so realistic that my natural life-preserving instincts are triggered.

We’ve gone from grey and white ZX81 block-o-vision to VR in my lifetime and that amazes me.

Playstation VR (PSVR) has been out for less than a year and there’s already a decent range of games available for it, with a healthy amount of stuff in the pipeline like Fallout and Skyrim VR and I can’t wait to see what else they come up with in the future.

In the meantime, here’s a video of me driving around a Scottish town in a Caterham in VR.