Monthly Archives: August 2008

Useful Linux Commands 08/2008

Inspired by the book “The Productive Programmer” I was paying attention more and more on how I actually get things done and how I could better exploit existing shortcuts or faster paths.

Please do not ask why, but I had the following problem: One my PHP-Apps had scattered syntax errors. The question was, how I could locate them in the application. The first attempt was to let Zend Studio analyse the project… This was very slow and contained a lot of information which I actually did not want to see.

So I came up with the following solution:

find -name ‘*.php’ | xargs -i php -l {} | grep ‘Parser error:’

There are 3 parts piped together:

  1. find: Lists all .php files in your project.
  2. xargs: Executes one command for each of the lines coming from standard input. The -i flag replaces one line from STDIN with the {}. The php-executalbe has a flag -l (=lowercase L), which lets php check for correct syntax only.
  3. grep: Filters the output (lots of output like ‘No syntax errors detected in ./includes/’) to the actual information I liked to see: The files which had syntax errors.

From this experience I learned the following:

  • Pay attention to flags of commandline tools, even if they do not appear useful at first sight – like the ‘php -l script.php’. They might be very useful when combined via pipe with other commands.
  • I understood one more time the power of the commandline and will more often visit man pages of commands.

Make Your Projects Transparent

As projects and teams I am working on get more interwoven and organizational issues and management processes are gaining more and more traction on the 3 project dimensions time, budget and quality, I was thinking about what I would do as a manager in charge to let steam off the many issues we were facing and become productive again.

A low hanging fruit I identified, was the overall uncertainty about the many projects and tasks running at the same time with nebulous requirements and developers working in parallel on many things without clear priorities, which resulted in an ad-hoc development and fixing-style of work. This created an atmosphere in which it was nearly impossible to plan – a vicious-circle.

As a consequence I was thinking about how we could …

  1. … make the ongoing project-related processes more transparent to all participants (Chicken and Pigs),
  2. … display project progress, status, expected outcome and deadlines, and
  3. … visualize the current consumption of available ressources and the team’s mood.

During my research I came accross the term ‘Big Visual Charts’. Once you enter the arena of visualizing processes, you will also come across closely related topics like Kanban (Japanese for card or sign) and Lean Production.

Summarizing points:

  • Hand-made drawings on a wall draw more attention than everything electronically distributed or printed stuff. They are easy to maintain and unique.
  • Capture what is important for success, spotted problems, especially recurring ones. Capture good things and bad things equally.
  • Do not be fingerpointing in your visualizations, just display facts to trigger goal oriented behaviour. Your goal is always to become more effective through behaviour adaption.
  • As time goes by, your charts evolve and display certain patterns which work as trigger for people to come together and find solutions as a team.
  • A central project dashboard helps the team and the project stakeholders to understand the bigger picture, what they are currently doing, what comes next and what they want to focus on. It helps the team to self-organize and prioritize tasks.

Recommended links:

Examples and inspiration:

One nice example of a project planning board is this one from the ‘Agile in Action’ site. See ** link from the above list for explanations.
Nice to see the Southpark icons for each team member ;).

This one focusses on the planned stories (green) plus incoming change requests (yellow) and defects (red) to be fixed. It becomes obvious if there where fewer changes and less defects, the team could concentrate more on the production of story points. See * link from above list for explanations.

A burndown chart in Scrum showing the remaining stories in the project backlog. It also visualizes the progress towards a deadline. See **** link from the above list for explanations.
There are many more chartable things:
  • Show team velocity, the number of story points finished or how many ‘ideal man-days’ your team spent actually in production per iteration. This knowledge will also help you plan more accurately in the future.
  • Defects reported and defects fixed.
  • Unittests and actually working unittests, or code coverage of your test suites. Discover how better code coverage and more tests affect reported defects and leave more time to be productive in other areas in the future or reduce overtime.
  • Hours spent pair-programming.
  • Track unplanned interruptions by adding a red sticker on a calendar or the story card you are currently working on.
  • Team code ownership, number of people contributed to certain modules or average contributors.
  • Last date the boss ordered pizza for the team.

Happy charting!

The Chicken and Pig Analogy

If you engage in agile development methods, sooner or later you will come accross the ‘Chicken and Pig’ analogy. It’s purpose is to depict the different levels of commitment of project stakeholders. It summs up like this:

A chicken and a pig decide to start a restaurant. The chicken suggests to serve bacon and eggs. The pig responds, “No thanks. For you, bacon and eggs is simply involvement. For me, it is total commitment!”

This translates into: Chicken, while still project stakeholders, are only losely committed to the project and are not accountable for deliverables. And Pigs are the ones held accountable for deliverables (developers, architects, designers).

Now, how can you translate this controverse picture into being more productive with your team and still love your work without getting fried or frying colleagues?