Over a million developers have joined DZone.
Platinum Partner

Best Best Practices Ever

· DevOps Zone

The DevOps Zone is brought to you in partnership with New Relic. Improving the performance of your app is easy with New Relic's SaaS-based monitoring.

Every once in a while I read something that is so insightful, so clearly written and so well documented that it enters my own personal pantheon of “Best Ever” documents. I recently added a new, simply divine article titled Best Practices for Scientific Computing and hope that everyone reading this post also takes the time to read that article. I’m including the outline here only to encourage you to read the article in it’s entirety.  It is extremely well written.

  1. Write programs for people, not computers.
    1. a program should not require its readers to hold more than a handful of facts in memory at once
    2. names should be consistent, distinctive and meaningful
    3. code style and formatting should be consistent
    4. all aspects of software development should be broken down into tasks roughly an hour long
  2. Automate repetitive tasks.
    1. rely on the computer to repeat tasks
    2. save recent commands in a file for re-use
    3. use a build tool to automate scientific workflows
  3. Use the computer to record history.
    1. software tools should be  used to track computational work automatically
  4. Make incremental changes.
    1. work in small steps with frequent feedback and course correction
  5. Use version control.
    1. use a version control system
    2. everything that has been created manually should be put in version control
  6. Don’t repeat yourself (or others).
    1. every piece of data must have a single authoritative representation in the system
    2. code should be modularized rather than copied and pasted
    3. re-use code instead of rewriting it
  7. Plan for mistakes.
    1. add assertions to programs to check their operation
    2. use an off-the-shelf unit testing library
    3. use all available oracles when testing programs
    4. turn bugs into test cases
    5. use a symbolic debugger
  8. Optimize software only after it works correctly.
    1. use a profiler to identify bottlenecks
    2. write code in the highest-level language possible
  9. Document design and purpose, not mechanics.
    1. document interfaces and reasons, not implementations
    2. refactor code instead of explaining how it works
    3. embed the documentation for a piece of software in that software
  10. Collaborate.
    1. use pre-merge code reviews
    2. use pair programming when bringing someone new up to speed and when tackling particularly tricky problems

The only extra I would have included would be:

11. Maintain and update older code.

If you are still hesitant to go to the original article, go there for the 67 references to other books and articles that discuss scientific computing.  Like I said, this article is a “Best Ever”.

The DevOps Zone is brought to you in partnership with New Relic. Know exactly where and when bottlenecks are occurring within your application frameworks with New Relic APM.

server,devops,best practices

Published at DZone with permission of Jonathan Callahan , DZone MVB .

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}