Skip to main content

Posts

Windows Subsystem for Linux Internals

Background Windows Subsystem for Linux was developed by Microsoft to enable command line programs compiled for the Linux operating system to be executed on Windows. To explain the architecture I would like to show the evolution of OS design and how that has enabled this subsystem to be built. Dark Ages (or Back in the Day) Microsoft's MS-DOS was quite primitive in its design (compared to today's OS's). It is a single user OS that can execute one process at a time. DOS had an application programming interface to allow user programs to access some hardware in a device independent way, but only for character-based applications. This allowed applications to display graphical elements emulated with text characters as these screenshots of Microsoft word for DOS show: This is Microsoft Word version 1. To use these programs you had to remember key combinations to bring up the menus and used the cursor keys to navigate around the screen. If the a...

What does "Full Stack" mean?

I've been a software engineer for a little while and I see the term "Full Stack developer" more and more, but what does it mean? Okay, let's walk through what a complete system will comprise of and see if we can work it out. UI First (from the users perspective) is the UI. It's how they interact and really all they care about (as long as the application does what is expected of it. Here is a list of some UI technologies that I know of AWT Swing Qt Android XML MFC and VB OpenGl Vulkan Communication Protocol Next up is the communications protocol (as most applications these days are a thin UI talking to a backend server (we've gone back to the mainframe era!) RPC FTP SNMP SMTP DDS ActiveMq/RabbitMq Network Layer The communications protocol has to be transported between the client and the server somehow, so here we have the network layer IPX/SPX Token Ring Bluetooth USB Server So now we have data being transferred between t...

School Story

When I was at school (yes I can remember that long ago, just) I remember that I submitted a story (I guess it was a homework exercise) and the teachers would not believe that I wrote it myself. During NaNoWriMo 2018 I finally got round to recreating the story as best I can remember. Story “ Detention sucks.  Especially in winter. ” That’s what I was thinking as I wandered towards the pedestrian path behind the school that would lead me to the main road. It was November, and it was now dark and misty. I hated it when the days started getting shorter. I didn’t like the dark. I was a big fan of horror. I enjoyed watching films and reading books that scared me. Unfortunately for me that made walking home alone along a dark path a bit nerve-racking as my mind would remember all the stories where a lone teenager would get to be walking alone in the dark and some monster would grab them. The path wasn’t lit, and it had trees on one side with a high fence on the school side. ...

First race of 2019

As I am aiming for a middle distance triathlon in September, I want to make sure that I can complete it before shelling out the (rather high) entry fee. my main concern is that my knees cope with the run section which will be 21 Km (a half marathon). In the past, I have had a bit of trouble with my knees playing up. I thought it was because I had run too much (increased my training too quickly, too many races close together, that sort of thing). So for the last 8 months, I have been trying to acclimatise my knees by running around 5km three times a week To take stock of how my knees are with running, I decided to enter a 10K race. The race I entered was the Bristol Race For Chocolate 10K. It sounded like a fun race and was on 27th January, which would give me plenty of time to train for my main race in September. I wanted a 10K as it is just under half the distance of my target middle distance and if my knees cope with that then I have plenty of time to increase the distance...

Triathlon Training in the new year

So, my 2019 training has got off to a good start. I'm running regularly and my knees seem to be holding up. I've got a training plan to get me to a middle distance triathlon in September and I am managing the run distances I have set myself. I need to find some longer cycling routes to work and ones with a few hills too, but that shouldn't be a problem. my weekly cycling distance is okay, I just need to move to get my ebike to be doing less of the work. last week I did use my normal commuter bicycle and managed the whole four days as well as my runs, so that was a really good sign. Swimming won't be an issue, I have always found that to be the easy part of a triathlon (not that I'm fast, but I can keep going, and I did manage to swim the distance within the cut off time when I tried the ironman 70.3 last time) The main worry about going longer is my knees. I've got a 10K booked in late January which will test my knees out and I'm hoping that they hold ...

Creating a Watch Face for Android Wear OS 2

Step 1 - Setup my watch for development I have wanted to create a watch face for android wear for a while, but as no new watches were being released my old Moto 360 watch running wear os 1.0 got out of date and I stopped using it. For Christmas 2018 I got a new wear os watch running wear os 2.2 (android os 8.0.0). it has a round 400 x 400 screen and I decided to finally get round to creating myself a custom watch face for it. The first thing I do with all my android devices is to enable developer options. if you don't know how to do that then you can find the method using a google search. I won't give it hear as it opens up all sorts of options that could make android become slow/unusable. Once I had developer options enabled, I turned on USB debugging. This watch (as opposed to my old Moto 360) has a USB connection to the computer, so I don't have to use WiFi debugging (which has to be set up for each debugging session). now on to the watch face creation. St...

2019 is Here

So, 2019 is here and it's going to be a big one. Since I started at Scott Logic last year I am getting much fitter. being just about 10.5 Km door to door it's an easy cycle (or will be once I get fit again). Also there are lots of us who like to go running at lunchtime. Well, they go running, I just try to keep up, and mostly just watch their backs head off into the distance. Of course trying to keep up will get me fitter and faster in the long run (I keep telling myself that). Last year, I finally got back into triathlons and I am now looking at which races I will be participating in this year (notice I don't say competing in, which would be a misnomer, I only compete to not come last!) Many years ago (around 2007) I attempted to complete the Ironman 70.3 at Wimbleball. I failed. I was far too slow on the bike leg and ran out of time. That was the first race I had not managed to finish. This year I am thinking about trying my hand at another middle distance race ...

Wales 500 Post 2

Day -1 (of the rally) So, tomorrow, Patrick and I will be riding up to set up our campsite ready for two days of (not quite off) roading. I've got my camping gear packed, but I've been getting confused about how to pack things that I will want whilst riding vs stuff to leave at camp. Then I realised that I've never done that before. whenever we've gone on a trip we've always stayed a night and then moved on to the next place. Only once have we set up and stayed in the same place for more than one night, and that was at Assen to watch the MotoGP. Guess I'll get it sorted today. I think I've got everything I need, except a way to pump up my tyres if I have a puncture. I have a puncture repair kit, but no pump. hmmm, will have to think on that. I think I will be taking a rucksack so that I can carry stuff out on the rides with me, but I may try to attach it to the back of the bike instead of wearing it as it might get too hot. Today is wet and rainy...

Wales 500 post 1

Day -2  (of the rally) I can't remember where I saw it, but I found details about an event called the Wales-500 . It's a 500 km off road (ish) motorcycle weekend. I've never done any off road riding. but have always wanted to, so, I decided (and no, I wasn't drunk) that it would be a great introduction to off-road riding and I entered it. Now I actually have to do it as a friend of mine said he would like to do it too. No wit's not just me, so I cant suddenly come down with the plaque and stay at home. It's funny how many things seem like a good idea until it actually come to doing them. But, with two more days until we ride to the Malvern Showground to the start of this event, I have started packing. Now the event expects us to follow as closely as possible a pre-designed route. the winner will be the rider (or team?) who most closely matches the routes mileage. I have entered the GPS category. I thought this would make things easier. Then I realise...

First Triathlon of 2018

I have just completed my first triathlon of 2018. On Sunday I completed the Lydney First Tri . I managed to get round in 2:10:56. Although not a great time, I am happy enough just to have completed it as I haven't really cycled since my last tri back in September. I almost didn't make it to the start line as my shoulder was playing up in the week running up to the race (I decided that, with a week to go, I really should get out on the bike. I think the sudden move back into cycling and leaning on the handlebars got to my shoulder). I was also very nervous. This would only be my second tri in many, many years and I think self doubt was creeping in and nagging at me that maybe I should wait until I'd done more training. But, I managed to ignore my little inner voice telling me that there was no way I would complete the course, and got up, dressed and got to Lydney Leisure Centre for about 07:45. I left everything in the car and went to have a look around. I like to ...

Project Z750 part 36 - the finalle

I took the bike for a quick test ride round the block and it was fine. it actually cornered now that I had sorted out the tyre pressures. and the brakes all work. I gave the bike a quick look over and noticed that I hadn't marked the rear caliper bolts. (I mark each bolt when I tighten it up to the specified torque so that I can see if it loosens up. so if you look at my bikes you'll see white dots on a lot of the bolts.). As I hadn't marked it, I hadn't tightened it up fully, so I torqued it up and marked it. The bike shop I use managed to fit my in for an MOT before they went off to the Isle of Man Classic TT, so that morning, I got my gear on, wheeled the bike out of the garage, said a quick prayer (I'm not religious, but it can't hurt), and I then put my life in my own hands. I mean that even though I ride every day, I had never before done this much work on a bike. I'd changed braked pads, but never replaced the brake seals, and although I had tor...

Project Z750 part 35

So, I've swapped the CB750 and Z750 as the CB750 was up on the bench, but it is going to the bike shop to have a few things looked at. so now that the Z750 is up on the bench I will change the oil (as the engine has now run I want to make sure I remove any gunk that the oil has flushed out of the engine) and I'll change the coolant. The oil change went smoothly (so really, I should have been expecting trouble with the cooling system). Reading through the haynes manual, Kawasaki seem to have put a lot of thought into building the Z750 to make it difficult for the home mechanic to do a coolant change. The first instruction in the haynes manual is : Remove the fuel tank. What? why do I need to remove the fuel tank just to change the coolant? well, it's because instead of making the pressure cap (which is also used for topping up the coolant) easily accessible. it's underneath the fuel tank. right in the middle. So fuel tank off (at least I'm getting used to r...

Project Z750 part 34

So, I asked a friend at work about the problems changing gears, and he told me to be gentle and not to try to force the gear lever as it could bend the gear selector arms inside the gearbox. wow, my first thought was to try brute force, so I'm glad I asked before steaming ahead. So, the idea is to gently work all of the gear selector arm and gears until they are all free. How hard can it be ? So, I put the Z750 up on a paddock stand with its exhausts pointing out of the garage door. Fire up the engine and let it warm up for a bit. Now to try the gears. First is no problem. Second was okay too, so next if third, the gear I couldn't get into during my test ride. At this point I would have crossed my fingers, but my right hand was holding the front brake on, and the left was holding the clutch. maybe I should have crossed my eyes instead. Anyway here goes, foot under gear lever and lift. There was a clunk and the bike was in third gear. I must be dreaming, but if I am, I...

Project Z750 part 33

Okay, so we have brakes, we have lights, we have forks. Next up is a quick test ride round the block. so I put my helmet on, wheeled the bike out of the garage and fired it up. I put it into first and pulled gently away. okay so far. I tried the brakes just to make sure they wouldn't explode when I first used them (or at least for them to explode at slow speed). The brakes work. woohoo !! okay corner coming up, oh. steering is a bit of a challenge, but I made it around the corner. Okay now to try second gear, clutch in, gear lever up.... and second gear (that shocked me, but I'm getting a bit of a pessimist with this bike now) okay, trundle down the road and another corner coming up. I have to fight the bike round the corners, and I'm not sure if that's something I've done when changing the forks. Or it could just be the tyre pressure (which I should've checked before taking the bike onto the road!). okay, next gear. Clutch in, gear lever... oh, the ge...

Project Z750 part 32

Okay, the new vacuum brake bleed kit has arrived. Time to try it out. The kit is quite easy to put together. there is a diagram of how to attach the vacuum pump to the collection jar, and all of the pipes go on easily enough (but not so easy that they'll pop off in use). okay, so vacuum connected to one side, other side connected to bleed nipple. pump up the vacuum pressure, then open the bleed nipple. lots of bubbles and some fluid coming through, great. I had to keep an eye on the master reservoir to make sure it had enough fluid in it, but that's not too bad to do. so I keep pumping to keep the vacuum pressure, open the bleed nipple to let some air and fluid out, and keep an eye on the reservoir, topping up as necessary. After a while fluid stopped coming through to the jar. it seemed as though it was just air coming through. A closer look at the bleed nipple and I could see that there was air getting into the kit's tube even when the nipple was closed, so it...

Project Z750 part 31

Right, new braided brake hoses have arrived, so all I have to do is drain the brake fluid, replace the hoses and bleed new fluid through again. The new hoses went on without a hitch. the kit I ordered (from HEL) had everything it needed; new banjo bolts and crush washers as well as the hoses. It made everything simple. So I put it all back together, fill up the master reservoir. brake bleed hose onto the nearest calipers bleed nipple and start slowly pumping the brake lever. As I pump the brake lever, lots and lots of bubble appear in the reservoir. After about an hour of pumping the brake lever (and opening and closing the bleed nipple) I'm getting nowhere. Either this is going to take days, or I'm doing something wrong. My vote; I'm doing something wrong. So "To the Internet". very few people drain the brake system and then fill up from scratch. Or at least very few post about it. There are some people who use a syringe and push the fluid up from the bl...

Project Z750 part 30

Whilst waiting for the new brake hoses I thought that I would try to see what was wrong with the front brake light switch, so I took the switch off the bike, put a multi-meter to it (set to measure resistance) and viola, no change when I press the switch, so it's dead. New switch ordered from eBay. I then decided to take the rear wheel off and have a look at the swing-arm. And boy did it need looking at (and some work too, but I'll get to that in a bit). Once I had access to the swing-arm it looked really bad. it was basically all brown (and no the bikes colour is supposed to be black not brown). I got out some 80 grit wet and dry and started cleaning the rust off, and to my relief, it was only on the surface, so I got into every nook I could without taking the swing-arm off the bike, and cleaned it up. Of course there are places I couldn't get to so I will have to re-visit the swing-arm at a later date and finish it off. Once the rust was gone, I cleaned it up and ...

Project Z750 part 29

So, I've got the fork legs back with the new stanchions, seals and oil. putting hem back onto the bike went easier than expected. I pushed one then the other through the yokes and lightly gripped them with the yoke bolts (making sure I could still move the forks up/down and twist so that I could adjust them as necessary). Then I attached the mudguard. my reasoning was that it would make sure that both fork legs were the same height and rotated correctly (plus it had to be put on before the wheel anyway). I then checked the top of the fork legs to make sure that they were the same height as before I took them off. I then put the wheel on which went on easily enough, but I can't torque it up as I don't have the right allen bits (more tools to order, oh dear!). Once the wheel was on (which also reassured me that the forks were aligned correctly), I tightened all of the yoke bolts to the correct torque and dropped the bike off of the lift. It's looking like...

NaNoWriMo has Finished

So NaNoWriMo has finished, and I now have 50,000 words of a new novel. It seems to be about halfway through the story, so I still have a lot to write, but I am slowing down the writing so I can get back to other things now.

NaNoWriMo

I just wanted to warn everyone that I will not be updating this blog until December. the reason for this is that I will be participating in NaNoWriMo . The challenge is to produce 50,000 words of a novel starting on November 1st and finishing at midnight on the 30th November. I'll be doing some planning in October. I'll be writing up my characters, and trying to get an outline plot so that when I start on the 1st Nov I can hit the ground running. But it does mean that I won't be posting here until December, sorry.