Nate SwannerFormer Reporter, TNW
TNW's former West Coast writer in the PNW (Portland, Oregon). Nate loves amplifying developers, and codes in Swift when he's not writing. If TNW's former West Coast writer in the PNW (Portland, Oregon). Nate loves amplifying developers, and codes in Swift when he's not writing. If you need to get in touch, Twitter is your best bet.
To rewrite or not to rewrite, that is the question many Ruby developers face. GitHub wants to help you decide if refactoring code is really your best option, which is why it’s introducing Scientist.
The tool is pretty straightforward: it uses your legacy code, and compares its performance to new code. It then takes return values, and lets you know if your new code is ready for production.
It’s meant for testing pull requests. As projects get larger, Scientist can held expedite your workflow by quickly testing if the candidate code will even work — or if it will break something.
If Scientist sounds a bit like Swift.org’s new Continuous Integration, it’s because it’s a very similar tool — just meant for Ruby. The difference is that CI lets you know if all the code in a pull request will work, while Scientist tests code on how it would perform against real traffic.
The GitHub team has been using it internally for refactoring and a large clean-up of its permissions code, but warn it will hinder performance slightly, and isn’t meant for code that has side effects.
➤ Scientist: Measure Twice, Cut Over Once [GitHub]
Get the TNW newsletter
Get the most important tech news in your inbox each week.