Category Archives for Clean Code

Cleaner Tests with Spock

One obvious fact about tests that is often overlooked is: tests are code. This implies that the tests, as any kind of code, have to be read, understood and maintained. We’re smart, educated guys,

Continue reading

Keep Your Code Consistent

There’s a bunch of things in programming that have seemingly little to no meaning. Some of those things, despite their “seemingly” little meaning cause a lot of pointless discussions

Continue reading

10 Tips To Handle Null Effectively

When I started programming in Java, I considered the null value my enemy and I dreaded NullPointerExceptions that happened fairly often to me. Over time I learned working with it and nowadays I can consider

Continue reading

Perfecting Your SOLID Meal With DIP

The codebase has improved so much lately, that you’re famous now! Each day you come to WooMinus, you’re greeted with a different title: The One Dev To Satisfy Them All, The Grandparent of New

Continue reading

What Naming And Poetry Have In Common?

From time to time, I come across an article or comment that neglects the need for naming things, especially if that would imply creating a function that consists of a single line of code. Another, probably

Continue reading

Hard Rocking With Interface Segregation Principle

Our systems seem safe when it comes to different requirement sources and adding new features. Privately, you’re safer than ever, as King Benedictus promised to protect you. Your life is so beautiful

Continue reading

Find Inner Peace With Liskov Substitution Principle

We’re successfully handling divergent requirements by conforming to SRP. We’ve made our systems extensible by unleashing the power of OCP. Everything at WooMinus seems calm. But your life

Continue reading

The Power of Open/Closed Principle

Continuing our journey through SOLID principles with Ben and Tony, we’re now headed to unleash the power of Open/Closed Principle (and generate an infinite number of reports)! Tony’s new

Continue reading

Single Responsibility Principle Explained

Meet Ben and Tony, two typical employees of an e-commerce company called WooMinus. Ben is a crazy accountant, who can’t stop thinking about cents and euros, while Tony is a product owner who finds

Continue reading

Java Encapsulation For Adults

For proper understanding of this article I’d like you to close your eyes and imagine something. But since having closed eyes and reading at the same time is not an option, we’ll skip the “close

Continue reading