DEV Community

Paul Michaels
Paul Michaels

Posted on

Rules and Tips for Programming and Development

When I was at college, learning Pascal, I wrote a "10 Commandments of Programming" as a bit of a joke for myself. It never made it as far as the internet. These were the days of Borland's Turbo Pascal; the latest technology was an inside toilet, and the most expensive modem that money could buy was 14.4kbps!

I thought I'd draw up a similar idea for the modern age. Hopefully, somebody will find it amusing. Feel free to add your own.

1. Never use goto statements (even though Asp. Net Core code is riddled with them).

2. Being part of a code review / pull request means that your code works - even if neither the author or the reviewer has ever actually looked at the code. That's the magic of a PR.

3. The following incantation means that code will magically appear at a future date:

    // ToDo: [anything can go here - even if it makes no sense!]

4. If someone asks you how your code works, and you don't know, don't worry: just keep switching code panes using Ctrl-Tab, and using words like: push, suck and squirt; for example: "this section sucks the variable from somewhere and pushes it to somewhere else, where it squirts it out."

5. Mention the term "design pattern" as often as possible (even if you don't know what it means), and wherever possible, namedrop someone whose name was on the Agile Manifesto. You get extra points for referring to them as though you know them personally: "Uncle Bob's opinion on this is ..." or "Fowler said you should ..."

6. Self belief is everything. Even if you've been struggling with a problem for days and days, whenever you're asked how long is left, you must give and answer in hours. Also, never admit to actually spending more than two hours on anything. Try this handy chart:

"Almost done": "I've spent a week on it, and I have no idea why it's not working."
"I'll have it done this morning": "There's a week of work left."
"I'd say it's a couple of hours work": "The requirements are so vague, it could be anywhere from 20 minutes to 5 years."
"Less than half an hour": "I did this yesterday, so I'll be finishing half an hour early today."

7. Don't let your CV get stale. If you feel like it is doing, you should quickly approach your line manager and suggest a rewrite in the latest Javascript framework. You might try an approach such as:

"We need to replace this legacy* Angular system with bananagrape.js**."

* Legacy can be used to describe any code that was started more than 5 minutes ago.

** If bananagrape.js is a real thing then I want some form of compensation for my idea!

8. Only developers over the age of 35 use Visual Studio. Everyone else uses VS Code with a customised dark theme.

9. Never code review a unit test: the mere fact that a unit test has been written automatically makes it correct, no matter how vague and spaghettified the code may be.

10. There is no need to actually read the Agile Manifesto. Even if you practice 'Agile'. It's better to ask to be sent on a week long training course; after all, you can't put "Read the agile manifesto - it was 50 words," on your CV, but 'Certified Scrum Master' looks great.

Latest comments (0)