Let me tell you a secret, writing computer programs; coding is easy. I’ve spent most of my life in business as a finance professional and finance systems consultant, which was hard. It was almost impossible. All day every day, I had to deal with other people. I had to read their minds to find out what makes them happy and then give that to them. I had to make small talk, network and build working relationships. I had to decide on who to hire and who should be fired. I had to be empathetic, thoughtful, polite, friendly and motivated.
However, I could not mind reading. I was often stereotyped as the black working class trouble maker — the foreigner, separate and different, temporary and future enemy. I was tolerated as I could see what they couldn’t see. I saw blindingly obvious solutions that saved companies millions of pounds. I saved EasyJet millions of pounds simply by reading and understanding the published VAT rules, something anyone could have done. I then applied them as stated by using simple maths and percentages. This enabled them to calculate their correct VAT liability instead of overpaying.
Test Driven Development
Decide what you want the code to do. Then write a test in code that passes when the code does what it suppose to do. Update the code until the test passes. No magic or mind-reading is needed. This is Test Driven Development (TDD)
As Kent Beck says, “TDD is meant to eliminate fear in application development. The byproducts of fear include tentative, grumpy, and uncommunicative programmers who cannot absorb constructive criticism. When programming teams buy into TDD, they immediately see positive results. They eliminate the fear involved in their jobs.”
TDD Hello world example
Write failing code — decide on code design