Sunday, May 5, 2013

Best practices

When you start doing new things, you learn about the "best way to do thing" or "rule of thumb to follow". This is specially the case in software development.

A best practice is composed of two parts : the action, and the purpose.

For example, a convention is a best practice.
The purpose of convention is to make your work easy to read for other people.

The problem is that newbies only remember the action part of the best practice, but rarely the purpose.
The action of the best practice applied to the wrong purpose is not application of the best practice.

Example :
I follow a nutrition plan and I need 2 slices of avocado.
A friend told me that the best practice is to cut the avocado vertically, and remove the kernel.
But she was wrong. She forgot the purpose of doing it that way.
If I cut the avocado that way, the rest of the avocado will rot quickly in my fridge, because I only need 2 slices.

That's why, I always ask my students "what do you want to do, and why ?" so I can explain the best way to do that in their context.

That's why, I also never says : "Always do blahblah because blahblah".
Because the students will remember "Always do blahblah"... or just forget.

On the other hand, you can say : "You are doing blahblah, what problem are you stumbling on ? ok, here is a best practice that solve it nicely".

The purpose must be taught before the action. And through practice the action will become automatic when the purpose appears.
This also teach to be practical and critical.

Memory is like a network, the more link lead to an idea, the stronger and longer it will stay.

Your students will never respond immediatly to a question like "what are the best practices in software programming ?"
However, as they write code, their brain muscle will automatically bubble up the right way of solving the current problem. The memory becomes contextual.
Retrieving contextual information is what a network is the best at, your memory retrieve contextual information without any effort on your part.

No comments:

Post a Comment