-
Recent Posts
Recent Comments
Archives
Categories
- activesupport.net
- alt.net
- automation
- bash
- bdd
- binsor
- blogging
- blueprint
- boo
- books
- build
- bundler
- c#
- c# patterns mvp
- cancan
- capistrano
- castle
- commerce server
- communication
- community
- compass
- cucumber
- deployment
- devise
- domain-driven design
- factory_girl
- firefox
- git branch-per-feature
- haml
- jquery
- mbunit
- microprenuer
- mongodb
- mongoid
- monorail
- mstest
- nant
- nbehave
- nhibernate
- nspec
- osx
- patterns
- personal
- podcasts
- presentations
- productivity
- projects
- rails
- refactoring
- resharper
- reviews
- richmond dnug
- rspec
- rstakeout
- ruby
- rvm
- sass
- screencast
- screencasts
- scriptaculous
- steak
- subtext
- tales from the smelly side
- tdd
- terminal
- testing
- tools
- Uncategorized
- usability
- virtual teams
- vlad the deployer
- web
- windsor
- wordpress
- working from home
Meta
Category Archives: refactoring
A Guest Appearance On Tekpub’s Knockout.js Series
Tekpub release their series on Knockout.js recently and I was fortunate enough to make a guest appearance! Now I know you’re thinking “why would Derick make an appearance in a Knockout series?!” But don’t worry – I’m not there to … Continue reading
Improve your LINQ with .Any()
LINQ’s .Any() method is under-utilized, given the benefits it brings in making your code briefer, clearer, and more efficient. LINQ in general improves the expressiveness of your collection-manipulating code by using declarative statements instead of imperative foreach loops; .Any() is … Continue reading
Running JavaScript… With Sneakers!
Code-review time. I haven’t written significant JavaScript in forevs, but I hit upon a use case well suited to it, had a blast coding it up, and am confident that I’ll be completely mystified by it three months from now. … Continue reading
Also posted in nhibernate
6 Comments
Rebuilding My Backbone.js Plugins With Modules, SRP and More
In the last few weeks, I’ve rebuilt and refactored a large amount of JavaScript code in both my Backbone.ModelBinding and Backbone.Memento plugins. In the process, I re-learned several object oriented design principles and how they apply to JavaScript. I also … Continue reading
Legacy Operating Systems and Legacy Languages: If it ain’t broke, it still needs fixing
In my travels I’ve encountered systems chugging happily along on outdated, discontinued, unsupported technology stacks. Apps written in VB6, FoxPro, Classic ASP, still running without a hitch because the kinks had been shaken out years ago… Software users delicately avoiding … Continue reading
An Object Lesson in Binary Compatibility
A riddle for you, friends: When is changing a method from return void to return Something a breaking change? If you already know the answer, then why hadn’t you told me? Could’ve saved me a fair bit of embarrassment. Ah … Continue reading
Also posted in c#, mbunit, tdd
3 Comments
Good Refactoring / Patterns For Simple UI Logic?
I’ve got a chunk of C# that sits inside of a very simple form. The form downloads an update from a web page – one of two possible downloads, based on which one is available – and shows a message … Continue reading
A Less Ugly Switch Statement For C#
I know switch statements are considered “evil” because they are very procedural code, they violate the Open-Closed Principle, etc etc. But every now and then I don’t see a need to do anything more than a switch statement because the … Continue reading
A Refactoring: Explicit Modeling And Reducing Duplication
A coworker showed me a method that had a series of guard clauses at the top and a series of sequential steps that had to be processed after that. All of the guard clauses and sequential steps were executed the … Continue reading
"Refactoring" Notes
I’m not going to bother with a review of Martin Fowler‘s Refactoring: Improving the Design of Existing Code. It’s good enough that its catalog, available in expanded form online, now provides the definitive vocabulary shared by dozens of refactoring tools … Continue reading
Also posted in castle, monorail, tdd
Leave a comment
