Badges
Tags
Categories
Meta
Category Archives: Programming
Replacing the for loop with Seq.iter
Here’s the initial function in C#: public string BuildQuery(IEnumerable<KeyValuePair<string, string>> args) { var coll = HttpUtility.ParseQueryString(String.Empty, _urlEncoder); foreach (var arg in args) { coll.Add(arg.Key, arg.Value); } return coll.ToString(); } First I rewrote it in F# the following pretty naïve way, … Continue reading
How to make Beyond Compare the default diff and merge tool in Git
Here’s a brief summary of the official documentation: Don’t ask me why BC4 has the shortcut called BC3 still. Go figure. And happy merging! 🙂
TDD kata by implementing LINQ
I just discovered that what I’m writing right now is a new TDD kata. Very interesting and useful TDD kata. Interesting because usual C# developer uses LINQ extension methods on every day basis and it is interesting to re-implement by … Continue reading
The Cult of Legacy
In our company’s software development division due to many reasons, most of them are unknown to me, we apparently have The Cult of Legacy: You can discuss anything but Legacy You can criticize anything but Legacy You can refactor anything … Continue reading
Your constructor smells
A code like the following looks as a “code smell” definitely: public ProductProvider( IProductDataProvider dataProvider = null, IProductDecorator decorator = null, IProductSearchCriteriaParser parser = null, IProductInventoryDataProvider inventoryProvider = null, IProductSessionDataProvider sessionProvider = null, IContentProvider contentProvider = null, IProductQueueProvider queueProvider = … Continue reading
Isolateware
After discussion with my colleague and considering the policies and practices adapted and used in our company towards globalization and isolation of software to write and support, I want to try to formulate a software development methodology anti-pattern: A software called … Continue reading
“Black Hole” software anti-pattern
During digging into eCommerce5 codebase and discussing ongoing impressions with my colleague, I just discovered a software design anti-pattern I called “Black Hole”. As a workaround I declare a rule: Any variables passed into constructor then should be available through a … Continue reading
