Published on January 8, 2014
Software design Write SOLID software with the IDEAL CHALK Company LOGO Alejandro Claro Mosqueda
What is all this stuff?! K.I.S.S . Information hiding
What is software design? “[...] software design means the conception, invention, or contrivance of a scheme for turning a specification for a computer program into an operational program.” - Steve McConnell, Code Complete (2004)
Programmer's approach to software engineering Skip requirements engineering and design phases; START WRITING CODE!! ● We need to show something to the customer real quick. ● We are judged by the amount of LOC/month. ● We expect or know that the schedule is too tight. ● Design is a waste of time.
Architect's approach to software engineering Don't write a single line of code until analysis and design phases are over; I WANT TO SEE UML DIAGRAMS FIRST!! ● Implementation is a peace of cake after UML diagrams are done. ● We can not fail if complete system design is ready first.
Software development is a “wicked” problem ● It is nondeterministic (There is no definite formulation). ● There is no stopping rule. ● Solutions are not true-or-false, but good or bad. ● It is a sloppy process. ● It is a heuristic process (trial-and-error). ● It is about tradeoffs and priorities. ● It involves restrictions. ● It is emergent.
Where is the design? Technical specifications documents? UML diagrams document?
Some thing are better done than described “[...] you should tend to view requirements gathering, design and implementation as different facets of the same process – the delivery of a quality system.” - Andrew Hunt, The pragmatic programmer (2000)
Where is the design? VS .
Where is the design? “Martin’s First Law of Documentation: Produce no document unless its need is immediate and significant.” - Robert Martin, Agile Software Development (2002)
Where is the design? “[...] the design of a software project is documented primarily by its source code.” - Robert Martin, Agile Software Development (2002)
Where is the design? “The source code IS the design!” - Jack Reeves, What is software design? (1992)
Separation of Concerns “no one’s skull is really big enough to contain a modern computer program.” - Dijkstra (1972) Don't let plumbing code pollute your software.
Information hiding “Primary criteria for system modularization should concern the hiding of critical design decisions.” - David Parnas (1972)
Levels of design ● System ● Modules ● Classes ● Functions/Methods Top-down / Stepwise refinement or bottom-up design?
High Cohesion “Cohesion is a measure of the strength of association of the elements inside a module.” - Tom DeMarco (1979) What about doing just one thing and do it well?!
Low Coupling “[...]; It is a measure of the strength of interconnection.” - Structured Design, Edward Yourdon (1979)
Bad smells Do you really know when your code stinks?
Rigidity . Software difficult to change.
Fragility Tendency to break in many places when a single change is made.
Immobility Hard to reuse.
Viscosity Doing thing wrong is easier than doing things right.
Needless complexity Over-design! or elements not currently useful.
Needless repetition Copy/Paste is useful text editing, but disastrous for code editing.
Opacity Difficult to understand!
What is really a design smell? It is a symptom. A violation of principles.
SOLID principles (Classes/Functions) Software development is not a Jenga game!
Single responsibility principle Just because you can, doesn't mean you should
Open/Close principle Open chest surgery is not needed when putting on a coat
Liskov substitution principle If it looks like a duck, quacks like a duck, but needs batteries Probably have the wrong abstraction!
Interface segregation principle You want me to plug this in, where?
Dependency inversion principle Would you solder a lamp directly to the electrical wiring in a wall?
IDEAL CHALK Write SOLID software with the IDEAL CHALK
Program to Interface NOT Implementation Think what to do; no who does it!
DRY principle Changes shall be made only at one place!
Encapsulate what varies Don't let tomatoes spoil potatoes!
Depend on abstractions, NOT concrete classes Be generic not specific!
Least Knowledge Principle Demeter's Law – Talk to friends not strangers
Favour Composition Over Inheritance Hang the clock; don't embed in the wall.
Hollywood Principle Don't call us; We will call you!
Apply Design Pattern wherever possible Don't reinvent the wheel!
Design patterns ● Provides solution to a recurring problem. ● Documents well-prove design experience. ● Abstraction above the level of a single component. ● Provides common vocabulary and understanding. ● Are a means of documentation. ● Supports construction of software with defined properties.
Strive for Loosely Coupled System Don't get entangled!
KISS - Keep It Small and Simple If only there were an easier way!
More principles (System/Modules) Next time... Granularity (Modules Cohesion) ● REP: Reuse-Release equivalence principle. ● CCP: Common-Closure principle. ● CRP: Common-Reuse principle. Stability (Modules Coupling) ● ADP: Acyclic-Dependencies principle. ● SDP: Stable-Dependencies principle. ● SAP: Stable-Abstractions principle.
Lets Talk! “Simple things should be simple and complex things should be possible.”
Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...
In this presentation we will describe our experience developing with a highly dyna...
Presentation to the LITA Forum 7th November 2014 Albuquerque, NM
Un recorrido por los cambios que nos generará el wearabletech en el futuro
Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...
Responsive Web Design Chalk Talk. 76 Views. AmyStafford. Chalk Dust Presentation Template. ... Software design - Write solid software with the ideal chalk.
Also Visit. On snot and fonts 1001 Free Fonts Free Fonts Font River. Home / Category / chalk fonts
... pottery, glass and plastic. Chalk Ink is ideal for artwork ... trying to write, repeat. The Chalk Ink markers keep their ... East Dane Designer Men ...
Zig Memory System Writer Chalk Pastel Dual-Tip ... Ideal for paper crafts and stamping ... Do not write well on chalkboard like they should as they are ...
Shop Chalk Line Reels & Marking Chalk at ... Photo & Graphic Design Software; ... Solid Chalk Solid chalk is ideal for use with stencil sets when you ...
Get the latest Software Developer jobs in Chalk Farm with Job Alerts. Email me jobs like these
... markers, crayons, chalk, pastels, ... These art-oriented software programs are designed especially ... Graphics Software; Design and ...
3D Printing Design & Modeling Software ... and in turn generates a solid 3D model as output. ... Ideal for architects and design engineers.
Photo & Graphic Design Software; ... Communicate with students or employees with chalk that writes smoothly and cleans easily. ... Ideal for chalkboards, ...