Skip to content

The 5-minute guide to Kanban

Kanban is another word that is currently popular among corporate flocks, I mean folks. So here is a quick guide on that.

  1. Kanban is a technique of categorizing, scheduling and displaying the work output of a project team.
  2. The Kanban method originated in Japan through the Toyota Production System (TPS) and uses a feedback system to manage store inventory based on demand .
  3. Software development teams can use Kanban techniques for enhancing their development pipeline and simplifying project management.
  4. The simplest form of Kanban can be applied as below.
    • All phases of the project such as specification, design, development, testing, and deployment are each given a slot on a Kanban chart.
    • Each slot is further divided into smaller slots based on status of a single feature/task, such as planned, ongoing, and completed as shown in the diagram.
    • Work-In-Progress or WIP limits are allotted to each slot. This is the amount of maximum items allowed to be pending in any one slot.
    • The tasks are then mapped on the Kanban board as they traverse each stage of software development.
    • Whenever a slot is filled to its assigned WIP limit, team members working on other slots can then help move the pending items forward or focus on other activities until the backlog is cleared.
    • This pull-back helps reduce spikes in the software development process.KanbanBoardDownload this post as an image

The 5-minute guide to Scrum

The corporate sector spews a lot of business jargon and buzzwords. Scrum is one such word. For people wanting to understand the meaning of scrum without devoting a lot of time to it, here it is in its most distilled form.

  1. Scrum is an agile project management framework.
  2. The main objective of scrum is to render project management simple and flexible.
  3. As per the diktats of the agile method, testing is a part of the process and not a separate phase.
  4. The scrum team consists of three roles drawn along the lines of their respective responsibilities as given below.
    • the product owner – an individual responsible for decisions related to the product
    • the development team – a team of executives working on the product
    • the scrum master – an individual orchestrating the project management
  5. The entire product lifecycle is divided into small timed events called ‘sprints‘.
  6. Each sprint starts with a single preparation meeting for selecting the requirements to be advanced in that sprint and the plan for doing so.
  7. The progress of the sprint is monitored by using any of the following tools.
    • the testing carried out to verify the goals of the sprint
    • a daily scrum meeting at the start of the day (status meeting)
    • a sprint burn-down chart and/or a scrum task-board
  8. A sprint ends with a sprint review and a sprint retrospective (lessons learned).
  9. The Scrum method includes the following main artifacts.
    • a product backlog (potential requirements)
    • a sprint backlog (requirements selected for a sprint – input)
    • an increment (the actual code/functionality for a sprint – output)
    • the sprint statistics (used to monitor the sprint)
  10. If a sprint is cancelled, the incomplete backlog items are added back to the product backlog. The completed items are reviewed and released, or kept back for release in the next sprint.

Figure 1: The scrum process (Source: Wikipedia)Download this post as an image

The ‘about proxy object project’ in Python Koans

I have recently decided to refresh (and update) my python skills. I had looked into Ruby Koans once and really liked the concept. So when I found out that there was a port of the koans code to Python, I figured that would be a good starting point for me. You can get the Python Koans code from github.

Anyway, the post is about a particular koan that stumped me. It is the last exercise in the koan series (second-last if you consider the extra credit koan) and the exercise file is titled ‘ The goal of the koan is to develop a class that makes proxy objects using a given parent class and intercepts calls made to the parent class as need be. I tried the problem myself and could not get very far. Naturally, I googled for an answer and found fragments of code that I could use in my solution. However, I did not find a complete answer to that exercise. So I am documenting the solution over here for all of you guys who are stuck in koan hell.

Update: The following error was corrected , so if you have downloaded the koans before the date this post was published, you might have to perform the following steps. Otherwise, just skip the next paragraph.

First things first. I am using the ‘python2’ area of the koans (Python 2.7.3). There is a ‘cosmetic’ error in the current edition of the python koan code in that exercise that needs to be corrected. I will update this post if this gets fixed eventually. For now, before you start the exercise, change the assertions that test for the ‘channel’ property so that they check for the string ‘channel’ rather than ‘channel=’
For eg. self.assertEqual(['power', 'channel='], tv.messages()) would become self.assertEqual(['power', 'channel'], tv.messages())
You could use the exercise without making the change above, but that will just result in string manipulation on your part to get the right strings for class properties.

It is always better that you try to solve it on your own, but I needed help from the interwebs so you might as well. That being said, here is how you do it. The basic idea is to intercept the way methods and properties are called in Python and manipulate them if necessary or pass them on to the parent object. To do that we redo the __getattr__ and __setattr__ methods in our proxy class and ensure two things happen. If the attribute that was called is of interest to the proxy class, the class handles it and returns values accordingly. If not, then it return the getattr or setattr methods on the object rather than self using __getattribute__ . Refer to the code below. The rest of the code is like any python code except for another tiny difference. When defining variables for the proxy class, instead of using the familiar self._messages format, we have to use the setattr method. The reason for this is that when setting these variables the normal way, the __setattr__ method is called by default on the instance attribute. To circumvent this behaviour and call it on the base class method, we have to use object.__setattr__(self, '_messages', []) as shown below. My solution juggles the base and instance methods to get the job done and it may be a hack (I don’t know for sure). So if any Pythonista has a better way at implementing this koan, do respond in comments. The entire class code is given below. If you copy paste the code make sure your indents are right. 
class Proxy(object):
    def __init__(self, target_object):
        object.__setattr__(self, '_messages', [])
        object.__setattr__(self, '_was_called', {})
        #initialize '_obj' attribute last. Trust me on this!
        object.__setattr__(self, '_obj', target_object)

    def messages(self):
        return self._messages

    def was_called(self, attribute):
        return attribute in self._was_called

    def number_of_times_called(self, attribute):
        if attribute in self._was_called:
            return self._was_called[attribute]
            return 0

    def __setattr__(self, attr_name, value):
        if attr_name in self._was_called:
            self._was_called[attr_name] += 1
            self._was_called[attr_name] = 1
        setattr(object.__getattribute__(self, "_obj"), attr_name, value)

    def __getattr__(self, attr_name):
        if attr_name == 'messages':
            return self.messages()
            if attr_name in self._was_called:
                self._was_called[attr_name] += 1
                self._was_called[attr_name] = 1
            return getattr(object.__getattribute__(self, "_obj"), attr_name)

Shell script to remove system-beeps in Crunchbang Linux

I am going to rant some on this post before I get to the solution. I have been a fan of Ubuntu Linux for a long time. In fact Ubuntu was the reason I started using Linux. But ever since Ubuntu 11.04 (Natty Narwhal) came out, I have faced some usability issues. I like the new Unity interface and I think that it has great potential. On the other hand Gnome is progressing on its own path of GUI evolution. However, mixing both of these GUI is not working out for me. In my opinion, this mix resulted in a mashup of two very diverging approaches of handling linux GUI. The bottom-line is that I have decided to wait on the fence until this GUI battle is over and then root for the winner later.  So I decided that I need to go to the next level of geek-dom and install a minimal Linux distro. My distro of choice is Crunchbang, just because. Anyways, it is a fun little distro and I still keep my Ubuntu Linux on a separate partition lest I need it someday.

Enough of that though… as the title states, this post is about a shell script to put an end to all the annoying system beeps you get in Crunchbang linux. The script is given below. (Or you can get it using the Pastie Link) Copy and paste this to a  file (say ‘’) and make it executable by using the following command.
sudo chmod a+x
Next run the script with root privileges with your username as an argument. So for example, if your username is ‘uname’, the command would be as follows.
sudo ./beepoff uname
This should get rid of almost all the system beeps. Please note that the script is just a compiled version of a solution that I found here  on the Crunchbang Forums. So if you prefer to do the typing yourself, you can make all the changes in the forum manually.
#! /bin/sh
# Shell script to disable (almost) all beeps on Crunchbang Linux
# @author: Akshay Dandekar
# @version: 0 (there will be no other)
# This script is free - do whatever you want with it
# and I am not responsible for the outcome

# Blacklist pcspkr
if [ $(grep -c 'blacklist\ pcspkr' /etc/modprobe.d/pcspkr.conf) -eq 0 ]
echo 'blacklist pcspkr' | tee -a /etc/modprobe.d/pcspkr.conf
rmmod pcspkr
echo "blacklist pcspkr in pcspkr configuration"

#set PC speaker and PC Beep to mute on amixer
amixer set 'PC speaker' 0% mute
amixer set 'PC Beep' 0% mute

# remove gtk application beeps
if [ $(grep -c 'gtk-error-bell\ \=\ 0' /home/$1/.gtkrc-2.0.mine) -eq 0 ]
echo "gtk-error-bell = 0" >> /home/$1/.gtkrc-2.0.mine
chmod 755 /home/$1/.gtkrc-2.0.mine
echo "gtk-error-bell already set to zero"

# remove console beeps in X
if [ $(grep -c 'xset\ b\ off' /home/$1/.config/openbox/ -eq 0 ]
echo "\n# remove console beeps in X --Added by $1 \nxset b off &" >> /home/$1/.config/openbox/
echo "console beeps already off in autostart script"

# remove bash beeps
sed -i 's/^#\ set\ bell\-style\ none/set\ bell\-style\ none/g' /etc/inputrc

# remove console beeps from the system console
if [ $(grep -c 'setterm\ -blength\ 0' /etc/profile) -eq 0 ]
echo "setterm -blength 0" >> /etc/profile
echo "setterm -bfreq 0" >> /etc/profile
echo "console beeps already off in /etc/profile"

# remove login sound from gdm
if [ $(grep -c 'SoundOnLogin=False' /etc/gdm/gdm.conf) -eq 0 ]
sed -i 's/\[greeter\]/\[greeter\]\nSoundOnLogin\=False/' /etc/gdm/gdm.conf
echo "login sound already off from gdm"

Also, an easier but riskier way of getting around the annoying system beeps is by disabling the pc speaker in BIOS. However, I do not know what the implications that would have on your computer. (For example, would the computer beep if you fall asleep on the keyboard? 🙂 or more seriously if the processor cooler fan stops working?) Also, I dual-boot my machine and would like to keep configuration settings separate for both OSes.

Removing entries from the ‘Open with Other Application’ menu in Ubuntu

So recently I decided to remove Wine once and for all… again. However, after doing so, I realized that the ‘Open with Other Application’ menu in Ubuntu 10.04 does not flush all the Wine-related entries in it (this menu can be accessed by right-clicking any file/folder in the file-system). I googled around to find a fix for this issue and did not find a good solution. The solution was finally found on some forums and was in a pretty fragmented state. So I am compiling it here.

Go to the ‘/home/<username>/.local/share/applications’ directory. Find all the Wine-related documents in there and delete them… just like that. Then open the ‘mimeapps.list’ file in the same folder using gedit (or your favorite text editor). Again find all Wine-related entries in the file and delete them. This can be tricky, so make a backup copy of the file before you change anything. That should get rid of those useless entries once and for all. This solution can probably be used to get rid of any entry. Try it and let me know.