際際滷

際際滷Share a Scribd company logo
Taking DRY seriously
@FredyFadel
Aspectize.com
Without data
you are just another person
with an opinion.
Without opinion
you are a person just
with another dataset.
DRY
DRY
DRY
DRY
 From punch cards to Javascript
 more than 35 years of daily programming
 Co-Founder of two companies :
 Winwise (1993-2008)
 Aspectize (2007- always running)
 @FredyFadel
 http://www.scoop.it/t/web-tools-and-technologies
Code
DRY
Technical
NonTechnical
Separation
The thing, the job and its problems
Do we have any ?
Trying hard to do things right
but
We are not doing the right thing
Its difficult.
HUMANS MACHINES
Ambiguities
Automating
As much as possible but not more
Human  Machine
Valuable information  Irrelevant details
 The computer revolution hasn't happened yet.
 OOPSLA - Alan Kay : 1997
 The real computer revolution hasn't happened yet.
 Education - Alan Kay : 2007
 Software is eating the world (Marc Andreessen : 2011).
 Books, Music,Video, Entertainment, Photography, Recruitment
 And its just the beginning.
 First time in history we have a global many to many communication system
and its software.
 While describing your job, would you use the word growing ?
 Do you grow software ?
 Things that grow
 Cities, plants
 Networks :The internet, theWeb, communication end points
 Data : its shape, its volume
 Ceremonial complexity : Often due to code its shape, its volume
 Cars dont grow : they are born dead
I'm not against types, but I don't know of
any type systems that aren't a complete
pain, so I still like dynamic typing.
Actually I made up the term "object-oriented",
and I can tell you I did not have C++ in mind.
Alan Kay
Dynamic
Slow
Continuous
Non stop
Class
Code
Deliverable at any time
Never finished
Is about automating
What is repeatable and valueless
Machines are good at repeating
Valuable best practices
It could be business oriented or technical.
But yet not interfering with intelligent choices
Its distinguishing the invariant from the variable.
Eliminating
Waste
Cumbersome work
Its about removing redundancies
Logical redundancies
Its not about factoring code
Work less, do moreAutomation
Its not about code
its about connections
Have nothing to do with code
Solving the puzzle
Rotating sides
Directing the flow of
information between humans
and machines
Reuse, DRY andWET
Do you have the impression of repeating yourself ?
 Repeating can be fun and lucrative
 You gain knowledge and expertise (at least in the beginning)
 You can maintain an impression of knowledge and expertise
 The widespread Not Invented Here syndrome
 You can easily mess up reuse
 left-pad story in node community
 A little copying is better than a little dependency
Write Everything Once
Is as dumb as
WET ==Write EverythingTwice
Is reusable what is reused
We reuse every day
tools, ideas, code others have written, resources
We reuse because its seamless and has value
Habit
Even when its not seamless
Changing habits is expensive
Imitation
Surfing the buzz waves
 Best example
 Operating system
 Language independent
 Code independent
 Even better example
 Browser
 Language independent
 Operating system independent
Every piece of knowledge must have a
single, unambiguous, representation
within a system.
The Pragmatic Programmer
Taking Orthogonality Seriously
 Reuse is impossible if the reusable is not identified
 If the invariant is not identified
 If the independent is not identified
 Orthogonal is just a fancy way of saying independent
 The reusable wont be reused if reuse is not more or less
seamless
 The invariant is what can be reused if its totally separated
from the variable (from the non reusable)
 The reuse of the invariant can be automated to make it
seamless
 AOP is a technique of automating the invariant.
 Separating what
 Business oriented code
 Technical code
 Because they are clearly independent
 Each have their own invariants
 Each evolve in their own pace
 Some technical invariants
 Network, bytes and clicks
 JSON, HTTP, SQL,Authentication, Browsers, Devices
 Some business variable
 UX
 Data (its shape)
 Processes
HOW ?
DRY
Don't
call us
We'll
call you
Technical code calls business code
 Some history
 1997 MicrosoftTransaction Server (MTS)
 Declarative runtime attributes
 2000 COM+
 More attributes
 2002 .net
 Declarative and programmable attributes
 Attributes
 Create your own or use existing
 Tying
 the attribute to your code
 Engine (middle ware)
 to operate the magic (to automate)
 Some existing examples
[Conditional("DEBUG")] voidTrace (string msg) { ; }
[PrincipalPermission (SecurityAction.Demand, Role = "Admin")]
public DataSet LoadAdminData () { ; }
[assembly:InternalsVisibleToAttribute("YourAssembly, PublicKey=8bff")]
 Some potential examples
[DateValidator("yyyy-MM-dd")]TextBox birthDay = newTextBox ();
[Command(BrowserCacheDuration = "30 Minutes")]
doubleTemperature (string city);
 The mighty TransparentProxy
 A transparent proxy is an object that can simulate any interface !
 Easy to implement
 Less than 50 lines of C#
 You just need to implement it once in your life
 Enables you to intercept all calls and provide valuable orthogonal
technical services through aTechnical Engine.
 .net attributes are fine for technical aspects that require a
small amount of information
 For more sophisticated aspects a DSL can be used to load
information into theTechnical Engine.
 DSL example : Gherkin in Cucumber.
 Integrated inVisual Studio
 Graphical DSL for describing
 The shape of Data
 Textual DSL for describing bindings
 Data
 Command
 Layout
 A JavascriptTechnical Engine that automates
 Producing HTML in the browser
 Sending/Receiving Data
 Manging State
 A .netTechnical Engine that automates
 Reading/Writing Data
 Azure integration
Load Information
Payment
Save Information
Business operation
Technical
Engine
Load Information
Payment
Save Information
Business operation
Technical
Engine
http://www.meetup.com/fr-FR/Aspectize-Paris-Meetup/
Next one is on may 19th @ 5:30pm hosted by Microsoft
Issy les Moulineaux
Ad

Recommended

Aspectize
Aspectize
Fredy Fadel
FormaVia Pr辿sentation Elgg
FormaVia
Le d辿veloppeur est un cr辿ateur de valeur
Fredy Fadel
Infinie
Fredy Fadel
Rethinking enterprise software - Codemotion 2014
Rethinking enterprise software - Codemotion 2014
Alberto Brandolini
Rethinking Enterprise Software - Brandolini
Rethinking Enterprise Software - Brandolini
Codemotion
Low Code Neuro-Symbolic Agents.pdf
Low Code Neuro-Symbolic Agents.pdf
Denis Gagn辿
Computing vocabulary activities
Computing vocabulary activities
Cintia Santos
Developer's Introduction to Machine Learning
Developer's Introduction to Machine Learning
Christopher Mohritz
Beginners guide-to-coding-updated
Beginners guide-to-coding-updated
SaidLezzar
Classroom to careers in Web Development
Classroom to careers in Web Development
Douglas Ng
Voxxed Athens 2018 - UX design and back-ends: When the back-end meets the user
Voxxed Athens 2018 - UX design and back-ends: When the back-end meets the user
Voxxed Athens
Sunny Tech 2019 - Craft Forever
Sunny Tech 2019 - Craft Forever
Cyrille Martraire
Models vs Reality: Quest for the Roots of Complexity
Models vs Reality: Quest for the Roots of Complexity
Julian Warszawski
From dev to ops and beyond - getting it done
From dev to ops and beyond - getting it done
Edorian
Data Modelling For Software Engineers (Devoxx GR 2025).pdf
Data Modelling For Software Engineers (Devoxx GR 2025).pdf
Scott Sosna
Edt08 June08 004
Edt08 June08 004
Kevin Corti
Le PC est mort. Vive le PC!
Le PC est mort. Vive le PC!
Giorgio Pauletto
[GDSC @ UoL] Chip Chat
[GDSC @ UoL] Chip Chat
Tan
Grammarly AI-NLP Club #2 - Recent advances in applied chatbot technology - Jo...
Grammarly AI-NLP Club #2 - Recent advances in applied chatbot technology - Jo...
Grammarly
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
Jennifer Lim
Evolving as a professional software developer
Evolving as a professional software developer
Anton Kirillov
Automating With Excel An Object Oriented Approach
Automating With Excel An Object Oriented Approach
Razorleaf Corporation
Demystifying Machine Learning - How to give your business superpowers.
Demystifying Machine Learning - How to give your business superpowers.
10x Nation
Feedback loops between tooling and culture
Feedback loops between tooling and culture
Chris Winters
Diagnosability versus The Cloud, Redwood Shores 2011-08-30
Diagnosability versus The Cloud, Redwood Shores 2011-08-30
Cary Millsap
Diagnosability vs The Cloud
Diagnosability vs The Cloud
Bob Rhubart
Integrating and publishing public safety data using semantic technologies
Integrating and publishing public safety data using semantic technologies
Alvaro Graves
Linformatique est une science fondamentale.pdf
Fredy Fadel
L'infinie ou l'histoire de la math辿matisation de la logique
Fredy Fadel

More Related Content

Similar to DRY (20)

Developer's Introduction to Machine Learning
Developer's Introduction to Machine Learning
Christopher Mohritz
Beginners guide-to-coding-updated
Beginners guide-to-coding-updated
SaidLezzar
Classroom to careers in Web Development
Classroom to careers in Web Development
Douglas Ng
Voxxed Athens 2018 - UX design and back-ends: When the back-end meets the user
Voxxed Athens 2018 - UX design and back-ends: When the back-end meets the user
Voxxed Athens
Sunny Tech 2019 - Craft Forever
Sunny Tech 2019 - Craft Forever
Cyrille Martraire
Models vs Reality: Quest for the Roots of Complexity
Models vs Reality: Quest for the Roots of Complexity
Julian Warszawski
From dev to ops and beyond - getting it done
From dev to ops and beyond - getting it done
Edorian
Data Modelling For Software Engineers (Devoxx GR 2025).pdf
Data Modelling For Software Engineers (Devoxx GR 2025).pdf
Scott Sosna
Edt08 June08 004
Edt08 June08 004
Kevin Corti
Le PC est mort. Vive le PC!
Le PC est mort. Vive le PC!
Giorgio Pauletto
[GDSC @ UoL] Chip Chat
[GDSC @ UoL] Chip Chat
Tan
Grammarly AI-NLP Club #2 - Recent advances in applied chatbot technology - Jo...
Grammarly AI-NLP Club #2 - Recent advances in applied chatbot technology - Jo...
Grammarly
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
Jennifer Lim
Evolving as a professional software developer
Evolving as a professional software developer
Anton Kirillov
Automating With Excel An Object Oriented Approach
Automating With Excel An Object Oriented Approach
Razorleaf Corporation
Demystifying Machine Learning - How to give your business superpowers.
Demystifying Machine Learning - How to give your business superpowers.
10x Nation
Feedback loops between tooling and culture
Feedback loops between tooling and culture
Chris Winters
Diagnosability versus The Cloud, Redwood Shores 2011-08-30
Diagnosability versus The Cloud, Redwood Shores 2011-08-30
Cary Millsap
Diagnosability vs The Cloud
Diagnosability vs The Cloud
Bob Rhubart
Integrating and publishing public safety data using semantic technologies
Integrating and publishing public safety data using semantic technologies
Alvaro Graves
Developer's Introduction to Machine Learning
Developer's Introduction to Machine Learning
Christopher Mohritz
Beginners guide-to-coding-updated
Beginners guide-to-coding-updated
SaidLezzar
Classroom to careers in Web Development
Classroom to careers in Web Development
Douglas Ng
Voxxed Athens 2018 - UX design and back-ends: When the back-end meets the user
Voxxed Athens 2018 - UX design and back-ends: When the back-end meets the user
Voxxed Athens
Sunny Tech 2019 - Craft Forever
Sunny Tech 2019 - Craft Forever
Cyrille Martraire
Models vs Reality: Quest for the Roots of Complexity
Models vs Reality: Quest for the Roots of Complexity
Julian Warszawski
From dev to ops and beyond - getting it done
From dev to ops and beyond - getting it done
Edorian
Data Modelling For Software Engineers (Devoxx GR 2025).pdf
Data Modelling For Software Engineers (Devoxx GR 2025).pdf
Scott Sosna
Edt08 June08 004
Edt08 June08 004
Kevin Corti
Le PC est mort. Vive le PC!
Le PC est mort. Vive le PC!
Giorgio Pauletto
[GDSC @ UoL] Chip Chat
[GDSC @ UoL] Chip Chat
Tan
Grammarly AI-NLP Club #2 - Recent advances in applied chatbot technology - Jo...
Grammarly AI-NLP Club #2 - Recent advances in applied chatbot technology - Jo...
Grammarly
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
Jennifer Lim
Evolving as a professional software developer
Evolving as a professional software developer
Anton Kirillov
Automating With Excel An Object Oriented Approach
Automating With Excel An Object Oriented Approach
Razorleaf Corporation
Demystifying Machine Learning - How to give your business superpowers.
Demystifying Machine Learning - How to give your business superpowers.
10x Nation
Feedback loops between tooling and culture
Feedback loops between tooling and culture
Chris Winters
Diagnosability versus The Cloud, Redwood Shores 2011-08-30
Diagnosability versus The Cloud, Redwood Shores 2011-08-30
Cary Millsap
Diagnosability vs The Cloud
Diagnosability vs The Cloud
Bob Rhubart
Integrating and publishing public safety data using semantic technologies
Integrating and publishing public safety data using semantic technologies
Alvaro Graves

More from Fredy Fadel (7)

Linformatique est une science fondamentale.pdf
Fredy Fadel
L'infinie ou l'histoire de la math辿matisation de la logique
Fredy Fadel
AspectizeAndYou
AspectizeAndYou
Fredy Fadel
AspectizeWhyHowWhat
Fredy Fadel
Azure Data Aspectize
Fredy Fadel
Javascript un langage sup辿rieur
Fredy Fadel
Tech days2013aspectize
Fredy Fadel
Linformatique est une science fondamentale.pdf
Fredy Fadel
L'infinie ou l'histoire de la math辿matisation de la logique
Fredy Fadel
AspectizeAndYou
AspectizeAndYou
Fredy Fadel
AspectizeWhyHowWhat
Fredy Fadel
Azure Data Aspectize
Fredy Fadel
Javascript un langage sup辿rieur
Fredy Fadel
Tech days2013aspectize
Fredy Fadel
Ad

DRY

  • 2. Without data you are just another person with an opinion.
  • 3. Without opinion you are a person just with another dataset.
  • 8. From punch cards to Javascript more than 35 years of daily programming Co-Founder of two companies : Winwise (1993-2008) Aspectize (2007- always running) @FredyFadel http://www.scoop.it/t/web-tools-and-technologies
  • 10. The thing, the job and its problems
  • 11. Do we have any ?
  • 12.
  • 13. Trying hard to do things right but We are not doing the right thing
  • 16. Automating As much as possible but not more Human Machine Valuable information Irrelevant details
  • 17. The computer revolution hasn't happened yet. OOPSLA - Alan Kay : 1997 The real computer revolution hasn't happened yet. Education - Alan Kay : 2007 Software is eating the world (Marc Andreessen : 2011). Books, Music,Video, Entertainment, Photography, Recruitment And its just the beginning. First time in history we have a global many to many communication system and its software.
  • 18. While describing your job, would you use the word growing ? Do you grow software ? Things that grow Cities, plants Networks :The internet, theWeb, communication end points Data : its shape, its volume Ceremonial complexity : Often due to code its shape, its volume Cars dont grow : they are born dead
  • 19. I'm not against types, but I don't know of any type systems that aren't a complete pain, so I still like dynamic typing. Actually I made up the term "object-oriented", and I can tell you I did not have C++ in mind. Alan Kay
  • 21. Deliverable at any time Never finished
  • 22. Is about automating What is repeatable and valueless Machines are good at repeating Valuable best practices It could be business oriented or technical. But yet not interfering with intelligent choices Its distinguishing the invariant from the variable.
  • 23. Eliminating Waste Cumbersome work Its about removing redundancies Logical redundancies Its not about factoring code
  • 24. Work less, do moreAutomation Its not about code its about connections
  • 25. Have nothing to do with code
  • 27. Directing the flow of information between humans and machines
  • 29. Do you have the impression of repeating yourself ?
  • 30. Repeating can be fun and lucrative You gain knowledge and expertise (at least in the beginning) You can maintain an impression of knowledge and expertise The widespread Not Invented Here syndrome You can easily mess up reuse left-pad story in node community A little copying is better than a little dependency
  • 31. Write Everything Once Is as dumb as WET ==Write EverythingTwice
  • 32. Is reusable what is reused We reuse every day tools, ideas, code others have written, resources We reuse because its seamless and has value
  • 33. Habit Even when its not seamless Changing habits is expensive Imitation Surfing the buzz waves
  • 34. Best example Operating system Language independent Code independent Even better example Browser Language independent Operating system independent
  • 35. Every piece of knowledge must have a single, unambiguous, representation within a system. The Pragmatic Programmer
  • 37. Reuse is impossible if the reusable is not identified If the invariant is not identified If the independent is not identified Orthogonal is just a fancy way of saying independent The reusable wont be reused if reuse is not more or less seamless
  • 38. The invariant is what can be reused if its totally separated from the variable (from the non reusable) The reuse of the invariant can be automated to make it seamless AOP is a technique of automating the invariant.
  • 39. Separating what Business oriented code Technical code Because they are clearly independent Each have their own invariants Each evolve in their own pace
  • 40. Some technical invariants Network, bytes and clicks JSON, HTTP, SQL,Authentication, Browsers, Devices Some business variable UX Data (its shape) Processes
  • 41. HOW ?
  • 43. Don't call us We'll call you Technical code calls business code
  • 44. Some history 1997 MicrosoftTransaction Server (MTS) Declarative runtime attributes 2000 COM+ More attributes 2002 .net Declarative and programmable attributes
  • 45. Attributes Create your own or use existing Tying the attribute to your code Engine (middle ware) to operate the magic (to automate)
  • 46. Some existing examples [Conditional("DEBUG")] voidTrace (string msg) { ; } [PrincipalPermission (SecurityAction.Demand, Role = "Admin")] public DataSet LoadAdminData () { ; } [assembly:InternalsVisibleToAttribute("YourAssembly, PublicKey=8bff")] Some potential examples [DateValidator("yyyy-MM-dd")]TextBox birthDay = newTextBox (); [Command(BrowserCacheDuration = "30 Minutes")] doubleTemperature (string city);
  • 47. The mighty TransparentProxy A transparent proxy is an object that can simulate any interface ! Easy to implement Less than 50 lines of C# You just need to implement it once in your life Enables you to intercept all calls and provide valuable orthogonal technical services through aTechnical Engine.
  • 48. .net attributes are fine for technical aspects that require a small amount of information For more sophisticated aspects a DSL can be used to load information into theTechnical Engine. DSL example : Gherkin in Cucumber.
  • 49. Integrated inVisual Studio Graphical DSL for describing The shape of Data Textual DSL for describing bindings Data Command Layout
  • 50. A JavascriptTechnical Engine that automates Producing HTML in the browser Sending/Receiving Data Manging State A .netTechnical Engine that automates Reading/Writing Data Azure integration
  • 51. Load Information Payment Save Information Business operation Technical Engine Load Information Payment Save Information Business operation Technical Engine
  • 52. http://www.meetup.com/fr-FR/Aspectize-Paris-Meetup/ Next one is on may 19th @ 5:30pm hosted by Microsoft Issy les Moulineaux