Github’s Scientist as a helper to do large refactorings

Using github scientist for large refactorings in java

Github’s Scientist is a tool to create fitness functions for critical path refactorings in a project. It relies on the idea that for a large enough system, the behavior or data complexity makes it harder to refactor the critical paths only with the help of tests. If we can run the new path and old path in production in parallel without affecting the current behavior, and compare the results, then we can decide the best moment to switch to the new path more confidently.
I created a simple example to demonstrate the application of the concept on a java project.

Prologue

Some software companies don’t pay enough attention to the overall quality of their codebase. We might even say that this is a common pattern in the software business. The rationale for such a behavior is often justified by the claim that paying attention to “fast delivery to market” is far more important than code quality aspects of the product. Similarly, caring more about whether the functionality is there, is what matters for the business.

During the early stages of a project, this claim might have the (false) appearance of being true; your codebase has not grown that large yet, and you are delivering to your customers with “unbelievable” velocity. Since this the case, there is no point in caring about this technical nonsense. However, as time goes by, this kind of approach causes the technical debt to pile up. It slowly starts to cripple your market maneuvering capability, makes your code harder to change and degrades your developers’ motivation.

Continue reading “Github’s Scientist as a helper to do large refactorings”

Testing Java Projects with Groovy

Testing java projects with groovy.

This example demonstrates how we can implement our tests using groovy in a java based project. You might be asking why. Well, implementing tests with groovy has some advantages like easier mock creation, expressive business readable test method names, seamless adaptation with BDD frameworks, and so on. If you want to investigate testing java projects with groovy, the article will, then, provide you a starting point for your investigation.

Continue reading “Testing Java Projects with Groovy”

Spring Boot Rest API Documentation Using Rest Assured Tests

Generating rest API documentation with rest-assured tests.

A clear and concise REST API documentation is mandatory for a rest API to be easily used. However, it’s error-prone and it is also hard to maintain API documentation if we attempt to write it manually. This sample project demonstrates how we can use rest assured tests along with spring boot to generate API documentation with a small amount of manual work.

Continue reading “Spring Boot Rest API Documentation Using Rest Assured Tests”