DEV Community

Cover image for 100 Tips from The Pragmatic Programmers Book: Part 7/10
Rajesh Royal
Rajesh Royal

Posted on

3 2 2 2 2

100 Tips from The Pragmatic Programmers Book: Part 7/10

7.1. Listen to Your Inner Lizard.

When it feels like your code is pushing back, it’s really your subconscious trying to tell you something’s wrong.

 

7.2. Don’t Program by Coincidence.

Rely only on reliable things. Beware of accidental complexity, and don’t confuse a happy coincidence with a purposeful plan.

 

7.3. Estimate the Order of Your Algorithms.

Get a feel for how long things are likely to take before you write code.

 

7.4. Test Your Estimates.

Mathematical analysis of algorithms doesn’t tell you everything. Try timing your code in its target environment.

 

7.5. Refactor Early, Refactor Often.

Just as you might weed and rearrange a garden, rewrite, rework, and re-architect code when it needs it. Fix the root of the problem.

 

7.6. Testing Is Not About Finding Bugs.

A test is a perspective into your code, and gives you feedback about its design, api, and coupling.

 

7.7. A Test Is the First User of Your Code.

Use its feedback to guide what you do.

 

7.8. Build End-To-End, Not Top-Down or Bottom Up.

Build small pieces of end-to-end functionality, learning about the problem as you go.

 

7.9. Design to Test.

Start thinking about testing before you write a line of code.

 

7.10. Test Your Software, or Your Users Will.

Test ruthlessly. Don’t make your users find bugs for you.

 
Thanks for reading, happy coding 😀

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay