Avoid Whack-a- Mole Development

Avoid Whack-a- Mole Development

Venkat Subramaniam Broomfield, Colorado, U.S.

SoFTWARE PRojECT MAnAgERS face a lot of pressure to deliver fast. Time is of the essence. How can you get things done fast?

Imagine you have two programmers on your team, Bernie and Rob. Both are capable, have the same amount of domain knowledge, and have equal lan- guage skills. During development, you find that Bernie finishes his feature implementations much faster than Rob.

While Bernie focuses on getting the code completed quickly, Rob spends time writing code and then refactoring* it. He names the variables and methods bet- ter. Once he gets things working, he breaks the code into smaller pieces. Now he writes tests to make sure each piece of his code does what he meant it to do. When he’s reasonably satisfied, he declares the coding of that functionality done.

But assume you don’t know these details. If you only look at the speed with which the functionalities are declared done, clearly Bernie is the better man, right?

A few weeks go by, and you demonstrate the features to your customer. As usual, the customer loves your completed features, but now wants you to change and improve them. You ask your developers to make those code altera- tions. When you take the new and improved functionality back to your cus- tomer, they try out the features that Rob implemented and are pleased with the changes.

* Refactoring: Reworking the body of code to improve its internal structure without changing its external function. It improves the software design. Refactoring code is going back to improve a working feature that was created quickly and tested. Now it needs further internal refinement to facilitate its long term use and make it easier to add future changes.

?

???????????????Unfortunately, they discover something odd with the features that Bernie imple- mented. While Bernie has programmed in the new functions fine, now a few things that worked before don’t work anymore. The customer marks these as defects, and you ask Bernie to fix them. The customer tests the features again. Now even newer, stranger things seem to be broken. What’s going on here?

If you have a child, you know what is happening. Bernie has created a Whack- A-Mole application. Whack-A-Mole is a toy. Kids are given a wooden ham- mer to strike moles that pop up at random. It’s fun for them to be surprised by which mole pops up next. However, fixing applications with broken code popping up at random places is not fun. It is frustrating, unpredictable, and it slows your product development. Bernie was sprinting initially, but he was running in the wrong direction.

While Rob appeared slower at the outset, he was actually creating superior code. His pace proved sustainable. The better quality of his initial code helped him make workable changes quickly. Plus, the tests he wrote in the beginning gave him instant feedback regarding whether or not his new code was compat- ible with other parts of the application where the code was used.

When measuring time for a feature implementation, do not consider only the time it takes to write it in the first place. Add the time it takes to enhance, fix, and improve the code. Writing good quality code and tests takes time. It appears to be a short-term loss. However, it comes with a long-term gain.

Ask yourself if you want speed, or if you want to savor sustainable progress.

时间: 2024-11-05 18:30:58

Avoid Whack-a- Mole Development的相关文章

C#程序员整理的Unity 3D笔记(二十):2D Toolkit之官方教程《Whack a Mole》

在上篇博客中,简单整理了一下Unity Native 2D功能:<C#程序员整理的Unity 3D笔记(十九):Unity 3D的Native 2D>. 本文开始学习2D商用比较广泛的2D Toolkit插件. 2D Toolkit插件在2D中的地位,犹如UI中NGUI对Unity GUI一样:虽然官方原生的2D还不错,但这是最近1年新版本才有的功能,2年前Unity 2D的王道还是得用插件的,故<2D Toolkit>就成了目前商业不错的选择. 在上周刚开始看的时候,就给自己提了

2DToolkit官方文档中文版打地鼠教程(二):设置摄像机

这是2DToolkit官方文档中 Whack a Mole 打地鼠教程的译文,为了减少文中过多重复操作的翻译,以及一些无必要的句子,这里我假设你有Unity的基础知识(例如了解如何新建Sprite等).当前2D Toolkit版本为2.4. 这是一篇系列教程,全文共13节(官方文档为4章,不过为了每节有明确目的,我根据官方文档的标题拆成了13节),下面是本系列教程的所有链接: 2DToolkit官方文档中文版打地鼠教程(一):初始设置 2DToolkit官方文档中文版打地鼠教程(二):设置摄像机

2DToolkit官方文档中文版打地鼠教程(三):Sprite Collections 精灵集合

这是2DToolkit官方文档中 Whack a Mole 打地鼠教程的译文,为了减少文中过多重复操作的翻译,以及一些无必要的句子,这里我假设你有Unity的基础知识(例如了解如何新建Sprite等).当前2D Toolkit版本为2.4. 这是一篇系列教程,全文共13节(官方文档为4章,不过为了每节有明确目的,我根据官方文档的标题拆成了13节),下面是本系列教程的所有链接: 2DToolkit官方文档中文版打地鼠教程(一):初始设置 2DToolkit官方文档中文版打地鼠教程(二):设置摄像机

2DToolkit官方文档中文版打地鼠教程(一):初始设置

这是2DToolkit官方文档中 Whack a Mole 打地鼠教程的译文,为了减少文中过多重复操作的翻译,以及一些无必要的句子,这里我假设你有Unity的基础知识(例如了解如何新建Sprite等).当前2D Toolkit版本为2.4. 这是一篇系列教程,全文共13节(官方文档为4章,不过为了每节有明确目的,我根据官方文档的标题拆成了13节),下面是本系列教程的所有链接: 2DToolkit官方文档中文版打地鼠教程(一):初始设置 2DToolkit官方文档中文版打地鼠教程(二):设置摄像机

nodejs(第三篇):nodejs中的文件模块、nodejs中的require与exports、http模块补充、JavaScript Standard Style

一.nodejs中的文件模块 在nodejs中,用户自己编写的模块,称为文件模块. 文件模块,则是指js文件.json文件或者是.node文件.在引用文件模块的时候后要加上文件的路径:/.../.../xxx.js表示绝对路径../xxx.js表示相对路径(同一文件夹下的xxx.js),../表示上一级目录.如果既不加/.../.../又不加./的话,则该模块要么是核心模块,要么是从一个node_modules文件夹加载. (1)在Node.js中,require是一个方法,只有通过requir

Software development skills for data scientists

Software development skills for data scientists Data scientists often come from diverse backgrounds and frequently don't have much, if any, in the way of formal training in computer science or software development. That being said, most data scientis

Development of large-scale site performance optimization method from LiveJournal background

A LiveJournal course of development is a project in the 99 years began in the campus, a few people do as a hobby such an application, in order to achieve the following functions: Blog, forum Social network, find friends Polymerization article polymer

Domain Driven Design and Development In Practice--转载

原文地址:http://www.infoq.com/articles/ddd-in-practice Background Domain Driven Design (DDD) is about mapping business domain concepts into software artifacts. Most of the writings and articles on this topic have been based on Eric Evans' book "Domain Dr

Native JavaScript Development after Internet Explorer

This article has nothing to do with the decision whether or not to abandon support for oldIE. You and you alone must take that decision based on the specific details of your website or application. With all this being said, let us proceed! 1. JavaScr