This is a style of programming that is often frowned upon. People shooting from the hip are called "Cowboys." They are wild gunslingers that make a mess wherever they go.
This is, of course, the stereotype. There are exceptions to the rule. Shooting from the hip is the rawest form of programming. The programmer has the most power, can make the most mistakes, and completes the work in the shortest time possible.
It takes a lot of practice to be a good hip shooter but when that time crunch happens (2 weeks to do a 6 month project) you will be happy you have the experience.
You may not know it, but you probably shoot from the hip when you are fixing bugs. Once you find the bug, it's usually a quick "reflex operation" to fix it. Hip shooting is taking that "reflex operation" and applying it to features as well as bugs.
When Do You Shoot
You don't have time.
The requirements are small or you know them well.
You aren't obligated to follow rules.
It's better to be done than done right.
You are working in small teams (1-3).
You know how to write good code quickly.
The feature can be disabled if working improperly.
How It Works
Think quickly about how you will fix the problem/implement the feature. Start writing. That's it. Go go go!
Make sure you have an on/off button for this new code (in case it breaks or is not the right solution). Provide a working demo to the requester in minimal time.
Work as fast as possible - this is exciting. Try to be faster than the last time. Try to impress everyone with how fast you wrote that feature. Make sure before it goes live that you didn't miss anything. Best if you can get another developer to review/test your new code.
A Story From A Cowboy
I can be a hip-shooter from time-to-time. I think it comes from my level of knowledge with the language, the customer, the requester of the feature, and the time allotted to developing the feature.
I once astounded a co-worker who had a very regimented process when I was asked to work on a new feature and began typing away vigorously. The feature request was a 30 second conversation with the CEO and it was complete and in the repository within 20 minutes. For him, it was at least a 2 hour job.
Tuesday, June 8, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment