# something to tug your heartstrings

This is so awesome!

# In some places it’s called a hustle

I don’t play much physical sports, actually I don’t. But like all men I must satisfy a desire to beat other men in some measures of strength, agility or intelligence. I play Go. My latest game appears at the end of this post. It seems as if I was mismatched here, I am definitely not a 25 kyu, the final score does seem to indicate I am around 10 kyu or even better.

I actually felt bad for the guy because I see this sort of thing a lot in real life. The Japanese have a concept aptly named Shuhari which has found currency in Agile Software Development lingo. The avid reader will notice the same concept from a Martin Fowler article where he articulates it as follows:

Shu: In this beginning stage the student follows the teachings of one master precisely. He concentrates on how to do the task, without worrying too much about the underlying theory. If there are multiple variations on how to do the task, he concentrates on just the one way his master teaches him.
Ha: At this point the student begins to branch out. With the basic practices working he now starts to learn the underlying principles and theory behind the technique. He also starts learning from other masters and integrates that learning into his practice.
Ri: Now the student isn’t learning from other people, but from his own practice. He creates his own approaches and adapts what he’s learned to his own particular circumstances.

Playing this 25kyu reminded me of the context I learned about the Shuhari concept myself. I too was a beginner. And as a beginner one is often preoccupied with not breaking the rules of the game. You try and make really really sure you don’t lose any stones and your focus is on capturing the stones of your opponent.

As you become more comfortable with the game you might even learn about Joseki which is basically a pattern of play in response to a common situation — which I suppose is a fair progression given that you’re probably trying to draw on the experiences of what the expert before you has, on average, gone through. At this stage you’re probably still having occasional headaches while playing because you’re really concentrating very very hard.

In the final stage, as Fowler says, the student is no longer learning from other people but from what he himself has observed in the field and he adopts his approach based on his own particular set of circumstances. In fact a famous Go Proverb intimates that you should no longer be relying on Joseki. Also, you realise that Go is more about encircling unoccupied board area than capturing stones. Capturing stones does actually count for a lot, but it’s considered vulgar to actually capture the group (you waste a move) and as an expert you’re supposed to be able read a few moves ahead that a group is in fact dead.

Of course this is all very similar to the Dreyfus Model of Skill Acquisition which Fowler also makes mention of.

Some food for thought perhaps?

Anyway what I wanted to say in today’s post is that at one point my skill level was ranked at 6 kyu in competitive play, but after some years of absence I can barely win against a 16 kyu. But in trying to remind myself of the first principles I clung to as an acolyte Go player it’s all coming back to me albeit slower than I want to as I kick some beginner ass.

It’s often said that to be sharp you have to do some teaching. By being in the company of those trying to learn you get an appreciation (some would say a reminder) of your own level of awareness.

I very much predict that in my next game I shall be able to beat at least a 15 kyu.

Enough talking, here’s the game. As you can see I totally crushed this guy.

# After a long time I play Go again, and promptly resign

I used to be an avid Go/Weichi/Baduk player, reaching 6 kyu on kgs. But then life started in earnest. My daughter was born and I started mucking about with other things. Anyway wow, it was damn hard to get the Java applet running, and littlegolem games take too long. So I found this cool site which has uses HTML 5 to draw the goban and offers a lot of other nifty features.

I’m playing white. Things started going wrong for me around move 70.

# Best introduction to Lean Manufacturing I’ve seen in a while

Ok, in case you haven’t noticed I just learned how to post youtube videos to my blog 🙂

In this video they approach a very simple problem of packing a number of items into a bag. They’re using a timer and at the start of the video the full operation takes about 3 minutes and we see how with incremental common sense changes they bring this down to something like 15 seconds.

It’s fascinating to watch how they innovate and do simple stuff like move things around and change the sequence of operations to cut down on the time taken to finish a job.

# Why optimisation is sometimes not a good idea

I really love this video for the inadvertent thing it teaches you about how dishwashers actually work and why premature optimisation is such a common mistake.

# Executing a django view from the command line

In the recent post about importing postal codes I alluded to having written a script and doing the import “in a few minutes”. If you think about it a few minutes is way too short so let me tell how I at least got the persistent layer set up.

In Django a typical view (and the one I actually used) looks like this

def import_postalcodeboundaries(request):
with open('/home/pi/projects/django/postalcodesbyprovince.csv','r') as f:
for line in f:
pname = line.split(',')[0]
startcode = line.split(',')[2]
endcode = line.split(',')[3]
province = Province.objects.get(name=pname)
pcb = PostalCodeBoundary(province=province, code_start=startcode, code_end=endcode)
pcb.save()

..

You will notice here that I’m using straight old Django ORM to save my records. This makes the code pretty much agnostic to what the underlying database technology is. You can’t tell but I’m using mysql as a backend store.

From within ./manage.py shell I did a from views.myappname import views then did a views.import_postalcodeboundaries(None) and voila!

# Some observations as I do the same thing as looking for new employment

Every few months I reassess the value of remaining at my current job. Perhaps you’ve read the article I posted a while ago on the metrics I use to assess whether a company and the role I’m offered is a good bet. So far whatever I’ve thought was a good bet actually turned to be a pretty good bet for the most part. Where the model has been wrong is in those things I really needed a crystal ball to foretell but that’s the nature of the game I guess. There’s always some surprising that’s going to crawl out from under the skirting boards. I have since attempted to redevelop that list, but one thing I learned is the value of exposing my current position and skillset to the open market.

This helps me assess the viability of my skills and therefore align my perception of my employability with “reality”.

It’s a seemingly expensive strategic exercise which I first read about in a career-advice article I read a whole while back, and which I have found to be immeasurably valuable especially given that the fulcrum of my pay-the-school-fees strategy is to balance job security with agility and ability to execute at a tactical level — the economy being what it is.

Just simulating the job search results in taking stock of what I’m actually doing at work, looking at the direction my career is going, what skills I’m both exercising and acquiring, what my candidate differentiator is and helps me to identify any gaps in my strategy of “over the next five years” to remain meaningfully and securely employed in a job which invokes something passionate within me.

Since the best feedback is actually independent outsider knowledge this exercise may take many forms

• Engaging in conversation recruiters on LinkedIn by giving them their free “15 minute chats” and reading their job specifications etc. The information contained in these documents is very useful as they give an idea as to what kind of skills are current, popular, pay the highest, are used by the stablest companies, etc.
• Engaging in conversation with mentors and colleagues at work and within my social network.
• Actual interviews with companies which have actual openings. When I do find myself in the market I pay very very careful attention to all the feedback I get before, during and after the interview. The feedback, especially if it’s candid is used to feed me with ideas on how to improve. I found this Harvard Business Review article quite useful.

Anyway. Thus far I have seen the number one factor that would get you at least an interview at a good company regardless of whether or not your specific skills actually match what’s required in the job is:

PASSION

I suppose this cannot be stressed enough. If someone has passion it translates into so many other things a potential employer could harness about that person, to the point that I have seen they would be willing to employ a C# developer to write code in an entirely different language and operating system. This actually happened at a payments processing company where I was approached to interview at simply because of what my LinkedIn profile looks like.

And the number one thing that tells prospective companies that you have passion?

WHAT YOU DO OFF THE FIELD IS MORE IMPORTANT THAN WHAT YOU DO ON IT

So what these companies look for is evidence of

• Hobby projects such as stuff you do in your free time. Tracking the temperature of a room with sensors connected to and code running off a raspberry pi? Great! You’re a self-starting innovator.
• Do you have a technical blog? (I thank John Sonmez for this tip. He also has a great book called Soft Skills which currently ranks 5-stars over at amazon.com). Great! We can assess your ability to articulate yourself by writing and get a pretty good understanding of your thought processes.
• Is that code written in a secondary language you taught yourself? Great! To you development is a lot more than just a means to get a salary.
• Is that code in a repository such as github or bitbucket? Great! Nobody’s watching you but still have great innate development practises (now let me look at that code anyway).
• Do you solve toy problems? aka projecteuler.net? Great! You have an interest in seemingly boring nerdy exercises which pay off only 1 in a 100 times in a real job but you know that 1 in a 100 times is what differentiates mundane from great.

The last, but certainly not the least important, is INTEGRITY. I’m not sure how companies look for evidence of this in candidates. Do you have any ideas?

# South African Postal Code Database

For one of these toy projects of mine I had this requirement to enable people to search for job listings by Area. It turns out to do that efficiently I need to capture the postal code of the company to which that listing belongs then create bags of postal codes which can then be used to associate a listing with a custom area.

I started with Dirk Strauss’s list of ZA cities which I felt could be improved upon. But I would not rank a place such as Athlone on the same level as Cape Town so this data wasn’t going to to be useful for me.

The South African Postal Service has a nice downloadable .xls file available here. I exported this to CSV and ended up with a list of suburbs tagged by street delivery and post box postal code.

Next I needed a way to find which postal code belonged in which province which I found at this STATS SA link. In this PDF is embedded a table mapping postal codes to Province.

A few minutes of coding and I’m left with a database of ZA suburbs, their postal codes, the area of that postal code and the provinces in which they fall.

My current car smells like a cat took a pee in it and someone tried to clean it with the spit of a horse. I’m told it’s the aircon filter which needs to be replaced. Honestly there’s just too much else wrong with it (like the fact that the aircon doesn’t work either) so I took a decision to liquidate some forward positions and use that as a deposit on a new car.

While I’ve never bought a brand new car in my life and considering that one loses at least 15 percent when you drive off the showroom the next best thing was to look at a year-old car. Usually this the kind of car that’s still under manufacturer warranty, has an active service plan and is in a very good condition.

The sources of these cars may be financially distressed owners, commercial fleet cars, all the way up to as the title of this article suggests, ex-rental/fleet cars. The prices are usually good too. I found something nice that had 25 thousand km on the clock, is a current model that was introduced a year ago and while a new car costs 230k 252k (blame the exchange rate) I could get it for 173k, presenting quite a tidy discount.

Most of the resistance for buying a rental car is based on anecdotal evidence. As they say “the fastest car is a rental”. Google “rental car abuse” and you’ll find a couple of awful videos on youtube where rental cars are, well, abused. It’s as if to say given a few selective examples of some very emotive topic, we have now proven the general rule. From a science-based view this is all bullshit.

The counter-argument is that if you bought a car from a single owner (preferably a “little old lady”) you would “know” what you’re getting. The problem is how would you “know” what you are getting though? And if you were lied to what recourse would you have?

In facing the unknown my strategy is to usually assume an educated worst-case scenario and plan for that.

In this case I identified following possible issues:

• That 23k of kilometres basically consisted of driving the car “in its moer”.
• An unknown mechanical issue would materialise shortly after actually purchasing the car.

Now, rental cars are divided into classes. The ‘nicer’ the car the more its rental cost. It was an acceptable assumption that someone would rent a cheap car because that’s all they could afford. Equally someone renting a more expensive car would probably do so deliberately. The ‘class’ of person making each rental would be worlds apart. I assumed that a mid-range car would be attractive to the VIP corporate type (most likely also a ‘fleet’ car) while the lower end of the market would be attractive to short-distance drivers aka the typical class I assumed would compose the bulk of those “driving the car in its moer”.

[A long time passes]

I bought the car. Only problem I had with it so far is that the engine under-cover was improperly refitted when the car was sent for a valet. This was quickly fixed with the sellers fetching the car from work and dropping it off later (maybe it helped that they weren’t far from where I work).

Other than that it was a pretty good buy and I would do it again.

But just to cover myself I took an extra two-year warranty plan on the mechanical features and a paint-and-chip-protection plan.