Zeigarnik effect and productivity


Effect of Directed Forgetting

In 1927, in a restaurant in Berlin, Dr. Kurt Lewin and his colleagues were engaging in a long conversation. The waiter had not yet given them their bill, so Lewin called him over and asked for the amount. The waiter told him immediately, and Lewin paid and reengaged in the conversation for some number of minutes. Suddenly though, Lewin had an insight—he called the waiter over a second time and asked again for the amount of their bill. The waiter no longer knew.

The Zeigarnik Effect

This day marked the beginning of something known as the Zeigarnik Effect, a theory which was first dreamed up by Lewin and then later researched and named after his colleague.

When a person intends to perform a task, a quasi-need is established which causes a strong desire for fulfillment of that task. These quasi-needs, or „tension systems‟, come into being because of a person‟s decision to begin a task.

Another more common, every-day example is one that is experienced by most students: when taking a timed multiple choice test, the questions which are never answered, or those that the student is not sure about, are the ones most often remembered after the test has been finished. According to Lewin and Zeigarnik, this represents a lack of closure, which is the driving force behind the tendency for individuals to remember incomplete or interrupted tasks better than completed ones.

How does this relate to productivity?

1. How finish task faster?

To be able to concentrate fully on current work we have to close all previous tasks. This is basically what Kanban with definition of “Work In Progress” limit is proposing. To be most effective we need to concentrate on one task and avoid multitasking.

2. How to remember stuff better?

The Zeigarnik effect suggests that students who suspend their study, during which they do unrelated activities (such as studying unrelated subjects or playing games), will remember material better than students who complete study sessions without a break.

Sources and more reading:

Facilitating Global day of Coderetreat 2013

On the 14th of December 2013 – the Global Day of Coderetreat was held at Warsaw as part of annual Agile Development Day. Event was hosted by Pragmatists and Sages.

For me it was first time to facilitate this kind of event. Many thanks to organizers for providing hangout workshops about facilitating coderetreat event. This provided many helpful information

We followed a fairly standard format but we had only 5 sessions in total. We wanted to leave some time to participants to network and get to know each other doing brakes.

My first thought of theme of this coderetreat was Test-Driven development. But after seeing how good people are doing TDD and Pair programming after first few sessions we started to play with OO programming in last sessions.

Session 1 – Warm up with no constraints

Starting session to get to know the problem.

Session 2 – Ping pong pair programming with TDD

Session teaching pair programming and Test Driven Development rules. One additional constraint was not using plain arrays.

Session 3 – Mute pair programming with evil coder

Person being Evil coder was supposed to implement the code in a way the tester doesn’t expect.

Session 4 – Extreme OO.

3 lines of code per method
2 fields per class
3 methods per class
One dot per line

It turned up to be very difficult to follow those rules. But there were some insights that creating small classes and small methods made the code more readable and better designed.

Session 5 – Pick your own

In last session we voted for constraint. And “no if statements” was picked up. We have very interesting approaches to code without ifs and people have a lot of fun in this session.


One thing i could have done is ask user to write down one thing they wanted to learn before event. Then after last session write one most important thing they learned.
On Retrospection session we could compare this findings with others. I got this idea watching photos from other cites and i think its the best way to sum up whole day.

Interesting sessions in other locations

Some interesting sessions that other teams around the world were doing:

Amsterdam, Netherlands
Inherit the code from the previous session (yes we did not delete our code). With mixed pairs (1 of the 2 knows of the old code base).

Amsterdam, Netherlands
Zombie cells, which are cells that where alive, died, and then revived. Zombie Cells behave like Alive cells for now but we ought to know if they where ‘resurrected’

Berlin, Germany
No return values

Peterborough, UK
Abstract cartoon names for variables

Some thoughts after Agile By Example 2012

Last week I attended Agile By Example conference in Warsaw.
There are some notes about presentations that i found very interesting.

Great teams are grown, not hired

Inspiring presentation from Roy Osherove about role of team leader in agile teams.
How to take a risk and put your self and your team out of comfort zones to raise team to productive state.
He presented three steps in team can be and how to evolve your team to Self Organizing Phase.

Take a look at his blog and his book is avalible on lintpub.

Impact Mapping

Another good speech by Marc Löffler was about impact mapping technique.
Very useful and convenient way to specify you requirements to meet specific business goal.
Helps you to concentrate on features that will be most useful for you project to achieve your goal.
He was recommending this book by Gojko Adzic.

Distributed teams

In block about distributed teams Jamie Allsop and Roger Dahlen where giving examples what benefits has working in distributed teams.
Variety of culture and working environments and diversity was contributing a lot of value to project.
People sitting together in same space tend to have same opinions and same behavior whereas with distributed team you have individuals with unique way of thinking and doing things.
The final conclusion was that you can use fact of distribution to make better team and in emulating Distribution with Co-located teams can be also useful

Best Git tools & configuration tips

Git is very flexible and powerfull tool. At the first try it can be overwhelming especialy for people comming from SVN. Here i will describe some tools and configuration that i use and are very helpful with day-to-day tasks.

Step 1. Enable Bash completion:

First thing after installing Git is enabling completion:

cp /opt/local/etc/bash_completion.d/git ~/.git-bash-completion.sh
echo "[ -f ~/.git-bash-completion.sh ] && . ~/.git-bash-completion.sh" >> ~/.bash_profile
. ~/.bash_profile

Better completion together with branch names can be achieved trought:


Step 2. Configure your git

There is two way to edit your git configuration. You can use command:

git config --global color.ui "auto"

or manually edit you .gitconfig file stored by default in home directory.
Here is my gitconfig with some helpful aliases:

Step 3. Command prompt modification

Nice feature if you are using git from terminal is to enable git tips in command prompt.

The one that has the most features is:

If its too ‘noisy’ for you checkout some custom command prompt modifications from git-hub like this:


Step 4. Install some plugins

To get plugin working put it anywhere on your $PATH (~/bin is recommended). Then git will see it and you’ll be able to run `git plugin_name`.

  • git WTF http://git-wt-commit.rubyforge.org

    Plugin with self explonatory name. Very helpful when you are not sure what is the state of you repos.
    One command replaces a lot of typing.

  • git-divergence https://github.com/garybernhardt/dotfiles/blob/master/bin/git-divergence
    Showing incoming and outgoing changes.

  • git-flow https://github.com/nvie/gitflow
    Plugin for managing very popular branching model git-flow.

    And plugin for completion:

  • git-extras https://github.com/visionmedia/git-extras

    Bunch of various command for repo statistics and day-to-day work.

    Step 5. Working with github?


    Step 6. Have fun using Git

    Collect achievements as you learn using Git 🙂


  • Failure publishing Play modules

    Today i found interesting module for my Play application on git-hub.
    Unfortunately it was not published on modules repository (I didn’t know the reason).
    So i forked it and made some changes (i hope that it was an improvement).
    Then i wanted to use it in my app so i wanted to publish it in play modules repository.
    And this is what i found about sharing modules in play repository for 1.2.4 version:

    Share module in Play

    “First you need to have an OpenID.
    Then you have to send module registration request on the Google Group.
    Then you can release your module
    And then log in to module repository and upload the generated package”

    Damm, now i know why creator of this module didn’t share it at first place. More detailed instruction available here http://www.playframework.org/documentation/1.2.4/modules

    Share gem in ruby
    Compare all of this tasks to rubygems one line way of publishing your gem:

    gem push foo-1.0.0.gem

    Grails spring-security-ui plugin and Bad credentials exception

    The spring-security-ui plugin provides CRUD screens and user management workflows out of the box for spring security implementation. The most important is that it’s fully customizable. Together with spring-security-core plugin its gives you full implementation of security stack. Instalation is very simple but you have to consider one thing.

    For example to install plugin with brand new app run:

    grails create-app sample
    grails install-plugin spring-security-core
    grails s2-quickstart com.sample User Role
    grails install-plugin mail
    grails install-plugin jquery
    grails install-plugin jquery-ui
    grails install-plugin famfamfam
    grails install-plugin spring-security-ui
    grails run-app

    And that’s it. You have CRUD flow for user management and login, register, forgot password functionalty.
    Only problem is that you cannot login with registered users. Read along to see why.

    Password encoding catch

    Plugin have generated all classes for us but one thing you have to change manually.
    Classes generated by spring-security-core plugins already have encodePassword executed before insert.
    For example in User it looks like this:

    	def beforeInsert() {
    	def beforeUpdate() {
    		if (isDirty('password')) {
    	protected void encodePassword() {
    		password = springSecurityService.encodePassword(password)

    After you install spring-security-ui you may find that you cannot login using created users. You will receive error about bad credentials: org.springframework.security.BadCredentialsException: Bad credentials

    The problem is that while registering new users controller generated by springsecurity.ui is encoding user password second time.
    So you end up having password encoded twice. Password is encoded in controller and in User domain object.
    You can remove encoding in domain object but this is not prefered because then you will have to remember to encode password when creating
    User objects in BootStrap or anywhere else besides UserController.


    Solution is to disable encoding in springsecurity.ui controllers by setting property in Config.groovy:

    grails.plugins.springsecurity.ui.encodePassword = false

    Other things to configure

    There are also other things generated by plugin you may want to customize.
    For example RegisterController and its views assume that your User domain class has an email field. If You don’t have smtp server then registration will fail. Be sure to rework the workflow (using the s2ui-override script) if you don’t want an email confirmation step.

    grails s2ui-override register com.sample

    Otherwise add an email field to User domain class and configure mail plugin.

    You probably will need to change generated pages like register/index.gsp too get rid of email functionality. View register/index.gsp assumes that sendEmail model property is set to true after sucessfull registering user.