Programming advice

@20231101 1531

Occasionally, I read programming advice that resonates. This is an example of

The summary at the bottom reduces it to three points only,

    Avoid premature optimisation.

    When in doubt, use brute force.

    Write stupid code that uses smart objects.

Advice can easily be misunderstood,

    I was led astray in the early days by "don't repeat yourself". That was
    awful advice.

    Trying to follow that, I would cram different functionality into a single
    class structure, and go to unreasonable lengths to reuse functions. 

    There is a related sentiment that is valuable, "avoid engineered
    coincidence". If you have two things that are meant to be the same, get
    them from the same source.

I suspect there is a better way to express "Write stupid code that uses smart
objects." A new programmer will not be able to recognise a smart object.