The wrong duplication (reprise)
I came across this old post again today, and I still like what it has to say: The Wrong Duplication. Maybe I should add a code example…?
I came across this old post again today, and I still like what it has to say: The Wrong Duplication. Maybe I should add a code example…?
November 16, 2011
In case you hadn’t noticed, XP-Manchester is running a Coderetreat as part of the Global Day of Coderetreat on December 3rd 2011. You can find out everything you need to know by visiting our page on Eventbrite, where you can find FAQs, links to further information, and the all-important sign-me-up button. Oh, and it’s FREE… [Read more…]
November 10, 2011
I just upgraded my work laptop to Ubuntu Natty Narwhal, and then I found all my rails projects broken. Whenever I tried to run up a rails server, I got this: $ rails server => Booting WEBrick => Rails 3.0.3 application starting in development on http://0.0.0.0:3000 => Call with -d to detach Exiting /path/to/gems/activerecord-3.0.3/lib/active_record/connection_adapters/mysql_adapter.rb:30: in… [Read more…]
October 28, 2011
In the blog post Simple Design with Design Patterns, Cory Foy runs a thought experiment in which he explores the use of patterns in solving the Game of Life kata. Cory’s starting point is the intention behind the GoF patterns, coupled with the XP rules of Simple Design and Uncle Bob’s SOLID principles. Cory stops his analysis… [Read more…]
September 28, 2011
I learned a long time ago that there are essentially three different kinds of relationship between two classes. They are, in order of increasing tightness: Uses, in which I care only about your public API; Creates, in which I also need to know your class; Inherits/extends, in which I can also see some of your… [Read more…]
September 19, 2011
As you know, I have a thing about conditional code. Most conditionals are duplicates, and the only “genuine” conditionals are at the system boundaries, where they test external state and input information. But I discovered recently that, even at the edges, not every conditional is necessary… Here’s (a drastically simplified version of) some code I… [Read more…]
August 8, 2011
Spork is great. And so is guard and its family of plugins. Early this year I spent a while converting all of my rails projects to use spork, and we even had a team standard tmux setup that ran spork in one of the start-up screens. So every time we saved a file, guard/spork ran… [Read more…]
August 7, 2011
One of the Rails apps I work on has this: $ rspec spec #... Finished in 61.82 seconds 475 examples, 0 failures 61 seconds! (And on top of that I have to wait another 15 seconds for Rails load; that’s a whole other story, and I hope to come back to that in a future… [Read more…]
July 29, 2011
It turns out I co-wrote the feature article in this month’s Better Software magazine!
July 10, 2011
I just posted this review of Wabi-Sabi: For Artists, Designers, Poets and Philosophers by Leonard Koren: This is a wonderful little book about the Japanese art style called Wabi-sabi. The book is short, and many of the pages consist solely of full-page photographs illustrating the ideas. So it’s a quick read, but worth taking the… [Read more…]
December 23, 2011
0