Zsolt Fabók

Practical ideas on kanban, lean, scrum, xp, java, programming…

Schedule Portfolio Kanban

in kanban

As a project manager one of my current tasks is risk management, and I have to focus especially on schedule risk. Therefore I was looking for something that can show me quickly the current status of the project and this kind of risk. I started to use a portfolio Kanban board that covers the whole project, but my board is different from Pawel Brodzinski’s resource oriented board:

I’m using an old idea from Chris Matts - a work item is put into a column that tells us when the it is supposed to be ready -, and the idea of organisational level Kanban boards. If this is week 13, team yellow is doing fine, whereas teams red and blue are in trouble.

No Attributes in Objects

in development

I just realised that I rarely define attributes in my classes (the dependency injection references are exceptions) and I’m passing everything as a parameter. So instead of this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class Foo
  attr_accessor :list

  def do_something
    @list = []
    action_1
    action_2
  end

  private
  def action1
    @list[2] = "a"
  end

  def action_2
    @list[1] = "b"
  end
end

I have this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class Foo
  def do_something
    list = []
    action_1(list)
    action_2(list)
  end

  private
  #   self. means that this is a class level method (static in Java)
  def self.action_1(list)
    list[2] = "a"
  end

  def self.action_2(list)
    list[1] = "b"
  end
end

Fast or Accurate Applications?

in development

It is a common topic between software developers whether an application should be fast or accurate. I’ve always chosen accuracy over speed until now, like when I was solving problem 7 on project euler, which sounded very simple: find the 10001st prime number. My algorithm for finding prime numbers used Wilson’s theorem:

prime.rb
1
2
3
def is_prime?(number)
  (Math::Factorial.get(number-1)+1) % number == 0
end

And it was just fine for problem 3, where I had to find the prime factors of a certain number. There, the highest prime number I had to deal with was 6857 which is the 882nd prime number. Then I started to look for the 10001st prime, and my algorithm managed to find the 3000th after 2 hours.

Spike and a New Workflow

in development

The other day I found myself writing a single test case the whole day without making a significant progress in the production code. It wasn’t efficient at all and I wasted the whole day on stupid test cases - so it was time to ditch TDD for the rest of the weekend and try something different. After calming down I asked myself why I was writing test cases when I didn’t have a clue about the next step. So, instead of writing tests I wrote a spike. It wasn’t nice at all, but showed me which direction I should go. I wrote a test case which tested the spike and was green, and I deleted the spike afterwards. And at this very moment, the Spike Solution from XP finally made perfect sense to me.