A recent work project needed the ability to "turn on and off" MVC routes dynamically, depending on the user that was logged into the system. However, I didn't want to update all the existing controllers to handle the logic in each action. Furthermore, I didn't want any new controllers/actions to need to know about this logic. I did some research and tried a few strategies. Then [Josh Rogers](http://joshuarogers.net) mentioned `IRouteConstraint`.
It's been a while since I've posted. I'm not sure if anyone even reads my posts anyway... If only there were a way to see if anyone reads them... Which reminds me... Once upon a time, I set up Google Analytics on a couple websites. The immediate results were actually really neat. I could see that people were visiting the sites.
I ran across this [article](http://www.codeproject.com/Tips/798140/Switch-statement-alternative) on an alternative to switch statements. Basically it was using a look-up table rather than a switch statement.
Not all error messages are very helpful. Usually, the less descriptive an error message is, the longer it takes to track down the issue. In my case, it concerned this blog itself. I was having an error while attempting to preview my site with `rake preview`.
Regular expressions can be super useful, but they can also be a bit of a pain to work with sometimes. Yesterday I learned about something pretty handy -- a way to tell the regular expression to not capture a group. I've been dealing with captured groups that I do not need captured for years now. Finally, I found an way to remove that nuisance.
Coming soon to a browser near you!