agile and automation conclave 2018 · 2018. 7. 3. · agile and automation conclave 2018...
TRANSCRIPT
AGILE AND AUTOMATION CONCLAVE 2018
Applied Design PatternsA Compiler Case StudyGanesh Samarthyam
CodeOps Technologies LLP
Agile and Automation Conclave 2018
• Entrepreneur – Co-founder, CodeOps technologies• Book Author – “Refactoring for Software Design
Smells” (translated to languages like Chinese & Korean)
• Community Contributor – Organizer of popular tech meetups & conferences
• Simple Programmer – That’s the day job! J
Agile and Automation Conclave 2018
Design PatternsDeveloper view on design patterns is surprisingly polarizing: • Some swear by its usefulness • Some find it really complicated or outdated or
irrelevant for modern software development • Most are clueless about how to apply them
for creating effective designs!
Agile and Automation Conclave 2018
Compiler Case Study: What you need to know
• Understand essential object oriented constructs such as runtime polymorphism (virtual functions), and principles (such as encapsulation)
• Know essential C# or Java language features - classes, inheritance, etc.
• Data structures and algorithms (especially binary trees, tree traversals, and stacks)
• NO background in compilers needed • Extremely simplified compiler code example; purposefully done to make best
use of this case study
Agile and Automation Conclave 2018
Let’s Just Code!
Image Source: https://pixabay.com/en/code-geek-talk-code-to-me-coffee-cup-2680204/ (CC0 No Attribution Required)
Agile and Automation Conclave 2018
Switch-case to runtime polymorphism
Agile and Automation Conclave 2018
Simplify object creation
Agile and Automation Conclave 2018
Reuse “fine-grained” objects
Agile and Automation Conclave 2018
Externalizing iteration concern
Agile and Automation Conclave 2018
Isolating platform dependencies
Agile and Automation Conclave 2018
Isolating platform dependencies
Agile and Automation Conclave 2018
Primitives to objects
Agile and Automation Conclave 2018
Switch-case for operations
Agile and Automation Conclave 2018
Isolating platform dependencies
Agile and Automation Conclave 2018
Key Technical Points
Design patterns are quite relevant for Agile development
The key to effective design is to apply design principles
Design patterns result from proactively applying design principles
Often design patterns emerge naturally when refactoring smells
Agile and Automation Conclave 2018
Supporting Source Code • https://github.com/CodeOpsTech/CompilerDesignPatternsCSharp (C# examples) • https://github.com/CodeOpsTech/DesignPatternsJava (Java examples)
Agile and Automation Conclave 2018
Q&A
Agile and Automation Conclave 2018
FOLLOW USLinkedIn – SolutionsIQ India | Twitter – SIQIndia | Facebook – SolutionsIQ India
Ganesh [email protected]