FOREWORD PREFACE 1 INTRODUCTION Why a Book on Programmer Productivity? What This Book Is About Where to Go Now? Part One MECHANICS 2 ACCELERATION Launching Pad Accelerators Macros Summary 3 FOCUS Kill Distractions Search Trumps Navigation Find Hard Targets Use Rooted Views Use Sticky Attributes Use Project-Based Shortcuts Multiply Your Monitors Segregate Your Workspace with Virtual Desktops Summary 4 AUTOMATION Don’t Reinvent Wheels Cache Stuff Locally Automate Your Interaction with Web Sites Interact with RSS Feeds Subvert Ant for Non-Build Tasks Subvert Rake for Common Tasks Subvert Selenium to Walk Web Pages Use Bash to Harvest Exception Counts Replace Batch Files with Windows Power Shell Use Mac OS X Automator to Delete Old Downloads Tame Command-Line Subversion Build a SQL Splitter in Ruby Justifying Automation Don’t Shave Yaks Summary 5 CANONICALITY DRY Version Control Use a Canonical Build Machine Indirection Use Virtualization DRY Impedance Mismatches DRY Documentation Summary Part Two PRACTICE 6 TEST-DRIVEN DESIGN Evolving Tests Code Coverage 7 STATIC ANALYSIS Byte Code Analysis Source Analysis Generate Metrics with Panopticode Analysis for Dynamic Languages 8 GOOD CITIZENSHIP Breaking Encapsulation Constructors Static Methods Criminal Behavior 9 YAGNI 10 ANCIENT PHILOSOPHERS Aristotle’s Essential and Accidental Properties Occam’s Razor The Law of Demeter Software Lore 11 QUESTION AUTHORITY Angry Monkeys Fluent Interfaces Anti-Objects 12 META-PROGRAMMING Java and Reflection Testing Java with Groovy Writing Fluent Interfaces Whither Meta-Programming? 13 COMPOSED METHOD AND SLAP Composed Method in Action SLAP 14 POLYGLOT PROGRAMMING How Did We Get Here? And Where Exactly Is Here? Where Are We Going? And How Do We Get There? Ola’s Pyramid 15 FIND THE PERFECT TOOLS The Quest for the Perfect Editor The Candidates Choosing the Right Tool for the Job Un-Choosing the Wrong Tools 16 CONCLUSION: CARRYING ON THE CONVERSATION APPENDIX: BUILDING BLOCKS INDEX