The document discusses tips for improving developer productivity by optimizing the edit-build-test cycle. It presents several tools that can help speed up and streamline the development workflow, such as PeepOpen for navigating code, Kerl for managing Erlang versions, Rebar for simplifying build processes, Mochiweb Reloader for automatic reloading of code changes, and Sync for automatic compilation and reloading without using the shell. It also recommends writing unit tests with EUnit and Cover to catch errors and measure code coverage. The overall message is that by reducing inefficiencies in the edit-build-test cycle through these kinds of tools, developers can significantly increase the progress they are able to make.
2. The Edit•Build•Test Cycle
determines how quickly
you can see the
results of new code
in your application.
3. Developer Productivity
How much progress can a developer make
on a problem in some interval of time.
Intelligence
X
Knowledge / Experience
X
Typing Speed
X
Edit•Build•Test Cycle
=
Developer Productivity
(Simplified)
3
4. Developer Productivity
How much progress can a developer make
on a problem in some interval of time.
Intelligence
X
Knowledge / Experience
X
Typing Speed
X
Edit•Build•Test Cycle
=
Developer Productivity
(Simplified)
4
5. Developer Productivity
How much progress can a developer make
on a problem in some interval of time.
Intelligence
X
Knowledge / Experience
X
Typing Speed
X Easy to improve
Edit•Build•Test Cycle
=
Developer Productivity
(Simplified)
4
6. Developer Productivity
How much progress can a developer make
on a problem in some interval of time.
Intelligence
X
Knowledge / Experience
X
Typing Speed
X Easy to improve
Edit•Build•Test Cycle
Transferrable to other projects
=
Developer Productivity
(Simplified)
4
7. Developer Productivity
How much progress can a developer make
on a problem in some interval of time.
Intelligence
X
Knowledge / Experience
X
Typing Speed
X Easy to improve
Edit•Build•Test Cycle
Transferrable to other projects
=
Developer Productivity Transferrable to other people
(Simplified)
4
10. How do we win it?
Waste Less Time
SPEED
POWER
CONSISTENCY
6
11. How do we win it?
Waste Less Time
SPEED
Shorter Iterations
POWER
CONSISTENCY
6
12. How do we win it?
Waste Less Time
SPEED
Shorter Iterations
Maintain Focus
POWER
CONSISTENCY
6
13. How do we win it?
Waste Less Time
SPEED
Shorter Iterations
Maintain Focus
POWER
Find Points of Leverage
CONSISTENCY
6
14. How do we win it?
Waste Less Time
SPEED
Shorter Iterations
Maintain Focus
POWER
Find Points of Leverage
Avoid Re-invention
CONSISTENCY
6
15. How do we win it?
Waste Less Time
SPEED
Shorter Iterations
Maintain Focus
POWER
Find Points of Leverage
Avoid Re-invention
CONSISTENCY Easy Onboarding
6
17. Tip 1: Navigating a Project
Tool
• PeepOpen (Mac only, not free)
• Works with BBEdit, Coda, Emacs, MacVim,
TextMate, XCode
• http://peepcode.com/products/peepopen
What It Does
• Find and open files quickly
8
24. Tip 4: Simplify Your Makefile
Tool
• Rebar - Simple-yet-sophisticated build tool
• https://github.com/basho/rebar
What It Does
• Simplify our Makefile
• Will build *anything* if you follow OTP conventions
• Fetch project dependencies
• And more...
15
25. Tip 4: Simplify Your Makefile
# Rebar simplifies your Makefile.
# (NOTE: Include rebar in your repo.)
all: deps compile
compile:
./rebar get-deps compile
clean:
./rebar clean
rel:
./rebar generate
16
29. Tip 5: Stay in the Zone
Doesn’t realize his code
finished compiling...
19
30. Tip 5: Stay in the Zone
Doesn’t realize his code
finished compiling...
20 minutes ago.
19
31. Tip 5: Stay in the Zone
# Get alerted when `make` is finished.
# Drop this in your .bashrc
function make {
/usr/bin/make "$@"
say "Finished make $1"
}
20
32. Tip 5: Stay in the Zone
# Get alerted when `make` is finished.
# Drop this in your .bashrc
function make {
START=$SECONDS
/usr/bin/make "$@"
ELAPSED=`echo $SECONDS - $START | bc`
growlnotify -n "make"
"Finished make $1!"
-m "Took $ELAPSED seconds."
}
21
33. Tip 6: Avoid VM Restarts
Tool
• Mochiweb Reloader
What It Does
• Automatically reload new beams
22
34. Tip 6: Avoid VM Restarts
$ erl -pa deps/*/ebin
Eshell V5.8.4 (abort with ^G)
1> % Start the reloader.
1> reloader:start().
2> % Ensure mymodule is loaded
2> code:ensure_loaded(mymodule).
3> % Edit and compile mymodule.erl
3> % and Mochiweb reloader will reload it.
Reloading myproject_sup ... ok.
23
35. Tip 7: Avoid the Shell
Tool
• Sync
• https://github.com/rustyio/Sync
What It Does
• Automatically recompile new code
• Automatically reload new beams
• Growl (or notify) the results
24
36. Tip 7: Avoid the Shell
%% Pull http://github.com/rustyio/Sync into
%% ERL_LIBS path and compile.
%% Then, start sync within your project.
%% Make sure erl is started with `-mode interactive`,
%% not `-mode embedded`.
sync:go().
Starting Sync (Automatic Code Compiler / Reloader)
Scanning source files...
ok
=INFO REPORT==== 10-Oct-2011::10:37:58 ===
/Users/rusty/Documents/Code/MyProject/src/
myproject_sup.erl:0: Recompiled.
=INFO REPORT==== 10-Oct-2011::10:37:58 ===
myproject_sup: Reloaded! (Beam changed.)
25
Reloading myproject_sup ... ok.
37. Tip 7: Avoid the Shell
Growl Notifications
Success!
Warning!
Error!
26
39. Tip 8: Unit Testing + Coverage
Tool
• Rebar + EUnit + Cover
Goals
• Run tests for all dependencies
• Run tests for a specific dependency
• Run tests for a specific module
• Include a coverage report
28
Of course, this is a simplified few, doesn’t mention anything about level of focus, or whether the developer is working on the *right* things. \n\nOr, maybe we can assume that that’s covered under “Intelligence” and “Knowledge”\n
\n
\n
\n
\n
Waste Less Time - Don’t spend as long staring at screen, twiddling thumbs.\nShorter Iterations - Get feedback more often, make sure we are on the right track\nMaintain Focus - A byproduct of thumb twiddling is that you get distracted and start reading blogs.\n\nLeverage Points - Automation. Find ways to do a lot with a little. This leads to a feeling of traction, excitement, longer focus, and more productivity.\n\nConsistency - Repeatable process is faster than starting from scratch. Remove the temptation to fiddle with tools each time we start a new project.\nEasy Onboarding - Others can join in without having to relearn the system.\n
Waste Less Time - Don’t spend as long staring at screen, twiddling thumbs.\nShorter Iterations - Get feedback more often, make sure we are on the right track\nMaintain Focus - A byproduct of thumb twiddling is that you get distracted and start reading blogs.\n\nLeverage Points - Automation. Find ways to do a lot with a little. This leads to a feeling of traction, excitement, longer focus, and more productivity.\n\nConsistency - Repeatable process is faster than starting from scratch. Remove the temptation to fiddle with tools each time we start a new project.\nEasy Onboarding - Others can join in without having to relearn the system.\n
Waste Less Time - Don’t spend as long staring at screen, twiddling thumbs.\nShorter Iterations - Get feedback more often, make sure we are on the right track\nMaintain Focus - A byproduct of thumb twiddling is that you get distracted and start reading blogs.\n\nLeverage Points - Automation. Find ways to do a lot with a little. This leads to a feeling of traction, excitement, longer focus, and more productivity.\n\nConsistency - Repeatable process is faster than starting from scratch. Remove the temptation to fiddle with tools each time we start a new project.\nEasy Onboarding - Others can join in without having to relearn the system.\n
Waste Less Time - Don’t spend as long staring at screen, twiddling thumbs.\nShorter Iterations - Get feedback more often, make sure we are on the right track\nMaintain Focus - A byproduct of thumb twiddling is that you get distracted and start reading blogs.\n\nLeverage Points - Automation. Find ways to do a lot with a little. This leads to a feeling of traction, excitement, longer focus, and more productivity.\n\nConsistency - Repeatable process is faster than starting from scratch. Remove the temptation to fiddle with tools each time we start a new project.\nEasy Onboarding - Others can join in without having to relearn the system.\n
Waste Less Time - Don’t spend as long staring at screen, twiddling thumbs.\nShorter Iterations - Get feedback more often, make sure we are on the right track\nMaintain Focus - A byproduct of thumb twiddling is that you get distracted and start reading blogs.\n\nLeverage Points - Automation. Find ways to do a lot with a little. This leads to a feeling of traction, excitement, longer focus, and more productivity.\n\nConsistency - Repeatable process is faster than starting from scratch. Remove the temptation to fiddle with tools each time we start a new project.\nEasy Onboarding - Others can join in without having to relearn the system.\n
Waste Less Time - Don’t spend as long staring at screen, twiddling thumbs.\nShorter Iterations - Get feedback more often, make sure we are on the right track\nMaintain Focus - A byproduct of thumb twiddling is that you get distracted and start reading blogs.\n\nLeverage Points - Automation. Find ways to do a lot with a little. This leads to a feeling of traction, excitement, longer focus, and more productivity.\n\nConsistency - Repeatable process is faster than starting from scratch. Remove the temptation to fiddle with tools each time we start a new project.\nEasy Onboarding - Others can join in without having to relearn the system.\n