<commit_before>---
layout: post
title:  "Single-Responsibility Principle done right"
date:   2017-12-31 13:59:34
comments: true
categories: solid srp programming 
tags:
    - solid
    - srp
    - programming
summary: "I am a big fan of SOLID programming principles by <NAME>. In particular, I thought that the Single-Responsibility Principle was one of the most powerful among these principles, yet one of the most misleading. Its definition does not give any rigorous detail on how to apply it. Every developer has left to his own experiences and knowledge to define what a responsibility is. Well, maybe I found a way to standardize the application of this principle during the development process. Let me explain how."
social-share: true
social-title: "Single Responsibility Principle done right"
social-tags: "srp, solid, Programming"
math: true
---

I am a big fan of SOLID programming principles by <NAME>. In my opinion, <NAME> did a great work when it first defined them in its books. In particular, I thought that the Single-Responsibility Principle was one of the most powerful among these principles, yet one of the most misleading. Its definition does not give any rigorous detail on how to apply it. Every developer has left to his own experiences and knowledge to define what a responsibility is. Well, maybe I found a way to standardize the application of this principle during the development process. Let me explain how.

## The Single Responsibility Principle
As it is used to do for all the big stories, I think it is better to start from the beginning. In 2006, <NAME>, a.k.a. <NAME>, collected inside the book [Agile Principles, Patterns, And Practices in C#](https://www.amazon.it/Agile-Principles-Patterns-Practices-C/dp/0131857258) a series of articles that represent the basis of clean programming, through the principles also known as SOLID. Each letter of the word SOLID refers to a programming principle:

 - **S** stands for Single-Responsibility Principle
 - **O** stands for Open-Closed Principle
 - **L** stands for Liskov Substitution Principle
 - **I** stands for Interface Segregation Principle<commit_msg>Fourth and last installment of post on srp<commit_after>---
layout: post
title:  "Single-Responsibility Principle done right"
date:   2017-12-31 13:59:34
comments: true
categories: solid srp programming 
tags:
    - solid
    - srp
    - programming
summary: "I am a big fan of SOLID programming principles by <NAME>. In particular, I thought that the Single-Responsibility Principle was one of the most powerful among these principles, yet one of the most misleading. Its definition does not give any rigorous detail on how to apply it. Every developer has left to his own experiences and knowledge to define what a responsibility is. Well, maybe I found a way to standardize the application of this principle during the development process. Let me explain how."
social-share: true
social-title: "Single Responsibility Principle done right"
social-tags: "srp, solid, Programming"
math: true
---

I am a big fan of SOLID programming principles by <NAME>. In my opinion, <NAME> did a great work when it first defined them in its books. In particular, I thought that the Single-Responsibility Principle was one of the most powerful among these principles, yet one of the most misleading. Its definition does not give any rigorous detail on how to apply it. Every developer has left to his own experiences and knowledge to define what a responsibility is. Well, maybe I found a way to standardize the application of this principle during the development process. Let me explain how.

## The Single-Responsibility Principle
As it is used to do for all the big stories, I think it is better to start from the beginning. In 2006, <NAME>, a.k.a. <NAME>, collected inside the book [Agile Principles, Patterns, And Practices in C#](https://www.amazon.it/Agile-Principles-Patterns-Practices-C/dp/0131857258) a series of articles that represent the basis of clean programming, through the principles also known as SOLID. Each letter of the word SOLID refers to a programming principle:

 - **S** stands for Single-Responsibility Principle
 - **O** stands for Open-Closed Principle
 - **L** stands for Liskov Substitution Principle
 - **I** stands for Interface Segregation Principle
{'fraction_non_alphanumeric': 0.059123579874797126, 'fraction_numerical': 0.012984001854857407, 'mean_word_length': 4.406015037593985, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1547698', 'n_tokens_mistral': 1143, 'n_tokens_neox': 1050, 'n_words': 629}