SlideShare a Scribd company logo
Habits of a Responsible
Programmer
Anders Janmyr
@andersjanmyr
http://anders.janmyr.com
Outline
• Definitions
• Programming
• Project
• Life, the Universe and Everything
• Summary
Definitions
Habit
An acquired behavior pattern,
regularly followed,
until it has become almost
involuntary
— dictionary.com
The Conscious Brain
Sequential and Slow
The Unconscious Brain
Parallel and Fast
Habits
Creating Habits

Outsourcing
to our
unconscious
Responsible
Accountable for something
within one's power or control
— dictionary.com
Why Be Responsible?
Programming
Typing
And as for this
non-college bullshit I
got two words for that:
learn to fuckin' type!
— Mr. Pink
Write Clear Code
Consistent
• Follow Conventions
• Constants: SCREAMING_SNAKE_CASE
• HTML Attributes: dash-er-ized
• API: Naming, Ordering, etc.
Don’t Quick Fix
Short Classes, Functions,
Parameter Lists
Short Classes, Functions,
Parameter Lists
Separate Commands
from Queries
Separate Commands
from Queries
External
Dependencies
• Use as few as practical
• Learn it well
• Wrap them
Refactor
Mercilessly
• When understanding changes
• Prevents bugs and frustration
• Don’t ask for permission!
Balance
Prefer Explicit
Explicit

Implicit

Specific
Concrete
Direct

Generic
Abstract
Indirect

function helloWorld() {
console.log(‘Hello World’);
}

function helloWorld() {
hello(‘World’);
}
function hello(thing) {
var m = ‘Hello ’+ thing;
console.log(m);
}
Learn Basic
Techniques
• Iteration and Recursion
• Conditional Code
• Functions and Closures
• Classes, Objects, Immutability
Simple vs. Easy
Simple
Singular
Does one thing
Is made of one thing

Easy

Close at hand
Familiar
Learn Advanced
Techniques
• Meta-objects and Reflection
• Monads and Continuations
• Events, Contracts, ...
• Actors, Message Queues, ...
Testing
The Scientific Method
Theory

Prediction

Observation

Experiment
What to Unit Test?
Message
Origin

Incoming

Sent to Self

Outgoing

Type

Query

Command

Assert

Assert

result

direct public
side effects

Ignore
Ignore

Expect
to send
Documentation
README
• Description
• Installation Instructions
• Usage Instructions
• Examples
• Pointers to more documentation
An Overview
System Overview
Drawing
Map

Description
A few pages

Servers
Databases
External services
Domain Overview
Drawing
Map

Description
A few pages

Bounded Context
Core Objects
Main supporting domains
Comments
ASSUMPTION:

As
Few As
Possible
TODO:

WTF:

Anything else
Tools
• The Editor
• The Version Control System
• The Command Line
• A scripting language
• Anything you use on a daily basis
The Editor
Version Control System
CV, legacy
CV, modern
http://commitlogsfromlastnight.com/
A Good Commit Message
Command Line

sudo lsof -nPi | grep LISTEN |
awk '{printf "%-20s%8s%20sn",$1,$2,$9}'
| sort | uniq
Scripting
What to script?
Alias

Verification
Deployment
Setup
Machines

Code
Generation

Watch
scripts

Editor
Macros
A bash function (≈alias)
Deploy new
Server
Go away,
or I will
replace you
with a very
small
shell script!
Environments
All
Environments
• Setup with

ONE command

• Scripts are continuously maintained
Production
• All configuration, dependencies
• Optimized for speed
• Configured for monitoring
Development
• As similar as possible to production
• Optimized for development speed
• Short feedback cycle
• Watchers, live reloading, auto
testing
Test
• Test Fixtures
• Mock services
• Recorded API interactions
Project
Compromise
Critique
Own It!
Why? Why? Why?
Estimation
It is better to
ask for
forgiveness than
to ask for
permission!
-- Grace Hopper
Habits of a Responsible Programmer
Flow
Focus
Habits of a Responsible Programmer
Know what makes you
happy!
Silva’s 4 rules of
happiness
1. If you like something, enjoy it!
2. If you don’t like something, avoid it!
3. If you don’t like something and can’t
avoid it, change it!
4. If you can’t or choose not to avoid or
change it, change your perception of it!
Urgent

≠

Important

Not Important

Not Urgent

Urgent

Important

✖

✔

✔
Relax
Summary
• Write clean code
• Test
• Script everything
• Learn your tools by heart
• Optimize for flow
Proud!
References
http://anders.janmyr.com

Habits of a
Responsible
Programmer

Anders Janmyr
@andersjanmyr
anders.janmyr@jayway.com

More Related Content

PPTX
You Live, You Learn, Then You Get Perforce Swarm
KEY
Erlang - Dive Right In
PDF
Cypress, charm and easy.
PDF
Illuminate - Performance Analystics driven by Machine Learning
KEY
Ruby Concurrency Realities
PDF
STAQ Development Manual (Redacted)
PPTX
Naeem Akram Malik, Sr. Software Engineer & SQA Analyst
PDF
Cucumber basics
You Live, You Learn, Then You Get Perforce Swarm
Erlang - Dive Right In
Cypress, charm and easy.
Illuminate - Performance Analystics driven by Machine Learning
Ruby Concurrency Realities
STAQ Development Manual (Redacted)
Naeem Akram Malik, Sr. Software Engineer & SQA Analyst
Cucumber basics

Similar to Habits of a Responsible Programmer (20)

PDF
Enterprise PHP
PPT
Case study
PPTX
Design Like a Pro: Scripting Best Practices
PPTX
Design Like a Pro: Scripting Best Practices
PPTX
Putting Compilers to Work
PPTX
Quality code in wordpress
PDF
The View - Lotusscript coding best practices
PDF
Redundant devops
PDF
How To Use Selenium Successfully
PPTX
Ui Testing with Ghost Inspector
ODP
DevOps, CLI, APIs, Oh My! Security Gone Agile
PPTX
Best Practices for WordPress in Enterprise
PDF
SGCE 2015 REST APIs
PDF
APIs distribuidos con alta escalabilidad
ZIP
Intro To Puppet.Key
PPTX
Advantages of Rails Framework
PPTX
Agile
PPTX
Javascript best practices
PPTX
Coding Standard And Code Review
PDF
Microsoft power point automation-opensourcetestingtools_matrix-1
Enterprise PHP
Case study
Design Like a Pro: Scripting Best Practices
Design Like a Pro: Scripting Best Practices
Putting Compilers to Work
Quality code in wordpress
The View - Lotusscript coding best practices
Redundant devops
How To Use Selenium Successfully
Ui Testing with Ghost Inspector
DevOps, CLI, APIs, Oh My! Security Gone Agile
Best Practices for WordPress in Enterprise
SGCE 2015 REST APIs
APIs distribuidos con alta escalabilidad
Intro To Puppet.Key
Advantages of Rails Framework
Agile
Javascript best practices
Coding Standard And Code Review
Microsoft power point automation-opensourcetestingtools_matrix-1
Ad

Recently uploaded (20)

PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Encapsulation theory and applications.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Empathic Computing: Creating Shared Understanding
PDF
KodekX | Application Modernization Development
PPTX
Big Data Technologies - Introduction.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Approach and Philosophy of On baking technology
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Digital-Transformation-Roadmap-for-Companies.pptx
20250228 LYD VKU AI Blended-Learning.pptx
Encapsulation theory and applications.pdf
sap open course for s4hana steps from ECC to s4
Empathic Computing: Creating Shared Understanding
KodekX | Application Modernization Development
Big Data Technologies - Introduction.pptx
MYSQL Presentation for SQL database connectivity
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Approach and Philosophy of On baking technology
NewMind AI Weekly Chronicles - August'25 Week I
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Network Security Unit 5.pdf for BCA BBA.
Review of recent advances in non-invasive hemoglobin estimation
Encapsulation_ Review paper, used for researhc scholars
MIND Revenue Release Quarter 2 2025 Press Release
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Ad

Habits of a Responsible Programmer