SlideShare una empresa de Scribd logo
1 de 32
Common sense
driven development
Bozhidar Bozhanov
Vanity slide
http://techblog.bozho.net
@bozhobg
Senior Software Engineer @ TomTom
It’s a maze
TDD, BDD
Domain-driven design, Design-driven
development
SOA, Microservices
MQs, ESBs, rules engines, data processing
engines
...and software is still crap
“because writing software is hard”, we soothe
ourselves
Some real methodologies
Hype driven development (Big Data in the
Cloud, yeah)
Demo driven development
Copy/paste driven development
Denial driven development (Not Invented
Here syndrome)
Common sense
Common sense gives you
less bugs
maintainability
extensibility
scalability
eternal life
Applying common sense
No definition for common sense
...so we’ll define it by counter-examples
Let’s make an API
...that we never write against
TransformerFactory tf = TransformerFactory.newInstance();
Transformer transformer = tf.newTransformer();
transformer.setOutputProperty(...);
StringWriter writer = new StringWriter();
transformer.transform(new DOMSource(doc), new
StreamResult(writer));
String result = writer.toString();
default use-case(s)
Let’s use raw JDBC
easy to setup
...and you’ll eventually build a feature-poor,
buggy and time-consuming object mapper.
you are probably using ORMs wrong
Let’s use java.util.Date
...instead of joda-time, java.time
or let it creep from other libraries
java.util.Date is mutable, not timezone-aware, with a
bad, deprecated api. Bottom line: it’s bad
extra effort for: hibernate, json/xml
serialization
Let’s homegrow a
framework
NIH (Not Invented Here) syndrome
“NIH's emphasis is on ignoring, boycotting, or
otherwise refusing to acknowledge solutions by
others.”
Our web framework, our DI, our ORM, our
build tools.
...what could go wrong?
Let’s not use latest versions
Java 8 is “too new” #not
Latest JavaEE/Spring is probably still buggy
We don’t have time to learn the new things
We have a “standard infrastructure”
… and other bullshit
critical security issues, fixed bugs
regularly upgrade
Let’s not support safe-and-refresh
...because waiting for 3 minutes to see
changes is cool
you can check facebook
JRebel is not the only option
HotSwap in debug mode
Process
Let’s skip code reviews
we don’t have time
we are really good, we promise
someone may get offended
...because I suggested to rename a variable
Let’s not write tests
we don’t have time
but we do have time to fix recurring bugs
we are really good, we promise
the code is simple and doesn’t need testing
yeah, right
Let’s make it work just for the demo
...and never actually deliver working features
it’s fine to show incomplete features
it’s not fine to write crap in the codebase just for a
demo to work
Let’s allow management decisions to
influence software design
because non-technical managers know better:
which database to use
what frameworks to use
how to structure the deployment
that 89% coverage is not enough
Architecture
(source: MSDN.com)
Let’s use SOAP
...for no apparent reason
...where simple RESTful services will do
...and we don’t actually need web services
Let’s use an ESB
...because I heard it’s cool
...even though we have to integrate just 2
systems, both of which are under our control
it won’t break, I promise.
Let’s use an MQ
“message-driven” - decoupling, throughput,
fault-tolerance, distributed processing
right… do you really need these?
what’s the overhead of managing an MQ?
async processing without MQ, in your JVM
there are legitimate use-cases. But fewer than
you think.
hardware is cheap, unreadable code isn’t
Let’s use application-level state
instance fields with data
non-cache (non-dismissable) information
well, maybe you don’t want to scale out
Let’s split the system
...and make separately deployable
submodules communicate with web-services
with us as the only user
...of our relatively small application
monolithic applications work fine
splitting, microservices - prove if necessary
(by Martin Fowler)
Let’s [..]. How about...
So...
That’s what commons sense isn’t.
But there were contradictions...
like “reuse existing solutions” vs “you probably
don’t need X”
or “don’t overdesign in advance” vs “design
good APIs”
This is where you apply common sense to
choose what fits your case :)
Obvious?
Yes, but every project has many of the above.
Common sense is not a set of rules or a set of
slides.
Based on...
http://techblog.bozho.net/development-methodologies/
http://techblog.bozho.net/you-probably-dont-need-a-message-queue/
http://techblog.bozho.net/the-default-use-case/
http://techblog.bozho.net/orm-haters-dont-get-it/
http://techblog.bozho.net/do-it-either-way-well-refactor-it-later/
http://techblog.bozho.net/kiss-my-yagni/
http://techblog.bozho.net/two-types-of-deployment-of-subsystems/
http://techblog.bozho.net/keep-as-much-stuff-as-possible-in-the-application-itself/
http://techblog.bozho.net/state-does-not-belong-in-the-code/
http://techblog.bozho.net/save-and-refresh-with-java-web-projects/
http://martinfowler.com/bliki/MicroservicePremium.html
Questions?

Más contenido relacionado

La actualidad más candente

[Mas 500] Web Basics
[Mas 500] Web Basics[Mas 500] Web Basics
[Mas 500] Web Basics
rahulbot
 
Component based Progress Programming
Component based Progress ProgrammingComponent based Progress Programming
Component based Progress Programming
Valentin Duricu
 

La actualidad más candente (20)

Sugarcoating your frontend one ViewModel at a time
Sugarcoating your frontend one ViewModel at a timeSugarcoating your frontend one ViewModel at a time
Sugarcoating your frontend one ViewModel at a time
 
Memorial Sloan Kettering: Adventures in Drupal 8
Memorial Sloan Kettering: Adventures in Drupal 8Memorial Sloan Kettering: Adventures in Drupal 8
Memorial Sloan Kettering: Adventures in Drupal 8
 
Gemeinsame View-Models mit XAML Technologien
Gemeinsame View-Models mit XAML TechnologienGemeinsame View-Models mit XAML Technologien
Gemeinsame View-Models mit XAML Technologien
 
Introduction to portable class libraries
Introduction to portable class librariesIntroduction to portable class libraries
Introduction to portable class libraries
 
[Mas 500] Web Basics
[Mas 500] Web Basics[Mas 500] Web Basics
[Mas 500] Web Basics
 
Ruby on rails
Ruby on railsRuby on rails
Ruby on rails
 
Making Multisite Work for You
Making Multisite Work for YouMaking Multisite Work for You
Making Multisite Work for You
 
Some chat ops what?
Some chat ops what?Some chat ops what?
Some chat ops what?
 
Knock out Introduction with samples (jsfiddle.net)
Knock out Introduction with samples (jsfiddle.net)Knock out Introduction with samples (jsfiddle.net)
Knock out Introduction with samples (jsfiddle.net)
 
Component based Progress Programming
Component based Progress ProgrammingComponent based Progress Programming
Component based Progress Programming
 
Harnessing The Power of CDNs
Harnessing The Power of CDNsHarnessing The Power of CDNs
Harnessing The Power of CDNs
 
Coonti in HelsinkiJS
Coonti in HelsinkiJSCoonti in HelsinkiJS
Coonti in HelsinkiJS
 
Using Javascript in today's world
Using Javascript in today's worldUsing Javascript in today's world
Using Javascript in today's world
 
1 - demo lab using vmware workstation
1 - demo lab using vmware workstation1 - demo lab using vmware workstation
1 - demo lab using vmware workstation
 
Gwt cdi jud_con_berlin
Gwt cdi jud_con_berlinGwt cdi jud_con_berlin
Gwt cdi jud_con_berlin
 
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET EditionRediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
 
ApacheCon North America - Introduction to FlexJS
ApacheCon North America - Introduction to FlexJSApacheCon North America - Introduction to FlexJS
ApacheCon North America - Introduction to FlexJS
 
Kolomiyets Dmytro "Dealing with Multiple Caches, When Developing Microservices"
Kolomiyets Dmytro "Dealing with Multiple Caches, When Developing Microservices"Kolomiyets Dmytro "Dealing with Multiple Caches, When Developing Microservices"
Kolomiyets Dmytro "Dealing with Multiple Caches, When Developing Microservices"
 
Redhat.com: An Architectural Case Study
Redhat.com: An Architectural Case StudyRedhat.com: An Architectural Case Study
Redhat.com: An Architectural Case Study
 
Portable Class Library Deep Dive
Portable Class Library Deep DivePortable Class Library Deep Dive
Portable Class Library Deep Dive
 

Destacado

Destacado (9)

Electronic identification
Electronic identificationElectronic identification
Electronic identification
 
Biometric identification
Biometric identificationBiometric identification
Biometric identification
 
E-voting
E-votingE-voting
E-voting
 
E-government architecture
E-government architectureE-government architecture
E-government architecture
 
Electronic governance steps in the right direction?
Electronic governance   steps in the right direction?Electronic governance   steps in the right direction?
Electronic governance steps in the right direction?
 
Open Source for the Government
Open Source for the GovernmentOpen Source for the Government
Open Source for the Government
 
anxiety and child development
 anxiety and child development anxiety and child development
anxiety and child development
 
Fear Driven Development
Fear Driven DevelopmentFear Driven Development
Fear Driven Development
 
TDD - Inevitable Challenge for Software Developers (phpkonf15 keynote)
TDD - Inevitable Challenge for Software Developers (phpkonf15 keynote)TDD - Inevitable Challenge for Software Developers (phpkonf15 keynote)
TDD - Inevitable Challenge for Software Developers (phpkonf15 keynote)
 

Similar a Common Sense Driven Development

Similar a Common Sense Driven Development (20)

Cloud computing - an architect's perspective
Cloud computing - an architect's perspectiveCloud computing - an architect's perspective
Cloud computing - an architect's perspective
 
Micro services
Micro servicesMicro services
Micro services
 
Microservices for the rest of us
Microservices for the rest of usMicroservices for the rest of us
Microservices for the rest of us
 
"The Intersection of architecture and implementation", Mark Richards
"The Intersection of architecture and implementation", Mark Richards"The Intersection of architecture and implementation", Mark Richards
"The Intersection of architecture and implementation", Mark Richards
 
Ob Essay
Ob EssayOb Essay
Ob Essay
 
Let's talk about... Microservices
Let's talk about... MicroservicesLet's talk about... Microservices
Let's talk about... Microservices
 
Accelerate your Application Delivery with DevOps and Microservices
Accelerate your Application Delivery with DevOps and MicroservicesAccelerate your Application Delivery with DevOps and Microservices
Accelerate your Application Delivery with DevOps and Microservices
 
The Big Picture - Integrating Buzzwords
The Big Picture - Integrating BuzzwordsThe Big Picture - Integrating Buzzwords
The Big Picture - Integrating Buzzwords
 
NZCS Cloud Computing Presentation
NZCS Cloud Computing PresentationNZCS Cloud Computing Presentation
NZCS Cloud Computing Presentation
 
Microservices and Prometheus (Microservices NYC 2016)
Microservices and Prometheus (Microservices NYC 2016)Microservices and Prometheus (Microservices NYC 2016)
Microservices and Prometheus (Microservices NYC 2016)
 
Microservices for performance - GOTO Chicago 2016
Microservices for performance - GOTO Chicago 2016Microservices for performance - GOTO Chicago 2016
Microservices for performance - GOTO Chicago 2016
 
Moving to Microservices with the Help of Distributed Traces
Moving to Microservices with the Help of Distributed TracesMoving to Microservices with the Help of Distributed Traces
Moving to Microservices with the Help of Distributed Traces
 
DevOne - How to not fail with Azure
DevOne - How to not fail with AzureDevOne - How to not fail with Azure
DevOne - How to not fail with Azure
 
What every C++ programmer should know about modern compilers (w/ comments, AC...
What every C++ programmer should know about modern compilers (w/ comments, AC...What every C++ programmer should know about modern compilers (w/ comments, AC...
What every C++ programmer should know about modern compilers (w/ comments, AC...
 
3stages Wdn08 V3
3stages Wdn08 V33stages Wdn08 V3
3stages Wdn08 V3
 
Scaling Engineering with Docker
Scaling Engineering with DockerScaling Engineering with Docker
Scaling Engineering with Docker
 
Isset Presentation @ EECI2009
Isset Presentation @ EECI2009Isset Presentation @ EECI2009
Isset Presentation @ EECI2009
 
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
 
Serverless in production (O'Reilly Software Architecture)
Serverless in production (O'Reilly Software Architecture)Serverless in production (O'Reilly Software Architecture)
Serverless in production (O'Reilly Software Architecture)
 
Microservices pros and cons
Microservices pros and consMicroservices pros and cons
Microservices pros and cons
 

Más de Bozhidar Bozhanov

Más de Bozhidar Bozhanov (20)

Антикорупционен софтуер
Антикорупционен софтуерАнтикорупционен софтуер
Антикорупционен софтуер
 
Nothing is secure.pdf
Nothing is secure.pdfNothing is secure.pdf
Nothing is secure.pdf
 
Elasticsearch - Scalability and Multitenancy
Elasticsearch - Scalability and MultitenancyElasticsearch - Scalability and Multitenancy
Elasticsearch - Scalability and Multitenancy
 
Encryption in the enterprise
Encryption in the enterpriseEncryption in the enterprise
Encryption in the enterprise
 
Blockchain overview - types, use-cases, security and usabilty
Blockchain overview - types, use-cases, security and usabiltyBlockchain overview - types, use-cases, security and usabilty
Blockchain overview - types, use-cases, security and usabilty
 
Електронна държава
Електронна държаваЕлектронна държава
Електронна държава
 
Blockchain - what is it good for?
Blockchain - what is it good for?Blockchain - what is it good for?
Blockchain - what is it good for?
 
Algorithmic and technological transparency
Algorithmic and technological transparencyAlgorithmic and technological transparency
Algorithmic and technological transparency
 
Scaling horizontally on AWS
Scaling horizontally on AWSScaling horizontally on AWS
Scaling horizontally on AWS
 
Alternatives for copyright protection online
Alternatives for copyright protection onlineAlternatives for copyright protection online
Alternatives for copyright protection online
 
GDPR for developers
GDPR for developersGDPR for developers
GDPR for developers
 
Политики, основани на данни
Политики, основани на данниПолитики, основани на данни
Политики, основани на данни
 
Отворено законодателство
Отворено законодателствоОтворено законодателство
Отворено законодателство
 
Overview of Message Queues
Overview of Message QueuesOverview of Message Queues
Overview of Message Queues
 
Сигурност на електронното управление
Сигурност на електронното управлениеСигурност на електронното управление
Сигурност на електронното управление
 
Opensource government
Opensource governmentOpensource government
Opensource government
 
Биометрична идентификация
Биометрична идентификацияБиометрична идентификация
Биометрична идентификация
 
Регулации и технологии
Регулации и технологииРегулации и технологии
Регулации и технологии
 
Regulations and technology
Regulations and technologyRegulations and technology
Regulations and technology
 
Архитектура на електронното управление
Архитектура на електронното управлениеАрхитектура на електронното управление
Архитектура на електронното управление
 

Último

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 

Último (20)

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 

Common Sense Driven Development

Notas del editor

  1. constructors with 10 parameters, using different order of pairs of parameters (source, target|target,source) speaking of bad APIs...
  2. orms are hard to setup and make it easy for shooting yourself in the foot. raw jdbc is fine sometimes, and ORMs give you that
  3. transition to the next slide: what hibernate?
  4. extend or patch existing ones instead.
  5. does that remind you of something? I copied this slide to the next one
  6. but don’t aim for 100% coverage, of course.
  7. emphasize on monolithic applications