際際滷

際際滷Share a Scribd company logo
Software Horticulture
Software Horticulture
and other terrible analogies
What is software engineering?
What is software engineering?
Coding
What is software engineering?
Coding
Designing
What is software engineering?
Coding
Designing
Communicating
What is software engineering?
Important
What is software engineering?
Recent
Important
What is software engineering?
Unique
Recent
Important
What is software engineering?
What is software engineering?
We use analogies
What is software engineering?
We use analogies
to link to familiar things
What is software engineering?
We use analogies
to link to familiar things
to build intuition
What is software engineering?
We use analogies
to link to familiar things
to build intuition
to frame methodologies
What is software engineering?
But analogies are imperfect
What is software engineering?
But analogies are imperfect
and taking them too far can lead to
incorrect or incomplete conclusions
What is software engineering?
What is software engineering?
Build a structure or machine from raw materials
What is software engineering?
Build a structure or machine from raw materials
Structures need to stay standing
What is software engineering?
Build a structure or machine from raw materials
Structures need to stay standing
Machines need to work
What is software engineering?
What is software engineering?
Heavy on planning and design
What is software engineering?
Heavy on planning and design
Breaking is permanent and catastrophic
What is software engineering?
Heavy on planning and design
Breaking is permanent and catastrophic
Requirements are clearly set in advance
What is software engineering?
Its for very serious people.
What is software engineering?
Requirements
Design
Execution
Verification
Production
What is software engineering?
This is nothing like how software is built today.
What is software engineering?
This is nothing like how software is built today.
Too slow and inflexible
What is software engineering?
This is nothing like how software is built today.
Too slow and inflexible
Can we tolerate failure of any sort?
What is software engineering?
It is important to say right up front that quality
isn't everything, and acknowledging it isn't
some sort of moral failing. Value is what you
are trying to produce, and quality is only one
aspect of it, intermixed with cost, features, and
other factors.
What is software engineering?
It is important to say right up front that quality
isn't everything, and acknowledging it isn't
some sort of moral failing. Value is what you
are trying to produce, and quality is only one
aspect of it, intermixed with cost, features, and
other factors.
Mark Zuckerberg
What is software engineering?
It is important to say right up front that quality
isn't everything, and acknowledging it isn't
some sort of moral failing. Value is what you
are trying to produce, and quality is only one
aspect of it, intermixed with cost, features, and
other factors.
John Carmack
What is software engineering?
Business demands
Outputs
Sound familiar?
What is software economics?
What is software economics?
Find the right match between
What is software economics?
Find the right match between
Demand for business logic PMs
What is software economics?
Find the right match between
Demand for business logic
Supply of business logic
PMs
Devs
What is software economics?
yes
What is software economics?
What is software economics?
Trade offs
What is software economics?
Trade offs
Time
What is software economics?
Trade offs
Time
Quality
Scope
What is software horticulture?
What is software horticulture?
If you think about it, building software is more
like gardening than building.
What is software horticulture?
If you think about it, building software is more
like gardening than building.
some guy I know
What is software horticulture?
If you think about it, building software is more
like gardening than building.
Walter Hilton
Software Architect at Advertising.
com
What is software horticulture?
What is software horticulture?
Babysitting - safety in both compile and run time
What is software horticulture?
Babysitting - safety in both compile and run time
Landscaping - encouraging flexibility
What is software horticulture?
Babysitting - safety in both compile and run time
Landscaping - encouraging flexibility
Linguistics - communication of intent
What is software babysitting?
What are the two biggest
impediments to programming?
What is software babysitting?
What are the two biggest
impediments to programming?
Fear of being wrong
What is software babysitting?
What are the two biggest
impediments to programming?
Fear of being wrong
Being wrong
What is software babysitting?
Static analysis is a huge safety net
What is software babysitting?
Static analysis is a huge safety net
Type safety, immutability
What is software babysitting?
Static analysis is a huge safety net
Type safety, immutability
Use it and use it wisely
What is software babysitting?
val a = 20
val b = if (a == None) {
30
} else {
40
}
What is software babysitting?
var a = 1; var b = 0;
if (a = 2) {
b += 1
} else {
b += 2
}
What is software babysitting?
1. Never use vars
What is software babysitting?
1. Never use vars
2. Never use AnyVal or Any.
What is software babysitting?
1. Never use vars
2. Never use AnyVal or Any.
3. Never do Option.get
What is software babysitting?
1. Never use vars
2. Never use AnyVal or Any.
3. Never do Option.get
4. Be as functional as possible
What is software babysitting?
Testing is incredibly important
A sieve that catches runtime errors
What is software babysitting?
Unit testing is for finicky business logic
Functional testing is for sanity checks
What is software babysitting?
Singletons
Can trap state across application shutdowns
What is software babysitting?
Singletons
Can trap state across application shutdowns
Use cake pattern for service unit tests
Use reloadable registry for controller
functional tests
What is software landscaping?
What is software landscaping?
Design for composition
What is software landscaping?
Design for composition
Would rather have Legos than a BMW
What is software landscaping?
traits
What is software landscaping?
traits
type classes
What is software landscaping?
traits
type classes
first class functions
What is software landscaping?
trait CanBark; trait HasPaws
class Dog extends CanBark with HasPaws
class Dog extends Canine
class Canine extends Mammal
What is software landscaping?
trait UserComponent
trait QuestionComponent
object Registry
extends UserComponent
with QuestionComponent
What is software landscaping?
trait Barkable[A]
implicit dogIsBarkable = new Barkable[Dog]
def seesBurglar[A](animal: A)(implicit b:
Barkable[A])
What is software landscaping?
case class MyDTO(a: Int, b: String)
object MyDTO {
implicit val format: Format[MyDTO] =
Json.format[MyDTO]
}
What is software landscaping?
def withAttack[A](animal: A)(attackF: A =>
Int): Int
withAttack(myDog) { dog =>
dog.attackPoints
}
What is software landscaping?
myList.map(_ + 1)
Action { implicit request =>
Ok(request.body)
}
What is software linguistics?
What is software linguistics?
Scala and most modern languages are not
designed to communicate with computers
What is software linguistics?
Scala and most modern languages are not
designed to communicate with computers
They are designed to communicate with
humans!
What is software linguistics?
Scala is a huge language.
What is software linguistics?
Scala is a huge language.
Limit your use of weird paradigms.
What is software linguistics?
Scala is a huge language.
Limit your use of weird paradigms.
If it is truly useful, teach it to your team
What is software linguistics?
Questions to ask:
What is software linguistics?
Questions to ask:
1. What syntax style to use? Dot vs. operator
method calls?
What is software linguistics?
Questions to ask:
1. What syntax style to use? Dot vs. operator
method calls?
2. What semantic style to use? Should use
for comprehensions?
What is software linguistics?
Questions to ask:
1. What syntax style to use? Dot vs. operator
method calls?
2. What semantic style to use? Should use
for comprehensions?
3. What structures to use? Cake pattern?
Actors?
What is software horticulture?
Building software is a steady but constantly
changing endeavour to meet product
requirements.
Maintaining a codebase is a constant
process of grooming, never a complete
restructuring.
Thanks!
jieren.chen@gmail.com

More Related Content

Software Horticulture

  • 2. Software Horticulture and other terrible analogies
  • 3. What is software engineering?
  • 4. What is software engineering? Coding
  • 5. What is software engineering? Coding Designing
  • 6. What is software engineering? Coding Designing Communicating
  • 7. What is software engineering? Important
  • 8. What is software engineering? Recent Important
  • 9. What is software engineering? Unique Recent Important
  • 10. What is software engineering?
  • 11. What is software engineering? We use analogies
  • 12. What is software engineering? We use analogies to link to familiar things
  • 13. What is software engineering? We use analogies to link to familiar things to build intuition
  • 14. What is software engineering? We use analogies to link to familiar things to build intuition to frame methodologies
  • 15. What is software engineering? But analogies are imperfect
  • 16. What is software engineering? But analogies are imperfect and taking them too far can lead to incorrect or incomplete conclusions
  • 17. What is software engineering?
  • 18. What is software engineering? Build a structure or machine from raw materials
  • 19. What is software engineering? Build a structure or machine from raw materials Structures need to stay standing
  • 20. What is software engineering? Build a structure or machine from raw materials Structures need to stay standing Machines need to work
  • 21. What is software engineering?
  • 22. What is software engineering? Heavy on planning and design
  • 23. What is software engineering? Heavy on planning and design Breaking is permanent and catastrophic
  • 24. What is software engineering? Heavy on planning and design Breaking is permanent and catastrophic Requirements are clearly set in advance
  • 25. What is software engineering? Its for very serious people.
  • 26. What is software engineering? Requirements Design Execution Verification Production
  • 27. What is software engineering? This is nothing like how software is built today.
  • 28. What is software engineering? This is nothing like how software is built today. Too slow and inflexible
  • 29. What is software engineering? This is nothing like how software is built today. Too slow and inflexible Can we tolerate failure of any sort?
  • 30. What is software engineering? It is important to say right up front that quality isn't everything, and acknowledging it isn't some sort of moral failing. Value is what you are trying to produce, and quality is only one aspect of it, intermixed with cost, features, and other factors.
  • 31. What is software engineering? It is important to say right up front that quality isn't everything, and acknowledging it isn't some sort of moral failing. Value is what you are trying to produce, and quality is only one aspect of it, intermixed with cost, features, and other factors. Mark Zuckerberg
  • 32. What is software engineering? It is important to say right up front that quality isn't everything, and acknowledging it isn't some sort of moral failing. Value is what you are trying to produce, and quality is only one aspect of it, intermixed with cost, features, and other factors. John Carmack
  • 33. What is software engineering? Business demands Outputs
  • 35. What is software economics?
  • 36. What is software economics? Find the right match between
  • 37. What is software economics? Find the right match between Demand for business logic PMs
  • 38. What is software economics? Find the right match between Demand for business logic Supply of business logic PMs Devs
  • 39. What is software economics? yes
  • 40. What is software economics?
  • 41. What is software economics? Trade offs
  • 42. What is software economics? Trade offs Time
  • 43. What is software economics? Trade offs Time Quality Scope
  • 44. What is software horticulture?
  • 45. What is software horticulture? If you think about it, building software is more like gardening than building.
  • 46. What is software horticulture? If you think about it, building software is more like gardening than building. some guy I know
  • 47. What is software horticulture? If you think about it, building software is more like gardening than building. Walter Hilton Software Architect at Advertising. com
  • 48. What is software horticulture?
  • 49. What is software horticulture? Babysitting - safety in both compile and run time
  • 50. What is software horticulture? Babysitting - safety in both compile and run time Landscaping - encouraging flexibility
  • 51. What is software horticulture? Babysitting - safety in both compile and run time Landscaping - encouraging flexibility Linguistics - communication of intent
  • 52. What is software babysitting? What are the two biggest impediments to programming?
  • 53. What is software babysitting? What are the two biggest impediments to programming? Fear of being wrong
  • 54. What is software babysitting? What are the two biggest impediments to programming? Fear of being wrong Being wrong
  • 55. What is software babysitting? Static analysis is a huge safety net
  • 56. What is software babysitting? Static analysis is a huge safety net Type safety, immutability
  • 57. What is software babysitting? Static analysis is a huge safety net Type safety, immutability Use it and use it wisely
  • 58. What is software babysitting? val a = 20 val b = if (a == None) { 30 } else { 40 }
  • 59. What is software babysitting? var a = 1; var b = 0; if (a = 2) { b += 1 } else { b += 2 }
  • 60. What is software babysitting? 1. Never use vars
  • 61. What is software babysitting? 1. Never use vars 2. Never use AnyVal or Any.
  • 62. What is software babysitting? 1. Never use vars 2. Never use AnyVal or Any. 3. Never do Option.get
  • 63. What is software babysitting? 1. Never use vars 2. Never use AnyVal or Any. 3. Never do Option.get 4. Be as functional as possible
  • 64. What is software babysitting? Testing is incredibly important A sieve that catches runtime errors
  • 65. What is software babysitting? Unit testing is for finicky business logic Functional testing is for sanity checks
  • 66. What is software babysitting? Singletons Can trap state across application shutdowns
  • 67. What is software babysitting? Singletons Can trap state across application shutdowns Use cake pattern for service unit tests Use reloadable registry for controller functional tests
  • 68. What is software landscaping?
  • 69. What is software landscaping? Design for composition
  • 70. What is software landscaping? Design for composition Would rather have Legos than a BMW
  • 71. What is software landscaping? traits
  • 72. What is software landscaping? traits type classes
  • 73. What is software landscaping? traits type classes first class functions
  • 74. What is software landscaping? trait CanBark; trait HasPaws class Dog extends CanBark with HasPaws class Dog extends Canine class Canine extends Mammal
  • 75. What is software landscaping? trait UserComponent trait QuestionComponent object Registry extends UserComponent with QuestionComponent
  • 76. What is software landscaping? trait Barkable[A] implicit dogIsBarkable = new Barkable[Dog] def seesBurglar[A](animal: A)(implicit b: Barkable[A])
  • 77. What is software landscaping? case class MyDTO(a: Int, b: String) object MyDTO { implicit val format: Format[MyDTO] = Json.format[MyDTO] }
  • 78. What is software landscaping? def withAttack[A](animal: A)(attackF: A => Int): Int withAttack(myDog) { dog => dog.attackPoints }
  • 79. What is software landscaping? myList.map(_ + 1) Action { implicit request => Ok(request.body) }
  • 80. What is software linguistics?
  • 81. What is software linguistics? Scala and most modern languages are not designed to communicate with computers
  • 82. What is software linguistics? Scala and most modern languages are not designed to communicate with computers They are designed to communicate with humans!
  • 83. What is software linguistics? Scala is a huge language.
  • 84. What is software linguistics? Scala is a huge language. Limit your use of weird paradigms.
  • 85. What is software linguistics? Scala is a huge language. Limit your use of weird paradigms. If it is truly useful, teach it to your team
  • 86. What is software linguistics? Questions to ask:
  • 87. What is software linguistics? Questions to ask: 1. What syntax style to use? Dot vs. operator method calls?
  • 88. What is software linguistics? Questions to ask: 1. What syntax style to use? Dot vs. operator method calls? 2. What semantic style to use? Should use for comprehensions?
  • 89. What is software linguistics? Questions to ask: 1. What syntax style to use? Dot vs. operator method calls? 2. What semantic style to use? Should use for comprehensions? 3. What structures to use? Cake pattern? Actors?
  • 90. What is software horticulture? Building software is a steady but constantly changing endeavour to meet product requirements. Maintaining a codebase is a constant process of grooming, never a complete restructuring.