This week I have read the Roadcraft the police drivers handbook, I had read the previous edition and the update has a few good common sense approaches. I did like the idea of constant improvement through reflection and asking questions about performance to gain insight.
A couple of the take aways apart from reminding me of bad habits I need to correct.
- It is pull push, I always push pulled. It is smoother to steer their way.
- Do not wrap your thumbs around the steering wheel, due to possibility of hitting potholes high kerbs and breaking a thumb. I did this as I was always told if you wrapped your thumbs around the steering wheel you could lose them if the airbag deployed.
I liked Knuth's presentation,2014 Kailath Lecture: Stanford Professor Donald Knuth.
Old half broken blog from hacker news, found the article interesting. The Bipolar Lisp Programmer.
Visual studio short cut, you can repeatedly press ctrl + v and cycle through visual studio clipboard. Handy working on other machines where a clipboard manager such as ditto is not installed.
Keeping up with reading, this time I read The Design of Everyday Things. There are a lot products in the book that I have encountered, a sink I couldn't empty or a tap that looked weird and took a few seconds to work out rather than just being obvious. Apparently it is all poor design, most I agree with especially hob control layout.
Take aways for me are,
- Affordances, a chair affords sitting.
- Anti-affordances, put a slope on a control panel so people don't put coffee on it.
- Signifiers, a clue of what should happen or what to do.
- The 5 whys.
- Poke yoke, idiot proofing.
People make errors, slips and mistakes, in fact this is not always our fault, humans can live with the situation being a bit fuzzy, machines often need precision. Asking humans to be very precise is not a good idea.
For all of this I bought some new shoe polish, cherry blossom, it is actually made in England and cheap. The point is the tin, instead of the wedge which has to be twisted all you do on these is press and the tin pops open. Simple effective design.
Still been going at the coding challenges, the grey-scale image one, simple yet nice to see something other than console output for a challenge
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
namespace Challenge179
{
class Program
{
static void Main(string[] args)
{
var path = @"C:\Users\R\Desktop\bikers.bmp";
var pictureStream = new FileStream(path, FileMode.Open);
var rawImage = new Bitmap(pictureStream);
for (int i = 0; i < rawImage.Width /2; i++)
{
for (int j = 0; j < rawImage.Height; j++)
{
Color pixelColor = rawImage.GetPixel(i, j);
var newColor = (int)Math.Round((pixelColor.R * 0.21) + (pixelColor.G * 0.72) + (pixelColor.B * 0.07));
rawImage.SetPixel(i, j, Color.FromArgb(newColor, newColor, newColor));
}
}
rawImage.Save(pictureStream, ImageFormat.Bmp);
pictureStream.Close();
}
}
}
Also properly tackling an intermediate challenge without asking for help or browsing the already prepared solutions, I am pleased. Challenge 181. 181 iterates over speed average speed camera logs to check for the limit and car registrations.
Little bits, blog has now been up for six months, behind with my own website and should get on with the MVC book. Looked at a lot of algorithm and Maths books, how much this will help I don't know. Going to re-read the pragmatic programmer. Hopefully this will give some insight into how far or how little I have come.
This week, I have managed a couple of challenges, Re-formatting dates from one file into another was a fun challenge, at least I learnt a bit about the DateTime library, even though I did this one manually. Challenge 188.
Second challenge, of words within words,
it seems there are a couple of ways of doing this, by building a binary tree apparently this works very quickly for very large sets with the penalty of building the tree. For the ~179,000 words, iterating over each string would take a long time, using hash set time went from 10 minutes to finish the first half of words beginning with 'a'
to completion in under one second. Challenge 190. My solution after refactoring came out very close to the reddit C# solution.
Noticing some of the guys at work using the dark colour scheme for visual studio, I tried it and you get used to the darker colours with a little less eye strain.
Sadly someone ( I think ) stole the roof rail plugs from my car as they have to be levered out and one was on the ground next to the car. Ordering plugs for a MG-ZT the part number is DYB100121, nearly £4 from Rimmer bros they are not good value. They did come with a website printed on the new part, skiffy. This way it would have cost me £40 for a 1000 of the plugs, at least it is good value for money and ebay'd the surplus.
I found this competency matrix ages ago but couldn't find it again until now, matrix. Which was an eye opener looking at how far I have come but so little I actually know. There are a couple of books to add to the reading list, thinking forth is even free.
Podcasts, a new one for the me, hello world by Shawn Wildermuth, the podcast is about how many got started in their industry.
Learnt quite a bit this week, ab / abn testing and that keeping testing well defined can be challenging.
For testing qualifications it seems ISTQB are the standard, exams are not too bad at ~£200, courses vary for a few days at ~£1000 does not seem good value. Syllabus and glossary are free to download from their site.
Coding, I have one solution for counting the amount of distinct words in a book, linq and regex just simplify the problem down so much. Words in book sln.