880 likes | 1.41k Views
Pragmatic Software Development Curing the Architecture Astronaut. Cory House bitnative.com/ kcdc | @ housecor. We have a problem. I learned something new…. I will use this EVERYWHERE. When you go too far up, abstraction-wise, you run out of oxygen. Joel Spolsky. Astronaut Assessment.
E N D
Pragmatic Software DevelopmentCuring the Architecture Astronaut Cory Housebitnative.com/kcdc | @housecor
I learned something new… I will use this EVERYWHERE
When you go too far up, abstraction-wise,you run out of oxygen.Joel Spolsky
Astronaut Assessment We must use <shiny new technology> for this! Reinventthe wheel 100% test coverage NeverORM Alwayscode to an interface Use all the patterns
X is good It Depends
What’s An Expert? Anyone can design a bridge that stands. It takes an engineer to design a bridge that barely stands.
Reasons to Select an Architecture To experiment To challenge myself To improve my resume´ Save Money Save Effort Save Time
Assumptions Web based Enterprise line-of-business app RDBMS
What if I said… $250k over budget Customers hated it, or worse, ignored it Project funding dried up 1 month late = worthless
Time to set up?Training? Necessary tooling? Large enough to warrant “prep time”?
More effective? More efficient? Least expensive? Most flexible? Most scalable?
Lighter? Quicker to set up? Cheaper? More risky? Faster?Requires training?
Experimental? How permanent is this solution? How big is the project?
Complexity Complexity ~= Lines of code 010101110101111101011101 011010111010111010110100 010111101011101101011101
Complexity must be J U S T I F I E D
Parkinson’s Law: Work expands to fill available time.
Simplicity: The art of maximizing the amount of work not done.
Consider Simplicity Do simplest thing that could possibly work / KISS Lean principles 80/20 Rule Minimum Viable Product (MVP)
Do Simplest Thing That Could Possibly Work Get done sooner Easier to communicate Duplication is obvious, so needs for refactoring are clearer Tests are easier to write Code is easier to performance tune You feel less stress, which enhances all of the above http://xp.c2.com/DoTheSimplestThingThatCouldPossiblyWork.html
Consider all solutions to your task that could possibly work. Implement the simplest solution.Refactor from there if and when needed…you will always wind up with a system that is just right for what it does so far…nothing added that isn't needed. Ron Jeffries
80/20 Rule Get 80% of the benefit from 20% of the features? Get 80% of the benefit of automated testing by testing the most important 20%?
Lean Principles Not adding value to the customer? It’s likely waste. Choice unclear? Choose the simple option. Ideal architecture varies by team Automated testing Source: “Lean Software Development” by Mary and Tom Poppendieck Eliminate waste Amplify learning Decide as late as possible Deliver as fast as possible Empower the team Build integrity in See the whole
Minimum Viable Product (MVP) Goal: Validated learning What was the response? What did they like? Hate? How much profit? Is this worth scaling? Bad assumptions? Do we need to pivot?
Minimum Viable Product (MVP) • What we don’t care about • Scalability • Maintenance costs • And often • Beauty • Code cleanliness • Full feature set • Performance • Security • If it even actually works!
Agile Architecture: Flex One Features Architecture Reuse Performance Security Testing Scalability Documentation Technical Debt (and other issues) Blown Budget Missed deadline
Assuming deadline, manpower and scope are constant: Software quality == deadline sanity. Quality software requires realistic deadlines.
Q: Is debt bad? A: Is the deadline hard?
Hard vs Soft Deadlines Trade show Published advertising X-team dependencies 1st to market or dead Network effects Single loud customer Wild guess Salesman misspoke MS Project said so
Part 1: Summary • Defined complexity. Neither good or bad. Must be justified. • Parkinson’s Law • Arguments for simplicity • Timelines may dictate potential complexity and quality • Hard vs soft deadlines
Web Forms, MVC, WPF, WinForms, Silverlight Web API, WCF, ServiceStack, POCOs C#, VB.Net, F#, IronRuby, IronPython Entity Framework, nHibernate, LLBLGen, Dapper, ADO.Net
Layers vs Tiers Logical Physical or virtual
Tiers Web Server DBBoxes
Tiers Scalability Security Uptime Reusable Performance cost Increased complexity