My two rules to start writing code

What lacks in many tutorials and examples is not how to write, implement and test code but how to begin writing code as in what are the first things to do to write a code to an end.
I use two rules when starting new code.

My number one rule for starting to write code

Write function calls in context before writing the functions (or classes or methods).

// someFile.php

class PoliteBot{
    public function makeKind( $phrase ){
        $kindWords = $this->wordProvider->getKindWords();
        return $this->wordReplacer->replaceWordsInWith($phrase, $kindWords);
    }
}

given the ideal, and completely fictional, class above I now know I will have to implement two classes with a method each.

My number two rule for starting to write code

Let go of “and”.
In the example above the two classes could really be one that

provides words and replaces them in phrases

I used “and” in the class definition and hence will implement two classes in place of one. “And” is a word not to use in code to me.

And that’s all. Many other golden rules I try to apply in code like the DRY principle or the KISS principle but the two above really condition the way I start my work. And a good start is all to me.

I appreciate your input