Hanselminutes with Scott Hanselman cover image

SOLID Principles with Uncle Bob - Robert C. Martin

Hanselminutes with Scott Hanselman

00:00

The Single Responsibility Principle

A method should be extremely focused. If it's got an if statement in it, it probably shouldn't have two or three. And then you wind up with lots of little bits of code underneath well-named functions. I call this cleaning up the room. That's the same kind of thing we get with the single responsibility principle. We name the places that they go with extremely informative names so that our system follows the rule of place for everything and everything in its place.

Play episode from 09:52
Transcript

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app