Monday, September 7th, 2009
The problem: Hiding Your hbm.xml files in Visual Studio (or not) The solution: How to nest NHibernate mapping files in Visual Studio projects I’m doing this in Visual Studio 2008. I don’t know if this is a “bug” or not, but it sure is annoying. The fix Timo posted does work, but it requires editing [...]
Friday, September 4th, 2009
I’m so sick of Ctrl+Tab’ing back to my test file, finding the test I want to run, right-clicking it with the mouse, and selecting Run Test(s) or Test With. How come nobody told me that TestDriven.NET came with keyboard shortcuts? They have to be manually mapped, but once I did that, I’ve found them indispensible. [...]
Saturday, August 15th, 2009
On my new project, I needed to split a method name up into its constituent parts. For Ruby programmers, this is easy: just split on underscores. For us .NET programmers, we need something a little fancier since we like to SquashOurMethodNamesTogetherLikeThis. Here’s a little regular expression that can do exactly that: (?<!^)(?=[A-Z]) That basically says [...]
Tim Barcz is looking for a solution to an interesting problem in his Coding Contest: Create a Programming Pearl post. I decided to challenge myself by writing my solution as a single “line” of code: public static class StringExtensions { private static Dictionary<char, char> _charMap = new Dictionary<char, char> { { (char)8208, (char)45 }, { [...]
Uh, hello. It’s me again. I somehow managed to screw up my previous server. I did have backups, but decided that this was as good a time as any to reboot my weblog. We’ll see how often I manage to post. I’ll try, but I’m not making any guarantees. Thanks for stopping by!
Saturday, August 9th, 2008
Douglas Crockford’s JavaScript: The Good Parts is a short, but informative read that all JavaScript developers should probably pick up. In it, he describes what parts of the JavaScript language we should be using (the good parts) and what parts we shouldn’t (the bad and the awful parts). To help keep ourselves in check, he’s [...]