Repetition

Repetition is the process that allow us to assimilate what we do. And what we do is learn code processes internals. We could learn domain driven development. We can play code kata to learn development skills.

Repetition of things has a special effect on us. Think about advertisements.

Pattern match

Our brain, is an excelent pattern matcher. Repetetion of code kata, with right princincples behind, reward us with development skills. Repetition create a pattern. And pattern can be part of us. The patten become a behavior. The behavior become familiarity of the process.

Familiarity

Familiarity is like go to supermarket. Doing shopping we choose brand that we know. We like to eat what we are familiarity with.

Understand

Familiarity come when we deeply understand what we are doing. If our job is development. To understand development process we must be familiar with it. And to be familiar with it we must recognize some patterns. How to combine for, while, if statements, and variable, classes and objects?

Let me check a little piece of code I always see in legacy code.

function foo($bar) {
    if ($bar == "fizz") {
        return 42;
    } else {
        return 24;
    }
}
function foo($bar) {
    if ($bar == "fizz") {
        return 42;
    }

    return 24;
}
function foo($bar) {
    return $bar == "fizz"
        ? 42
        : 24
    ;
}
function foo($bar) {
    return [24, 42][$bar == "fizz"];
}

Depending on our rules or preference we can write same code in a huge amount of different ways. The perfect and the best way to do something not exists. But if we are familiar with good ways to do same thing, I am sure we can work with better tools. Our tool is our experience.

Memory

Memory is also the purpose in things repetition. Like when we read multiplication tables in elementary schools. Or poems. First we read, the we try to repeat with memory. After a huge amount of repetition we sink to into our memory. Repetition put things in longer term memory and this is key concept to learn.

In a developer with huge experience, thanks to thousands of ours of training, concepts are deep rooted in neural circuits of the motor cortex thus he/she can do his/her better when leaved undisturbed.

Confidence and error sense

In the world of test driven development there is a lot of people that write tests reasonably well. But those people write ofter test after the code. Write useless test. Test too much. Those people spend hours in writing tests.

Write good tests, is all about confidence. You know how to write a good test. You know how to write good code. You have just to gain the confidence that you are not wasting your time. Having error-sense means that when you recognize that a test does not improve your production code, you have to stop it! Keep a rapid feedback and learn from this error. Key to mastery is confidence and error-sense.

results matching ""

    No results matching ""