Tom's Blog

From tech to non-tech

Improving Your Go With the Help of a Teacher

| Comments

I stumbled on a discussion about Go teachers at reddit/baduk and I thought I’ll share my story. For years I’ve improved only by solving problems, reading books, playing and occasional game reviews. This changed last November when I felt that I wasn’t improving at the pace I had hoped for. I thought I’ll try go lessons from a teacher.

I did my research and I actually loved the idea of a Baduk league (Korean Style Insei League on KGS, In-seong’s Yunguseng Dojang, Nordict Go Academy etc.) but I just can’t make such a time commitment. Go is a hobby that I can recharge my batteries with and also keep my mind sharp. Hopefully my quest for improvement won’t ruin it for me :).

I found 2 teachers through Google and had one online go lesson with each. After that I continued taking lessons from Kazunari Furuyama and I’m glad I did. I discovered another world of improvement that I had no idea even existed.

Kazunari prefers Offline Go Lessons although the first one I had was an online version. I’ll only explain how the offline go lessons work as this is what I have experience with.

Offline Go Lessons

You start off by playing some games as you normally do. I play on KGS, I like 20 min time controls with 5 x 30s byo-yomi. If you have accumulated 2 to 10 games you send them (the SGF files) over to Kazunari. He will analyze them and depending on his schedule you will receive a lesson from him back within couple of days or up to a week.

The lesson contains analysis of 1-3 games and about 25 problems (see Offline Go Lessons page for actual details as the number varies depending on the number of lessons you purchase). So you’ll be receiving a bunch of SGF files (not sure I’ve seen so many attachments to an email before).

The game analysis is either a very thorough 1 game review or shorter ones for couple of games. So far all of these have been eye openers for me.

Now comes the really fun part. Kazunari will have spotted your common bad habits throughout your sent games. He then composes problems based on your games to weed those out.

At first the problems seemed so easy that I couldn’t understand why aren’t I solving tsumego instead. After going through my first lesson I realized how profound those bad habits were. I was so used to making certain moves because for no good reason I was used to.

Even when I had read about hitting at the head of 2 stones for example I wasn’t using that in my games. To weed these out the problems actually can’t be very difficult.

Already after the first lesson my confidence in games increased tremendously. After 10 lessons I feel the meaning behind very many moves that before were just some moves for me. It also has helped me understand my opponents – seeing whether they take advantage of certain weaknesses or not gives me an idea of their strength.

Of course this doesn’t come without a price. You actually have to solve these problems over time again and again for them to actually internalize. Not sure I’m there yet but I’m working on it. I’ve taken about 10 lessons so far so my collection of custom problems to go through is large enough to be a challenge.

Also you should be going over the analyzed games every now and then. Whenever I go back to them I re-learn something or understand something more that I either had missed or wasn’t ready to understand.


I’m very glad that I found a new source of improvement that is working for me. I wish I had looked into getting go lessons before. And as with all the other sources of improvements you actually still have to work really hard to take advantage of them. I play 1 to 30 games a month, solve couple of hundred tsumego and get about one offline go lesson a month. Looking forward to being a KGS shodan!

Ansible Install Multiple Packages on Ubuntu

| Comments

I’ve been playing around with Ansible a lot and I’ve noticed that most of the time the examples that you find in the docs or on the web are not very good.

For example when you try to figure out if it possible to install multiple APT packages with a single command my googlefoo will find that the answer is YES but not a single copy and paste solution. Anyways, here you go, lets have it on the interwebs now. Lets install Apache and PHP5 with a single command!

- name: Install Apache
  action: apt pkg= state=installed
    - apache2-mpm-prefork
    - libapache2-mod-php5

And as we are at it lets enable couple of Apache modules also.

- name: enable some Apache modules
  action: apache2_module name= state=present
   - rewrite
   - expires

I’m Listening to Music Now

| Comments

Some months ago I had the opportunity to borrow a Pono Player and a pair of Bowers and Wilkins P5 v2 from a friend and colleague of mine. That evening I listened to music. Something that I thought I had done before but I actually hadn’t.

Earlier that day, over lunch, I had listened to couple of songs with that equipment. I started laughing when listening to Queen – We Will Rock You. Not that that song was funny but the base went just through me and it was tingling inside. I can’t remember being so surprised for some time.

Next I listened to Béla Fleck & The Flecktones – Blu Pop. The richness of the sound was overwhelming. This is when I asked to borrow the set for that evening. That evening I spent 3 hours in my hotel room just listening to music. I listened so much that I was tired afterwards.

Now couple of months later I received my pair of P5s. I’m rediscovering the music I have and I’m hungry for higher quality of sound. I’m listening to music now!

One Thousand and One Life and Death Problems

| Comments

Over Christmas I read a lot about improving in the game of go and most of the materials had the recurring theme of how important solving life and death problems are. At the same time I realised that I didn’t have any good books on life and death but only iOS applications. After some googling and looking for the European dealers which would carry go books I ended up ordering bunch of them from Goshop Keima. 1001 L&D Problems Cover Photo

The one I’ll write today about is the 1001 Life and Death Problems by Richard Bozulich.

The book is divided into 6 parts. 1 move, 3 move, 5 move problems and 2 sets of each – black to kill and black to live. The problems are on one page and the next page has the solutions. One solution diagram for each problem.

I really like how the problems are laid out on paper. You have 9 problems on each page. For the 1 and 3 move problems I liked to solve all on a page and then check the solutions. For the 5 move ones I solve 3 at a time, turn the page, check and then do the next 3 from previous page. Probably the most usable format for problems I’ve experienced. No distractions, easy to spend time on a problem and really quick way to verify the answer.

At first when I started out with the book the problems seemed too easy. The first 600 problems I solved really quickly. Especially the 1 move problems but the 3 move ones also were a bit too easy. Starting from 600th problem I would see more and more problems that required more than 10-15 seconds of work. Starting from 5 move problems it turned into the type of problems I’m used to 15s to 60s.

For a 3k KGS I observed that I made maybe 1-2 mistakes for every 100 problems. Starting from 5 move problems I would make 0-3 mistakes per page. On average probably 1. Of course this taught me to pay more attention and read more carefully.

Once I was done with the book I started reading it again from the 600th problem. I think I’ll do that again once I finish it, maybe just this time I’ll even start from the 700th problem.

I find the problems in this book be deep enough that they definitely train my reading skill, unexpected enough that I cannot rely on my intuition too much and actually have to read until the end or I make mistakes.

Now that I think of this book is a great resource for even a 10k. Especially the 1 move problems (not sure why they are named 1 move problems, they actually require a bit more but I guess because they unfold so well after just a single move).

So overall, I like the book a lot. For a 3k KGS it gets interesting from 600th problem. Before that it is more of a warm-up and maybe seeing some interesting shapes you haven’t seen before. I like the problem quality, deep, interesting and makes you read out the sequences to get them completely right. I’ll probably re-read the book many more times!

Intro to Future Go Posts

| Comments

One of my hobbies is studying and playing the game of Go. I’m around 3 kyu at KGS (an internet go server) at the time of writing this. I learnt the game about 9 years ago and been playing it actively from Dec 2010 again. This hobbie helps me get the necessary attention off from work but at the same time keep mind mind sharp and feed my need of thinking about things.

In the last year I’ve stumbled on some good Go software, books and other materials. Also I’ve found that it is quite difficult to know beforehand if a book is suitable for me and my level of Go understanding. I’ve bought books that are over my head and at the same time books that are too easy. Also I’ve been looking for really good tsumego books but again I’ve had more failures than successes. So I thought that I’ll at least help others and write couple of posts about specific books I’ve enjoyed at my level. This post is more of an intro and I’ll follow up with couple of book reviews.

Mercurial: Put the Branch Name in Your Face

| Comments

I happened to push some code to the wrong Mercurial branch (Yikes!) today. Nothing too bad but one of my colleagues pointed out to me that if I had been using a GUI then it is way more difficult. I’m a commandline line guy and I like it this way!

Luckily I knew what to do, there is a feature that I have enabled for git that just does that, it shows the branch name in your face and I set out to do the same for Mercurial. Let me share the solution and you might also like it. I’ve also made a shot how it looks like for me.

To achieve this you first need to install the hg-prompt Mercurial plugin. This little plugin gives you access to meta info about the repository and easy to use from shell scripts.

Secondly you need to re-configure your PS1 environment variable. I created a function that would add the extra information and then I use it in the PS1 definition.

# the bash function
function hg_prompt_info {
  hg prompt --angle-brackets "<%{$fg[green]%}@%{$fg[yellow]%}\
%{$fg[magenta]%}<branch>%{$reset_color%}> " 2>/dev/null

# And the usage of the function. I don't set PS1 directly because
# I'm in a theme of oh-my-zsh but for vanilla bash it is similar
PROMPT='%{$fg[$NCOLOR]%}%n%{$fg[green]%}@%m%{$reset_color%} %~ \
%{$fg[red]%}%(!.#.»)%{$reset_color%} '
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'

So now whenever you are in a folder with a Mercurial repository the shell will show you the branch. Hopefully this helps you to commit to the correct branch!

Mercurial Shelve Extension for the Lazy

| Comments

Have you ever been in this situation that that you want to hg pull some changes but you have uncommited changes and you don’t want to commit the local changes yet? I know I have and I’ve usually caved in and just modified my code to a state that I can commit my local changes and then pull.

Yesterday I was lazy enough to look up the Shelve Extension which comes bundled now with the 2.8 release of Mercurial. The idea is fairly simple. When you have uncommited changes you put them on a shelf, hence the name shelve. Here is what the workflow looks like:

toomasr@cigarillo ~/project » hg pull
abort: outstanding uncommitted changes

toomasr@cigarillo ~/project » hg shelve
shelved as default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved

toomasr@cigarillo ~/project » hg pull
pulling from ssh://
searching for changes
adding changesets
adding manifests
adding file changes
added 42 changesets with 457 changes to 152 files (-1 heads)
13 files updated, 0 files merged, 0 files removed, 0 files unresolved

toomasr@cigarillo ~/project » hg unshelve
unshelving change 'default'
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 2 files (+1 heads)

So I was able to shelve away my local changes, run the pull and update and unshelve my changes! Go enable the extension in your ~/.hgrc and start shelving.


For more features go check out the Shelve Extension page!

Follow the Document

| Comments

I was looking for some documentation on PayPal checkout and at one point discovered myself following too many links. Not web links that you might think but PDF links instead. I thought I’ll share my experience with the world because it can be somewhat fun!

Writing Testable Code

| Comments

Last week I watched 3 half an hour videos about how to write testable code. These videos re iterated a lot that I already knew but in a way still opened my eyes. I found them cool enough that I would like to share these with you and I think that if you watch these you will be able to write more testable code starting from today!

The Clean Code Talks – Unit Testing

  • Introduction to the series
  • It is not about writing tests it is about writing testable code
  • Explains and shows hard to test code
  • Goes over different levels of tests and argues about their importance
  • Explains how to write more testable code

The Clean Code Talks – Don’t Look For Things!

  • Globa state and how it will hurt your tests
  • Law of Demeter
  • Dependency Injection
    • Business logic
    • Wiring and creation logic

The Clean Code Talks – Global State and Singletons

  • Global state and insanity
  • Singletons and singletons
  • Deceptive APIs


Writing tests is easier than you think but for easy tests you need your code to be set up in a way that makes it easy to test!

Jenkins - Disable Reloading

| Comments

I’ve been doing some Jenkins plugin development. Just some tweaks here and there. One thing that bothers me a lot is the console reloading. So whenever you are on the console and by accident press the ENTER key (I sometimes do that to clear some screen to see when new Exceptions start) and a redeploy happens instead. Usually I run out of memory during the reload also.

When you run your mvn hpi:run it will say that some sort of reloading is enabled.

[INFO] Console reloading is ENABLED. Hit ENTER on the console to restart the context.

Of course no information on how to disable this. By googling around I finally found the solution!


So hopefully next time you google for the message you’ll find this flag quicker. You can consult this Jetty Issue for more information on the console reloading trigger.