From Good to Great

The third great conference talk I want to share is Ben Orenstein’s Aloha Ruby Conf 2012 talk called Refactoring from Good to Great. Ben shows some common refactoring patterns by doing live coding on stage. He not only covers what he’s doing, but he also talks a lot about the why. I learned a tremendous amount from this talk. Here are some of the topics he covers: Extracting temporary variables to query Tell don’t ask Reducing parameter coupling by extracting data clumps into an object Feature envy And a few more. My favourite quotes from the talk are: I’m starting…

A therapy session with Katrina Owen

This week I’m posting a mini-series on great conference talks. Today’s installment is a talk by Katrina Owen called Therapeutic Refactoring. I’ve watched and re-watched, and re-re-watched this talk several times over the past year. Each time, it just seems to get better and better. I understand more of it, and notice and learn new things. It’s also got great slides, a lot of which are from Hyperbole and a Half. Katrina is also running exercism.io, a site where you can complete small coding problems and get peer feedback on them. I’ve been enjoying participating in that recently as well….

Moving grouping queries from the Database to ActiveRecord

Today’s post is a refactoring story. The ERP I wrote for my old company includes an automatic commission calculator. It looks at quite a few aspects: How much we billed each client What ‘category’ each billed service was Whether the employee was involved in the initial sale or ongoing management of the client at the time the invoice was issued Whether the client reimburses our expenses separately from the cost of the service, or whether the expenses are ‘baked in’ to the cost of the service Whether we have received payment yet, or are still waiting to recieve payment Whether…