dashingDev is a card deck designed to inspire, improve and remind developers.
Each card summarizes a core concept in software development.
The deck is for people from all kinds of backgrounds and all levels of skill.
The cards are not specific to any technology – they describe the fundamentals of software design & development.
Beginners get inspiration on what to learn next; more advanced developers have the chance to expand their horizons with new concepts and seasoned developers get reminded of facts they once knew.
dashingDev is neither a comprehensive teaching tool nor a full checklist for validating your design.
The dashingDev cards inspire and awaken curiosity.
Patterns standards on how to solve common design problems
useful because lower-level classes change more often than higher-level ones.
avoid declaring direct dependencies from top to bottom.
violation
def highlevel_method() {
LowLevel.new(1,2,3)
}
encourages reusability of high-level classes by dynamically injecting classes
eases low-level changes by allowing to swap implementations
simplifies code by being able to uniformly work with alternate classes
steers the design process away from low-level details
improves testability
adds complexity for generalization
Convention over Configuration
Convention over Configuration provides structural & configurational defaults.
useful because learning a technology's specifics may be overwhelming.
avoid explicitly asking for non-essential configuration choices.
violation
class Sale < DatabaseModel {
table_name 'sales'
}
lowers the barrier to learn a new technology or project through common structures
decreases the number of decisions to be made by the developer
retains flexibility because defaults can be overridden
reduces the amount of redundant code
leads to adhering to conventions when another approach is more appropriate
practices
Commenting
code can only describe the how but not the why
Commenting adds valuable information beyond the operations written as code.
provide context why choices were made
warn others to avoid pitfalls
instruct on how to maintain the code
provide a learning path
refactor comments just like code
leave links to research & code sources
state the obvious code's contents
be verbose
mislead with outdated information
comment instead of refactor to clarify
keep chunks of code despite being present in the VCS
Code Reviewing
four eyes see more than two
Code reviewing enables learning, teaching and quality assurance.
stay curious & ask questions
compliment on good stuff
attune to the author's level, be more liberal if necessary
validate user requirements
checkout & understand the code
envision edge cases & try to break it
consider security & performance
chat in person when it gets rough
nitpick and be perfectionist
let only seniors do reviews
give no pointers to the reviewer
judge solutions
state opinions as absolute truths
boost your ego by roasting the author
Spiking
play to learn
Spiking reduces uncertainty and allows to gain confidence in a new area.
technical spikes study and evaluate a new library or technology.
work in isolation to remove distractions
discover limitations early
facilitate or refine estimations
document findings for later designs
focus on refactoring
copy the spike as-is
functional spikes learn about the interaction with a new feature.
acquire feedback on requirements
discover edge cases
align stakeholders by demonstrating
de-risk estimations & user acceptance
subtract spike efforts from estimations
Pair Programming
two heads – one screen
Pair programming brings teams together, raises design quality and facilitates knowledge exchange.
share context & explore requirements
gain confidence & enjoy collaboration
discuss why the solution works best & elaborate on trade-offs
be open and allow pursuit of alternative or even wrong paths
change roles often, so both can learn
consider potential bugs as observer
improve onboarding
dominate the discussion
work in silence
forget to weigh the doubled cost
interrupt sessions due to "more important" things
Performance Optimizing
save time for users & servers
Performance optimizing improves speed & resource consumption to save cost and increase user retention.
start with measuring to focus on significant problems
consider alternatives that fit the requirements or remove features
weigh between faster and simpler code
quantify performance cost in money – not in time
monitor metrics on production; profile to identify causes; establish benchmarks to compare alternatives
feedback metrics during development
apply equal effort to all areas
fix every performance issue
80% of the effect comes from just 20% of the causes
Solution Sketching
program with comments
Solution sketching enables clear thinking, a deeper understanding of solutions and their trade-offs.
write comments about how and why, only then translate them to code
create stubs of classes describing each method's steps in plain language
break it down from large to small
write interfaces as you wish they existed
annotate the data flow between lines and methods with an example
use a pen for structural problems to allow quick sketching
jump right into the implementation
get lost in technicalities of the language or framework
keep redundant comments
Retrospective
adapt to thrive
Retrospectives improve collaboration to raise effectivity, quality and happiness.
regularly invite to discuss what to continue and what to change
use a private space outside the office
don't invite management
evolve processes as the context/team changes
learn from successes and failures
make sure everyone is heard
focus on improvement rather than placing blame
derive action items from the suggestions and follow up
assume ill-will
take feedback personally
repeat what was said outside the meeting without explicit permission
Automated Testing
get fast feedback
Automated testing objectively assesses the quality of features and prevents bugs.
eliminate repetitive, manual testing
ensure requirements are met
make tests run fast and easily
prioritize scope based on risk & importance to the user
brainstorm edge cases and assess their likelihood
prevent repeating bugs & de-risk refactors by adding regression tests
weigh the gain of confidence against the effort to create & maintain
use it as development tool – to setup data & speed up trying out all cases
skip manual testing altogether
add trivial tests to be maintained
leave tests unfixed
Naming
write for reading
Naming increases speed to comprehend code and reduces bugs through confusion.
leverage names to reveal intent
empathize with others
reuse established names for concepts
be specific & avoid general terms unless they have contextual meaning
use longer names for larger scopes
include all effects of the method/class
establish a single domain terminology
apply consistent standards in a project
stick to idiomatic case
rather encode hints in the name than in comments
reuse names in different scopes
pick names making only sense to you
be funny
Did you like it?
Thanks for browsing through the content! I had a blast preparing the cards and it would be awesome if it is helpful to you too.
There is a real world version of the cards. If you are interested, please I still have a few decks left over from the successful Kickstarter campain:
Please contact me via dashingdev@tomrothe.de.
Once I receive the confirmation, I will sprint to the mailbox as soon as I can. In the very unlikely case that I run out of decks because thousands of people order the cards, shipping may take a little longer 😁
Questions, feedback, praise and love letters are welcome :) Please contact me via dashingdev@tomrothe.de or open an issue on GitHub.