This article discusses observations on how the most effective developers are able to cut the amount of typing they do nearly in half and gives recommendations on how you can experience the same boost in productivity.
(Originally published at delphi-expert.com on April 20, 2004)
On May 1, coinciding with the release of Castalia 2.3, we're going to launch an advertising campaign that will talk about Castalia's benefits in quantitative terms. This is the result of an informal usage study that was conducted in December 2003 and January 2004. For "tip of the day" readers, I'm letting the cat out of the bag early. The general theme of the results was that those who took the time to learn Castalia's capabilities were those who saw the biggest increase in productivity. The goal of the next few articles will be to present the usage data that we discovered, but unlike the "marketspeak" of the advertising, I want to discuss how you can see the same increase in productivity that our test subjects saw.
The study focused on four key areas that are important to programming productivity: Raw keystrokes, understanding code, eliminating errors, and writing/refactoring code. Each week for the next four weeks, I'll write a short description of the data, and some in-depth tips on how you can achieve the results that our advertisements claim are possible.
Raw keystrokes was easy to measure, because it's a simple metric. We counted the keystrokes required to perform a task with Castalia. We counted the keystrokes required to complete the same task without Castalia. Comparing the two, we get a productivity metric. In this case, the metric is pretty close to 100%. That is, using Castalia's code templates and keyboard shortcuts for code navigation, the observed developers were generally able to double their productivity.
You can cut keystrokes in half by becoming familiar with Castalia's code templates and learning to use Castalia's keystroke code navigation. Castalia's code template mechanism allows common code constructs to be reproduced with a fraction of the keystrokes. By default, if you type "if" and then the spacebar, Castalia will complete your "if" statement, and provide an easy way for you to fill in the blanks.
The navigation toolbar provides a number of controls that help you move quickly to different parts of your code. Each of these controls has a keyboard shortcut, and those that are used to find a certain class or method use ComboBoxes with AutoComplete. For example, you can type Ctrl+Alt+C to show the Classes ComboBox, and type the first few letters of the name of your Class. Castalia will figure out the rest, and when you press Enter, will jump to the definition of the class. The same is true for the Method ComboBox (Ctrl+Alt+M).
The Navigation toolbar also contains other useful information that you can access with a single keystroke. Want to see a summary of your unit's "Uses" clause? Press Ctrl+Alt+U and a menu will appear. The left column contains all of the units used in the interface section of your unit. The right column contains all of the units used in the implementation section of your unit. Use the arrow keys to select one of these and press Enter, and Castalia will attempt to open the unit (You can also click on an item with the mouse). Or, if you don't want to open a unit, just press Esc.
Pressing Ctrl+Alt+S will show the "Unit Sections" menu. Selecting an item from this menu allows you to quickly jump to any section of the unit: interface, implementation, initialization, etc.... You can also move directly to one of the unit's "Uses" clauses from this menu.
The navigation toolbar also contains buttons for working with the bookmark stack. These can be used to push a bookmark (F2), pop a bookmark (Esc), or move around the bookmark stack like a plain list. I'll write more on the intricacies of the bookmark stack another time.
Raw keystrokes are not the only (and certainly not the best) measure of programmer productivity, but programmers spend a significant amount of time typing, and reducing keystrokes means getting more done, faster. Castalia not only helps you work faster, but also more accurately. Next week, we'll look at Castalia's ability to identify syntax errors the instant they are created, and some interesting study data showing how this truly makes developers more productive.