On being a toolsmith with Matt Doar

I’m looking to learn from people with related careers who have succeeded, either as an independent consultant or with a startup.

One such person is Matt Doar, a “toolsmith” and author of the book Practical Development Environments which I highly recommend.  Also check out his blog at toolsmiths.blogspot.com

Here is Matt’s story:

My background is computer networking, including a PhD from Cambridge, but I really learned to code on the job after graduating (don’t we all).  I hopped from area to area every few years (industry standards meetings, hardware simulation, remote configuration, CORBA and business integration, wireless simulators, …) until I settled on providing tools for software development. I spent five years as the primary toolsmith at two or three different companies and during that time wrote a book for O’Reilly (Practical Development Environments) that basically summarized what I was doing for a living.

The next time that I was ready to change jobs, I simply asked to be employed as a consultant, paid by the hour. I was fortunate enough to have a client who had enough work to keep me busy for a few months while I was finding other clients. That was about three years ago and the work keeps rolling in. I’d guess more than half of it has been JIRA work, which mainly comes through the Atlassian Partners page. The rest of it is part word of mouth, part Google? I’m rarely booked more than a few weeks in advance so it’s always a bit edgy that way.

How did you become a “toolsmith”? I’m going out on a limb and guess it was more accidental than intentional, at least at first. Was there a point at which there was a deliberate transition to focusing on providing tools for others?

I complained about the general state of the tools in the company I was at and inevitably was asked if I thought I could do better. So I spent a while working on some of the problem tools and enjoyed getting down into the details of those tools. I also really liked the immediate feedback from people, rather than waiting until a product is released.

When I was next looking to make a move to another company, I thought about what I had enjoyed at the previous company and went for jobs in that area.

How did you become an independent consultant? You said you were “fortunate.” Do you think luck played a large part or were there other factors? Also, was it a conscious decision to become independent or did it “just happen”? What prompted the decision?

I think there’s always an element of fortune in life. But I’m smart, able to focus and communicate reasonably well, and I reckon that all helped. If it hadn’t worked out, I’d have taken another full-time job somewhere (mortage to pay, kids to feed).

It was a conscious decision to be independent, and I’m still enjoying the detachment that brings to the crazy world of software development. A consultant gets satisfaction from what is created or changed, but at the same time if the direction changes, so long as the bills are paid, that’s ok with me.

Why did you decide to write a book? And what motivated you to complete it?

I’m really stubborn! I went looking for a book about what I was doing day-to-day: version control, build systems, bug trackers, wikis etc. and didn’t find what I wanted. I felt strongly that such a book should exist.

Do you find having written it has been a major factor in building your reputation and helped you gain clients?

It doesn’t hurt, but it’s not been the deciding factor in any jobs that I’m aware of.

Personally I’m a bit afraid to open my mouth and “remove all doubt”, as the saying goes; not that I lack the convictions or am too modest to think I have nothing original to say.

I know what you mean. There are ways to avoid pronouncements though – “it seems to me”, “how about this?”, “perhaps I’m fuzzy on this, but”. And then sometimes you eventually have real experience to base your opinions on.

My projects

So I’m cleaning up my webspace a little and realized I’ve actually got quite a few projects I’m working on.  Here’s a list:

  • One Shore – my business website (freelance testing an development)
  • QA Site – hosted software testing tools, automation, and test deployments
  • Taskboard – agile project management application
  • Like Minds – “there’s more to life than dating” social network
  • Shoppi (AKA ForgetMeNot) – shopping list webservice and iPhone app
  • Sailhost – free web sites for sailors with blog, gallery, and GPS route widget
  • Harvest – “gathering requirements should be fun”

And projects I’m working on for others:

Old projects I’m not actively working on (some have expired domains):

  • Klamath Systems – my old business with networking, hosting, wifi, and voip
  • Fluffy –  Flex test automation research project
  • Linux PC – custom built PCs with Linux installed
  • Dave’s Books – uses Amazon Web Service and bar code scanner to track inventory
  • Reservations – book  hotel reservations online

static logging class for Code Igniter

Here’s a little time waster that makes logging a bit more pleasurable in Code Igniter:

/**
 * Log class to enable logging directly to a level
 *
 * static examples:
 *
 * Log::info('message');
 * Log::write('message', 'error');
 * Log::write('message'); // default level is 'ERROR'
 * Log::setDefaultLevel('info');
 *
 * instance examples:
 *
 * $log = new Log();
 * $log->info("message");
 *
 * $log2 = new Log('debug'); // sets default level
 * $log2->write("message");
 *
 * Note: static use of DefaultLevel is not thread safe
 */
class Log {

	public static $Level = array('NONE', 'ERROR', 'DEBUG',  'INFO', 'ALL');
	public static $DefaultLevel = 'ERROR';

	public static function write($message, $level=null)
	{
		if (! isset($level) )
		{
			$level = self::$DefaultLevel;
		}

		log_message($level, $message);
	}

	public static function setDefaultLevel($default_level)
	{
		$default_level = strtoupper($default_level);

		if ( in_array($default_level, self::$Level) )
		{
			self::$DefaultLevel = $default_level;
		}
		else
		{
			// fail silently for invalid log level
		}
	}

	public static function error($message)
	{
		log_message('ERROR', $message);
	}

	public static function info($message)
	{
		log_message('INFO', $message);
	}

	public static function debug($message)
	{
		log_message('DEBUG', $message);
	}

	function __construct($default_level = null)
	{
		$default_level = strtoupper($default_level);

		if ( in_array($default_level, self::$Level) )
		{
			self::$DefaultLevel = $default_level;
		}
		else
		{
			// fail silently for invalid log level
		}
	}

	function __call($method, $args)
	{
		$level = strtoupper($method);

		if ( in_array($level, self::$Level) )
		{
			if ( isset($args) )
			{
				$log_message($level, $args);
			}
		}
		else
		{
			// fail silently for invalid log level
		}
	}
}

And here are some tests:

log_message('info', 'testing log_message()');

Log::Info('testing static Log::Info');
Log::deBUG('testing static Log::deBUG');
Log::error('testing static Log::error');
Log::Write('testing static Log::Write with level', 'info');
Log::WRITE('testing static Log::WRITE with no level specified');

$log = new Log('debug');
$log->info('testing instantiated $l->info()');
$log->DEBUG('testing instantiated $log->DEBUG()');
$log->Error('testing instantiated $log->Error()');
$log->write('testing instantiated $log->write() with level', 'info');
$log->write('testing instantiated $log->write() with no level specified');
Log::setDefaultLevel('INFO');
$log->write('testing instantiated $log->write() with no level specified after changing default level');