For a while now I have wanted to write a dynamic formula engine that could take a math equation sting and resolve it. While researching an unrelated topic I found a bit of code for a "FormulaGenerator" by Tiberiu Ionescu. The code is written for a single thread application, and it works wonderfully in that context. Unfortunately, I need something like it in a web application. I also want to be able to use variables within the formula for example :( 5 * x ) The Formula G...
[More]
Recently, we did an upgrade to a new version of the .net blog engine. This update changed how the URLs work and relate back to posts, images, and attachments. While I am kicking myself for not testing the upgrade before deploying it; I am also a bit surprised that the new code was released without maintaining backwards compatibility of posts that were already published. This brings me to a cross roads of choice. Do I... dig in the code, find the issue and and the backwards compatibility ...
[More]
Every developer runs into a hidden requirement leaving them feeling like a bird who discovered a closed window. Hidden requirements are not new, nor are they exclusive to software development. The first time I recall learning about hidden requirements was many years ago when I was in high school. My Father owned a couple duplexes which he took good care of. My brother and I spent what seemed like an eternity doing yard work, small repairs, and shoveling the deep Minnesota snow from the si...
[More]
It's not that uncommon to use an ID for a data object. However, sometimes more information is needed to uniquely identify an object than a number. In these cases is useful to use another object. It can contain an integer, guid, date created, created by, or even the date and time and object was modified. A good example of this would be a content management system. A given piece of content could have a content object ID, which would contain an ID, the day and time of the modification,...
[More]
Let's take a moment and think about exactly how boxed variables work when checking to see if they are equal. Here is a little Console application to do a quick comparison of how the Equals function and == operator work. using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace VariableBoxEqualityTest
{
class Program
{
static void Main(string[] args)
{
int x = 1;
int y = 1;
test(x, y);
...
[More]
I get a few messages about how the rights system fires many times per request and it is a lot of SQL traffic. Allow me to address this issue and introduce to your silent partner Cassini. Most developers, myself included, love being able to click the "play" icon (press F5 or select start debugging from the menu) and be able to debug their WebForms or MVC application on their local box. The catch here is this- the site you are debugging is not running on/being served by IIS. It'...
[More]
I was sent a link to Caleb's blog about an ajax tooltip popup script. It's a great article but the script was a little to specific for my uses. As I played with the script I found some things I wanted to change a bit. One issue is I needed to add it to a site with jQuery 1.2.6 (and for reasons I cant begin to understand) upgrading to a newer version of jQuery was not an option. the other issue was I needed several different tooltips on the same page. So I rewrote parts of the...
[More]
Asp.net has a wonderful system built in for handling user accounts and roles. The administration interface is encapsulated in a separate web site that can be accessed from within Visual Studio but it is difficult to integrate into the site. This often leads to building a new user administration area in each site. The problem I have with this is going into the data store and deleting the incomplete test data and not having "known good" data for testing. In the past, I have talked about...
[More]
Ok we all know SQL2K has lost support from Microsoft. We all know it is marked with "compatibility" issues with Win2k8. But will it run? Microsoft dropped the ball on us here. They shipped Win2K8 before SQL2000. leaving those of us with giant budgets in a pickle... The option from Microsoft "upgrade to SQL2k5 and buy software assurance". I assure you, their bottom line will thank you. But if you are a smaller shop with limited resources and getting ...
[More]
Not long ago I started working on changing the look and feel of the default WebService documentation that is generated by asp.net. While I demonstrated how to replace the default page template with a custom one I "glossed" over the details of what you can do with it. By using a custom Sitemap Provider you can create a dynamic Map of all of your WebServices methods. Please note I am not out to explain SiteMaps in this article. They list the pages in a site for use by some ...
[More]