DEV Community

Discussion on: On the Occasional Misdiagnosis of "Not Invented Here Syndrome"

Collapse
 
keithrbennett profile image
Keith Bennett

"These named patterns we identify with should always be the start of a conversation or debate, not the thing that ends the debate."

Very well said.

I've seen lots of programming "best practices" come and go. Many years ago it was "comment everything". Later on it was "comment nothing". Both are wrong.

As our experience grows, we realize that dogmatic oversimplifications like these are naive. They fail to take into account context and nuance. They may be correct in most cases, but when invoked as sacred truth their overuse is detrimental to a code base.

Another example is YAGNI (You Ain't Gonna Need It). I've been in discussions where, as you suggest, invoking it was like playing a trump card -- subsequent discussion was futile. YAGNI has an extreme beyond which it should not apply; if you wrote a left-pad method (speaking of left-pad methods) and so far you always needed to pad to a width of 16, would you write this?:

def left_pad_16(string)

No, of course not, you would parameterize the width:

def left_pad(string, width)

And yet the unquestioning application of YAGNI would dictate against that. It's a silly extreme, but it illustrates the point.

So, as you say, "not invented here syndrome" raises an important and useful question, but applying it unconditionally without considering the context and nuance is unhelpful.