devxlogo

Scientist Tool Helps Rewrite Ruby Code

Scientist Tool Helps Rewrite Ruby Code

GitHub has released Scientist 1.0, a Ruby library that assists with code rewrites. It shows developers what will happen when rewritten code is executed, compared with how the original code ran. “It works by creating a lightweight abstraction called an experiment around the code that is to be replaced,” GitHub engineer Jesse Toth said. “The original code — the control — is delegated to by the experiment abstraction, and its result is returned by the experiment. The rewritten code is added as a candidate to be tried by the experiment at execution time.”

GitHub says that developers should follow a similar procedure when rewriting code in any programming language. “Even if Ruby isn’t your language of choice, we’d still encourage you to apply Scientist’s experiment pattern to your system,” said Toth.

View article

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist