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”
Hudson/Jenkins code? see http://gojko.net/2011/04/05/how-is-it-even-possib…
Yup, that's some awful code. Too awful for the beginning of the workshop, but may be a good final challenge.
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…
have you seen the Gilded Rose Kata? http://iamnotmyself.com/2011/02/13/refactor-this-…
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.
I've used this in the past: https://sourceforge.net/projects/buddi/
It created some wonderful refactoring exercises, especially since the seeming lack of domain objects… (so lots of primitive obsessions in there)
Sounds perfect. Any particular parts of the code base that make good targets? I loves me some primitive obsession.
Does it need to be on any particular platform?
I'll be running the workshops in C# because of the tooling (R# FTW). However, I'm happy to transilerate code from other languages.
Ayende's been doing intermittent code reviews of OSS projects. All of the examples have been C#. http:/ /http://ayende.com/blog/tags/reviews
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)
Sorry; we didn't record. Would be good to get some videos out there. Sadly, not currently near the top of my queue.