Code Design Practices

Author:
Florin Coroș

Trainer:
Florin Coroș


Overview

This training is focused on learning how to minimize the cost of change on large projects, by doing a code design that embraces change. By participating to this training you will understand how to structure your code in a way that you will enjoy working on it, long after the first lines were written in your project. You will learn how to drive all the code design decisions to minimize the effect of change on your code.

In any software project there is and there will be a lot of code. The code needs to handle every aspect of the product in very small details. To assure the long life of a project, it is crucial that the code is structured in a clear way. It is like arranging and sorting sheets of papers, in files, folders, drawers and closets, so we can find what we need. Developers arrange code in functions, classes, modules and deployable packages. Any developer spends most of her time on reading and changing the existent code, rather than writing new code. Designing the structures in which we place our code, by following some principles and widely known patterns makes a huge difference in increasing our efficiency, productivity and happiness by achieving a high quality code which is maintainable, reusable and extensible.

There are studies* showing that raising the overall code quality in a software project will increase productivity, efficiency and shorten schedules.

Motivation

You should invest in having high quality code design because:

  • it increases your team efficiency and productivity
  • it gives you the means to handle in a manageable way the size and complexity of the project
  • it reduces the cost of change
  • it reduces the cost of adding features to your product
  • it makes your product to stand the test of time

Motivating someone to adopt new practices implies that she needs to know how to apply them, and then she needs to see that by applying them she can get the desired results. This training as a class course covers the first part, by teaching code design concepts, by sharing experiences from real life projects and by showing how widely known practices can be applied. Follow-up workshops and coaching sessions can address the second part, by exercising the practices on specific contexts or particular projects and by showing how quality code emerges.

Learning Objectives

  • Understand the importance of quality code design
  • Learn to write clean code that works
  • Understand the Separation of Concerns as the root of Design Patterns and Programming Principles
  • Learn and understand how to use Dependency Injection
  • Learn techniques to achieve and maintain code quality through structure and enforced consistency
  • Understand the Application Infrastructure as the tool to manage and control complexity and size in large projects

Target Audience

Any software architect or software developer would benefit greatly from this training.

Prerequisites

Object Oriented Programming basics (inheritance; encapsulation; polymorphism; interfaces; abstract classes; virtual methods; overriding; overloading).

 Format and Agenda

The training is structured in more class lessons, which target one or more learning objectives. The lessons focus on explaining, exemplifying, discussing and exercising the technical concepts to reach the targeted learning objectives. Each lesson is listed below. Here is a more detailed view on the content of each lesson.

  • Why Code Quality and Code Design
  • Clean Code
  • Separation of Concerns
  • Dependency Injection
  • From Principles and Patterns to Practices
  • Application Infrastructure

The most recommended format for delivering the entire course is in four full days. This assures a balanced pace between explaining the material and having examples, discussions or hands-on exercises. There is also the possibility to shorten the course to three full and intensive days by taking out few lessons, topics or exercises. Some subjects might be skipped or briefly explained during the course, depending on the audience interest on each topic.

The training can be tailored even more to your needs by selecting only some of above lessons and also by combining them with other related trainings like Design Patterns Explained or SOLID Principles Insights. When the lessons selection is done to tailor the training, the level of experience of the audience and the duration of the entire training are taken into account. Common ways to tailor the training is to select one or two lessons for one day or two to four lessons for two days. Most of these lessons can be done individually and in days which are not consecutive.

Content Covered Course Duration
Entire Course Content most recommended4 full days
Partial Course Content some topics may be briefly explained or skipped 3 full intensive days
One or two selected lessons 1 full day
One lesson as a coaching sessionHalf day

Additionally, this class course training could be followed by workshops or coaching sessions, which focus on practicing, and applying these concepts on a specific problem or context. This would contribute to applying the patterns, principles and practices learned in the course in real life projects.

Offer

Please contact me for requesting a commercial offer tailored to your needs.

Outline

Lesson: Why Code Quality and Code Design

  • Activities in software development
  • Code Design
  • Functions, Classes, Modules
  • Total Cost of Owning a Mess
  • Technical Debt and Refactoring
  • What is a Good Design

Lesson: Clean Code

  • What is Clean Code
  • Meaningful Names
  • The Boy Scout Rule
  • Coding Standards
  • Comments
  • The Newspaper Metaphor

Lesson: Separation of Concerns (SoC)

  • SoC the Core of Programming Principles and Practices
  • Architectural Styles
  • Cross-Cutting Concerns
  • Data Access Concerns
  • SoC at Module Level
  • SoC at Class Level
  • SoC at Function Level

Lesson: Dependencies Management

  • Define Dependencies
  • The Dependency Rule
  • Circular Dependencies
  • Separating Construction from Use
  • Dependency Injection
  • Service Locator
  • Using Dependency Injection and Service Locator

Lesson: From Principles and Patterns to Practices

  • Cohesion and coupling
  • Inheritance vs Composition
  • Unit Testing
  • Error Handling
  • Boundaries
  • Singletons and Statics
  • Defensive programming
  • Planning and Teaming Implications
  • Code Smells

Lesson: Application Infrastructure

  • What is an Application Infrastructure
  • Application Infrastructure Elements
  • Technical and Functional Components
  • Application Boot Library
  • Data Access Abstraction
  • Package Dependencies
  • Global Exception Handling
  • Validation Mechanisms
  • Generic Entity Management Service
  • Generic Input Validation Engine

Testimonials


What I liked about Florin’s course the most was that he emphasizes on one good way of doing things. In a very opinionated software development world I found this very helpful.

Alexandru-Dan Pop
.NET Software Developer
Coera


A must attend for any developer that wants to write clean and maintainable code.

Mircea Blaga
Product Architect
fme


In my humble opinion reading great books such as Clean Code and following NDC or other conferences helps broadening our perspective and knowledge base. However, they are more like read-only properties. You cannot interact with the ideas exposed in such ways.

Here comes in Florin. Organizing small-scale (~15 people) experience-sharing intensive courses combining years of experience mixed with beautiful, well known and widely accepted theory. The best in all is the way Florin implements DRY in his course. Participate to figure it out how! ;)

Kövér Alpár Etele
Technical Lead
iQuest


The principles presented in the Code Design Training help the developer to write better code, the team to be more efficient and the company to save money (lots of money). To learn these principles there are a few ways: one of them is the hard way which in this case is very painful (especially for budgets), another way is to do the course sooner than later as the course may help developers at any maturity level by showing that things can be done better and by pointing the consequences and the costs of the choices they make while coding.

Andrei Craciun (a hard way learner)
Senior Software Engineer
Intel Education


I highly recommend this course. Florin does a fantastic job in teaching about how to create, maintain and handle software projects, not only from the architecture and design point of view, but also from the team management perspective.

Lucian Torje
Lead Software Engineer
Intel Education


A must for any developer between one to two years of significant experience.

Tudor Muresan
Software Architect
ISDC


I recommend this course because it will help you write code that you like.
Because it will help you understand what you don’t like about badly written code.
And last, but not least, because it structures concepts you already know so that you can find their place and value.

Laura Lungoci
Senior Developer
ISDC


By connecting the code design related “dots” (points of understanding gained with code writing experience), this course may lead to a series of small revelations, which will in the end offer a good overview and higher level of understanding of good code design and the importance of a well-defined application infrastructure.

Alexandru Marchis
.NET Developer
ISDC