SlideShare una empresa de Scribd logo
1 de 72
Descargar para leer sin conexión
Software engineering
essentials
A primer
Bio
● 16+ years IT stuff
● 1981 - 2011 in Germany
● since 21.07.2011 in Brazil, married, 2 sons
Currently
● Head of Innovation, Dafiti
● IT Consultant, independent
Contact
● Twitter (follow me for mostly geek stuff): https://twitter.com/georg.buske
echo -n $(whoami); Georg.Buske
Today’s topics (not agenda)
● Process and team organization
○ Agile - what's all about?
○ Small projects VS. large scale projects
○ Real world examples of important IT guidelines in an enterprise
● Software Design & Architecture
○ Clean Code - an evergreen in Software Development
○ abbreviations you need to know: DDD, TDD, KISS, DRY, YAGNI, SOLID
○ A deeper look into the meaning of…
Disclaimer(s)
● Slides in english, talk in portuguese
● This is in no means a deep dive - a primer
○ We will cover a lot of stuff
○ Each topic could easily fill its own talk (or workshop)
○ There is no shortcut
● Slides will be available afterwards
Process and team organization
Fact: There is no real difference
Everything of the talk can be applied to small and big [software] projects [and
products]
Wait, there is “really small”:
● < 3 developers on a private project or something you own
● then it is OK to ignore a lot of topics
● Use at least a VCS, like Git (even you are working alone, source control
makes your life easier)
Small projects VS. large scale projects
Try to split large projects into a lot of small ones!
E.g. Amazon has 2 Pizza teams
Average team size in other tech companies is between 3 - 10 (which is already a
lot!)
Communication paths by team size
Source: https://www.solutionsiq.com/learning/blog-post/lines-of-communication/
Agile - what's all about?
Agile Manifesto
Different ways of being agile: Scrum
Scrum, quite old: 1993
“Real scrum” has more than 30 rules
Because of this technically a lot of companies are doing “ScrumBut”
But this is fine, as long as we are efficient
Some important aspects of Scrum:
Prioritized Backlog
Timeboxed Sprints (Work organized and delivered in Sprints, e.g. always 2 weeks,
no changes) -> deliver value
Scrum
Roles:
● scrum master
● product owner
● participants (qa, devs)
Meetings:
● Daily (same place, same time, everyday)
● Retrospective (what was good, what was bad in the last Sprint)
● Planning (what we can accomplish next Sprint)
Different ways of being agile: Kanban
● part of lean movement (popularized by toyota, 1940s/1950s)
● Less rules than Scrum, important aspects:
○ Visualize (KanbanBoard)
○ limit WIP
○ optimize value streams
○ Implement Feedback loops
Different ways of being agile: XP
● extreme programming framework
● by Kent Beck (also creator of TDD)
● First used in C3 (Chrysler Comprehensive Compensation project) - Kent
Beck, Martin Fowler
● “XP was one of the first agile methods, indeed XP was the dominant agile
method in the late 90s and early 00s before Scrum became dominant”
● Contains:
○ Continuous Integration
○ Refactoring
Real world examples of important IT
guidelines in an enterprise
Why is it important?
● Consistency
● Best practices (we know it works)
● blueprint / howto for everyone (new and old), everybody knows how to do
something
● Standard (from Wikipedia): established norm, specification, system of market
dominance
● Guideline (from Google search): a general rule, principle or piece of advice
Dafiti’s IT Docs...
● General development workflow
● Architecture guidelines
● Ticket guidelines
● Coding standards
○ Style Guide templates
● Logging guidelines
● Commit message standard
● Pull request guidelines
Dafiti’s IT Docs...
● Post-mortem template
● DevOps best practices and failure mode
● Change requests
● POCs
● RFCs
● Service guidelines
● Component integration guidelines
● Component testing best practices
Examples
We will opensource our Docs, follow @Dafiti_Tech or me (@georgbuske) on
Twitter if you are interested ;-)
Feedback and Deliver Value
Software Design & Architecture
Design VS. Architecture
Definition
If the Design is the interior, the architecture is the building
Therefore:
Design: The API (how to open the door) how looks the dining room)
Architecture: The Big Picture, high level (this is how the house [or city] looks like)
So in short, Software architecture is more about the design of the entire system,
while software design emphasizes on module / component / class level. (Source:
https://stackoverflow.com/questions/704855/software-design-vs-software-architecture)
Avoid Ivory Tower Architecture
Should there be a dedicated team of Software architectures?
No!
Better:
● committee of senior technologists
● clear set of allowed technologies (tools like Technology Radar:
https://www.thoughtworks.com/radar )
Clean Code - First things first
● Clean Code Book, by Robert “Uncle Bob” Martin
● “Programs must be written for people to read, and only incidentally for
machines to execute.”
○ ― Harold Abelson, Structure and Interpretation of Computer Programs
● “No surprises”
○ ― Ward Cunningham
● “Clean code is a code that is written by someone who cares”
○ ― MIchael Feathers
Clean Code characteristics
● is language independent
● method length
● I should be able to read and understand
● Interfaces
● Error handling
● Boy Scout Rule
○ Always leave the campground cleaner than you found it.
● Unit and acceptance tests
Naming is hard
There are only two hard things in
Computer Science: cache invalidation
and naming things.
-- Phil Karlton
An extension
My personal extension
Naming
● this applies to everything: variables, classes, functions, interfaces - even
repository names
● Rule: Use Intention-Revealing Names
● Rule: Avoid Disinformation
○ E.g. IP as variable name for Identity Provider
● Rule: Make meaningful Distinctions
○ ProductInfo and ProductData
● Classes: Nouns
Naming Examples
SOLID
● subset of clean code
● 5 principles
○ Single Responsibility Principle
○ Open Close Principle
○ Liskov Substitution Principle
○ Interface Segregation Principle
○ Dependency Inversion Principle
Single Responsibility Principle
Cohesion, a class should have only a single responsibility
Should be changed for only one reason
minimal and does one thing good (cf. Unix philosophy) and least possible
dependencies
Open Closed Principle
software entities should be open for extension, but closed for modification
Liskov Substitution Principle
Objects in a program should be replaceable with instances of their subtypes
without altering the correctness of that program
Interface Segregation Principle
Many client specific interfaces are better than one big one
Dependency Inversion Principle
One should depend upon abstractions, not concretions
A.High-level modules should not depend on low-level modules. Both should
depend on abstractions.
B.Abstractions should not depend on details. Details should depend on
abstractions.
Example Patterns: Plugin, ServiceLocator, Dependency Injection -> Inversion of
control
KISS = Keep it simple, stupid
● no overly complex solutions
● straightforward is often easier, cleaner and better to understand
● if you do TDD, this helps
● code duplication is bad [copy paste]
● now, this can conflict with microservices (more on microservices later)
DRY = Don’t repeat yourself
YAGNI = You ain’t gonna need it
very close related to KISS
For example: unnecessary complexity
Except you are writing library code probably don't need to add 4 different types of
authentication methods (Strategies, Adapters) - if there is the requirement to
change, it is often long-term
DDD = Domain Driven Design
● term coined by Eric Evans
● focus on problem domain
● Combines lots of best
practices and patterns
○ Refactoring
○ Continuous Integration
Context mapping & bounded contexts
● Core domain, generic subdomain, supporting domain
○ Best forces on most important part of the system (your product’s USP), core domains
○ Generic subdomains could be bought off-the-shelf
Ubiquitous language
● Everyone in team has the same vocabulary
Tactical Patterns
● Entities
○ Has identity
● Aggregate Roots
○ Are the entry points
● Value Objects
○ Immutable
● Repositories
○ Data Layer
TDD = Test Driven Development
Test Driven Development
● Red - green - refactor
● test first development (unit testing)
● write failing test, implement, refactor, iterate
● you can certainly test after, but advantages for test first are focus on features
● evolving and iterative design, to achieve KISS, DRY and YAGNI
Bonus: SOA = Service Oriented
Architecture
SOA is a kind of 20 year old concept
● Boundaries are explicit
● Services are autonomous (Microservice extension: Can be deployed
independent)
● Services share schema and contract, not class
● Service compatibility is based on policy
And nowadays, everybody calls it “Microservices”
This is now not 100 % accurate, but generally speaking Microservices are an old
SOA and Microservices
A deeper look into the meaning of:
make it work make it right make it fast
What does it mean?
● Remember TDD Cycle: make it work, make it right
○ test pass - refactor - nice API
● And then: performance (make it fast)
○ profiling bottlenecks, optimize code
● And sometimes this is not enough...
● make it work, make it right, make it fast, make it scale, make it again -
lifecycle in #softwaredevelopment
○ Google: Design for 10fold, rewrite for 2 orders of magnitude...
Anti patterns
● Big Ball of Mud: A system with no recognizable structure
● Cargo Cult Programming: Using patterns and methods without understanding
why
● Accidental complexity: Programming tasks which could be eliminated with
better tools (as opposed to essential complexity inherent in the problem being
solved)
● Dependency hell: Problems with versions of required products
And much more: https://en.wikipedia.org/wiki/Anti-pattern
● I found the silver bullet: There is no silver bullet
● The wrong abstractions: Better RY than the wrong abstraction!
● Being “too clever”: Better clear than clever (sometimes weird and
Communication and maintainability
Final thoughts
Life is about trade-offs
● Do you test? How much do you test?
○ Good discussion about TDD and trade-offs Kent Beck, David Heinemeier Hansson, and Kent
Beck (Is TDD Dead? https://martinfowler.com/articles/is-tdd-dead/ )
● We need to refactor X, but we need feature Y.
● This won’t perform good when we have more users.
● As technologists we want to use cool tech, as employees we need to deliver
value as well
Language recommendations
● Master at least one language
● proficiency (Dreyfus) in a language is nothing one can accomplish in a month
or a year
○ 10 years to learn a language is a good time frame (Peter Norvig): http://norvig.com/21-
days.html
● Stay up-to-date and look into new languages and paradigms: TIOBE Top 50 (
https://www.tiobe.com/tiobe-index/ ) is a good place to look for
● Read papers about algorithms and concepts that matter to you (good sources
are Google Scholar, https://arxiv.org/ or https://blog.acolyer.org/ )
Book recommendations
● Coders at Work (Peter Seibel)
● Clean Code (Robert Martin)
● Working Effectively with Legacy Code (Michael Feathers)
● Domain Driven Design (Eric Evans)
● The Phoenix Project (Gene Kim, George Spafford, and Kevin Behr)
● Mythical Man Month (Fred Brooks)
● Release It! (Michael T. Nygard)
● Building Microservices: Designing Fine-Grained Systems (Sam Newman)
Book recommendations
● Design Patterns (GoF) (Erich Gamma, John Vlissides, Ralph Johnson, and
Richard Helm)
● Enterprise patterns for Application Architecture (Martin Fowler)
● How Google Tests Software (James A. Whittaker, Jason Arbon, and Jeff
Carollo)
● Implementing Domain Driven Design (Vaughn Vernon)
● Beyond Blame (Dave Zwieback)
● 7 languages in 7 weeks (Bruce Tate)
Book recommendations
● 97 Things Every Software Architect Should Know (Richard Monson-Haefel)
● Data Science from Scratch (Joel Grus)
● Building Scalable Websites (Cal Henderson)
○ Some topics might be a bit outdated in the era of Cloud and SaaS, though a lot of good topics
if you are working on websites
● Pragmatic Thinking and Learning: Refactor Your Wetware (Andy Hunt)
● Introduction to Algorithms (Charles E. Leiserson, Clifford Stein, Ronald
Rivest, and Thomas H. Cormen)
● Refactoring (Martin Fowler)
Recap
Communication
Fast Feedback
Continuous Improvement (also live-long learning)
Every Rule has its exception
your mileage may vary
@Dafiti_Tech is hiring…
Want to work in Sao Paulo? Or know
some friend?
Thank you!
Q & A

Más contenido relacionado

Similar a Software Engineering Primer

Evolutionary Design - NewCrafts Paris 18 May 2018
Evolutionary Design - NewCrafts Paris 18 May 2018Evolutionary Design - NewCrafts Paris 18 May 2018
Evolutionary Design - NewCrafts Paris 18 May 2018Adi Bolboaca
 
DockerCon US 2016 - Scaling Open Source operations
DockerCon US 2016 - Scaling Open Source operationsDockerCon US 2016 - Scaling Open Source operations
DockerCon US 2016 - Scaling Open Source operationsArnaud Porterie
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia eventXebia India
 
Software Craftmanship - Cours Polytech
Software Craftmanship - Cours PolytechSoftware Craftmanship - Cours Polytech
Software Craftmanship - Cours Polytechyannick grenzinger
 
Keeping code clean
Keeping code cleanKeeping code clean
Keeping code cleanBrett Child
 
From class to architecture
From class to architectureFrom class to architecture
From class to architectureMarcin Hawraniak
 
The working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор ТурскийThe working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор ТурскийSigma Software
 
The working architecture of node js applications open tech week javascript ...
The working architecture of node js applications   open tech week javascript ...The working architecture of node js applications   open tech week javascript ...
The working architecture of node js applications open tech week javascript ...Viktor Turskyi
 
A DevOps Checklist for Startups
A DevOps Checklist for StartupsA DevOps Checklist for Startups
A DevOps Checklist for StartupsRick Manelius
 
We Need to Talk: How Communication Helps Code
We Need to Talk: How Communication Helps CodeWe Need to Talk: How Communication Helps Code
We Need to Talk: How Communication Helps CodeDocker, Inc.
 
Tackle Your Everyday Business Problems Like an Architect, Melissa Shepard
Tackle Your Everyday Business Problems Like an Architect, Melissa ShepardTackle Your Everyday Business Problems Like an Architect, Melissa Shepard
Tackle Your Everyday Business Problems Like an Architect, Melissa ShepardCzechDreamin
 
Labeling all the Things with the WDI Skill Labeler
Labeling all the Things with the WDI Skill Labeler Labeling all the Things with the WDI Skill Labeler
Labeling all the Things with the WDI Skill Labeler Kwame Porter Robinson
 
Large drupal site builds a workshop for sxsw interactive - march 17, 2015
Large drupal site builds   a workshop for sxsw interactive - march 17, 2015Large drupal site builds   a workshop for sxsw interactive - march 17, 2015
Large drupal site builds a workshop for sxsw interactive - march 17, 2015rgristroph
 
Managing software projects & teams effectively
Managing software projects & teams effectivelyManaging software projects & teams effectively
Managing software projects & teams effectivelyAshutosh Agarwal
 
The essentials of the IT industry or What I wish I was taught about at Univer...
The essentials of the IT industry or What I wish I was taught about at Univer...The essentials of the IT industry or What I wish I was taught about at Univer...
The essentials of the IT industry or What I wish I was taught about at Univer...Equal Experts
 
Extreme Programming (XP): Revisted
Extreme Programming (XP): RevistedExtreme Programming (XP): Revisted
Extreme Programming (XP): RevistedMike Harris
 

Similar a Software Engineering Primer (20)

Evolutionary Design - NewCrafts Paris 18 May 2018
Evolutionary Design - NewCrafts Paris 18 May 2018Evolutionary Design - NewCrafts Paris 18 May 2018
Evolutionary Design - NewCrafts Paris 18 May 2018
 
DockerCon US 2016 - Scaling Open Source operations
DockerCon US 2016 - Scaling Open Source operationsDockerCon US 2016 - Scaling Open Source operations
DockerCon US 2016 - Scaling Open Source operations
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia event
 
Software Craftmanship - Cours Polytech
Software Craftmanship - Cours PolytechSoftware Craftmanship - Cours Polytech
Software Craftmanship - Cours Polytech
 
Pusheando en master, que es gerundio
Pusheando en master, que es gerundioPusheando en master, que es gerundio
Pusheando en master, que es gerundio
 
Keeping code clean
Keeping code cleanKeeping code clean
Keeping code clean
 
What is xp
What is xpWhat is xp
What is xp
 
From class to architecture
From class to architectureFrom class to architecture
From class to architecture
 
The working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор ТурскийThe working architecture of NodeJS applications, Виктор Турский
The working architecture of NodeJS applications, Виктор Турский
 
The working architecture of node js applications open tech week javascript ...
The working architecture of node js applications   open tech week javascript ...The working architecture of node js applications   open tech week javascript ...
The working architecture of node js applications open tech week javascript ...
 
A DevOps Checklist for Startups
A DevOps Checklist for StartupsA DevOps Checklist for Startups
A DevOps Checklist for Startups
 
We Need to Talk: How Communication Helps Code
We Need to Talk: How Communication Helps CodeWe Need to Talk: How Communication Helps Code
We Need to Talk: How Communication Helps Code
 
Tackle Your Everyday Business Problems Like an Architect, Melissa Shepard
Tackle Your Everyday Business Problems Like an Architect, Melissa ShepardTackle Your Everyday Business Problems Like an Architect, Melissa Shepard
Tackle Your Everyday Business Problems Like an Architect, Melissa Shepard
 
Better java with design
Better java with designBetter java with design
Better java with design
 
Labeling all the Things with the WDI Skill Labeler
Labeling all the Things with the WDI Skill Labeler Labeling all the Things with the WDI Skill Labeler
Labeling all the Things with the WDI Skill Labeler
 
Large drupal site builds a workshop for sxsw interactive - march 17, 2015
Large drupal site builds   a workshop for sxsw interactive - march 17, 2015Large drupal site builds   a workshop for sxsw interactive - march 17, 2015
Large drupal site builds a workshop for sxsw interactive - march 17, 2015
 
Open Source in Real Life
Open Source in Real LifeOpen Source in Real Life
Open Source in Real Life
 
Managing software projects & teams effectively
Managing software projects & teams effectivelyManaging software projects & teams effectively
Managing software projects & teams effectively
 
The essentials of the IT industry or What I wish I was taught about at Univer...
The essentials of the IT industry or What I wish I was taught about at Univer...The essentials of the IT industry or What I wish I was taught about at Univer...
The essentials of the IT industry or What I wish I was taught about at Univer...
 
Extreme Programming (XP): Revisted
Extreme Programming (XP): RevistedExtreme Programming (XP): Revisted
Extreme Programming (XP): Revisted
 

Último

Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfAarwolf Industries LLC
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 

Último (20)

Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdf
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 

Software Engineering Primer

  • 2. Bio ● 16+ years IT stuff ● 1981 - 2011 in Germany ● since 21.07.2011 in Brazil, married, 2 sons Currently ● Head of Innovation, Dafiti ● IT Consultant, independent Contact ● Twitter (follow me for mostly geek stuff): https://twitter.com/georg.buske echo -n $(whoami); Georg.Buske
  • 3. Today’s topics (not agenda) ● Process and team organization ○ Agile - what's all about? ○ Small projects VS. large scale projects ○ Real world examples of important IT guidelines in an enterprise ● Software Design & Architecture ○ Clean Code - an evergreen in Software Development ○ abbreviations you need to know: DDD, TDD, KISS, DRY, YAGNI, SOLID ○ A deeper look into the meaning of…
  • 4. Disclaimer(s) ● Slides in english, talk in portuguese ● This is in no means a deep dive - a primer ○ We will cover a lot of stuff ○ Each topic could easily fill its own talk (or workshop) ○ There is no shortcut ● Slides will be available afterwards
  • 5. Process and team organization
  • 6. Fact: There is no real difference Everything of the talk can be applied to small and big [software] projects [and products] Wait, there is “really small”: ● < 3 developers on a private project or something you own ● then it is OK to ignore a lot of topics ● Use at least a VCS, like Git (even you are working alone, source control makes your life easier) Small projects VS. large scale projects
  • 7. Try to split large projects into a lot of small ones! E.g. Amazon has 2 Pizza teams Average team size in other tech companies is between 3 - 10 (which is already a lot!)
  • 8. Communication paths by team size Source: https://www.solutionsiq.com/learning/blog-post/lines-of-communication/
  • 9. Agile - what's all about?
  • 11. Different ways of being agile: Scrum Scrum, quite old: 1993 “Real scrum” has more than 30 rules Because of this technically a lot of companies are doing “ScrumBut” But this is fine, as long as we are efficient Some important aspects of Scrum: Prioritized Backlog Timeboxed Sprints (Work organized and delivered in Sprints, e.g. always 2 weeks, no changes) -> deliver value
  • 12. Scrum Roles: ● scrum master ● product owner ● participants (qa, devs) Meetings: ● Daily (same place, same time, everyday) ● Retrospective (what was good, what was bad in the last Sprint) ● Planning (what we can accomplish next Sprint)
  • 13. Different ways of being agile: Kanban ● part of lean movement (popularized by toyota, 1940s/1950s) ● Less rules than Scrum, important aspects: ○ Visualize (KanbanBoard) ○ limit WIP ○ optimize value streams ○ Implement Feedback loops
  • 14. Different ways of being agile: XP ● extreme programming framework ● by Kent Beck (also creator of TDD) ● First used in C3 (Chrysler Comprehensive Compensation project) - Kent Beck, Martin Fowler ● “XP was one of the first agile methods, indeed XP was the dominant agile method in the late 90s and early 00s before Scrum became dominant” ● Contains: ○ Continuous Integration ○ Refactoring
  • 15. Real world examples of important IT guidelines in an enterprise
  • 16. Why is it important? ● Consistency ● Best practices (we know it works) ● blueprint / howto for everyone (new and old), everybody knows how to do something ● Standard (from Wikipedia): established norm, specification, system of market dominance ● Guideline (from Google search): a general rule, principle or piece of advice
  • 17. Dafiti’s IT Docs... ● General development workflow ● Architecture guidelines ● Ticket guidelines ● Coding standards ○ Style Guide templates ● Logging guidelines ● Commit message standard ● Pull request guidelines
  • 18. Dafiti’s IT Docs... ● Post-mortem template ● DevOps best practices and failure mode ● Change requests ● POCs ● RFCs ● Service guidelines ● Component integration guidelines ● Component testing best practices
  • 19. Examples We will opensource our Docs, follow @Dafiti_Tech or me (@georgbuske) on Twitter if you are interested ;-)
  • 21. Software Design & Architecture
  • 23. Definition If the Design is the interior, the architecture is the building Therefore: Design: The API (how to open the door) how looks the dining room) Architecture: The Big Picture, high level (this is how the house [or city] looks like) So in short, Software architecture is more about the design of the entire system, while software design emphasizes on module / component / class level. (Source: https://stackoverflow.com/questions/704855/software-design-vs-software-architecture)
  • 24.
  • 25.
  • 26.
  • 27.
  • 28. Avoid Ivory Tower Architecture Should there be a dedicated team of Software architectures? No! Better: ● committee of senior technologists ● clear set of allowed technologies (tools like Technology Radar: https://www.thoughtworks.com/radar )
  • 29. Clean Code - First things first ● Clean Code Book, by Robert “Uncle Bob” Martin ● “Programs must be written for people to read, and only incidentally for machines to execute.” ○ ― Harold Abelson, Structure and Interpretation of Computer Programs ● “No surprises” ○ ― Ward Cunningham ● “Clean code is a code that is written by someone who cares” ○ ― MIchael Feathers
  • 30. Clean Code characteristics ● is language independent ● method length ● I should be able to read and understand ● Interfaces ● Error handling ● Boy Scout Rule ○ Always leave the campground cleaner than you found it. ● Unit and acceptance tests
  • 32. There are only two hard things in Computer Science: cache invalidation and naming things. -- Phil Karlton
  • 35. Naming ● this applies to everything: variables, classes, functions, interfaces - even repository names ● Rule: Use Intention-Revealing Names ● Rule: Avoid Disinformation ○ E.g. IP as variable name for Identity Provider ● Rule: Make meaningful Distinctions ○ ProductInfo and ProductData ● Classes: Nouns
  • 37. SOLID ● subset of clean code ● 5 principles ○ Single Responsibility Principle ○ Open Close Principle ○ Liskov Substitution Principle ○ Interface Segregation Principle ○ Dependency Inversion Principle
  • 38. Single Responsibility Principle Cohesion, a class should have only a single responsibility Should be changed for only one reason minimal and does one thing good (cf. Unix philosophy) and least possible dependencies
  • 39.
  • 40. Open Closed Principle software entities should be open for extension, but closed for modification
  • 41.
  • 42. Liskov Substitution Principle Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program
  • 43.
  • 44. Interface Segregation Principle Many client specific interfaces are better than one big one
  • 45. Dependency Inversion Principle One should depend upon abstractions, not concretions A.High-level modules should not depend on low-level modules. Both should depend on abstractions. B.Abstractions should not depend on details. Details should depend on abstractions. Example Patterns: Plugin, ServiceLocator, Dependency Injection -> Inversion of control
  • 46.
  • 47. KISS = Keep it simple, stupid ● no overly complex solutions ● straightforward is often easier, cleaner and better to understand ● if you do TDD, this helps
  • 48. ● code duplication is bad [copy paste] ● now, this can conflict with microservices (more on microservices later) DRY = Don’t repeat yourself
  • 49. YAGNI = You ain’t gonna need it very close related to KISS For example: unnecessary complexity Except you are writing library code probably don't need to add 4 different types of authentication methods (Strategies, Adapters) - if there is the requirement to change, it is often long-term
  • 50. DDD = Domain Driven Design ● term coined by Eric Evans ● focus on problem domain ● Combines lots of best practices and patterns ○ Refactoring ○ Continuous Integration
  • 51. Context mapping & bounded contexts ● Core domain, generic subdomain, supporting domain ○ Best forces on most important part of the system (your product’s USP), core domains ○ Generic subdomains could be bought off-the-shelf
  • 52. Ubiquitous language ● Everyone in team has the same vocabulary
  • 53. Tactical Patterns ● Entities ○ Has identity ● Aggregate Roots ○ Are the entry points ● Value Objects ○ Immutable ● Repositories ○ Data Layer
  • 54. TDD = Test Driven Development
  • 55. Test Driven Development ● Red - green - refactor ● test first development (unit testing) ● write failing test, implement, refactor, iterate ● you can certainly test after, but advantages for test first are focus on features ● evolving and iterative design, to achieve KISS, DRY and YAGNI
  • 56. Bonus: SOA = Service Oriented Architecture
  • 57. SOA is a kind of 20 year old concept ● Boundaries are explicit ● Services are autonomous (Microservice extension: Can be deployed independent) ● Services share schema and contract, not class ● Service compatibility is based on policy And nowadays, everybody calls it “Microservices” This is now not 100 % accurate, but generally speaking Microservices are an old SOA and Microservices
  • 58. A deeper look into the meaning of: make it work make it right make it fast
  • 59. What does it mean? ● Remember TDD Cycle: make it work, make it right ○ test pass - refactor - nice API ● And then: performance (make it fast) ○ profiling bottlenecks, optimize code ● And sometimes this is not enough... ● make it work, make it right, make it fast, make it scale, make it again - lifecycle in #softwaredevelopment ○ Google: Design for 10fold, rewrite for 2 orders of magnitude...
  • 61. ● Big Ball of Mud: A system with no recognizable structure ● Cargo Cult Programming: Using patterns and methods without understanding why ● Accidental complexity: Programming tasks which could be eliminated with better tools (as opposed to essential complexity inherent in the problem being solved) ● Dependency hell: Problems with versions of required products And much more: https://en.wikipedia.org/wiki/Anti-pattern ● I found the silver bullet: There is no silver bullet ● The wrong abstractions: Better RY than the wrong abstraction! ● Being “too clever”: Better clear than clever (sometimes weird and
  • 64. Life is about trade-offs ● Do you test? How much do you test? ○ Good discussion about TDD and trade-offs Kent Beck, David Heinemeier Hansson, and Kent Beck (Is TDD Dead? https://martinfowler.com/articles/is-tdd-dead/ ) ● We need to refactor X, but we need feature Y. ● This won’t perform good when we have more users. ● As technologists we want to use cool tech, as employees we need to deliver value as well
  • 65. Language recommendations ● Master at least one language ● proficiency (Dreyfus) in a language is nothing one can accomplish in a month or a year ○ 10 years to learn a language is a good time frame (Peter Norvig): http://norvig.com/21- days.html ● Stay up-to-date and look into new languages and paradigms: TIOBE Top 50 ( https://www.tiobe.com/tiobe-index/ ) is a good place to look for ● Read papers about algorithms and concepts that matter to you (good sources are Google Scholar, https://arxiv.org/ or https://blog.acolyer.org/ )
  • 66. Book recommendations ● Coders at Work (Peter Seibel) ● Clean Code (Robert Martin) ● Working Effectively with Legacy Code (Michael Feathers) ● Domain Driven Design (Eric Evans) ● The Phoenix Project (Gene Kim, George Spafford, and Kevin Behr) ● Mythical Man Month (Fred Brooks) ● Release It! (Michael T. Nygard) ● Building Microservices: Designing Fine-Grained Systems (Sam Newman)
  • 67. Book recommendations ● Design Patterns (GoF) (Erich Gamma, John Vlissides, Ralph Johnson, and Richard Helm) ● Enterprise patterns for Application Architecture (Martin Fowler) ● How Google Tests Software (James A. Whittaker, Jason Arbon, and Jeff Carollo) ● Implementing Domain Driven Design (Vaughn Vernon) ● Beyond Blame (Dave Zwieback) ● 7 languages in 7 weeks (Bruce Tate)
  • 68. Book recommendations ● 97 Things Every Software Architect Should Know (Richard Monson-Haefel) ● Data Science from Scratch (Joel Grus) ● Building Scalable Websites (Cal Henderson) ○ Some topics might be a bit outdated in the era of Cloud and SaaS, though a lot of good topics if you are working on websites ● Pragmatic Thinking and Learning: Refactor Your Wetware (Andy Hunt) ● Introduction to Algorithms (Charles E. Leiserson, Clifford Stein, Ronald Rivest, and Thomas H. Cormen) ● Refactoring (Martin Fowler)
  • 70. Every Rule has its exception your mileage may vary
  • 71. @Dafiti_Tech is hiring… Want to work in Sao Paulo? Or know some friend?