Posts

When Testing Collides With Observation

Recently I noticed that a component I have been working on was running slowly in its Release version. The only changes I had made recently were mostly calls to Debug.WriteLine() to get unit-testing information. When I figured out the problem, it reminded me of a term from my Psychology background (my degree in Psychology, not my therapy ;-) ) called the “Observer Effect.” The Observer Effect is a term in experimental research which basically says that while you are trying to observe something, the very act of observation might affect what you are trying to observe. Consider the following simple, albeit silly example : Hypothesis: Water freezes at zero degrees Celsius. Method of study: Stand in freezer holding small puddle of water in hand. Results: Water doesn’t freeze at zero degrees Celsius. Why? Because the method of observation (holding water in hand) prevents the water from freezing because the warmth of your hand (around 98.6F) warms the water sufficiently so that it doesn’t fre...
Image
I love creating tools that simplify a developers life and can save time. My intent with the next few blog entries will be to publicly step through the process of designing, creating, and using tools that I have named the "Fast and Filthy Add Ins for Visual Studio." "Fast and Filthy" is a play on the term "Quick and Dirty." These add ins will be Visual Studio add ins that will give a developer a fast and simple way to create prototypes for customers/management. I think this also has the potential for use by managers and even clients (more on this later). Taking Advantage of the Hierarchical Classes, controls, and data tend to be hierarchical in nature. Classes have properties and methods (which have parameters and a return value ). Controls contain collections of controls. Data tends to be hierarchical to some degree - Databases contains tables which can be related to other tables, tables contain fields, etc.. And then of course there's XML: hierarch...

Wha' Happen'd?

Sorry for the delay in blog entries - the lines for the bathroom at my house are way long. ;-) Seriously, I've been away a while, but I'm going to throw myself into blogging. I encourage you to stay tuned!
Image
Copying Doth Not A Debuggable Web Application Maketh This week I was banging my head against the wall with a web project that I was working on. The project manager had sent me a web project that he wanted me to work on. I copied the project and files into a directory (for sake of example xyzproject) under inetpub\wwwroot. Then, from within Visual Studio I opened the project from web: localhost/xyzproject. I made a bunch of changes and then tried to run the web app. I got an error that said that the application was not configured for debugging. Following the instructions given by the error message, I went to my web.config and made sure that in the configuration section that debug was set to true (which it already was). I try to run the application, and again I'm presented with the error that the application is not configured for debugging. I can't even run the app in release mode. After knocking my head against the wall for a while, I came to the realization that just copying a ...
Peeking at An Iterator C'mon, You Know You Want To I'm currently designing a set of classes that will be used for parsing and importing data. Being a devotee of Design Patterns , I am quite familiar with the Iterator pattern, and felt that it was the appropriate tool to apply to parsing rows in text-based files. Using an interator, rows could be parsed one character at a time, looking for field delimiters (for example, in comma delimited files, the field delimiter is a comma), and moving the data into into the appropriate field in a DataRow. Strings in .NET already have an iterator associated with them. Strings implement the IEnumerable interface (from the System.Collections namespace), and therefore have a method called GetEnumerator. String's GetEnumerator method returns an instance of the CharEnumerator class (again, in System.Collections). As the name suggests, it iterates through through the characters in the string. Iterators in .NET basically know 3 things: how to vi...
Why not start with a "How Stupid..."? I have been working in both VFP and .NET lately, and recently had a "blonde" moment due to the fact that in VFP, everything is 1-based, whereas in .NET, everything is 0-based. In VFP, if you want to search for a string within a string, VFP has a function called AT(), which returns the starting point of the string within the string. If the string cannot be found, AT() returns 0. I wanted to create the .NET equivalent of the following VFP code:    lcEmailMessageBody = "<html> ...."    IF AT("<html",lcEmailMessageBody)>0 THEN       SendHTMLMail(lcEmailMessageBody)    ELSE       SendTextMail(lcEmailMessageBody)    ENDIF So I create the following .NET equivalent:    lcEmailMessageBody = "<html>....";    if(lcEmailMessageBody.IndexOf("<html")>0)       SendHTMLM...
Welcome to my blog! My name is Rick Hodder and this is my blog. A little about me. I'm a computer programmer by trade, but my interests/hobbies include: Improv Comedy : Both short form (a series of games like the show Whose Line Is It Anyway? ) and long form (the audience is asked for words or phrases, after which a half hour show is created on the spot). I have taken classes and have been an ensemble performer at Gotham City Improv in New York City. GCI was started by a group of "improv"ers from the famous LA improv group called "the Groundlings." I find improv a great way to "get out of my head" - its amazing where your mind can take you. I especially enjoy the fact that you don't prepare: no scripts, just what happens, and how you react to it. You create your own reality, and watch it change as other performers embellish. It's also great for thinking on your feet. Community Theater : I have been involved in theater since highschool. The la...