Scientific software design