Looking for bad code

I am giving a couple of workshops in the next few weeks on refactoring. It’ll be a guided fishbowl experience. I start the pair with code that has specific design problems, then I (and the audience) guide them in ways to refactor those problems away.

I’ve got some of my code to work with, but figured “hey! I should take some suggestions from the audience!”

So, if you’ve got some ugly code that you could share, please give it to me (link to it from a comment or something). I might include it in my workshop. I might even push the pair’s git history up to gitHub.

Oh, and if you want to come to the workshop, I’ll be giving it at Beyond Agile in Seattle on Wed, Oct 26, and then again at Agile Dev Practices in Orlando on November 8.

12 thoughts on “Looking for bad code”

    1. Yup, that's some awful code. Too awful for the beginning of the workshop, but may be a good final challenge.

    2. The difficulty, of course, is that it's so bad that it will be difficult to transliterate into C#. How to extract the awful code without losing any of its glory…

    1. That one looks pretty good. Good size for one kata during the talk, and shows primitive obsession and a bunch of other failings pretty well.

    1. Sounds perfect. Any particular parts of the code base that make good targets? I loves me some primitive obsession.

    1. I'll be running the workshops in C# because of the tooling (R# FTW). However, I'm happy to transilerate code from other languages.

  1. I know this is a really old post, but is there a video recording of your presentation? I'd love to see some refactoring magic using R# (especially some demo of removing primitive obsession)

    1. Sorry; we didn't record. Would be good to get some videos out there. Sadly, not currently near the top of my queue.

Leave a Reply

Your email address will not be published. Required fields are marked *