Coding Lessons Can Be Learned From Writing

No really, it’s true. James Devlin wrote an interesting article about it. He illustrates how the lessons from The Elements of Style by William Strunk and E.B. White apply to software development. Mitch Wheat also wrote a similar article showing a few concise examples.

If nothing else these new perspectives should give you something to think about.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • Technorati

A figleaf Text Coverage Report

figleaf is an indispensable tool for calculating code coverage. I use it to ensure my unit tests are testing a significant portion my code. It includes several reports, but is missing the one I want most - a simple text report.

I wrote figleaf2txt to generate a text report similar to the one generated by Ned Batchelder’s coverage.py. Running figleaf2txt on coverage data will print a simple report to the terminal.

Additionally I wrote a nose plugin to run the report immediately after a test run. Again just like coverage.py. You simply run nose --with-figleafreport to see the report on your terminal.

All work has been done in a Bazaar branch that started with figleaf version 0.6.1. Your can see my progress and participate in development by creating your own branch from mine.

My code works, but could stand a little clean up. There are lots of other small things I would like to fix up when I get the spare time, but for now my changes work good enough for me. Maybe these changes will eventually make it into the official distribution.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • Technorati