SlideShare a Scribd company logo
Programming in the large
Naveen Muguda
Two kinds of medicines
• Over the counter
• Prescription
Programming in the large
programming in small
• activity of writing a small program.
• Small programs are typified by being small in terms of their source
code size,
• are easy to specify, quick to code and typically perform one task or a
few very closely related tasks very well.
• Programming in the large
• by larger groups of people or by smaller groups over longer time periods
• program changes can become difficult
• If a change operates across module boundaries, the work of many people
may need re-doing.
Laws of Software Evolution
• An E-program is written to perform some real-world activity;
• how it should behave is strongly linked to the environment in which
it runs,
• needs to adapt to varying requirements and circumstances in that
environment
Laws of Software Evolution
• "Continuing Change" —must be continually adapted or it becomes
progressively less satisfactory.
• "Increasing Complexity" —its complexity increases unless work is done to
maintain or reduce it.
• "Conservation of Organisational Stability (invariant work rate)" — the
average effective global activity rate in an evolving system is invariant over
the product's lifetime.
• "Continuing Growth" — the functional content of a system must be
continually increased to maintain user satisfaction over its lifetime.
• "Declining Quality" — the quality of a system will appear to be declining
unless it is rigorously maintained and adapted to operational environment
changes.
Programming in the large
Price of being reactive
Programming in the large
Programming in the large
continuity
Effort,
unpredicatability
Complexity
• Complexity reflects the number and nature of entities that comprise
the software, and the number and nature of interactions between
them.
Programming in the large
Programming in the large
Complex
• a complex issue is one in which you can’t get a firm handle on the
parts and there are no rules, algorithms, or natural laws.
• "Things that are complex have no such degree of order, control, or
predictability"
• A complex thing is much more challenging--and different--than the
sum of its parts, because its parts can interact in unpredictable ways.
Programming in the large
Complicated
• "the components can be separated and dealt with in a systematic
and logical way that relies on a set of rules or algorithms.”
• allows you to deal with it in a repeatable manner.
Size | Nature Simple Complex Complicated
small ✓
large ✓ ✓
complicated
• order, control, predictability
• rules, algorithms, laws, recipes
Complicatedness
• “Liberties constrain, constraints liberate”
Programming in the large
goal of programming in the large
• Make system “complicated” instead of being complex
complexity
• Inherent needs to be managed
• Accidental needs to be reduced/eliminated
perspective
• programming properly should be regarded as an activity by which the
programmers form or achieve a certain kind of insight, a theory, of
the matters at hand. This suggestion is in contrast to what appears to
be a more common notion, that programming should be regarded as
a production of a program and certain other texts.” - Peter Naur
perspective
• programming properly should be regarded as an activity by which the
programmers form or achieve a certain kind of insight, a theory, of
the matters at hand. This suggestion is in contrast to what appears to
be a more common notion, that programming should be regarded as
a production of a program and certain other texts.” -Peter Naur
Problem solving
• apply the model
• create/change/delete the model
When you drive
• apply the model
• create/change/delete the model
Programming in the large
• apply the model
• create/change/delete the model
Programming in the large
Programming in the large
Models allow us to deal with new situations
• They expedite reasoning
• “seems like pub-sub system”
• “looks like a bounded buffer”
• “it’s going to be master slave system”
Model
• General idea behind many specific ones
• People remember abstractions
experiments
multiplication
That vs How
• 5 * 6 => knowing that
• 47 * 78 => knowing how
• knowing that doesn’t scale
• knowing how scales
• People remember methods/mechanisms
• “will use a builder”
• “will wrap that in a optional”
• “will use a circuit breaker”
• Theories “compress” knowledge.
• int relationshipStatus
• Enum RelationShipStatus { Single, Married, Divorced}
struct Stack {
int top;
unsigned capacity;
int* array;
};
void push(struct Stack* stack, int item)
{
if (isFull(stack))
return;
stack->array[++stack->top] = item;
}
int pop(struct Stack* stack)
{
if (isEmpty(stack))
return INT_MIN;
return stack->array[stack->top--];
}
class Stack {
private int top;
private int a[] =
public boolean push(int x)
{
}
public int pop()
{
}
Programming in the large
• Anti pattern: Primitive obsession, Procedural Programming, Beans
Bad practice
• Anemic Domain Model
• “ domain model where the domain objects contain little or
no business logic (validations, calculations, business rules etc.)”
• 39865 / 17
Programming in the large
Programming in the large
• composability
• On the criteria to be used in decomposing systems into
modules David L Parnas, 1971
• “that it is almost always incorrect to begin the decomposition of a
system into modules on the basis of a flowchart”
“axis of change”
• “We propose instead that one begins with a list of difficult design
decisions or design decisions which are likely to change.
• Each module is then designed to hide such a decision from the
others”
• Bad practice: controller based decomposition
Categories of models
Domain Solution
RDD
Design patterns
Architecture Styles
Coding Styles
Math, Logic
Logic
Set Theory
Discrete Maths
Category Theory
Infrastructure
Concurrency Model,
Process model
Database, Event Queue, Data Structures
Distributed Systems
• Models should be filtered, precise, compressed and organized
perceptions of knowledge.
Programming in the large
Inspiration of models
• Theory | Story | Observation| Math | Metaphor
CRC
• Model for reasoning about objects/classes
• Identify a class’s
• responsibilities
• collaborations
Responsibility Driven Design
• objects play specific roles and occupy well-known positions.
• community of objects.
• Each object is accountable for a specific portion of the work.
• Objects collaborate in clearly-defined ways.
Responsibility Driven Design
• object(class)’s role determines its responsibility
Stereotypes
Information holder
Structurer
Coordinator
Controller
Interfacer
Service provider
Control styles
• Centralized control style
• Delegated control style
• Clustered control style
• Dispersed control style
• Preferred control style
RDD: #1 :MVCRDD #1
MVC
• Model: manages the data, logic and rules of the application.
• View: output representation of information
• Controller: accepts input and converts it to commands for the model
or view
RDD: #2 EBI
• How to design the model
• Entity : Represent the business objects and contain business logic
• Boundary: model the interface with the system
• Interactor: Use case
Programming in the large
RDD: Clean
Architecture
• The outer circles are mechanisms. The inner circles are policies.
• The overriding rule that makes this architecture work is The
Dependency Rule. This rule says that source code dependencies can
only point inwards. Nothing in an inner circle can know anything at all
about something in an outer circle.
• Independent of Frameworks.
• Testable. The business rules can be tested without the UI, Database,
Web Server, or any other external element.
• Independent of UI.
• Independent of Database. Your business rules are not bound to the
database.
• Independent of any external agency.
Domain Driven Design
• Entity
• Value object
• Domain Event
• Service
• Factory
• Repository
Clean
Architecture
complex
complicated
Bounded Context
Programming in the large
Programming in the large
Programming in the large
Partially applied Abstractions
Patterns
Architectural Styles
Structure
Component-based
Monolithic application
Layered
Pipes and filters
Shared memory
Database-centric
Blackboard
Rule-based
Messaging
Event-driven aka implicit invocation
Publish-subscribe
Asynchronous messaging
Adaptive systems
Plug-ins
Microkernel
Reflection
Domain specific languages
Distributed systems
Client-server (2-tier, 3-tier, n-tier exhibit this style)
Shared nothing architecture
Space-based architecture
Object request broker
Peer-to-peer
Representational state transfer (REST)
Service-oriented
Cloud computing patterns

More Related Content

PPTX
Oo concepts and class modeling
PPT
Hasthi talk at ICWS 2009
PDF
11 Aggressive Ideas About Configuration Management
PPTX
Enterprise Software Development Patterns
PDF
Using systems approaches to manage change in complex and turbulent environme...
PPTX
Software Development: Beyond Training wheels
PPT
Best practices for agile design
PPT
Arch factory - Agile Design: Best Practices
Oo concepts and class modeling
Hasthi talk at ICWS 2009
11 Aggressive Ideas About Configuration Management
Enterprise Software Development Patterns
Using systems approaches to manage change in complex and turbulent environme...
Software Development: Beyond Training wheels
Best practices for agile design
Arch factory - Agile Design: Best Practices

Similar to Programming in the large (20)

PPT
Unified Modeling Language (UML)
PPTX
Powerful software linkedin
PDF
Excavating the knowledge of our ancestors
PPTX
Building Maintainable PHP Applications.pptx
PPTX
Clean code presentation
PPT
Domain Driven Design (DDD)
PPTX
Large Components in the Rearview Mirror
PDF
The 360 Developer
PPTX
Domain Driven Design
PDF
Structured Software Design
PDF
Sioux Hot-or-Not: Domain Driven Design (Edwin Van Dillen)
PPTX
2015.01.09 - Writing Modern Applications for Mobile and Web
PPTX
Finding balance of DDD while your application grows
PDF
Designing Object Oriented Software - lecture slides 2013
PPT
Importance Of Being Driven
PPTX
Software Engineering Primer
PPTX
GoF Design patterns I: Introduction + Structural Patterns
PPTX
Software Design
PDF
Clean code
PPTX
Domain Driven Design - garajco Education 2017
Unified Modeling Language (UML)
Powerful software linkedin
Excavating the knowledge of our ancestors
Building Maintainable PHP Applications.pptx
Clean code presentation
Domain Driven Design (DDD)
Large Components in the Rearview Mirror
The 360 Developer
Domain Driven Design
Structured Software Design
Sioux Hot-or-Not: Domain Driven Design (Edwin Van Dillen)
2015.01.09 - Writing Modern Applications for Mobile and Web
Finding balance of DDD while your application grows
Designing Object Oriented Software - lecture slides 2013
Importance Of Being Driven
Software Engineering Primer
GoF Design patterns I: Introduction + Structural Patterns
Software Design
Clean code
Domain Driven Design - garajco Education 2017
Ad

More from Naveenkumar Muguda (10)

PPTX
Ads quality
PPTX
Components: An overlooked abstraction
PPTX
Yin Yangs of Software Development
PPTX
Abstract Algebra and Category Theory
PPTX
Invariants & inversions
PPTX
Functional Programming, simplified
PPTX
Log* with Cassandra
PDF
Refactoring et al
PDF
System design
Ads quality
Components: An overlooked abstraction
Yin Yangs of Software Development
Abstract Algebra and Category Theory
Invariants & inversions
Functional Programming, simplified
Log* with Cassandra
Refactoring et al
System design
Ad

Recently uploaded (20)

PPT
Mechanical Engineering MATERIALS Selection
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
Geodesy 1.pptx...............................................
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
Digital Logic Computer Design lecture notes
PPTX
OOP with Java - Java Introduction (Basics)
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
composite construction of structures.pdf
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
web development for engineering and engineering
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
PPT on Performance Review to get promotions
Mechanical Engineering MATERIALS Selection
Foundation to blockchain - A guide to Blockchain Tech
Model Code of Practice - Construction Work - 21102022 .pdf
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Geodesy 1.pptx...............................................
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Digital Logic Computer Design lecture notes
OOP with Java - Java Introduction (Basics)
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
Operating System & Kernel Study Guide-1 - converted.pdf
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
composite construction of structures.pdf
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
web development for engineering and engineering
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPT on Performance Review to get promotions

Programming in the large

  • 1. Programming in the large Naveen Muguda
  • 2. Two kinds of medicines • Over the counter • Prescription
  • 4. programming in small • activity of writing a small program. • Small programs are typified by being small in terms of their source code size, • are easy to specify, quick to code and typically perform one task or a few very closely related tasks very well.
  • 5. • Programming in the large • by larger groups of people or by smaller groups over longer time periods • program changes can become difficult • If a change operates across module boundaries, the work of many people may need re-doing.
  • 6. Laws of Software Evolution • An E-program is written to perform some real-world activity; • how it should behave is strongly linked to the environment in which it runs, • needs to adapt to varying requirements and circumstances in that environment
  • 7. Laws of Software Evolution • "Continuing Change" —must be continually adapted or it becomes progressively less satisfactory. • "Increasing Complexity" —its complexity increases unless work is done to maintain or reduce it. • "Conservation of Organisational Stability (invariant work rate)" — the average effective global activity rate in an evolving system is invariant over the product's lifetime. • "Continuing Growth" — the functional content of a system must be continually increased to maintain user satisfaction over its lifetime. • "Declining Quality" — the quality of a system will appear to be declining unless it is rigorously maintained and adapted to operational environment changes.
  • 9. Price of being reactive
  • 13. • Complexity reflects the number and nature of entities that comprise the software, and the number and nature of interactions between them.
  • 16. Complex • a complex issue is one in which you can’t get a firm handle on the parts and there are no rules, algorithms, or natural laws. • "Things that are complex have no such degree of order, control, or predictability" • A complex thing is much more challenging--and different--than the sum of its parts, because its parts can interact in unpredictable ways.
  • 18. Complicated • "the components can be separated and dealt with in a systematic and logical way that relies on a set of rules or algorithms.” • allows you to deal with it in a repeatable manner.
  • 19. Size | Nature Simple Complex Complicated small ✓ large ✓ ✓
  • 20. complicated • order, control, predictability • rules, algorithms, laws, recipes
  • 23. goal of programming in the large • Make system “complicated” instead of being complex
  • 24. complexity • Inherent needs to be managed • Accidental needs to be reduced/eliminated
  • 25. perspective • programming properly should be regarded as an activity by which the programmers form or achieve a certain kind of insight, a theory, of the matters at hand. This suggestion is in contrast to what appears to be a more common notion, that programming should be regarded as a production of a program and certain other texts.” - Peter Naur
  • 26. perspective • programming properly should be regarded as an activity by which the programmers form or achieve a certain kind of insight, a theory, of the matters at hand. This suggestion is in contrast to what appears to be a more common notion, that programming should be regarded as a production of a program and certain other texts.” -Peter Naur
  • 27. Problem solving • apply the model • create/change/delete the model
  • 28. When you drive • apply the model • create/change/delete the model
  • 29. Programming in the large • apply the model • create/change/delete the model
  • 32. Models allow us to deal with new situations • They expedite reasoning
  • 33. • “seems like pub-sub system” • “looks like a bounded buffer” • “it’s going to be master slave system”
  • 34. Model • General idea behind many specific ones • People remember abstractions
  • 36. That vs How • 5 * 6 => knowing that • 47 * 78 => knowing how
  • 37. • knowing that doesn’t scale • knowing how scales • People remember methods/mechanisms
  • 38. • “will use a builder” • “will wrap that in a optional” • “will use a circuit breaker”
  • 40. • int relationshipStatus • Enum RelationShipStatus { Single, Married, Divorced}
  • 41. struct Stack { int top; unsigned capacity; int* array; }; void push(struct Stack* stack, int item) { if (isFull(stack)) return; stack->array[++stack->top] = item; } int pop(struct Stack* stack) { if (isEmpty(stack)) return INT_MIN; return stack->array[stack->top--]; }
  • 42. class Stack { private int top; private int a[] = public boolean push(int x) { } public int pop() { }
  • 44. • Anti pattern: Primitive obsession, Procedural Programming, Beans
  • 45. Bad practice • Anemic Domain Model • “ domain model where the domain objects contain little or no business logic (validations, calculations, business rules etc.)”
  • 50. • On the criteria to be used in decomposing systems into modules David L Parnas, 1971 • “that it is almost always incorrect to begin the decomposition of a system into modules on the basis of a flowchart”
  • 51. “axis of change” • “We propose instead that one begins with a list of difficult design decisions or design decisions which are likely to change. • Each module is then designed to hide such a decision from the others”
  • 52. • Bad practice: controller based decomposition
  • 53. Categories of models Domain Solution RDD Design patterns Architecture Styles Coding Styles Math, Logic Logic Set Theory Discrete Maths Category Theory Infrastructure Concurrency Model, Process model Database, Event Queue, Data Structures Distributed Systems
  • 54. • Models should be filtered, precise, compressed and organized perceptions of knowledge.
  • 56. Inspiration of models • Theory | Story | Observation| Math | Metaphor
  • 57. CRC • Model for reasoning about objects/classes • Identify a class’s • responsibilities • collaborations
  • 58. Responsibility Driven Design • objects play specific roles and occupy well-known positions. • community of objects. • Each object is accountable for a specific portion of the work. • Objects collaborate in clearly-defined ways.
  • 59. Responsibility Driven Design • object(class)’s role determines its responsibility
  • 61. Control styles • Centralized control style • Delegated control style • Clustered control style • Dispersed control style • Preferred control style
  • 63. MVC • Model: manages the data, logic and rules of the application. • View: output representation of information • Controller: accepts input and converts it to commands for the model or view
  • 64. RDD: #2 EBI • How to design the model • Entity : Represent the business objects and contain business logic • Boundary: model the interface with the system • Interactor: Use case
  • 67. • The outer circles are mechanisms. The inner circles are policies. • The overriding rule that makes this architecture work is The Dependency Rule. This rule says that source code dependencies can only point inwards. Nothing in an inner circle can know anything at all about something in an outer circle.
  • 68. • Independent of Frameworks. • Testable. The business rules can be tested without the UI, Database, Web Server, or any other external element. • Independent of UI. • Independent of Database. Your business rules are not bound to the database. • Independent of any external agency.
  • 69. Domain Driven Design • Entity • Value object • Domain Event • Service • Factory • Repository
  • 79. Architectural Styles Structure Component-based Monolithic application Layered Pipes and filters Shared memory Database-centric Blackboard Rule-based Messaging Event-driven aka implicit invocation Publish-subscribe Asynchronous messaging Adaptive systems Plug-ins Microkernel Reflection Domain specific languages Distributed systems Client-server (2-tier, 3-tier, n-tier exhibit this style) Shared nothing architecture Space-based architecture Object request broker Peer-to-peer Representational state transfer (REST) Service-oriented Cloud computing patterns