Friday, October 14, 2011

Pragmatic Programmer Tips, 44 - 70

Continuing with the tips given in the Pragmatic Programmer book. This is the third and final entry. 


Pragmatic Programmer reference tips: 44 - 70


Chapter 6 - While You Are Coding
44.  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.
45.  Estimate the Order of Your Algorithms
       Get a feel for how long things are likely to take before you write code.
46.  Test Your Estimates
       Mathematical analysis of algorithms doesn't tell you everything. Try timing your code in 
       its target environment.
47.  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.
48.  Design to Test
       Start thinking about testing before you write a line of code.
49.  Test Your Software, or Your Users Will
       Test ruthlessly. Don't make your users find bugs for you.
50.  Don't Use Wizard Code You Don't Understand
       Wizards can generate reams of code. Make sure you understand all of it before you
       incorporate it into your project.


Chapter 7 - Before The Project
51.  Don't Gather Requirements – Dig for Them
       Requirements rarely lie on the surface. They're buried deep beneath layers of assumptions, 
       misconceptions, and politics.
52.  Work with a User to Think Like a User
       It's the best way to gain insight into how the system will really be used.
53.  Abstractions Live Longer than Details
       Invest in the abstraction, not the implementation. Abstractions can survive the barrage of 
       changes from different implementations and new technologies.
54.  Use a Project Glossary
       Create and maintain a single source of all the specific terms and vocabulary for a project.
55.  Don't Think Outside the Box – Find the Box
       When faced with an impossible problem, identify the real constraints. Ask yourself: 
       "Does it have to be done this way? Does it have to be done at all?"
56.  Start When You're Ready
       You've been building experience all your life. Don't ignore niggling doubts.
57.  Some Things Are Better Done than Described
       Don't fall into the specification spiral—at some point you need to start coding.
58.  Don't Be a Slave to Formal Methods
       Don't blindly adopt any technique without putting it into the context of your development 
       practices and capabilities.
59.  Costly Tools Don't Produce Better Designs
       Beware of vendor hype, industry dogma, and the aura of the price tag. Judge tools on
       their merits.


Chapter 8 - Pragmatic Projects
60.  Organize Teams Around Functionality
       Don't separate designers from coders, testers from data modelers. Build teams the way 
       you build code.
61.  Don't Use Manual Procedures
       A shell script or batch file will execute the same instructions, in the same order, time 
       after time.
62.  Test Early. Test Often. Test Automatically
       Tests that run with every build are much more effective than test plans that sit on a shelf.
63.  Coding Ain't Done 'Til All the Tests Run
       'Nuff said.
64.  Use Saboteurs to Test Your Testing
       Introduce bugs on purpose in a separate copy of the source to verify that testing will catch 
       them.
65.  Test State Coverage, Not Code Coverage
       Identify and test significant program states. Just testing lines of code isn't enough.
66.  Find Bugs Once
       Once a human tester finds a bug, it should be the last time a human tester finds that bug. 
       Automatic tests should check for it from then on.
67.  English is Just a Programming Language
       Write documents as you would write code: honor the DRY principle, use metadata, 
       MVC, automatic generation, and so on
68.  Build Documentation In, Don't Bolt It On
       Documentation created separately from code is less likely to be correct and up to date.
69.  Gently Exceed Your Users' Expectations
       Come to understand your users' expectations, then deliver just that little bit more.
70.  Sign Your Work
       Craftsmen of an earlier age were proud to sign their work. You should be, too.

No comments:

Post a Comment