Complexity Management

Ovid on 2009-07-08T16:08:10

For some reason, I tend to get hired to work on large code bases, even though I've met many people who seem to have those perfect memories and instant analytic abilities which make them a natural for said code. Ultimately, as your code grows, complexity management skills become extremely important. This is why I have a number of modules I've written or contributed to heavily in order to make this easier:

Test::Harness
Complexity mangement starts with tests
Class::Sniff
When your OO hierarchy becomes unwieldy, take a closer look at it.
Class::Trait
Traits (roles) usually provide better OO complexity management than inheritance. (I should deprecate this in favor or Moose::Role)
Devel::Deprecate
You're going to forget to remove that out-of-date feature. This module won't let you forget.
Test::Most and Test::Kit
Stop duplicating test boilerplate in your tests and just get your work done.

Seriously, folks. As you move through your programming career, start paying attention to complexity management. When something is overly complex, figure out how to automate or simplify it. You'll usually gain flexibility and comprehensibility. Complexity management is your real job.


Test::Inline

Alias on 2009-07-08T18:46:29

When I'm in those situations, I seem to end up breaking out good old Test::Inline.

Lets you drop tests in tiny chunks randomly through a million lines of code, without having to write and manage entire separate test scripts.

Also..

Alias on 2009-07-08T18:48:24

When do I get that production release of Class::Sniff that's actually installable? :)

Re:Also..

Ovid on 2009-07-08T19:21:40

I sent you an email explaining that I thought the latest version of Class::Sniff had removed the dependency that was preventing you from installing it. Is it still giving you problems?

The Command Line Podcast

pdurbin on 2009-07-10T02:43:22

This post got a mention on yesterday's The Command Line Podcast around minute 4:30: http://thecommandline.net/2009/07/08/leader_as_law_giver/

Re:The Command Line Podcast

Ovid on 2009-07-10T10:09:54

I can't listen to that at work. Was it a positive or negative mention, or maybe just a comment in passing?

Re:The Command Line Podcast

Ovid on 2009-07-10T10:50:28

Ok, never mind. Forgot I could listen to that on my iPhone :)