I was once accused of primitive obsession. Especially when it comes to strings. Guilty as charged! There’s a lot of reasons to be obsessed with string primitives. Many times, the data really is a just a string and encapsulating it in some custom type is just software “designerbation.” Also, strings are special and the .NET Framework heavily optimizes strings through techniques like string interning and providing classes like the StringBuilder. But in many cases, a strongly typed class that better represents the domain is the right thing to do. I think System.Uri and its corresponding UriBuilder is a...
As a kid, I was an impatient little brat. On any occasion that required waiting, I became Squirmy Wormy until I pushed my dad to make the demand parents so often make of fidgety kids, “Sit still!” Recent evidence suggests a rejoinder to kids today in response to this command, “What!? Are you trying to kill me?!” There is compelling evidence that modern workers propensity to sit for prolonged periods every day makes them fat and shortens their lives. Hmmm, you wouldn’t happen to know any professions where sitting limply at a desk for long periods of time...
I was reading Jeff Atwood’s latest post, Programming: Love it or Leave it when I came across this part, emphasis mine. Joel implied that good programmers love programming so much they’d do it for no pay at all. I won’t go quite that far, but I will note that the best programmers I’ve known have all had a lifelong passion for what they do. There's no way a minor economic blip would ever convince them they should do anything else. No way. No how. Unlike Jeff, I will go that far. I love to...
Here’s the dirty little secret about being a software developer. No matter how good the code you write is, it’s crap to another developer. It doesn’t matter if the code is so clean you could eat sushi off of it. Doesn’t matter if both John Carmack and Linus Torvalds bow down in respect every time the code is shown on the screen. Some developer out there will call it crap, and it’s usually the developer who inherits the code when you leave. The reasons are many and petty: Your code uses string concatenation in that one method rather than...