The document discusses techniques for writing better code through minimizing what is written. It begins with an agenda that includes discussing principles over prescriptions. It then explains that writing less code saves both time and money. Several figurative techniques are presented for writing less code, such as YAGNI (You aren't gonna need it) and KISS (Keep it simple stupid). Literal techniques like test-driven development and acceptance test-driven development are also discussed. The document emphasizes writing code only for demonstrated needs and verifying requirements with stakeholders.
2. the best code, is code never written
@daniel_davis
⢠Brief Intro
⢠Focus For The Session
⢠Why Is It Important
⢠Figurative Techniques
⢠Literal Techniques
⢠Recap
⢠Q & A
Agenda
2
3. the best code, is code never written
@daniel_davis
⢠Founder/Lead Consultant at Elev8
⢠Business Improvement Consultant
⢠Developer & Technical Coach
⢠Innovator, Life Hacker, Maker
⢠Pro Snowboard Instructor
⢠Parent of 3 + 2
Brief Intro
3
4. the best code, is code never written
@daniel_davis
⢠Discussion over Presentation
⢠Principles over Prescription
Focus For The Session
4
5. the best code, is code never written
@daniel_davis
Global cost of code is â¨
hard to narrow down.
However, I did find that in â¨
2018, in the US alone the â¨
cost for poor quality code â¨
was $2,840,000,000,000.
Why Is It Important
5
6. the best code, is code never written
@daniel_davis
Code Is Expensive -
- Hard To Write
- Cost Of Delay
- Complicated To Maintain
We Are Expensive - (prefer to keep it so)
- Smart / Talented / Rare
- Specialized Skillsets
- Dedicated & Committed Mindset
Why Is It Important
6
7. the best code, is code never written
@daniel_davis
Pizza Delivery Service Voice App that was solved by a
simple 1-(800) phone number that already existed.
YAGNI - (You Arenât Gonna Need It)
- Lines of code are a liability, donât look at it as the "number of
lines producedâ, but rather the ânumber of lines spentâ.
- More explicitly, lines of code saved is directly correlated to
dollars we didnât spend.
- Minimizes waste.
Figurative Techniques
7
8. the best code, is code never written
@daniel_davis
NIH - (Not Invented Here)
- Beg (to use it)
- Borrow (if already written donât reinvent it)
- Steal (note âstealingâ to learn is far different from stealing for profit)
- Cheat To Win (itâs was bad when we were kids, itâs cool now)
There is a fine line when it comes to relying on others code.
Make sure the source is trusted and reliable and â¨
test protect it as if it was your own.
Figurative Techniques
8
9. the best code, is code never written
@daniel_davis
FITYMI - (Fake It Till You Make It)
- Mock, Fake, Stub, Etc⌠donât make the actual thing it until
you know you absolutely need it.
- âItâ is far better suited to your emotions, ie. confidence, pride,
etc⌠than it is actual skills.
Figurative Techniques
9
âThe cheapest, fastest, and most reliable components of a
computer system are those that arenât there.â
- Gordon Bell
10. the best code, is code never written
@daniel_davis
Not all your thoughts on the solution should turn into code.
In fact most shouldnât. Be aggressively de-selective.
KISS - (Keep It Stupid Simple)
- What's the simplest thing that could possibly work? â¨
(Beck/Cunningham)
- ST2CPWAKYO2HRJOM (The Simplest Thing That Could Possibly
Work And Keep You Out Of Human Resources, Jail, Or Morgue)
- Simple is subjective, itâs really just focusing on âone thingâ
Figurative Techniques
10
11. the best code, is code never written
@daniel_davis
âA complex system that works is inevitably found to have
evolved from a simple system that works.â
- John Gall
ED - (Emergent Design or Evolutionary Design)
- Primitive Whole, which builds in sophistication over time.
- Pursue high-value and high-risk items early.
- Follow Scientific Method
- Give it time to learn, but donât be afraid to fail fast.
Figurative Techniques
11
12. the best code, is code never written
@daniel_davis
MVP -
Figurative Techniques
12
13. the best code, is code never written
@daniel_davis
Pretotyping -
- Avoid âCan we build it?â or âWill it work?â Instead focus on
âShould we build it at all?â or âIf we build it, will people buy it?â
- Pretotypes make it possible to make a go/no-go decision at a
fraction of the cost of prototypes: hours or days instead of
weeks or months, and pennies instead of dollars.
Literal Techniques
13
âDesign until you feel you understand the problem.â¨
Write code until you realize you donât.â
- Software Engineering Conference, 1968
14. the best code, is code never written
@daniel_davis
Literal Techniques
ATDD & TDD Visualized -
- The shared practice of - Red - Green - Refactor
14
15. the best code, is code never written
@daniel_davis
The biggest advantage TDD (Design) provides is the â¨
ability to protect you from yourself.
TDD - (Test Driven Design/Development)
- Writing a tests before code helps assure only necessary code is
written.
- Doing so inherently makes the code simple and clear.
- Ensures the individual units of the system are built correctly.
Literal Techniques
15
16. the best code, is code never written
@daniel_davis
The biggest advantage ATDD provides is the ability to
protect the business from themselves.
ATDD - (Acceptance Test Driven Design/Dev)
- Same approach as TDD, however these tests are generally
written from a business/stakeholders perspective.
- Helps devs identify the appropriate code to write, that is, code
that reflects the outcomes desired.
- Meant to ensure the business value of the system is being met.
Literal Techniques
16
17. the best code, is code never written
@daniel_davis
âThe single biggest problem with communication â¨
is the illusion that it has taken place.â
- George Bernard Shaw
WWAC - (Well Written Acceptance Criteria)
- Acceptance Criteria that has real and legit content and context
to the business value that is being requested.
- Understandable by any and all team members.
- Realistic and Achievable.
Literal Techniques
17
18. the best code, is code never written
@daniel_davis
Rules are meant to be broken. Make sure they are
manageable and have some kind of ranking and/or priority.
DoR & DoD - (Definition of Ready & Done)
- Driven more from a team standards approach.
- Still also Realistic and Achievable.
- Meet the need and ONLY the need.
- Donât over-complicate them.
Literal Techniques
18
19. the best code, is code never written
@daniel_davis
Figurative
⢠YAGNI
⢠NIH
⢠FITYMI
⢠KISS
⢠ED
Recap
Literal
⢠Pretotyping
⢠TDD
⢠ATDD
⢠WWAC
⢠DoR & DoD
19
20. the best code, is code never written
@daniel_davis
Resources
⢠https://www.it-cisq.org/the-cost-of-poor-quality-software-in-the-us-a-2018-
report/The-Cost-of-Poor-Quality-Software-in-the-US-2018-Report.pdf
⢠https://www.artima.com/intv/simplest.html
⢠https://insights.dice.com/2018/07/05/tech-pros-steal-code-good-idea-bad/
⢠https://www.pretotyping.org/uploads/1/4/0/9/14099067/
pretotype_it_2nd_pretotype_edition-2.pdf
⢠https://github.com/northofnormal/ConferenceTalks/blob/master/
qualityvsquantity.pdf
⢠https://docs.google.com/document/d/
1A1sLe2R-9XhRpOiAZfKii2944PM5tUKS17EgaiGCnLE/export?format=pdf
20
21. the best code, is code never written
@daniel_davis
Q & A
21
22. the best code, is code never written
@daniel_davis
Now, go unto the world â¨
& not write some code!
22
23. the best code, is code never written
@daniel_davis
Thank you!
Daniel Davis
dan@elev8.services
@daniel_davis
linkedin.com/in/davisdaniel
23