Confessions of an IT Manager_Phil Factor
- No tags were found...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Section III: S<strong>of</strong>tware Projects: the Good, the Bad <strong>an</strong>d the Pitiful 159<br />
On the Trail with the Cowboy<br />
Coders<br />
First published 24 October 2007<br />
Testing code before you release it? Who would have<br />
thought <strong>of</strong> such a thing? Is there no end to what Agile<br />
Programming c<strong>an</strong> do? <strong>Phil</strong> is, once again, left<br />
shaking his head in disbelief.<br />
One <strong>of</strong> the signs <strong>of</strong> increasing age in the <strong>IT</strong> industry is a frequent <strong>an</strong>d acute<br />
sense <strong>of</strong> 'déjà vu'. New things that are laboriously explained to you ring all sorts<br />
<strong>of</strong> bells. The past flashes before one's eyes.<br />
I recently visited a comp<strong>an</strong>y developing Internet-based applications. They<br />
were proud <strong>of</strong> their progressiveness <strong>an</strong>d explained to me that they developed<br />
database systems using the radical new Agile XP (Extreme Programming)<br />
methodology. Wow, I thought. That must have impressed the shareholders.<br />
Perhaps they don't realize that Agile XP is known in the industry as 'Cowboy<br />
Coding'.<br />
I feigned ignor<strong>an</strong>ce, which is not usually hard for me to do.<br />
"Well," said my genial <strong>an</strong>d pleas<strong>an</strong>t host, "One <strong>of</strong> the great things<br />
about Agile XP is that you test every part <strong>of</strong> your code as soon as<br />
you've written it. XP uses what it calls 'Unit Tests'. These are<br />
automated tests that test the code. The programmer will try to write as<br />
m<strong>an</strong>y tests as they c<strong>an</strong> think <strong>of</strong> that might break the code they are<br />
writing; if all tests run successfully then the coding is complete, <strong>an</strong>d the<br />
programmer c<strong>an</strong> then go on to develop more code. Flaws in the system<br />
are easily communicated by writing a unit test that proves a certain<br />
piece <strong>of</strong> code will break."<br />
"Gosh! You me<strong>an</strong> you test your code rather th<strong>an</strong> just write it?"<br />
"Ingenious, isn't it? When writing code, the unit test provides direct<br />
feedback as to how the system reacts to the ch<strong>an</strong>ges one has made. If,<br />
for inst<strong>an</strong>ce, the ch<strong>an</strong>ges affect a part <strong>of</strong> the system that is not in the<br />
scope <strong>of</strong> the programmer who made them, that programmer will not<br />
notice the flaw. There is a large ch<strong>an</strong>ce that this bug will appear when<br />
the system is in production."