Digital Edition

SYS-CON.TV
Unnatural Acts
Unnatural Acts

Ah, television! Where else can you see so much action? Murders are routinely committed and solved, dastardly plots are hatched and foiled, and characters learn some deep life-truth - all within a single hour.

This makes the runaway success of ESPN's "World Series of Poker" and the Travel Channel's "World Poker Tour" all the more mysterious. What is it about a group of middleaged men, 11.5-gram clay chips, and 52 brightly colored cards gathered about a large felt-covered table that's so appealing to so many?

When I was in a bookstore recently looking for books on poker, the sales clerk looked at me knowingly as I made my purchase. "We've been selling a lot of those," she told me. "Do you watch the games on TV?" I admitted I had.

While many people have played "Wednesday night poker" with friends for years, I've been a latecomer to it. Feeling slightly guilty for the years of poker I had missed out on, I decided to plunge into it. The rules are simple enough; surely a bit of poker knowledge would lead me to success.

I was fortunate enough to have two students who are excellent poker players and who recently attended classes I held in Las Vegas. During the day, I taught them about successful programming; during the night, they taught me about successful card playing.

One of the lessons I found hardest to learn was that successful poker players don't passively accept ("call") other people's bets; they take the aggressive act of initiating and raising bets. "If a [card] hand is good enough to call," one player told me, "it's good enough to raise."

"But," I protested, "it just doesn't feel natural." My student-cum-teacher looked at me curiously. "Of course it's not natural. What's natural is losing."

This truth must have been slowly seeping in, for I found myself thinking about programming in light of this. Albert Einstein once remarked that what passed for "common sense" is really the collection of prejudices acquired by the age of 18. According to a 2002 Standish Group report, corporate software projects fail at an astonishing 70% rate. I began to ask myself what prejudices are common to us programmers, and what unnatural acts are called for to avoid the common experience of failure.

Here's a list of seven common practices that lead to failure - along with their remedies.

1.  Undervaluing encapsulation: This practice leads to large files with a great many lines of code. A single file then has many responsibilities. I once worked with a programmer who showed me (proudly) an application that consisted of a single file with 12,000 lines of code. When we practice encapsulation, we break the application into many small, discrete pieces, each of which is responsible for doing only a small bit of work. A well-defined interface specifies what the code requires and what it will provide. The greatest single reason for object-oriented programming's success is the powerful abilities it provides programmers to practice encapsulation. ColdFusion components (CFCs) allow us to build highly encapsulated components whose interface we can examine with the excellent component browser provided with ColdFusion MX. A wellencapsulated application then resembles nothing so much as a conversation between components.

2.  Testing later: Here, I'm being charitable. Often, of course, no testing is done; we rely on our users to do the testing for us. The reason for this practice is, I think, that while we know we should test our software, we may not know exactly how to go about this. Testing is not something that should be done later. We should treat writing code and writing tests for that code as two parts of a whole: one isn't done without the other. Kent Beck, of Extreme Programming fame, has written an excellent book entitled Test-Driven Development, which provides clear guidance on how to approach software by writing the tests before the code is written.

3.  Cowboy coding: In this practice, the myth of "rugged individualism" is applied to the practice of writing code. Each programmer heads out into the sunset on his or her own horse, determining an individual course of action. Pair programming? Code reviews? Not out here in the Wild West where such sissified acts are objects of scorn to real men (and, sadly, women). Put several cowboys together and you don't have a team - you have the potential for a shoot-out. It's ironic that the same personality that often leads to excellent acts of individual programming spells disaster when a project is too large or its lifespan is too long for a single individual. The remedy for this malady is stiff medicine: the programmer must actively work to create an environment in which others are involved and consulted. Talk about an unnatural act!

4.  Omitting prototypes: In his terrific book, Code Complete, Steve McConnell provides clear statistics that show that the greatest single action we can take to guarantee a successful software project is prototyping. Prototyping goes far beyond simple mock-ups; a complete prototype should make the user think that he or she is seeing the actual software. If we create the "front end" of our software first, we have the greatest chance of success with actual users - the only valid judges of our success or failure. Why is this so important? Simply because to the users, the front end is the application; they take it for granted that "all that back-end stuff" will work. Seem odd? Well, as Alan Cooper points out, when was the last time you bought a phone and demanded to hear the dial tone before purchasing it? Didn't you take it for granted that "all that phone stuff" would work correctly?

5.  Not defining acceptance tests: By what metric do we judge success? If we have no predefined acceptance tests, how can we know that we've succeeded, or that we're even done? For too many, an "acceptance test" consists of asking the client, "Do you like it?" That question - do you like it? - is enormously important. It's so important that it needs to be placed in the context of the prototype where clients can go through the iterative process of finding out exactly what they want in a safe environment. Acceptance tests should be a formal, measurable way of simply ensuring that the approved prototype runs. Acceptance tests should be established prior to the start of coding and should define both the procedures and the hardware on which tests will be run.

6.  Not using a framework: The history of programming can be seen as a series of greater and greater abstractions. ColdFusion's popularity is due in large part to its ability to abstract lower-level functionality into tags. Oddly, though, some programmers stop here: each application is built as if it were the first and only application. As is the next application and the next. Frameworks provide a foundation on which you can build your own applications. One of the great benefits of both abstraction and frameworks is that they require less low-level work, giving you the time and freedom to work on making your app truly great. The downside of frameworks is that to become proficient, you must learn the framework. Luckily, popular frameworks such as Fusebox 4 and Mach-II have active communities that are quick to offer help, and books and training exist to advance your expertise.

7.  Shallow learning: Rene Magritte, the Belgian surrealist painter, once painted a large pipe on a canvas, with words underneath proclaiming, "This is not a pipe." Magritte's point was that an image is not the thing itself. I sometimes think that all buzzwords should be accompanied by a sign proclaiming, "This is not an idea." The culture of programming is "dumbed down" when we rely on TLAs (three-letter acronyms!) and buzzwords to take the place of a deep understanding. There is indeed an overwhelming amount to learn in our business, and each day our present knowledge becomes worth less as it edges toward obsolescence. I wish I had a great remedy for this, but I know of none.

Instead, we must have the courage to admit that continuous learning is an absolute requisite for us and do all in our power to deepen our understanding by reading, experimenting, and attending training classes and conferences. The problem with buzzwords is that they short-circuit this admittedly difficult process, tricking users into thinking that they have already attained knowledge. This illusion of knowledge is intellectual quicksand that will undermine our efforts far more profoundly than simple ignorance.

Some unknown wit once remarked that insanity is defined as "doing the same thing over and over - while expecting different results." We all want to excel at what we do, but unless we've arrived at the pinnacle of our craft, we're going to have to step out of our comfort zone and perform a few unnatural acts to get there.

About Hal Helms
Hal Helms is a well-known speaker/writer/strategist on software development issues. He holds training sessions on Java, ColdFusion, and software development processes. He authors a popular monthly newsletter series. For more information, contact him at hal (at) halhelms.com or see his website, www.halhelms.com.

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1



ADS BY GOOGLE
Subscribe to the World's Most Powerful Newsletters

ADS BY GOOGLE

"Calligo is a cloud service provider with data privacy at the heart of what we do. We are a typical ...
Cloud-Native thinking and Serverless Computing are now the norm in financial services, manufacturing...
Data center, on-premise, public-cloud, private-cloud, multi-cloud, hybrid-cloud, IoT, AI, edge, SaaS...
Public clouds dominate IT conversations but the next phase of cloud evolutions are "multi" hybrid cl...
In a recent survey, Sumo Logic surveyed 1,500 customers who employ cloud services such as Amazon Web...
At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with exp...
Every organization is facing their own Digital Transformation as they attempt to stay ahead of the c...
Most modern computer languages embed a lot of metadata in their application. We show how this goldmi...
Darktrace is the world's leading AI company for cyber security. Created by mathematicians from the U...
Moving to Azure is the path to digital transformation, but not every journey is effective. Organizat...
Data center, on-premise, public-cloud, private-cloud, multi-cloud, hybrid-cloud, IoT, AI, edge, SaaS...
DevOps has long focused on reinventing the SDLC (e.g. with CI/CD, ARA, pipeline automation etc.), wh...
Atmosera delivers modern cloud services that maximize the advantages of cloud-based infrastructures....
Intel is an American multinational corporation and technology company headquartered in Santa Clara, ...
Now is the time for a truly global DX event, to bring together the leading minds from the technology...
Artifex Software began 25-years ago with Ghostscript, a page description language (PDL) interpreter ...
On-premise or off, you have powerful tools available to maximize the value of your infrastructure an...
In an age of borderless networks, security for the cloud and security for the corporate network can ...
At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with exp...
As the digitization of business accelerates the move of critical applications and content to the clo...