Science takes off when everyone uses the same naming and measures in the same units: yards vs meters,
fahrenheit vs celcius, etc.
Use a standard:
- Naming conventions
- Code conventions
- Patterns
Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.
For the best experience please use the latest Chrome, Safari or Firefox browser.
Building
Maintainable
Applications
Rick Beerendonk
@rickbeerendonk
Building
Maintainable
Applications
Rick Beerendonk
Building
Unmaintainable
Applications
Rick Beerendonk
Unmaintainable application
Unmaintainable environment
Unmaintainable
==
Unproductive
Thomas Huijer
Thomas H.
Use JavaScript!
What does Thomas actually mean?
Standardize
Science takes off when everyone uses the same naming and measures in the same units: yards vs meters,
fahrenheit vs celcius, etc.
Use a standard:
Naming
Code layout
var a = [1, 2, 3, 4, 5, 6];
for (var i = 0; i < a.length; i++) { var double = 2 * a[i]; document.write(double); }
a.forEach(function (e) { document.write(e + e); });
“We know brains are brilliant at detecting patterns. So we should be reeeeeallly careful about the patterns we were/are exposed to.” Kathy Sierra
Exchange current flexibility for future flexibility. Limit yourself!
Real Options
Simple vs Easy
Simple
One role, task, concept or dimension
Objective
Easy
Near at hand, near to our understanding, familiar
Subjective
Simple vs Easy
Easy | Simple |
---|---|
function DoAll() { DoA code; DoB code; DoC code; } DoAll(); |
function DoA() {} function DoB() {} function DoC() {} DoA(); DoB(); DoC(); |
A+B+C | A, B, C, A+B, A+C, B+C, A+B+C |
Is state simple?
function change(obj) { obj.test = "No longer hola!"; } var a = { test: "hola"}; var b = a; change(b); document.write(a.test);
// result: "No longer hola!"
Simple?
Separation of concerns
Make reasoning about code possible. Limit the number of things you need to remember. Make you scope small.
Don’t take code for granted
We think all code was written thoughtfully and purposely.
Reviews
JS as assembly language
Consider other languages that promote good coding by design.
ClojureScript:
JavaScript
Team
Team roles (Belbin)
Shaper | Challenges the team to improve. |
Implementer | Puts ideas into action. |
Completer Finisher | Ensures thorough, timely completion. |
Coordinator | Acts as a chairperson. |
Team Worker | Encourages cooperation. |
Resource Investigator | Explores outside opportunities. |
Plant | Presents new ideas and approaches. |
Monitor-Evaluator | Analyzes the options. |
Specialist | Provides specialized skills. |
Coaching
Sustainability
"Productivity is a by-product of feeling good" Daniel Mezick
Use a spacebar or arrow keys to navigate