Code Maven

Search for '{{search_term}}'

Welcome to the Code Maven!

Programming Exercises for any language.

For now, just read the articles...

If you want to make sure you don't miss any new articles, you can subscribe to the Code Maven newsletter, follow via atom feed, Twitter, or even my Google+ account.

Show number of files in a directory tree using Shell

Given a directory tree such as in the following example, we would like to know

  1. How many files are in it?
  2. How many files are in each one of the subdirectories?

groups/
  all.txt
  people/
    John.txt
    Jane.txt
  maskots/
    Foo.txt
    Bar.txt
  other -> maskots

All that using the Unix/Linux Shell.


Show number of files in a directory tree using Shell


Continuous Integration Systems

There are plenty of organizations that use Continuous Integration Systems and a lot that don't. In this 1-question survey I asked what do you use if anything at all? Multiple selections were welcome as we know some people and some organizations use several CI systems.


Continuous Integration Systems


Introduction to Python unittest

Using doctest is nice, but it is not very good for large test suites.

The unittest module is another standard module that provides a much more powerful way to write tests and despite its name it can be used to write integration and acceptance tests just as well as unittests.


Introduction to Python unittest