Marty Andrews

artful code

Thursday, January 24, 2013

Roodi 2.2.0 released

Roodi stands for Ruby Object Oriented Design Inferometer. It parses your Ruby code and warns you about design issues you have based on the checks that is has configured.

Changes in 2.2.0:

  • More changes around 1.9 compatibility.
  • Updated to use bundler.

Sunday, October 21, 2012

Best videos of SF MusicTech Summit 2012

One of the side effects of running a business like Eventer (more about that in another post) is that I get to see videos of great conference content a lot. A little over a week ago, SF MuiscTech Summit 2012 was recorded and published on an SF MusicTech Eventer channel. Here's my summary of the most popular talks, and my personal picks of the bunch.

Most Popular

There's two clear winners in the most popular category at the conference.

Firstly, there's a panel named named Artist Tools, where Hisham Dahud moderates a panel with Steve Rennie, David Dufresne, Taynah Reis, Matt Mason and David Haynes. They talk about tools that artists can use to operate the digital side of their business.

Secondly, Celia Hirschman interview the very cool Michael Franti of Spearhead. He talks about his music, fans, social media, Barack Obama and more. Jump to 21:10 if you just wanna see him start rockin on the guitar.

My Favourites

I'm a geek at heart, so my favourite talks at the conference were a couple of demos of some new iPad apps. In both cases, I watched and said "wow". They blew me away.

The first is commercial app about to be released. The presenter, with a straight face, says "Our technology analyses and codifies the meaningful elements in a song, capturing the compositional genome and then deploys that through the architecture, to render it interactively." I ate it up, maybe because the software was so cool and I could see myself (with no musical ability) playing some cool music.

Here's Dave Park talking about JamBandit.

Finally, as part of the SF MusicTech hack day, Yosun Chang built a virtual reality app named AR Album in just 6 hours! It lets you imagine you're holding an original vinyl album in your hands, including the ability to slide the record out from the cover, Incredible.

Saturday, January 14, 2012

House hunting letter drop

The real estate market naturally slows down over the christmas period, and my house hunting for the previous few months hadn't been very fruitful, so I decided to do a letter drop in the are we wanted to buy in.  Here's what I wrote:

Dear homeowner,

Hi. My name is Marty Andrews. My wife and I moved to the area about 6 months ago to be closer to family, and been looking for a house in xxxxxxxxx to buy for our young family. We are wondering if you might be interested in having a conversation about selling your home. If not, thanks for reading this far, and please disregard this letter.

We’re open to all sorts of options, from major renovations to homes that are ready to move in. We’re ready to make a decision quickly if needed, but we can also be flexible on long settlement periods if you need time to find another place of your own.

I’d be happy to share what I know about recent sales in the area to help figure out a fair price for your home, or to get some independent advice too if you want to. A direct sale could mean hefty savings on commission and advertising for you.

If you think you might be interested, please call me on xxxx xxx xxx, or email me at with as much or as little detail as you like. I’m happy to explore any option further to see if it is right for both of us.

Thanks for your time.

Marty Andrews

For a cost of about $25, I created about 400 copies of that letter and dropped it in houses in an area I was interested in.  I didn't bother with envelopes.  The letters were dropped off on January 1st and 2nd.  At the time I did it, I hoped I might get about 0.5% as a response rate.

Now, a couple of weeks later, my response rate has been exactly that.  I got one phone call and one email.  One of those responses was for a house that I was actually interested in, and from a seller who wasn't otherwise exploring selling.  That was great, because I got to have a conversation that I would never have had if I had just waited for real estate listings to appear.

As it turned out, the seller was hoping for too high a price, biased by a valuation he had done about 6 months ago (the market has steadily dropped since then).  We both walked away totally relaxed and happy though, as our investment in the conversation was virtually nil.

I'll absolutely try this technique again one day if I'm buying again.  It's so simple and cheap, and much more comfortable to have a conversation without an agent trying to influence both parties.

Tuesday, October 25, 2011

A ruby spec profiling story

I've always used ruby-prof in the past to profile my Ruby code, but a colleague yesterday put me on to the Google perftools for Ruby code. A bit of research turned up some interesting things.

According to,
ruby-prof attributes full cost of garbage collection to the method where GC gets triggered, not the methods that allocate the memory

That was news to me. I tried running the profiler over an app I'm working on, and got this:

Total: 23530 samples
13244 56.3% 56.3% 13244 56.3% garbage_collector
4223 17.9% 74.2% 4331 18.4% ActiveRecord::ConnectionAdapters::Mysql2Adapter#execute
678 2.9% 77.1% 678 2.9% ActiveRecord::ConnectionAdapters::Mysql2Adapter#active?
402 1.7% 78.8% 403 1.7% MonitorMixin::ConditionVariable#signal
258 1.1% 79.9% 294 1.2% Method#call

Wow! That's a massive amount of time in GC! What can I do about that?

That lead me to an article by Jamis Buck at It describes a way to address GC issues for Test::Unit, but there's a nice rspec version at I applied that to my code and ran it again. The new profile was:

Total: 11331 samples
3730 32.9% 32.9% 3804 33.6% ActiveRecord::ConnectionAdapters::Mysql2Adapter#execute
2021 17.8% 50.8% 2021 17.8% garbage_collector
720 6.4% 57.1% 720 6.4% ActiveRecord::ConnectionAdapters::Mysql2Adapter#active?
376 3.3% 60.4% 376 3.3% MonitorMixin::ConditionVariable#signal
352 3.1% 63.5% 353 3.1% Object#reconsider_gc_deferment

My spec build time also cam down from 375 seconds to 238 seconds. That's a massive improvement.

The post form Jamis also mentions cleaning up some instance variables, which I'll try amongst some further tweaking, but that improvement was significant enough that I figured it might point someone else in the right direction too.

Thursday, January 6, 2011

Collaboration Day

Many IT companies have embraced the idea of giving their staff some autonomy in working on something of their own without any constraints. Perhaps most famous are Atlassians FedEx day and Googles 20% time. Those companies, and others who are trying the idea, are beginning to reap the rewards in terms of innovations that have evolved into more concrete solutions.

At Cogent, we're trying to embrace that idea too, with a spin on it that matches the style of work we do and the values we have internally. Firstly, we're a consulting company. Most of the work we do is spent on a customer site, and they pay us for the hours we're there. We need to balance the customers needs with any internal activities we have. Secondly, our staff all want to work with each other. For most of us, that's a big factor for why we joined Cogent in the first place. Finally, we're a family friendly company that tries very hard to support a balance between home life and time at work.

The implementation we have settled on is an idea we call Collaboration Day. One day a month, everyone in the company takes the day off from consulting and comes to spend it in the office. It's booked well in advance, so our customers are aware of what is going on. The day is a normal working day, so nobody is expected to take any time off or work after hours to be there.

On the morning of the day, everyone brainstorms ideas for things to work on and we put them together on a planning wall. They might be expected to take anywhere from an hour up to the whole day. People then sign up to work on things and get started. You can switch between ideas as many times as you like during the day.

There's only one rule: you cannot work alone.

At the end of the day, we all get together and have a short presentation about what people worked on and do a demo of what was built.

For Cogent, Collaboration Day is working really well so far. Many demos spawn new ideas for the next Collaboration Day, and some inspire people to do some more in their own time. A few are coming up for discussion about Cogent sponsoring more time to evolve them further. Those outcomes are exactly what we're hoping for.

Monday, November 1, 2010


November is the Pragmatic Programmers Writing Month, or PragProWriMo for short. It's an idea they stole from the National Novel Writing Month (NaNoWriMo). They're encouraging people to spend the month writing, with the goal of putting together a book. No doubt their publishing business will get something out of it. The declared target is 60 pages worth, which means averaging 2 pages per day. I'm not sure if I can commit to that much, but I am hoping to get back into the habit of writing a bit each day. Some of that writing may come out in this blog, but I'm not expecting it all will. Perhaps some of it will never see the light of day. For now, I'll just start writing, and see where it takes me.

Monday, February 8, 2010

Cogent without Steve Hayes

In mid 2006, Steve Hayes and I were both working as independent consultants. I had known Steve since 2001, when the Melbourne XP Enthusiasts Group (MXPEG) had started up and we both became active members. When I became independent, he was kind enough to let me use the company name he had registered, Cogent Consulting, for invoicing. I paid him a nominal fee for processing my payroll.

Within six months, Steve and I decided to run some public training courses together to help market ourselves, and improve the Cogent brand for us both. Easy Access Training (EAT) was born. We ran a few reasonably successful public courses in early 2007.

The market at the time was quite buoyant, and pretty soon Steve and I both found ourselves turning away work because we were already engaged on projects. That triggered conversations between us about taking the opportunity to build Cogent as a business, and we decided to hire some staff and pay ourselves a salary rather than remaining effectively independent.

And so, on July 1 2007, Cogent Consulting was re-born as a structured business. Two and a half years later, we're a profitable consulting company with a dozen staff. Our values and policies are unlike any other local company that I know of, and we're proud of those unique attributes.

Sadly, Steve is now planning to leave the country soon, and therefore Cogent as well.

To say he'll be missed is an understatement. For me, Steve has been a friend, mentor and business partner for years. The shape of my career has undeniably been shaped by his influence, and the opportunity to help build a great company came with our partnership. For the rest of the staff at Cogent, Steve has been a thought leader and guiding influence.

I'm charged with being the steward of the company in Steve's absence. I'm quietly confident of my ability to do the job. Indeed, I've been sharing the role with Steve since the beginning, and we've got a good team around us to help. Cogent Consulting will continue on comfortably without Steve, which is perhaps one of his great achievements. It's culture will undeniably change though. Perhaps sometimes better, more often a little bit worse, but mostly just different. That difference is what I'll miss most of all.

Good luck Steve. I hope your new adventures are prosperous and enjoyable. With any luck, our paths will again cross someday sooner rather than later.