On a recent project, I was tasked with refactoring large parts of a web system. It’s written in C#. Over time some of the code-behind files had grown to 4000 lines. The goal was to get this number down to a more maintainable level. Over the next few posts, I’ve taken snippets of code that…
Month: October 2010
Getting the Job Done
There is a fine balance between doing it right and delivering. I manage a team of 8 developers. Each hour the team is blocked is eight lost development hours. A co-worker was tasked with getting me a database. After two days of waiting, I inquired the status. He said we were having problems with the…
Business Layer Value
I had a great discussion with my supervisor about application architecture. The question at hand was, what’s the value of the Business Layer? Most applications I’ve worked on are CRUD applications. Is there any value in a thin veneer over the data layer? In my experience, most business layers consist of pass through methods. If…
Weighted Random Distribution
This is genius; I could have used this a couple of years ago. I’m posting it here for safe keeping. Note that I am NOT using the random class. The random class is not truly random. It’s based on time. Time is predictable. RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider(); byte[] result = new byte[8]; rng.GetBytes(result); double…