When a data structure attempts to implement two different, incompatible usage patterns, it can lead to some nasty surprises. In part 2 we explore how to avoid unexpected integration bugs by following the Liskov Substitution Principal.
No New Legacy Code
A journey to write software that is maintainable, flexible, high-quality, and hand-crafted to last
By Jeremy R. Sellars (@agentjsellars)
Why does no one want to touch that beautiful code I wrote?
Why does "new code" become disgusting "legacy code" so quickly?
How can we stop writing disappointing code?I asked myself these questions, and the blame fell on the face in the mirror. So I set out on a journey toward writing *No New Legacy Code.* I am learning from gurus in the field in an attempt to stop writing code that just makes people want to re-write it.
As professionals, we want software that is, well, "soft" -- maintainable, flexible, high-quality, and hand-crafted to last. This is possible, but it requires professional practices. My first decade of writing software created programs that worked, but quickly became legacy - no unit tests, little separation of concerns, and no one really knows what exactly the users wanted it to do in the first place.
ConcurrentDictionary and the Pit of Success 2016-10-21
When it comes to managing state in .NET, ConcurrentDictionary is not a silver bullet. When a data structure attempts to implement two different, incompatible usage patterns, it can lead to some nasty surprises. This post explores how a "small" violation of the Liskov Substitution Principal can lead to unexpected bugs. ConcurrentDictionary can be accidentally used incorrectly because of a subtle Liskov Substitution Principal violation.
Functional State Management (in .Net) 2016-09-27
Bring some sanity to state management in C# by borrowing functional programming concepts. Some interesting ideas from functional programming, Clojure, etc. put in the context of .net.
Review 'Software Ninja Class Hierarchy' 2015-11-01
I came by this blog post, Software Ninja Class Hierarchy, via a tweet by Corey House (@housecor). I started reading this on Friday, re-reading it on Saturday, and again today. I guess you could say it captured my attention. I found myself agreeing with the author (Terence McGhee). This is the first I've known of the man and I like what I've read so far.