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.

Dandekar’s Nifty Guide to Indian Politics

This is a sarcastic look at the state of Indian politics today. The problem is that it is true.

First you should ask yourself, are you serious about it? Politics is hard work. Start by noting important points in your notepad such as… when was the last time you committed a murder? How many kids did you beat up in your school? How many teachers? Passing even one of your school exams without copying your answers instantly disqualifies you. Hell, even passing disqualifies you. Being intelligent disqualifies you. Stop using the computer immediately. Otherwise the only chair you will sit on will be the one in front of your computer. … If you never participated in college elections, and by that I mean if you never had attempted murder charges on you when you were in college, that disqualifies you. Never having owned a gun disqualifies you. Never having fired one instantly disqualifies you… Get more weapons… use them… at least on endangered animals if not on men and women and babies… If the only knife you own is the one in the kitchen… please do not choose this career… if ‘die evil onions’ is a phrase that has ever come to your mind… you will never do well in politics. I would suggest you completely give up studies and take up some form of a drug habit and work out three hours a day. Try to beat an innocent man daily for starters. Trust me, it will help. Try to hit a petrol pump as well… How are you going to rig elections and capture ballot boxes if you can’t hold up a stupid grocery store? Maybe you should also become a ladies man if you know what I mean… they say it works wonders. How can you ever enter politics if you think all races are equal? And you should not just hate other races… you should be willing to bash their skulls with blunt weapons… for it is always ‘their fault’. If you even once think it is your fault… that spells instant disqualification my friend. Claiming to be a ‘defendent’ of a religion, or willing to give up your life for a religion helps, but you should never actually be willing to give up your life for religion. In fact, you should be willing to strap a bomb to the chests of the people that follow your religion and send them to explode. If watching them do this very thing does not delight you. Maybe you should pick a softer career such as an in the armed forces. You should also be willing to kill the leader of your own religion and claim that ‘they did it’ at the right time. In fact you should always claim that ‘they did it’. ‘They’ can be anybody you desire to get beaten to death in broad daylight. What? You don’t think anyone deserves to be beaten to death? Pack your bags and go home… I just hit the buzzer to disqualify you.
Loving money is a necessary condition for holding any post in any government but never sufficient. And by loving money, I mean you should be willing to beat up blind beggars to steal their coins… In fact try robbing people as a pass-time. If you succeed, you have another career choice, if you get caught and appear on national tv.. Great! You are off to a flying start already. If you are not that great at robbing, that is always an incentive to print your own money. So some form of technical background may help… but it is rare not to have a technically capable friend in India whom you cannot kidnap or blackmail to do your work for you these days…Bribing people always helps… Bribing cops or anybody for that matter is also a necessary condition… but don’t get too good at it. How will you take bribes if you give them??? If you are better at giving bribes than taking them.. try your hand at some illegal business maybe… but not politics… On the contrary, having an illegal business background helps a lot in politics. You could use your ill-gotten fortune for funding your campaign. Or you could just take a bribe from a friend to facilitate his/her illegal business when elected. But then the funds are always limited in these cases. The advantage in the latter case however is that you can always backtrack on your promises. Which brings me to probably the most important point of all!!! Lying is an absolute MUST in politics! Jot that down in bold letters in your mind. Lying with a straight face is a thing of the past. You should be good at lying with an emotional face and crying out emphatically to make a point you never ever had, to succeed in politics. There are many that have done quite well on this one ability alone… Always lie daily to practice this. Lie to your parents, lie to your friends, lie to your teachers, lie to people unknown to you. Lie to anybody you come across. Manipulate people into committing crimes. A little pedagogy goes a long way in politics. Lie to your significant other/others(+1point). Fake a prayer to God. Stand in front of the mirror and lie to yourself. If you don’t see the guy in the mirror clapping in awe, try again. WHAT??? Did you say you cannot lie??? What a big waste of my time?!?! Why are you even reading this then??? What were you thinking? I write this awesome guide and this is what I get. baaah… I am better off manipulating my resume.

Removing links from the Ubuntu applications menu

This post is going to be a short one. Interestingly, I had not learnt how to delete links from the Ubuntu applications menu. So when I needed to do this, it took me a while to find out how to do it. But it is really a very simple task. All you have to do is delete the icon or link from “/usr/share/applications”. Note that this will not delete the actual application.

I like accessing applications directly from the terminal. So I frequently have to do this. Also, for all the power-users out there, I would suggest that you give Gnome-do a try.