
Why is Clean Code suggesting avoiding protected variables? - alpb
http://programmers.stackexchange.com/questions/162643/why-is-clean-code-suggesting-avoiding-protected-variables
======
k3n
I just learned about the existence of this book a few minutes before seeing
this post (what's the name of the phenomena whereby after discovering
something once, you immediately observe it again?), and the M.O. of the book
resonates with me; I do lots of refactoring, as well as a fair amount of API
design, and I've always put a lot of thought into the "best" way to write
code. E.g. while I personally enjoy writing clever code, such code is usually
a detriment in a team environment. I also get irritated when others don't put
time & effort into writing clean code (or at least putting a minimal amount of
thought and effort into it).

But I see that there's some pushback against this book, and so I'm not sure if
it's all that it's cracked up to be. Anyone have any opinions?

~~~
phaylon
I think you mean the Baader-Meinhof phenomenon[1], which I always find funny,
since I learned about it the day after I watched the movie.

[1]: Listed on <http://en.wikipedia.org/wiki/List_of_cognitive_biases>

~~~
k3n
Yes, that's it! Oddly enough, I can never remember the name of it. I'm going
to attempt to commit it to long-term memory by classifying it as a cognitive
bias; hope it sticks this time...

------
wzhack
Actually the perspective of languages like objective C and Python about
variable privacy or accessibility is pretty flexible.

