-
Recent Posts
Recent Comments
- Alper Sunar on Presenters, Use Code Snippets for Live Coding
- Carlos Ribas on Presenters, Use Code Snippets for Live Coding
- rsanchez1 on Presenters, Use Code Snippets for Live Coding
- John Teague on Presenters, Use Code Snippets for Live Coding
- Carlos Ribas on Presenters, Use Code Snippets for Live Coding
Archives
- May 2013
- March 2013
- January 2013
- November 2012
- June 2012
- May 2012
- March 2012
- February 2012
- December 2011
- November 2011
- October 2011
- August 2011
- July 2011
- June 2011
- May 2011
- March 2011
- December 2010
- August 2010
- June 2010
- March 2010
- February 2010
- January 2010
- November 2009
- October 2009
- August 2009
- June 2009
- October 2007
Categories
Meta
Category Archives: C
A DSL For Handling Zero, One, Many
All this talk about refactoring to clean up code and monads to create pipelines has put me on a code composition kick… I wrote this code today: 1: private AddAssetResult HandleAssetFamily(SortContainer container, SystemAsset systemAsset) 2: { 3: AddAssetResult result = … Continue reading
Monads in C#: Which Part Is The Monad?
In my previous post on refactoring some code, several people responded in the comments and via twitter that I should look at the Maybe<T> monad as an option. Now, I have to be honest… the potty-humor-teenager in me wants to … 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
Domain Models, Dependencies And Fighting Anemia
For a long time now, I’ve been in the camp that says you shouldn’t have domain entities take dependencies… but at this point I’m having a hard time remembering why. I’m sure I could dig up my old notes and … Continue reading
A question for Rubyists
I was checking out this post from Derick Bailey today, and something struck me rather odd. Not the “DI only enables testability” argument, but the ruby code: class Foo def bar baz = Baz.new baz.do_something end end I’ve been very … Continue reading
A Few Thoughts On IoC, An Idea For A different Type Of Container, And A Lot Of Questions
With all the comments on my previous post, there actually is a lot of great insight to be had. I’ve picked up on a few underlying themes and several of the commenters were able to cut through the cruft of … Continue reading
Design And Testability
In the line of business applications that I build, it’s considered good practice to use a test-first approach; Test-Driven Development, Behavior-Driven Development, or whatever you want to call it. Write a test, verify that it fails for the right reasons, … Continue reading
Serving Images from an Image Controller
Found this solution rather simple when you want to serve images from your database. public class ImageController { readonly IImageQueries Queries; public ImageController(IImageQueries queries) { Queries = queries; } public FileResult Show(int id) { DateTime? dateCreated = Queries.GetDateCreatedById(id); //invalid image, … Continue reading
Also posted in arduino, electronics
Leave a comment
Dynamic View Page, MVC without a View Model
Hello fellow techies on this roller coaster called life. It has been a while since my last post, I have been focusing on some other more important aspects of my life. What I want to talk about in this post … Continue reading
Capturing Rhino Mocks arguments in C# 4.0
As a quick review, a test fixture has inputs and outputs. We set up our test fixture by configuring inputs. We observe the results through the fixture’s outputs. Inputs and outputs can be grouped into direct and indirect variants. Direct … Continue reading
