You are not using any design patterns in your code!

Samir Joshi
To program is to create
2 min readJun 30, 2009
Learning inhabitation

Let me begin with a story:

“You are not using any design patterns in your code!”

- with a look of disappointment, a colleague of mine declared to me. Obviously, he had expected better from me.

That was a few years back. After some prototyping, I had created base line code that would eventually evolve as Fixed Income Trading product. The colleague who is quoted above — let’s call him Mr. PatternFan — was interested in the project. So, I pointed him to the source code. After couple of days, he came back to me, and that is when he gave me the feedback — “Your are not using any design patterns in your code !”

It took me a while to understand his feedback. This individual had accepted use of ‘Design Patterns’ as a mark of a good software design. So he was looking for presence of design patterns in code, to determine if the code was ‘well designed’. Moreover, he was familiar with only a few patterns: Singleton, Factory, Service Registry etc. He was looking for use of these patterns in the code. The code in question used Spring IoC container, which abstracts away much of the object creation and look up details. So Mr. PatternFan was not able to find any of the patterns he was looking for. Hence his disappointment.

Thus, this person’s unfamiliarity with Spring container (or in general, IoC concept) combined with limited familiarity with patterns led him to form an incorrect opinion. However, no or little familiarity is not basis of incorrect decision — it is person’s lack of awareness about his/her unfamiliarity.

Alfred North Whitehead had these wise words to say:

“Not ignorance, but ignorance of ignorance is death of knowledge”

We will have much to say on this blog about knowledge and learning. One point we will come to again and again is this: Individuals must take charge of their own learning. And a very valued treasure in this regard is to have ‘Enlightened Ignorance’ — being aware of one’s own ignorance.

Enlightened Ignorance’ equips one with a beginner’s mind — which is a land fertile for learning to grow. More on this later !

--

--