Best practices for algorithms