Over the lifetime of a product, maintaining the product is actually one - if not the most - expensive area(s) of the overall product costs. Writing clean code can significantly lower these costs. However, writing clean code also makes you more efficient during the initial development time and results in more stable code. You will be presented design patterns and best practices which will make you write better and more easily maintainable code, seeing code in a holistic way. You will learn how to apply them by using an existing implementation as the starting point of the presentation. Finally, patterns & practices benefits are explained.
Clean Code Part I - Design Patterns at SoCal Code CampTheo Jungeblut
Within this session you will learn and/or refresh the most important architectural design pattern and best practices to write better code. These patterns and practices build the foundation for writing maintainable application. More advances techniques like Inversion of Control and Dependency Injection are discussed in detail in the 2nd Clean Code presentation.
All 3 Clean Code presentations provide great value by themselves, but taken together are designed to offer a holistic approach to successful software creation. This first session creates the foundation for the 2nd Clean Code presentation on Dependency Injection, as it explains expected base knowledge.
Why writing Clean Code makes us more efficient
Over the lifetime of a product, maintaining the product is actually one - if not the most - expensive area(s) of the overall product costs. Writing clean code can significantly lower these costs. However, writing clean code also makes you more efficient during the initial development time and results in more stable code. You will be presented design patterns and best practices which will make you write better and more easily maintainable code, seeing code in a holistic way. You will learn how to apply them by using an existing implementation as the starting point of the presentation. Finally, patterns & practices benefits are explained.
This presentation is based on C# and Visual Studio 2010. However, the demonstrated patterns and practice can be applied to every other programming language too.
Clean Code Part III - Craftsmanship at SoCal Code CampTheo Jungeblut
When building a house, good architecture and craftsmanship together form the needed crucial elements for success. The same pattern applies to software development. As the previous sessions focused on the architectural part of software development, this session will strongly focus on often forgotten but very important areas of coding.
You will learn why naming is really difficult if done right, why coding and style guidelines are crucial, code structuring, exception handling and why other elements of coding often define the tipping point between success and failure of projects. Following the principles of software craftsmanship will allow you to end up with better maintainability and extensibility of your software and the success of the project in the end.
All 3 Clean Code presentations provide great value by themselves, but taken together are designed to offer a holistic approach to successful software creation.
Why writing Clean Code makes us more efficient
Over the lifetime of a product, maintaining the product is actually one - if not the most - expensive area(s) of the overall product costs. Writing clean code can significantly lower these costs. However, writing clean code also makes you more efficient during the initial development time and results in more stable code. You will be presented design patterns and best practices which will make you write better and more easily maintainable code, seeing code in a holistic way. You will learn how to apply them by using an existing implementation as the starting point of the presentation. Finally, patterns & practices benefits are explained.
This presentation is based on C# and Visual Studio 2010. However, the demonstrated patterns and practice can be applied to every other programming language too.
The document summarizes a presentation given by Theo Jungeblut on the topic of clean code. It discusses why clean code is important for maintainability. It also provides an overview of tools like Resharper, FxCop, StyleCop, GhostDoc and Code Contracts that can help write clean code. Principles of clean code like KISS, DRY, SoC and patterns like dependency injection are explained. The presentation emphasizes that maintainability is key to preventing code from bringing a development organization to its knees.
Clean Code II - Dependency Injection at SoCal Code Camp San Diego (07/27/2013)Theo Jungeblut
The document discusses dependency injection and clean code principles. It defines dependency injection as a method of implementing inversion of control by passing dependencies (such as logger objects) into a class from outside rather than instantiating them inside the class. This allows for loose coupling, extensibility, and testability. The document outlines benefits of dependency injection like late binding, maintainability, and parallel development. It discusses the roles of an IoC container in composing object graphs via registration and resolving dependencies, as well as managing object lifetimes. Anti-patterns like service locators and ambient contexts are also covered.
Clean Code at Silicon Valley Code Camp 2011 (02/17/2012)Theo Jungeblut
This document provides an overview of clean code principles and practices. It discusses topics like why clean code matters, definitions of clean code, tools that help enable clean code like Resharper and FxCop, principles of clean code development such as KISS, DRY, SoC and SRP, and coding conventions. The presentation aims to demonstrate how writing clean code can improve code maintainability and efficiency. It also provides references to influential books on clean code by authors like Robert Martin.
Clean Code Part II - Dependency Injection at SoCal Code CampTheo Jungeblut
Clean Code II – Cut your Dependencies with Dependency Injection
We will dive into the basics of Inversion of Control (IOC) and Dependency Injection (DI) to review different ways of achieving decoupling using and exploring both Best Practices and Anti Patterns.
All 3 Clean Code presentations provide great value by themselves, but taken together are designed to offer a holistic approach to successful software creation. This presentation requires you to know and understand basics like DRY, SoC, SRP, SOLID etc. which will be explained in the 1st Clean Code session. However, it will start at the basics of DI and will work towards intermediate and advanced scenarios depending on the participating group.
Why writing Clean Code makes us more efficient
Over the lifetime of a product, maintaining the product is actually one - if not the most - expensive area(s) of the overall product costs. Writing clean code can significantly lower these costs. However, writing clean code also makes you more efficient during the initial development time and results in more stable code. You will be presented design patterns and best practices which will make you write better and more easily maintainable code, seeing code in a holistic way. You will learn how to apply them by using an existing implementation as the starting point of the presentation. Finally, patterns & practices benefits are explained.
This presentation is based on C# and Visual Studio 2010. However, the demonstrated patterns and practice can be applied to every other programming language too.
All 3 Clean Code presentations provide great value by themselves, but taken together are designed to offer a holistic approach to successful software creation. This first session creates the foundation for the 2nd and 3rd Clean Code presentation on Dependency Injection, as it explains expected base knowledge. Why writing Clean Code makes us more efficient Over the lifetime of a product, maintaining the product is actually one - if not the most - expensive area(s) of the overall product costs.
We will dive into the basics of Inversion of Control (IOC) and Dependency Injection (DI) to review different ways of achieving decoupling, using and exploring both: Best Practices, Design and Anti Patterns. This presentation requires knowledge and understanding of basics like DRY, SoC, SRP, SOLID etc. which are building the base for decoupled architecture. However, we will start at the basics of DI and will work towards intermediate and advanced scenarios depending on the participating group.
This presentation is based on C# and Visual Studio 2013. However, the demonstrated patterns and practice can be applied to every other programming language too.
Note: Moving forwards this presentation will be updated with the latest version of the slides for the last event I did the presentation instead of creating new separate slide decks here on SlideShare.
Presentation dates and locations:
2015-10-03 Silicon Valley Code Camp, San Jose, CA
2015-06-27 SoCal Code Camp - San Diego, CA
2015-06-25 Bay.NET South Bay, Mountain View, CA
2014-11-14 SoCal Code Camp - Los Angeles, CA
2014-10-11 Silicon Valley Code Camp, Los Altos Hills, CA
Clean Code - Design Patterns and Best Practices at Silicon Valley Code CampTheo Jungeblut
Why writing Clean Code makes us more efficient Over the lifetime of a product, maintaining the product is actually one - if not the most - expensive area(s) of the overall product costs.
Writing clean code can significantly lower these costs. However, writing clean code also makes you more efficient during the initial development time and results in more stable code.
You will be presented design patterns and best practices which will make you write better and more easily maintainable code, seeing code in a holistic way. You will learn how to apply them by using an existing implementation as the starting point of the presentation. Finally, patterns & practices benefits are explained. This presentation is based on C# and Visual Studio 2012.
However, the demonstrated patterns and practice can be applied to almost every other programming language too.
Clean Code Part I - Design Patterns at SoCal Code CampTheo Jungeblut
Within this session you will learn and/or refresh the most important architectural design pattern and best practices to write better code. These patterns and practices build the foundation for writing maintainable application. More advances techniques like Inversion of Control and Dependency Injection are discussed in detail in the 2nd Clean Code presentation.
All 3 Clean Code presentations provide great value by themselves, but taken together are designed to offer a holistic approach to successful software creation. This first session creates the foundation for the 2nd Clean Code presentation on Dependency Injection, as it explains expected base knowledge.
Why writing Clean Code makes us more efficient
Over the lifetime of a product, maintaining the product is actually one - if not the most - expensive area(s) of the overall product costs. Writing clean code can significantly lower these costs. However, writing clean code also makes you more efficient during the initial development time and results in more stable code. You will be presented design patterns and best practices which will make you write better and more easily maintainable code, seeing code in a holistic way. You will learn how to apply them by using an existing implementation as the starting point of the presentation. Finally, patterns & practices benefits are explained.
This presentation is based on C# and Visual Studio 2010. However, the demonstrated patterns and practice can be applied to every other programming language too.
Clean Code Part III - Craftsmanship at SoCal Code CampTheo Jungeblut
When building a house, good architecture and craftsmanship together form the needed crucial elements for success. The same pattern applies to software development. As the previous sessions focused on the architectural part of software development, this session will strongly focus on often forgotten but very important areas of coding.
You will learn why naming is really difficult if done right, why coding and style guidelines are crucial, code structuring, exception handling and why other elements of coding often define the tipping point between success and failure of projects. Following the principles of software craftsmanship will allow you to end up with better maintainability and extensibility of your software and the success of the project in the end.
All 3 Clean Code presentations provide great value by themselves, but taken together are designed to offer a holistic approach to successful software creation.
Why writing Clean Code makes us more efficient
Over the lifetime of a product, maintaining the product is actually one - if not the most - expensive area(s) of the overall product costs. Writing clean code can significantly lower these costs. However, writing clean code also makes you more efficient during the initial development time and results in more stable code. You will be presented design patterns and best practices which will make you write better and more easily maintainable code, seeing code in a holistic way. You will learn how to apply them by using an existing implementation as the starting point of the presentation. Finally, patterns & practices benefits are explained.
This presentation is based on C# and Visual Studio 2010. However, the demonstrated patterns and practice can be applied to every other programming language too.
The document summarizes a presentation given by Theo Jungeblut on the topic of clean code. It discusses why clean code is important for maintainability. It also provides an overview of tools like Resharper, FxCop, StyleCop, GhostDoc and Code Contracts that can help write clean code. Principles of clean code like KISS, DRY, SoC and patterns like dependency injection are explained. The presentation emphasizes that maintainability is key to preventing code from bringing a development organization to its knees.
Clean Code II - Dependency Injection at SoCal Code Camp San Diego (07/27/2013)Theo Jungeblut
The document discusses dependency injection and clean code principles. It defines dependency injection as a method of implementing inversion of control by passing dependencies (such as logger objects) into a class from outside rather than instantiating them inside the class. This allows for loose coupling, extensibility, and testability. The document outlines benefits of dependency injection like late binding, maintainability, and parallel development. It discusses the roles of an IoC container in composing object graphs via registration and resolving dependencies, as well as managing object lifetimes. Anti-patterns like service locators and ambient contexts are also covered.
Clean Code at Silicon Valley Code Camp 2011 (02/17/2012)Theo Jungeblut
This document provides an overview of clean code principles and practices. It discusses topics like why clean code matters, definitions of clean code, tools that help enable clean code like Resharper and FxCop, principles of clean code development such as KISS, DRY, SoC and SRP, and coding conventions. The presentation aims to demonstrate how writing clean code can improve code maintainability and efficiency. It also provides references to influential books on clean code by authors like Robert Martin.
Clean Code Part II - Dependency Injection at SoCal Code CampTheo Jungeblut
Clean Code II – Cut your Dependencies with Dependency Injection
We will dive into the basics of Inversion of Control (IOC) and Dependency Injection (DI) to review different ways of achieving decoupling using and exploring both Best Practices and Anti Patterns.
All 3 Clean Code presentations provide great value by themselves, but taken together are designed to offer a holistic approach to successful software creation. This presentation requires you to know and understand basics like DRY, SoC, SRP, SOLID etc. which will be explained in the 1st Clean Code session. However, it will start at the basics of DI and will work towards intermediate and advanced scenarios depending on the participating group.
Why writing Clean Code makes us more efficient
Over the lifetime of a product, maintaining the product is actually one - if not the most - expensive area(s) of the overall product costs. Writing clean code can significantly lower these costs. However, writing clean code also makes you more efficient during the initial development time and results in more stable code. You will be presented design patterns and best practices which will make you write better and more easily maintainable code, seeing code in a holistic way. You will learn how to apply them by using an existing implementation as the starting point of the presentation. Finally, patterns & practices benefits are explained.
This presentation is based on C# and Visual Studio 2010. However, the demonstrated patterns and practice can be applied to every other programming language too.
All 3 Clean Code presentations provide great value by themselves, but taken together are designed to offer a holistic approach to successful software creation. This first session creates the foundation for the 2nd and 3rd Clean Code presentation on Dependency Injection, as it explains expected base knowledge. Why writing Clean Code makes us more efficient Over the lifetime of a product, maintaining the product is actually one - if not the most - expensive area(s) of the overall product costs.
We will dive into the basics of Inversion of Control (IOC) and Dependency Injection (DI) to review different ways of achieving decoupling, using and exploring both: Best Practices, Design and Anti Patterns. This presentation requires knowledge and understanding of basics like DRY, SoC, SRP, SOLID etc. which are building the base for decoupled architecture. However, we will start at the basics of DI and will work towards intermediate and advanced scenarios depending on the participating group.
This presentation is based on C# and Visual Studio 2013. However, the demonstrated patterns and practice can be applied to every other programming language too.
Note: Moving forwards this presentation will be updated with the latest version of the slides for the last event I did the presentation instead of creating new separate slide decks here on SlideShare.
Presentation dates and locations:
2015-10-03 Silicon Valley Code Camp, San Jose, CA
2015-06-27 SoCal Code Camp - San Diego, CA
2015-06-25 Bay.NET South Bay, Mountain View, CA
2014-11-14 SoCal Code Camp - Los Angeles, CA
2014-10-11 Silicon Valley Code Camp, Los Altos Hills, CA
Clean Code - Design Patterns and Best Practices at Silicon Valley Code CampTheo Jungeblut
Why writing Clean Code makes us more efficient Over the lifetime of a product, maintaining the product is actually one - if not the most - expensive area(s) of the overall product costs.
Writing clean code can significantly lower these costs. However, writing clean code also makes you more efficient during the initial development time and results in more stable code.
You will be presented design patterns and best practices which will make you write better and more easily maintainable code, seeing code in a holistic way. You will learn how to apply them by using an existing implementation as the starting point of the presentation. Finally, patterns & practices benefits are explained. This presentation is based on C# and Visual Studio 2012.
However, the demonstrated patterns and practice can be applied to almost every other programming language too.
All 3 Clean Code presentations provide great value by themselves, but taken together are designed to offer a holistic approach to successful software creation. This first session creates the foundation for the 2nd and 3rd Clean Code presentation on Dependency Injection, as it explains expected base knowledge. Why writing Clean Code makes us more efficient Over the lifetime of a product, maintaining the product is actually one - if not the most - expensive area(s) of the overall product costs.
Writing clean code can significantly lower these costs. However, writing clean code also makes you more efficient during the initial development time and results in more stable code. You will be presented design patterns and best practices which will make you write better and more easily maintainable code, seeing code in a holistic way.
You will learn how to apply them by using an existing implementation as the starting point of the presentation. Finally, patterns & practices benefits are explained. This presentation is based on C# and Visual Studio 2012. However, the demonstrated patterns and practice can be applied to every other programming language too.
Note: Moving forwards this presentation will be updated with the latest version of the slides for the last event I did the presentation instead of creating new separate slide decks here on SlideShare.
Presentation dates and locations:
2015-10-03 Silicon Valley Code Camp, San Jose, CA
2015-06-27 SoCal Code Camp - San Diego, CA
2014-11-14 SoCal Code Camp - Los Angeles, CA
2014-10-18 Desert Code Camp - Chandler, AZ
2014-10-11 Silicon Valley Code Camp, Los Altos Hills, CA
Clean Code Part i - Design Patterns and Best Practices -Theo Jungeblut
The document is a presentation on clean code principles and best practices. It discusses key concepts like the Single Responsibility Principle, Separation of Concerns, Don't Repeat Yourself, and others. It emphasizes that maintainable code is achieved through readability, simplification, decoupling, avoiding duplication, and testability. The presentation provides examples and references for attendees to learn more about writing clean, sustainable code.
Clean Code I - Design Patterns and Best Practices at SoCal Code Camp San Dieg...Theo Jungeblut
All 3 Clean Code presentations provide great value by themselves, but taken together are designed to offer a holistic approach to successful software creation. This first session creates the foundation for the 2nd Clean Code presentation on Dependency Injection, as it explains expected base knowledge.
Why writing Clean Code makes us more efficient Over the lifetime of a product, maintaining the product is actually one - if not the most - expensive area(s) of the overall product costs. Writing clean code can significantly lower these costs. However, writing clean code also makes you more efficient during the initial development time and results in more stable code. You will be presented design patterns and best practices which will make you write better and more easily maintainable code, seeing code in a holistic way. You will learn how to apply them by using an existing implementation as the starting point of the presentation. Finally, patterns & practices benefits are explained.
This presentation is based on C# and Visual Studio 2012. However, the demonstrated patterns and practice can be applied to every other programming language too.
Lego For Engineers - Dependency Injection for LIDNUG (2011-06-03)Theo Jungeblut
The document discusses how to build reusable and maintainable applications in C# using Lego principles. It promotes principles like separation of concerns, single responsibility, and dependency injection to create loosely coupled and modular code. It provides examples of how to implement these principles using techniques like interfaces, dependency injection containers, and the strategy of "keeping it simple stupid".
The document discusses principles and practices for writing clean code, including:
- Clean code is code that is readable, writable, and maintainable. It focuses on the needs of human readers over the computer.
- Broken windows theory states that one piece of low-quality code leads to more as developers get used to a lower standard. This can lead to software rot and eventual system rewrites.
- Characteristics of rotting software include rigidity, fragility, immobility, and viscosity.
- Following principles like SOLID, DRY, Law of Demeter, and object calisthenics can help avoid rot and keep code clean.
- Practices like using self-document
Lego for Software Engineers at Silicon Valley Code Camp 2011 (2010-10-10)Theo Jungeblut
My first presentation at the Silicon Valley Code Camp 2010 about better Software Architecture, Design and Implementation applying Design Patterns and Best Practices using Lego Technic models and parts as visualization of the ideas.
The document discusses clean code principles such as writing code for readability by other programmers, using meaningful names, following the DRY principle of not repeating yourself, and focusing on writing code that is maintainable and changeable. It provides examples of clean code versus less clean code and emphasizes that code is written primarily for human consumption by other programmers, not for computers. The document also discusses principles like the Single Responsibility Principle and the Boy Scout Rule of leaving the code cleaner than how you found it. It questions how to measure clean code and emphasizes the importance of writing tests for code and refactoring legacy code without tests.
A mental model is an explanation of how something works. It is a concept, a framework or a vision of the world that you carry in your mind to help you interpret what surrounds you and understand the relationship between things.
This talk explores how software projects are very complex systems that we should approach from different mental models, applying multidisciplinary thinking.
Pamplona Software Crafters 2018 #scpna
http://pamplonaswcraft.com/
You will learn why naming is really difficult if done right, why coding and style guidelines are crucial, code structuring, exception handling and why other elements of coding often define the tipping point between success and failure of projects. Following the principles of software craftsmanship will allow you to end up with better maintainability and extensibility of your software and the success of the project in the end. All 3 Clean Code presentations provide great value by themselves, but taken together are designed to offer a holistic approach to successful software creation.
Why writing Clean Code makes us more efficient Over the lifetime of a product, maintaining the product is actually one - if not the most - expensive area(s) of the overall product costs. Writing clean code can significantly lower these costs. However, writing clean code also makes you more efficient during the initial development time and results in more stable code. You will be presented design patterns and best practices which will make you write better and more easily maintainable code, seeing code in a holistic way. You will learn how to apply them by using an existing implementation as the starting point of the presentation. Finally, patterns & practices benefits are explained.
This presentation is based on C# and Visual Studio 2013. However, the demonstrated patterns and practice can be applied to every other programming language too.
Note: Moving forwards this presentation will be updated with the latest version of the slides for the last event I did the presentation instead of creating new separate slide decks here on SlideShare.
Presentation dates and locations:
2015-06-27 SoCal Code Camp - San Diego, CA
2014-11-14 SoCal Code Camp - Los Angeles, CA
2014-10-18 Desert Code Camp - Chandler, AZ
TDD is now mainstream but a lot people don't know or don't remember what is its purpose. TDD is about software design not testing or catching bug. TDD helps developers to shape and create software with "good" design, what is a "good" design is something that we will discuss in the topic.
TDD is now mainstream but a lot people don't know or don't remember what is its purpose. TDD is about software design not testing or catching bug. TDD helps developers to shape and create software with "good" design, what is a "good" design is something that we will discuss in the topic.
This document discusses principles of clean code and best practices for writing maintainable code. It defines clean code as code that is readable, testable, has minimal dependencies and clear purpose. It emphasizes that code quality is important to reduce technical debt and improve productivity. Specific techniques mentioned include using descriptive names, small single-purpose functions, object-oriented principles like SOLID, design patterns like strategy and observer patterns, and architectural styles like hexagonal architecture. The document stresses that clean code requires ongoing effort to refactor and prevent degradation over time.
During this talk we will discuss about the SOLID Principles described by Robert C. Martin, applying them in the Java programming language. Each principle will be explained in detail, with practical Java examples.
We will assess how these principles make it easy to develop the software for the entire duration of the project, and how some problems can appear if these principles are not applied. We will present common code fragments that do not respect these principles, and we'll see how we can correct them. Taking the SOLID principles into consideration, we will also analyse a real Java project using a Static Code Analyzer tool (e.g. STAN).
Finally, we will discuss the strategies on how to apply these design principles in "greenfield" projects, as well as "legacy" projects, while offering some tips and tricks.
We want code that is easy to understand, re-usable, and flexible. But we are always up against deadlines, so we rush, and end up with code that is messy, buggy, hard to maintain, and makes us go slower even though we’re trying to go faster.
What is clean code? In this talk I’ll provide some answers to this question, and introduce you to 10 good habits that will help keep your code clean, such as the use of meaningful names for your variables and functions, and following the “Boy Scout Rule” (leave the code cleaner than you found it). I will even try to persuade you that using a lot of code comments is a sign that there are problems with your code.
This BJUG presentation is focused on the unique inter-process communication (IPC) mechanism introduced by Android, namely Binder. As such, we will be exploring the entire Android software stack, starting from the Linux kernel, moving up to the Linux userspace, reaching the Android framework and ending our journey with some real-life usages of Binder in Android applications.
We will show how widely used Binder actually is in Android, thus proving that it is a cornerstone of the operating system. The main focus is on the programming model exposed towards developers and we will highlight when, how and why it should be used.
https://bjug.ro/binding-android-piece-by-piece/
Learn how to leverage functional concepts of Partial Application and Function Composition for Dependency Injection in C#. This is to achieve Simplicity.
Cut your Dependencies with Dependency Injection - .NET User Group OsnabrueckTheo Jungeblut
We will dive into the basics of Inversion of Control (IOC) and Dependency Injection (DI) to review different ways of achieving decoupling, using and exploring both: Best Practices, Design and Anti Patterns. This presentation requires knowledge and understanding of basics like DRY, SoC, SRP, SOLID etc. which are building the base for decoupled architecture.
However, we will start at the basics of DI and will work towards intermediate and advanced scenarios depending on the participating group.
Cut your Dependencies - Dependency Injection at Silicon Valley Code CampTheo Jungeblut
We will dive into the basics of Inversion of Control (IOC) and Dependency Injection (DI) to review different ways of achieving decoupling, using and exploring both: Best Practices, Design and Anti Patterns. This presentation requires knowledge and understanding of basics like DRY, SoC, SRP, SOLID etc. which are building the base for decoupled architecture.
However, we will start at the basics of DI and will work towards intermediate and advanced scenarios depending on the participating group.
Miche offers you the ultimate combination of style, convenience and affordability with unique magnetic interchangeable exterior shells. Change your look instantly. One purse, endless possibilities!
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...Theo Jungeblut
In the past, applications where created as monolithic entities running on a single server. If this is the past for you, too, you will have experienced the downside of modern distributed and cloud applications, as debugging, troubleshooting, and monitoring is not easily accomplished with traditional approaches.
Within this session, we will explore different possibilities for collecting and analyzing the needed information to solve issues on modern distributed application and discuss the advantages and disadvantages of each approach like debugger, log files, performance counter and third party solutions. The focus of this session will be on Developer and DevOps need, as increased release cycles and third party dependency more and more result in the need for troubleshooting also on production system, rather than in an isolated test environment.
This session requires a solid understanding of distributed applications and knowledge of SOA, but most principles also apply to and can be beneficial for more traditional application design approaches. The used code examples are in .NET but the shown principles generally apply to other languages, too, and shown software is often available for a variety of environments.
All 3 Clean Code presentations provide great value by themselves, but taken together are designed to offer a holistic approach to successful software creation. This first session creates the foundation for the 2nd and 3rd Clean Code presentation on Dependency Injection, as it explains expected base knowledge. Why writing Clean Code makes us more efficient Over the lifetime of a product, maintaining the product is actually one - if not the most - expensive area(s) of the overall product costs.
Writing clean code can significantly lower these costs. However, writing clean code also makes you more efficient during the initial development time and results in more stable code. You will be presented design patterns and best practices which will make you write better and more easily maintainable code, seeing code in a holistic way.
You will learn how to apply them by using an existing implementation as the starting point of the presentation. Finally, patterns & practices benefits are explained. This presentation is based on C# and Visual Studio 2012. However, the demonstrated patterns and practice can be applied to every other programming language too.
Note: Moving forwards this presentation will be updated with the latest version of the slides for the last event I did the presentation instead of creating new separate slide decks here on SlideShare.
Presentation dates and locations:
2015-10-03 Silicon Valley Code Camp, San Jose, CA
2015-06-27 SoCal Code Camp - San Diego, CA
2014-11-14 SoCal Code Camp - Los Angeles, CA
2014-10-18 Desert Code Camp - Chandler, AZ
2014-10-11 Silicon Valley Code Camp, Los Altos Hills, CA
Clean Code Part i - Design Patterns and Best Practices -Theo Jungeblut
The document is a presentation on clean code principles and best practices. It discusses key concepts like the Single Responsibility Principle, Separation of Concerns, Don't Repeat Yourself, and others. It emphasizes that maintainable code is achieved through readability, simplification, decoupling, avoiding duplication, and testability. The presentation provides examples and references for attendees to learn more about writing clean, sustainable code.
Clean Code I - Design Patterns and Best Practices at SoCal Code Camp San Dieg...Theo Jungeblut
All 3 Clean Code presentations provide great value by themselves, but taken together are designed to offer a holistic approach to successful software creation. This first session creates the foundation for the 2nd Clean Code presentation on Dependency Injection, as it explains expected base knowledge.
Why writing Clean Code makes us more efficient Over the lifetime of a product, maintaining the product is actually one - if not the most - expensive area(s) of the overall product costs. Writing clean code can significantly lower these costs. However, writing clean code also makes you more efficient during the initial development time and results in more stable code. You will be presented design patterns and best practices which will make you write better and more easily maintainable code, seeing code in a holistic way. You will learn how to apply them by using an existing implementation as the starting point of the presentation. Finally, patterns & practices benefits are explained.
This presentation is based on C# and Visual Studio 2012. However, the demonstrated patterns and practice can be applied to every other programming language too.
Lego For Engineers - Dependency Injection for LIDNUG (2011-06-03)Theo Jungeblut
The document discusses how to build reusable and maintainable applications in C# using Lego principles. It promotes principles like separation of concerns, single responsibility, and dependency injection to create loosely coupled and modular code. It provides examples of how to implement these principles using techniques like interfaces, dependency injection containers, and the strategy of "keeping it simple stupid".
The document discusses principles and practices for writing clean code, including:
- Clean code is code that is readable, writable, and maintainable. It focuses on the needs of human readers over the computer.
- Broken windows theory states that one piece of low-quality code leads to more as developers get used to a lower standard. This can lead to software rot and eventual system rewrites.
- Characteristics of rotting software include rigidity, fragility, immobility, and viscosity.
- Following principles like SOLID, DRY, Law of Demeter, and object calisthenics can help avoid rot and keep code clean.
- Practices like using self-document
Lego for Software Engineers at Silicon Valley Code Camp 2011 (2010-10-10)Theo Jungeblut
My first presentation at the Silicon Valley Code Camp 2010 about better Software Architecture, Design and Implementation applying Design Patterns and Best Practices using Lego Technic models and parts as visualization of the ideas.
The document discusses clean code principles such as writing code for readability by other programmers, using meaningful names, following the DRY principle of not repeating yourself, and focusing on writing code that is maintainable and changeable. It provides examples of clean code versus less clean code and emphasizes that code is written primarily for human consumption by other programmers, not for computers. The document also discusses principles like the Single Responsibility Principle and the Boy Scout Rule of leaving the code cleaner than how you found it. It questions how to measure clean code and emphasizes the importance of writing tests for code and refactoring legacy code without tests.
A mental model is an explanation of how something works. It is a concept, a framework or a vision of the world that you carry in your mind to help you interpret what surrounds you and understand the relationship between things.
This talk explores how software projects are very complex systems that we should approach from different mental models, applying multidisciplinary thinking.
Pamplona Software Crafters 2018 #scpna
http://pamplonaswcraft.com/
You will learn why naming is really difficult if done right, why coding and style guidelines are crucial, code structuring, exception handling and why other elements of coding often define the tipping point between success and failure of projects. Following the principles of software craftsmanship will allow you to end up with better maintainability and extensibility of your software and the success of the project in the end. All 3 Clean Code presentations provide great value by themselves, but taken together are designed to offer a holistic approach to successful software creation.
Why writing Clean Code makes us more efficient Over the lifetime of a product, maintaining the product is actually one - if not the most - expensive area(s) of the overall product costs. Writing clean code can significantly lower these costs. However, writing clean code also makes you more efficient during the initial development time and results in more stable code. You will be presented design patterns and best practices which will make you write better and more easily maintainable code, seeing code in a holistic way. You will learn how to apply them by using an existing implementation as the starting point of the presentation. Finally, patterns & practices benefits are explained.
This presentation is based on C# and Visual Studio 2013. However, the demonstrated patterns and practice can be applied to every other programming language too.
Note: Moving forwards this presentation will be updated with the latest version of the slides for the last event I did the presentation instead of creating new separate slide decks here on SlideShare.
Presentation dates and locations:
2015-06-27 SoCal Code Camp - San Diego, CA
2014-11-14 SoCal Code Camp - Los Angeles, CA
2014-10-18 Desert Code Camp - Chandler, AZ
TDD is now mainstream but a lot people don't know or don't remember what is its purpose. TDD is about software design not testing or catching bug. TDD helps developers to shape and create software with "good" design, what is a "good" design is something that we will discuss in the topic.
TDD is now mainstream but a lot people don't know or don't remember what is its purpose. TDD is about software design not testing or catching bug. TDD helps developers to shape and create software with "good" design, what is a "good" design is something that we will discuss in the topic.
This document discusses principles of clean code and best practices for writing maintainable code. It defines clean code as code that is readable, testable, has minimal dependencies and clear purpose. It emphasizes that code quality is important to reduce technical debt and improve productivity. Specific techniques mentioned include using descriptive names, small single-purpose functions, object-oriented principles like SOLID, design patterns like strategy and observer patterns, and architectural styles like hexagonal architecture. The document stresses that clean code requires ongoing effort to refactor and prevent degradation over time.
During this talk we will discuss about the SOLID Principles described by Robert C. Martin, applying them in the Java programming language. Each principle will be explained in detail, with practical Java examples.
We will assess how these principles make it easy to develop the software for the entire duration of the project, and how some problems can appear if these principles are not applied. We will present common code fragments that do not respect these principles, and we'll see how we can correct them. Taking the SOLID principles into consideration, we will also analyse a real Java project using a Static Code Analyzer tool (e.g. STAN).
Finally, we will discuss the strategies on how to apply these design principles in "greenfield" projects, as well as "legacy" projects, while offering some tips and tricks.
We want code that is easy to understand, re-usable, and flexible. But we are always up against deadlines, so we rush, and end up with code that is messy, buggy, hard to maintain, and makes us go slower even though we’re trying to go faster.
What is clean code? In this talk I’ll provide some answers to this question, and introduce you to 10 good habits that will help keep your code clean, such as the use of meaningful names for your variables and functions, and following the “Boy Scout Rule” (leave the code cleaner than you found it). I will even try to persuade you that using a lot of code comments is a sign that there are problems with your code.
This BJUG presentation is focused on the unique inter-process communication (IPC) mechanism introduced by Android, namely Binder. As such, we will be exploring the entire Android software stack, starting from the Linux kernel, moving up to the Linux userspace, reaching the Android framework and ending our journey with some real-life usages of Binder in Android applications.
We will show how widely used Binder actually is in Android, thus proving that it is a cornerstone of the operating system. The main focus is on the programming model exposed towards developers and we will highlight when, how and why it should be used.
https://bjug.ro/binding-android-piece-by-piece/
Learn how to leverage functional concepts of Partial Application and Function Composition for Dependency Injection in C#. This is to achieve Simplicity.
Cut your Dependencies with Dependency Injection - .NET User Group OsnabrueckTheo Jungeblut
We will dive into the basics of Inversion of Control (IOC) and Dependency Injection (DI) to review different ways of achieving decoupling, using and exploring both: Best Practices, Design and Anti Patterns. This presentation requires knowledge and understanding of basics like DRY, SoC, SRP, SOLID etc. which are building the base for decoupled architecture.
However, we will start at the basics of DI and will work towards intermediate and advanced scenarios depending on the participating group.
Cut your Dependencies - Dependency Injection at Silicon Valley Code CampTheo Jungeblut
We will dive into the basics of Inversion of Control (IOC) and Dependency Injection (DI) to review different ways of achieving decoupling, using and exploring both: Best Practices, Design and Anti Patterns. This presentation requires knowledge and understanding of basics like DRY, SoC, SRP, SOLID etc. which are building the base for decoupled architecture.
However, we will start at the basics of DI and will work towards intermediate and advanced scenarios depending on the participating group.
Miche offers you the ultimate combination of style, convenience and affordability with unique magnetic interchangeable exterior shells. Change your look instantly. One purse, endless possibilities!
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...Theo Jungeblut
In the past, applications where created as monolithic entities running on a single server. If this is the past for you, too, you will have experienced the downside of modern distributed and cloud applications, as debugging, troubleshooting, and monitoring is not easily accomplished with traditional approaches.
Within this session, we will explore different possibilities for collecting and analyzing the needed information to solve issues on modern distributed application and discuss the advantages and disadvantages of each approach like debugger, log files, performance counter and third party solutions. The focus of this session will be on Developer and DevOps need, as increased release cycles and third party dependency more and more result in the need for troubleshooting also on production system, rather than in an isolated test environment.
This session requires a solid understanding of distributed applications and knowledge of SOA, but most principles also apply to and can be beneficial for more traditional application design approaches. The used code examples are in .NET but the shown principles generally apply to other languages, too, and shown software is often available for a variety of environments.
Cut your Dependencies with Dependency Injection for East Bay.NET User Group Theo Jungeblut
Dependency injection is a design patter with the potential to write cleaner code. Over the lifetime of a product, maintaining the product is actuall one - if the the most - expensive areas of the overall product costs. Writing clean code can significantly lower these costs. Writing clean code also makes you more efficient during the initial development time and results in a more stable code base.
In this talk, we will dive into the basics of Inversion of Control (IoC) and Dependency Injection (DI) to review different ways of achieving decoupling. We will explorer best practices, design, and anti-patterns.
EAF563: American college & university presidents. “Issues, problems, and current topical concerns in the administration of higher education. Specific topics vary and students complete research projects on selected current critical issues.”
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...Theo Jungeblut
In the past, applications where created as monolithic entities running on a single server. If this is the past for you, too, you will have experienced the downside of modern distributed and cloud applications, as debugging, troubleshooting, and monitoring is not easily accomplished with traditional approaches.
Within this session, we will explore different possibilities for collecting and analyzing the needed information to solve issues on modern distributed application and discuss the advantages and disadvantages of each approach like debugger, log files, performance counter and third party solutions. The focus of this session will be on Developer and DevOps need, as increased release cycles and third party dependency more and more result in the need for troubleshooting also on production system, rather than in an isolated test environment.
This session requires a solid understanding of distributed applications and knowledge of SOA, but most principles also apply to and can be beneficial for more traditional application design approaches. The used code examples are in .NET but the shown principles generally apply to other languages, too, and shown software is often available for a variety of environments.
Accidentally Manager – A Survival Guide for First-Time Engineering ManagersTheo Jungeblut
This session is about your career perspective as an engineer, especially when the path may take an “unexpected” turn from technical lead to first-time engineering manager.
We will explore the differences between managing and leading, review different management styles, and discuss their impact on both the manager and the team member. Finally, we will find out why you do not want to treat everyone equally. I will share my personal experiences going from being one of the team to actually managing it: the pitfalls of suddenly being responsible for the team, typical problems surfacing, and how to avoid common mistakes. As part of the session,
I would also like to share thoughts and considerations about which career path could be the right one for whom, and what the advantages and disadvantages are going one way or the other.
This is not a “You get it all from the expert”- session, but a session to share experiences and discuss how this fits to your career path.
Note: Moving forwards this presentation will be updated with the latest version of the slides for the last event I did the presentation instead of creating new separate slide decks here on SlideShare.
Presentation dates and locations:
2015-10-03 Silicon Valley Code Camp, San Jose, CA
2015-06-27 SoCal Code Camp - San Diego, CA
2014-11-14 SoCal Code Camp - Los Angeles, CA
2014-10-18 Desert Code Camp - Chandler, AZ
2014-10-11 Silicon Valley Code Camp, Los Altos Hills, CA
This document summarizes a presentation given by Blair Schneider McKay on October 22, 2003. The presentation covered design patterns including Adapter, Bridge, Factory Method, and Observer. It also included a section on "How to Keep an Information-Technology Job". The agenda outlined the topics to be covered in the 50 minute presentation on design patterns and the 20 minute section on keeping an IT job.
Microservices Application Tracing Standards and Simulators - Adrians at OSCONAdrian Cockcroft
This document discusses distributed tracing standards and microservices simulations. It introduces OpenZipkin and OpenTracing as open source distributed tracing projects. It also discusses Pivot Tracing and the OpenTracing initiative to standardize instrumentation. The document proposes using a microservices simulator called Spigo to generate test data and visualize traces. It provides an example of defining a LAMP stack architecture in JSON to simulate with Spigo.
Seven Ineffective Coding Habits of Many ProgrammersKevlin Henney
Presented at Build Stuff (20th November 2014)
Habits help you manage the complexity of code. You apply existing skill and knowledge automatically to the detail while focusing on the bigger picture. But because you acquire habits largely by imitation, and rarely question them, how do you know your habits are effective? Many of the habits and conventions programmers have for naming, formatting, commenting and unit testing do not stand up as rational and practical on closer inspection.
This session examines seven coding habits that are not as effective as many programmers — whether working with Java, .NET, native or scripting languages — might believe, and suggests alternatives.
2009 Dotnet Information Day: More effective c#Daniel Fisher
The document discusses principles of loose coupling in software design, including concepts like composition over inheritance, the single responsibility principle, and dependency inversion. It provides examples of tightly coupled code and discusses how to structure code to be more loosely coupled and maintainable according to these principles.
The document provides an introduction to design patterns developed by the Gang of Four (GoF). It discusses several common design patterns in JavaScript like the constructor pattern, module pattern, singleton pattern, observer pattern, mediator pattern, prototype pattern, command pattern, facade pattern, and mixin pattern. For each pattern, it explains the problem it addresses, provides an example implementation, and notes advantages and disadvantages of the pattern. The overall document serves as a high-level overview of fundamental design patterns and their usage in JavaScript applications.
The first seminar in the mini-seminars periodical sessions I've prepared and lead in my spare time while being employed at Exigen Services. Kudos, guys!
Since these presentations were spare time hobby - I've decided to share them :)
Hopefully someone will find them useful.
The intro is - what designs patters are about, some simple examples and a lots of colorful images.
This document provides an overview of key object-oriented programming concepts including classes and objects, inheritance, encapsulation, polymorphism, interfaces, abstract classes, and design patterns. It discusses class construction and object instantiation. Inheritance is described as both exposing implementation details and potentially breaking encapsulation. Composition is presented as an alternative to inheritance. The document also covers method overriding, overloading, and duck typing as forms of polymorphism. Finally, it briefly introduces common design principles like SOLID and patterns like delegation.
The Ring programming language version 1.8 book - Part 92 of 202Mahmoud Samir Fayed
Here are the key differences between Ring and Python:
- Paradigms: Ring supports multiple paradigms like procedural, object-oriented, functional and declarative programming. It aims to better integrate these paradigms compared to Python. Python is mainly object-oriented with some functional features.
- Type System: Ring is weakly typed while Python is dynamically typed. Ring does automatic type conversions in some cases for convenience.
- Performance: Ring aims to be faster than Python by using a bytecode VM and optimizations like escape analysis in its garbage collector. Python relies more on interpretation.
- Natural Language: Ring puts more emphasis on natural language programming constructs to make programming more intuitive and language-like. This is not a major focus
The Kotlin compiler provides many features of Kotlin that do not exist natively in the JVM by generating bytecode that emulates these features. It uses various techniques like generating additional classes and methods, passing implicit parameters, and implementing functional interfaces to achieve this. The summary decompiles some Kotlin code examples to Java bytecode to illustrate how specific Kotlin features are implemented under the hood.
Practical Chaos Engineering will show how to start running chaos experiments in your infrastructure and will try to guide your through the principles of chaos.
Object-Oriented Programming has well established design principles, such as SOLID. For many developers architecture and functional programming are at odds with each other: they don’t know how their existing tricks of the trade convert into functional design. This problem becomes worse as hybrid languages such as Scala, Java 8 and Ruby become common. I will talk about how functional programming helps you implement the SOLID principles, and how a functional mindset can actually help you achieve the holy grail of OO, encapsulation.
Automated Discovery of Deserialization Gadget ChainsPriyanka Aash
Although vulnerabilities stemming from the deserialization of untrusted data have been understood for many years, unsafe deserialization continues to be a vulnerability class that isn't going away. Attention on Java deserialization vulnerabilities skyrocketed in 2015 when Frohoff and Lawrence published an RCE gadget chain in the Apache Commons library and as recently as last year's Black Hat, Muñoz and Miroshis presented a survey of dangerous JSON deserialization libraries. While much research and automated detection technology has so far focused on the discovery of vulnerable entry points (i.e. code that deserializes untrusted data), finding a "gadget chain" to actually make the vulnerability exploitable has thus far been a largely manual exercise. In this talk, I present a new technique for the automated discovery of deserialization gadget chains in Java, allowing defensive teams to quickly identify the significance of a deserialization vulnerability and allowing penetration testers to quickly develop working exploits. At the conclusion we will also be releasing a FOSS toolkit which utilizes this methodology and has been used to successfully develop many deserialization exploits in both internal applications and open source projects.
Presented at NDC 2014 in Oslo (4th June 2014)
Video available on Vimeo: https://vimeo.com/97344527
Apparently, everyone knows about patterns. Except for the ones that don't. Which is basically all the people who've never come across patterns... plus most of the people who have.
Singleton is often treated as a must-know pattern. Patterns are sometimes considered to be the basis of blueprint-driven architecture. Patterns are also seen as something you don't need to know any more because you've got frameworks, libraries and middleware by the download. Or that patterns are something you don't need to know because you're building on UML, legacy code or emergent design. There are all these misconceptions about patterns... and more.
In this talk, let's take an alternative tour of patterns, one that is based on improving the habitability of code, communication, exploration, empiricism, reasoning, incremental development, sharing design and bridging rather than barricading different levels of expertise.
Interop - Crash Course In Open Source Cloud ComputingMark Hinkle
This will be an overview of the open source software that can be used to deploy and manage a cloud computing environment. The session will include information on storage, networking(e.g. OpenDaylight) and compute virtualization (Xen, KVM, LXC) and the orchestration(Apache CloudStack, OpenStack) of the three to build their own cloud services.
Great Wide Open: Crash Course Open Source Cloud Computing - 2014Mark Hinkle
Very few trends in IT have generated as much buzz as cloud computing. This session will cut through the hype and quickly clarify the ontology for cloud computing. The bulk of the conversation will focus on the open source software that can be used to build compute clouds (infrastructure-as-a-service) and the complimentary open source management tools that can be combined to automate the management of cloud computing environments.
The session will appeal to anyone who has a good grasp of traditional data center infrastructure but is struggling with the benefits and migration path to a cloud computing environment. Systems administrators and IT generalists will leave the discussion with a general overview of the options at their disposal to effectively build and manage their own cloud computing environments using free and open source software.
Framework design involves balancing many considerations, such as:
- Managing dependencies between components to allow for flexibility and evolution over time. Techniques like dependency injection and layering help achieve this.
- Designing APIs by first writing code samples for key scenarios and defining object models to support these samples to ensure usability.
- Treating simplicity as a feature by removing unnecessary requirements and reusing existing concepts where possible.
The presentation consist of following:
- pimpl Idiom
- Introduction to ABC software firm – Rahul’s story.
- The SOLID Principles
- Outline of other principles : KISS , DRY , YAGNI.
- The story of a Paper- Boy : Law of Demeter
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...yazad dumasia
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and Inheritance , Exploring the Base Class Library -, Debugging and Error Handling , Data Types full knowledge about basic of .NET Framework
Similar to Clean Code - Design Patterns and Best Practices for Bay.NET SF User Group (01/16/2013) (20)
C# .NET: Language Features and Creating .NET Projects, Namespaces Classes and...
Clean Code - Design Patterns and Best Practices for Bay.NET SF User Group (01/16/2013)
1. Bay.NET
San Francisco
Clean Code
Design Patterns
and Best Practices
San Francisco, January 16th 2013
2. Theo Jungeblut
• Engineering manager & lead by day
at AppDynamics in San Francisco
• Coder & software craftsman by night
• Architects decoupled solutions
tailored to business needs & crafts
maintainable code to last
• Worked in healthcare and factory
automation, building mission critical
applications, framework & platforms
• Degree in Software Engineering
and Network Communications
theo@designitright.net
• Enjoys cycling, running and eating
www.designitright.net
3. Rate Session & Win a Shirt
http://www.speakerrate.com/theoj
4. Where to get the Slides
http://www.slideshare.net/theojungeblut
11. The “Must Read”-Book(s)
by Robert C Martin
A Handbook of Agile
Software
Craftsmanship
“Even bad code can
function. But if code
isn’t clean, it can bring a
development
organization to its
knees.”
14. Clean Code Developer – 1st Iteration
by Ralf Westphal & Stefan Lieser – http://www.clean-code-developer.de
Graphic by Michael Hönnig http://michael.hoennig.de/2009/08/08/clean-code-developer-ccd/
16. KISS-Principle – “Keep It Simple Stupid”
by Kelly Johnson
http://blogs.smarter.com/blogs/Lego%20Brick.jpg
17. The Power of Simplicity
Graphic by Nathan Sawaya courtesy of brickartist.com
Graphic by Nathan Sawaya courtesy of brickartist.com
http://www.geekalerts.com/lego-iphone/
18. Chaos build from simplicity
Graphic by Nathan Sawaya courtesy of brickartist.com
20. Don’t repeat yourself (DRY)
by Andy Hunt and Dave Thomas in their book “The Pragmatic Programmer”
// Code Copy and Paste Method // DRY Method
public Class Person public Class Person
{ {
public string FirstName { get; set;} public string FirstName { get; set;}
public string LastName { get; set;} public string LastName { get; set;}
public Person(Person person) public Person(Person person)
{ {
this.FirstName = string.IsNullOrEmpty(person.FirstName) this.FirstName = person.FirstName.CloneSecured();
? string.Empty : (string) person.FirstName.Clone(); this.LastName = person.LastName.CloneSecured();
}
this.LastName = string.IsNullOrEmpty(person.LastName)
? string.Empty : (string) person.LastName.Clone(); public object Clone()
} {
return new Person(this);
public object Clone() }
{ }
return new Person(this);
}
} public static class StringExtension
{
public static string CloneSecured(this string original)
{
return string.IsNullOrEmpty(original) ? string.Empty : (string)original.Clone();
}
}
21. Clean Code Developer – 1st Iteration
by Ralf Westphal & Stefan Lieser – http://www.clean-code-developer.de
Graphic by Michael Hönnig http://michael.hoennig.de/2009/08/08/clean-code-developer-ccd/
22. Clean Code Developer – 2nd Iteration
by Ralf Westphal & Stefan Lieser – http://www.clean-code-developer.de
Graphic by Michael Hönnig http://michael.hoennig.de/2009/08/08/clean-code-developer-ccd/
26. Class, Struct, Enum etc.
http://technicbricks.blogspot.com/2009/06/tbs-techpoll-12-results-2009-1st.html
27. Separation of Concerns (SoC)
probably by Edsger W. Dijkstra in 1974
• “In computer
science, separation of concerns
(SoC) is the process of separating
a computer program into distinct
features that overlap in
functionality as little as possible.
•A concern is any piece of
interest or focus in a program.
Typically, concerns are
synonymous with features or
behaviors. “
http://en.wikipedia.org/wiki/Separati
on_of_Concerns
28. Single Responsibility Principle (SRP)
by Robert C Martin
“Every object should have a single responsibility, and that
responsibility should be entirely encapsulated by the class.”
http://en.wikipedia.org/wiki/Single_responsibility_principle
public class Logger : ILogger
{
public Logger(ILoggingSink loggingSink)
{}
public void Log(string message)
{}
}
http://www.ericalbrecht.com
30. Clean Code Developer – 2nd Iteration
by Ralf Westphal & Stefan Lieser – http://www.clean-code-developer.de
Graphic by Michael Hönnig http://michael.hoennig.de/2009/08/08/clean-code-developer-ccd/
31. Clean Code Developer – 3rd Iteration
by Ralf Westphal & Stefan Lieser – http://www.clean-code-developer.de
Graphic by Michael Hönnig http://michael.hoennig.de/2009/08/08/clean-code-developer-ccd/
33. Information Hiding Principle (IHP)
by David Parnas (1972)
“.. information hiding is the principle of
segregation of the design decisions on a
computer program that are most likely to
change, ..”
http://en.wikipedia.org/wiki/Information_hiding
34. Interfaces / Contracts
• Decouple Usage and Implementation through introduction of a contract
• Allows to replace implementation without changing the consumer
public interface ILogger public class Logger : ILogger
{ {
void Log(string message); public Logger(ILoggingSink loggingSink)
} {}
public void Log(string message)
{}
}
36. Liskov Substitution Principle (LSP)
by Barbara Liskov, Jannette Wing (1994)
“Liskov’s notion of a behavioral subtype
defines a notion of substitutability for
mutable objects”
http://en.wikipedia.org/wiki/Liskov_substitution_principle
38. Dependency Inversion Principle (DIP)
by Robert C. Martin
• “High-level modules should not depend on
low-level modules. Both should depend on
abstractions.
• Abstractions should not depend upon details.
Details should depend upon abstractions.”
http://en.wikipedia.org/wiki/Dependency_inversion_principle
40. Clean Code Developer – 3rd Iteration
by Ralf Westphal & Stefan Lieser – http://www.clean-code-developer.de
Graphic by Michael Hönnig http://michael.hoennig.de/2009/08/08/clean-code-developer-ccd/
41. Clean Code Developer – 4th Iteration
by Ralf Westphal & Stefan Lieser – http://www.clean-code-developer.de
Graphic by Michael Hönnig http://michael.hoennig.de/2009/08/08/clean-code-developer-ccd/
43. Open/Closed Principle (OCP)
by Bertrand Meyer (1988)
An implementation is open for extension
but closed for modification
http://en.wikipedia.org/wiki/Open/closed_principle
45. Law of Demeter (LoD)
Northeastern University (1987)
“
• Each unit should have only limited knowledge
about other units: only units “closely” related
to the current unit.
• Each unit should only talk to its friends;
don’t talk to strangers
• Only talk to your immediate friends.”
http://en.wikipedia.org/wiki/Law_Of_Demeter
46. S Single Responsibility Principle
O Open/Closed Principle
L Liskov Substitution Principle
I Interface Segregation Principle
D Dependency Inversion Principle
Robert C Martin: http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod
47. Clean Code Developer – 4th Iteration
by Ralf Westphal & Stefan Lieser – http://www.clean-code-developer.de
Graphic by Michael Hönnig http://michael.hoennig.de/2009/08/08/clean-code-developer-ccd/
48. Clean Code Developer – 5th Iteration
by Ralf Westphal & Stefan Lieser – http://www.clean-code-developer.de
Graphic by Michael Hönnig http://michael.hoennig.de/2009/08/08/clean-code-developer-ccd/
49. Summary Clean Code
Maintainability is achieved through:
• Readability (Coding Guidelines)
• Simplification and Specialization
(KISS, SoC, SRP, OCP, )
• Decoupling (LSP, DIP, IHP, Contracts,
LoD, CoP, IoC or SOA)
• Avoiding Code Bloat (DRY, YAGNI)
• Quality through Testability
(all of them!)
50. Q&A
Downloads,
Feedback & Comments:
theo@designitright.net
www.designitright.net
www.speakerrate.com/theoj
Graphic by Nathan Sawaya courtesy of brickartist.com