Software Development
Best Practices Ever for Software Development
- Write programs for people, not computers.
- a program should not require its readers to hold more than a handful of facts in memory at once
- names should be consistent, distinctive and meaningful
- code style and formatting should be consistent
- all aspects of software development should be broken down into tasks roughly an hour long
- Automate repetitive tasks.
- rely on the computer to repeat tasks
- save recent commands in a file for re-use
- use a build tool to automate scientific workflows
- Use the computer to record history.
- Make incremental changes.
- work in small steps with frequent feedback and course correction
- Use version control.
- use a version control system
- everything that has been created manually should be put in version control
- Don’t repeat yourself (or others).
- every piece of data must have a single authoritative representation in the system
- code should be modularized rather than copied and pasted
- re-use code instead of rewriting it
- Plan for mistakes.
- add assertions to programs to check their operation
- use an off-the-shelf unit testing library
- use all available oracles when testing programs
- turn bugs into test cases
- use a symbolic debugger
- Optimize software only after it works correctly.
- use a profiler to identify bottlenecks
- write code in the highest-level language possible
- Document design and purpose, not mechanics.
- document interfaces and reasons, not implementations
- refactor code instead of explaining how it works
- embed the documentation for a piece of software in that software
- Collaborate.
- use pre-merge code reviews
- 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.
Reference: Best Practices Ever for Software Development from our JCG partner Andriy Andrunevchyn at the Java User Group of Lviv blog.
Kept it very simple. Worth reading. Thanks author.
Very good summary, and the best part is that author did not make it into 1.5 hour video! :)
Liked +1
Actually it’s also re-post from this blog :) http://mazamascience.com/WorkingWithData/?p=1218
Bookmarked! It pays to be reminded of these simple list of best practices every now and then. Thanks for sharing, Bohdan. Cheers!
Great post! Love the point about refactoe code instead of trying to explain what it does