July 2017

Nonredundancy and Testability

July 26, 2017 0 comments

Redundancy is always a maintenance issue. If you have to change redundant code, you have to do it in multiple places. If you have to extend redundant code, you have to do it in multiple places. When you have to test redundant code, you have to modify tests in multiple places. You get the idea. […]

CONTINUE READING THIS POST →

Pathologies of Redundant Code

July 19, 2017 0 comments

Remember Y2K? Before the turn of the millennium, computer storage was at such a premium that years were stored with only the last two digits so the year 1989 was stored as 89. This worked fine—up until the end of 1999, at which point the year returns to 00 which many programs would interpret as […]

CONTINUE READING THIS POST →

Quality Code is Nonredundant

July 12, 2017 0 comments

The last code quality that we’ll discuss in this series, the “N” in CLEAN, calls for code to be nonredundant. On its surface it seems pretty straightforward but there is some subtlety to redundancy as well. It’s easy to see why redundancy in code is a bad thing. It’s a duplicated effort. It means that […]

CONTINUE READING THIS POST →

Assertiveness and Testability

July 5, 2017 0 comments

It’s quite difficult to test inquisitive code. Very often the results of running a piece of code can only be found in another object. Therefore a test must use a separate entity, which we typically call a “spy,” to monitor the external object and validate that it was called correctly. This adds unnecessary complexity to […]

CONTINUE READING THIS POST →