Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 224 trang
THÔNG TIN TÀI LIỆU
Cấu trúc
The Productive Programmer
Table of Contents
Foreword
Preface
Who This Book Is For
Conventions Used in This Book
Using Code Examples
How to Contact Us
Safari® Enabled
Acknowledgments
Chapter 1. Introduction
Why a Book on Programmer Productivity?
Address Completion in Browsers
Internet Explorer
Firefox
What This Book Is About
Part I: Mechanics (The Productivity Principles)
Part II: Practice (Philosophy)
Where to Go Now?
Part I. Mechanics
Chapter 2. Acceleration
Launching Pad
Launchers
Creating a Windows Launching Pad
Mac OS X
Launching in Linux
Accelerators
Operating System Accelerators
Windows address bar
Mac OS X Finder
Clipboard(s)
Remember History
There and Back
Command Prompts at Your Fingertips
Command Prompt Explorer Bar
Here!
Development Accelerators
Search Trumps Navigation in Tools, Too
Macros
Macro Recorder
Key Macro Tools
Summary
Chapter 3. Focus
Kill Distractions
Blocking Strategies
Turn Off Needless Notifications
Create Quiet Time
Search Trumps Navigation
Find Hard Targets
Use Rooted Views
Rooted Views in Windows
Rooted Views in OS X
Use Sticky Attributes
Use Project-Based Shortcuts
Multiply Your Monitors
Segregate Your Workspace with Virtual Desktops
Summary
Chapter 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
Chapter 5. Canonicality
DRY Version Control
Use a Canonical Build Machine
Indirection
Taming Eclipse Plug-ins
Syncing JEdit Macros
TextMate Bundles
Canonical Configuration
Use Virtualization
DRY Impedance Mismatches
Data Mapping
Migrations
Rake migrations
dbDeploy
DRY Documentation
SVN2Wiki
Class Diagrams
Database Schemas
Summary
Part II. Practice
Chapter 6. Test-Driven Design
Evolving Tests
TDDing Unit Tests
Measurements
Design Impact
Code Coverage
Chapter 7. Static Analysis
Byte Code Analysis
Source Analysis
Generate Metrics with Panopticode
Analysis for Dynamic Languages
Chapter 8. Good Citizenship
Breaking Encapsulation
Constructors
Static Methods
Criminal Behavior
Chapter 9. YAGNI
Chapter 10. Ancient Philosophers
Aristotle’s Essential and Accidental Properties
Occam’s Razor
The Law of Demeter
Software Lore
Chapter 11. Question Authority
Angry Monkeys
Fluent Interfaces
Anti-Objects
Chapter 12. Meta-Programming
Java and Reflection
Testing Java with Groovy
Writing Fluent Interfaces
Whither Meta-Programming?
Chapter 13. Composed Method and SLAP
Composed Method in Action
SLAP
Chapter 14. Polyglot Programming
How Did We Get Here? And Where Exactly Is Here?
Java’s Birth and Upbringing
The Dark Side of Java
That happens when?
Zero-based arrays make sense to…
Where Are We Going? And How Do We Get There?
Polyglot Programming Today
Today’s Platform, Tomorrow’s Languages
Using Jaskell
Ola’s Pyramid
Chapter 15. Find the Perfect Tools
The Quest for the Perfect Editor
Neal’s List of What Makes a Perfect Editor
A macro recorder
Launchable from the command line
Regular expression search and replace
Additive cut and copy commands
Multiple registers
Cross-platform
The Candidates
Choosing the Right Tool for the Job
Refactoring SqlSplitter for Testablility
Keeping Behavior in Code
Un-Choosing the Wrong Tools
Chapter 16. Conclusion: Carrying on the Conversation
Appendix. Building Blocks
Cygwin
The Command Line
Getting Help When You Need It
Index
Nội dung
[...]... experts, yet they weren’t taking advantage of even the simplest productivity gains My mission is to rectify that What This Book Is About TheProductiveProgrammer is divided into two parts The first discusses the mechanics of productivity, and the tools and their uses that make you more productive as you go through the physical activities of developing software The second part discusses the practice... technologies (like Java) The disparity between the productivity of the students always struck me: some were orders of magnitude more effective And I don’t mean in the tool they were using: I mean in their general interaction with the computer I used to make a joke to a few of my colleagues that some of the people in the class weren’t running their computers, they were walking them Following a logical... add “www.” to the beginning and “.com” to the end of the string you type in the browser’s address bar Different browsers support slightly different syntax (Note that this is different from letting the browser automatically supply the prefix and suffix All the modern browsers do that too.) The difference is one of efficiency To autocomplete the prefix and suffix, the browser goes out to the network and... We get to see the broad spectrum of software development: building things from the start, advising in the middle, and rescuing what’s badly broken Over time, even the least observant person can get a feel for what works and what doesn’t Part II is the distillation of the things I’ve seen that either make developers more productive or detract from their productivity I’ve bundled them together in a more... Mac OS X’s dock combines the utility of the quick start menu and the task buttons in Windows It encourages you to place oft-needed applications on the dock, and drag the others off into space (with a satisfying “poof” when they disappear) Just like with the quick start bar, the constraints of real estate hurt you: placing a useful number of applications on the dock expands it to the point where it becomes... Spotlight search, you can choose on the toolbar which machine you want to search In the example shown in Figure 2-4, from my laptop I’ve logged onto the desktop machine (called Neal-office) and selected the home directory (named Launching Pad 17 nealford) When I do the Spotlight search, I can choose the target in the toolbar at the top The file music.rb exists only on the desktop machine FIGURE 2-4 Spotlight... understand the interaction model, which can differ between applications The less you interact with your computer, the faster you can go In other words, eliminating ceremony allows you more time to get to the essence of the problem Time you spend digging through a long filesystem hierarchy to find something is time you could be using to be more productive Computers are tools, and the more time you spend on the. .. founded by Jef Raskin, one of the early user interface designers for the Mac Enso encapsulates many of his (sometimes slightly radical) user interface views, but it is quite effective For example, one of the ideas that Raskin promotes is the idea of Quasimode keys, which act like the Shift key (in other words, changing the mode of the keyboard when held down) Enso takes over the pretty worthless Caps Lock... Alternatively, you can go to where the Start menu lives, under the current user’s Documents and Settings directory structure An easy way to fill up your launch menu with just the stuff 12 CHAPTER 2: ACCELERATION you need all the time is to select them from the massive Programs menu and right-drag them into your launch folder, creating a copy of the shortcut If you have the “modern” Windows Start menu,... directly in the Quick Launch folder Just like all other shortcuts, you may assign operating system–wide key accelerators to these items, but existing application accelerators will interfere with them NOTE Typing is faster than navigation Windows Vista has a slightly new twist to the Quick Launch bar You can run the applications associated with the shortcut via the Windows- keysym In other words, . Get There? 169
Ola’s Pyramid 173
15 FIND THE PERFECT TOOLS 175
The Quest for the Perfect Editor 176
The Candidates 179
Choosing the Right Tool for the. Book Is About
The Productive Programmer
is divided into two parts. The first discusses the
mechanics
of
productivity, and the tools and their uses that