Kevin Rutherford's Blog, page 2

September 2, 2022

Functions with multiple parameters

Okay, it’s time for a survey article. This is the kind of article that I hinted at in If this were a book. The general plan of attack in articles like this will be:

Outline a single simple example of implicit coupling.

Explore solution options in a wide variety of different (types of) programming languages.

This could all go horribly wrong, so please bear with. I have no idea where this might take us. But I haven’t seen this done anywhere else before — not even Martin Fowler has written anything si...

 •  0 comments  •  flag
Share on Twitter
Published on September 02, 2022 00:00

August 26, 2022

TDD mistakes 3

Back in 2014 I wrote a blog post listing three mistakes often made by folks who are new to test-driven development (TDD). The three mistakes I identified are:

Starting with error cases or null cases.

Writing tests for invented requirements.

Writing a dozen or more lines of code to get to GREEN.

It was a very long post, so I’ve taken the three parts and expanded each into its own article, also incorporating the comments I received in 2014. This is part 3, and will deal with taking a step that’s too b...

 •  0 comments  •  flag
Share on Twitter
Published on August 26, 2022 00:00

August 19, 2022

TDD mistakes 2

Back in 2014 I wrote a blog post listing three mistakes often made by folks who are new to test-driven development (TDD). The three mistakes I identified are:

Starting with error cases or null cases.

Writing tests for invented requirements.

Writing a dozen or more lines of code to get to GREEN.

It was a very long post, so I’ve taken the three parts and expanded each into its own article, also incorporating the comments I received in 2014. This is part 2, and will deal with writing tests for invented...

 •  0 comments  •  flag
Share on Twitter
Published on August 19, 2022 00:00

August 12, 2022

TDD: Three easy mistakes

Back in 2014 I wrote a blog post listing three mistakes often made by folks who are new to test-driven development (TDD). It was a very long post, so I’ve taken the three parts and expanded each into its own article, also incorporating the comments I received in 2014. This is part 1.

Each time I visit a team that is relatively new to TDD I find the same basic mistakes cropping up every time. The three mistakes I see most often are:

Starting with error cases or null cases.

Writing tests for invented...

 •  0 comments  •  flag
Share on Twitter
Published on August 12, 2022 00:00

August 5, 2022

Shotgun surgery

What’s your favourite code smell?

Daft question, I hope you’ll agree.

But I think I do have a favourite. It’s Shotgun Surgery. Why? Because it tells me so much about my design. Let me explain…

Firstly, many of the other code smells often feel quite ambiguous to me. Is this Feature Envy or is it a reasonable separation of responsibilities? Is this Primitive Obsession or simple value passing between close collaborators deep inside an encapsulated mechanism? Very often I spend too much energy debating...

 •  0 comments  •  flag
Share on Twitter
Published on August 05, 2022 00:15

July 29, 2022

Diving into the 4 rules of simple design

I’ll be taking a break from writing during the summer, so these weekly articles may contain slightly less deep content for a few weeks. When I’m back I have big plans for this newsletter, so make sure you’re subscribed so you don’t miss anything!

Subscribe now

This week I thought I’d take a somewhat more detailed look into the 4 Rules of Simple Design. I’ve mentioned them quite a few times in my early articles, so let’s look a little more closely.

To recap the 4 rules, code that is “simple” (ie. ha...

 •  0 comments  •  flag
Share on Twitter
Published on July 29, 2022 00:15

July 22, 2022

Estimating user stories

This is an article I wrote in 2014, rewritten slightly to account for the ravages of time and to incorporate the comments I’ve received since then. It’s about an idea I've introduced to every software team I’ve coached during the last eight years. If you try it, please publish your experiences and link to them via the comments here.

TL;DR:
Don't guess the size of a user story;
slice the story until it’s the size you want.

So there's this big discussion going on about #NoEstimates — and how estimatin...

 •  0 comments  •  flag
Share on Twitter
Published on July 22, 2022 00:15

July 15, 2022

Open thread: What's the most useful type of content here?

This week I need your help.

I want to grow this newsletter so that it becomes more and more useful to you, so I’d like to get your help in shaping the content.

I know that you, like me, are passionate about the internal quality of the software you create. And like me you’re frustrated that there’s very little practical advice out there to help with refactoring, and with test-driven development in general.

So how can I help? What do we, as a community, need this newsletter to provide?

I’ll put my own...

 •  0 comments  •  flag
Share on Twitter
Published on July 15, 2022 00:15

July 8, 2022

Integration tests

I’m really enjoying answering your questions and comments, because it’s making me thing about things I had clearly taken for granted! This week, a question I received via email…

In response to Thinking about APIs reader Richard made this comment directly to me via email:

Have you thought about integration tests? That could solve some of the issues about the changing contracts.

Yes, integration tests — indeed all kinds of automated checking — definitely help to establish our software’s correctness. ...

 •  0 comments  •  flag
Share on Twitter
Published on July 08, 2022 00:20

July 1, 2022

Static and dynamic analysis

Last week I answered a couple of points from a Manchester-based Slack channel. That same Slack thread continued with another comment from Ross:

Is it safe to say the static section in your "handy cut out" is explicit coupling and the dynamic section is implicit ?

By “handy cut out” Ross is referring to my 2016 representation of the various kinds of Connascence:

These nine kinds of Connascence were identified by Meilir Page-Jones in his book Fundamentals of Object-oriented Design in UML, and I discu...

 •  0 comments  •  flag
Share on Twitter
Published on July 01, 2022 00:20

Kevin Rutherford's Blog

Kevin Rutherford
Kevin Rutherford isn't a Goodreads Author (yet), but they do have a blog, so here are some recent posts imported from their feed.
Follow Kevin Rutherford's blog with rss.