Skip to content

Freelancing Digest

Menu
  • Past Issues
  • Articles
  • About Me
    • Hire Me
    • Contact Me

Daily Refactor #49: Replace Incoming Pane’s Data Value with Object

I’ve made a mistake. The last few refactorings I’ve been doing to the Kanban plugin have been useful but they haven’t really been improving the design of the plugin. I thought about it yesterday and discovered that I was just swapping out bits of procedural code for more procedural code. Once I saw this, I …

Read more

  • redmine
  • refactoring
  • replace-data-value-with-object
  • ruby

Daily Refactor #48: Consolidate Duplicate Conditional Fragments in Kanban

The Refactoring In order to remove the duplication in Kanban#get_issues_for_pane, I need to first consolidate some of the duplication in each case statement. This refactoring pulls the ActiveRecord conditions out of the finder and into the ARCondition object. Before 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 …

Read more

  • consolidate-duplicate-conditional-fragments
  • redmine
  • refactoring
  • ruby

Daily Refactor #47: Extract Method for Kanban panes – Part 3

Here is the third refactoring to clean up how the Kanban class gets it’s pane data. The Refactoring This refactoring is brutal to read through but it’s just moving the body of #get_incoming_issues, #get_backlog_issues, and #get_quick_issues into #get_issues_for_pane. Before 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 …

Read more

  • extract-method
  • redmine
  • refactoring
  • ruby

Daily Refactor #46: Extract Method for Kanban panes – Part 2

This is the second in a series of refactorings to clean up how the Kanban class gets it’s pane data. The Refactoring Using extract method again, I was able to merge #get_active and #get_testing so they both use a new method #issues_from_kanban_issue. Before 1 2 3 4 5 6 7 8 9 10 11 12 …

Read more

  • extract-method
  • redmine
  • refactoring
  • ruby

Testing Rails Plugins on All Cores with parallel_tests

About 90% of my development is done on Redmine and well over half of that is done on Redmine plugins. That means that I write tests; a lot of tests. Over time though, they get slower and slower and start to become a drain on productivity (“5 minutes to run the tests on a feature …

Read more

  • optimization
  • rails
  • ruby
  • testing
Posts navigation
Newer posts
Older posts

About Eric | Twitter | Google Plus
Best of Eric Davis | Best of Freelancing | Best of Product Business | Best of Ruby and Rails Programming
Privacy Policy | Terms of Use | A Little Stream Software website

Want to transition from coder to consultant? Learn more: