The Lanham Factor
The (ir)rational thoughts of a (not-so)mad man

Cutting Code

This category provides a place to evaluate the coding issues such as .NET vs. Java/PHP/Perl/Python/Ruby/et. al., Microsoft vs. All-You-Anti-Microsoft-People, and coding styles and theories.

Binding Checkboxes with KnockoutJS

Recently I had occasion to bind a list of checkbox input elements to a KnockoutJS observableArray. It actually took me a great deal of time to get the implementation working. In this post I am going to cover the issues I experienced. Then I will explain how implement a surefire checkbox-KnockoutJS binding solution. This post assumes you have a working knowledge of KnockoutJS. If you are new to KnockoutJS, please acquaint yourself at http://www.knockoutjs.com. NOTE: Try is yourself on JSFiddle http://jsfiddle.net/codesai... ......

Why I Love Microsoft Development

I've been writing software for a while and recently had an opportunity to broaden my horizons and start developing for iOS. We decided to leverage, as much as possible, our existing skills and use MonoTouch and MonoDevelop by Novell. For those of you who do not know, Mono is a .NET port originally designed for Linux but adapted for other platforms as well. MonoTouch is a port specifically for building iOS applications using the .NET framework. MonoDroid is a port (in CTP-esque release) for Android. ......

.NET Development is Free

Although I was more-or-less lambasted for my post about free vs. open source software, I want to follow-up with a comment or two about .NET development. There is a common misconception that developing for Windows using .NET is an expensive endeavor. For the record, .NET development is free. .NET Framework SDK The .NET framework itself (a.k.a. runtime) is completely free. In fact, if you don't have it, go and download it right now. Check out "Get the Framework" on the right. http://msdn.microsoft.com/e... ......

RVNUG Unit Testing Festival

The Roanoke Valley .NET User Group held a monthly meeting tonight. The topic was Unit Testing with Visual Studio 2008. It was arguably one of the better meetings we have held. Even though I have been using Unit Testing for years (starting with JUnit forever ago). Although I feel that I perform unit testing well enough, I am amazed and how much I can learn in just a few hours by collaborating and interacting with others. It seems that over the past 7 years or so I have performed a significant amount ......

XSLT Anyone?

Does anyone reading this have an XSLT script that determines the number of elements in an XML file (obviously) with a certain attribute equal to a certain value? For example, suppose you have an XML file similar to the following: <root> <someElem Status="closed"/> <someElem Status="open"/> </root> I want to count the number of "closed" items, etc. I have some references and books but it's becoming a big hassle. They all seem to want to specify the query using Elements instead ......

I Fought the Artificial Key...

and the Artificial Key won. I don't know what my problem is with artificial keys. I am a HUGE advocate of natural keys. My problem is, I tend to use "natural" keys where one really doesn't exist. For some reason, I am fixated on avoiding duplication. However, I tend forget what is an appropriate duplication and what isn't. Take the following example: What do I care if someone duplicates a URL? I mean, really...does it matter if the same link is listed twice? It does NOT. Sheesh! I am just killing ......

Databound Controls & Composite Keys

I blogged previously on databound controls. I am back to hating them. Okay, so I guess in a few situations they're still okay. But now I am dealing with a table that has a composite key. One of the keys is artificial, and one is natural (and I prefer natural keys...but that's a REALLY old blog entry). The natural key can be changed but the other key (which is both artificial and foreign) can-obviously-not be changed. Using the databound controls for this situation doesn't seem to work. In fact, quite ......

But...My Brain is Already Full!

As a consultant I am often asked to provide training and mentoring. Let's face it: Technology changes extremely often and typical IT departments have plenty of work. As a result, staying on top of technology is tough. So organizations often (and smartly) hire consultants to help weed out the most appropriate technologies and provide focused mentoring and training. Note: Everytime you read "world class" insert your tongue firmly into your cheek. Occasionally, however, an organizational representative ......

To DataBind or Not To Databind...

I have generally avoided the databound controls provided by the .NET framework. I am referring specifically to controls such as the GridView. Oh don't get me wrong, I use the GridView like I use oxygen. I just don't use an associated DataSource control. Utlimately, therefore, I manually bind controls to data. There are three main reasons I have opted to avoid databound Distributed Applications - Most of the business applications I design incorporate a business layer so it is rare that I bind directly ......

You're an Adult Now...Code Like One

The Windup... A month or so ago I was delivering a design/architecture review along with a code walkthrough for some software I wrote. Basically, a VB6 application needed updating to support cryptography (through a third-party tool) and FTP. I distributed the cryptography services to account for licensing constraints. Since the shop is migrating to .NET I wrote .NET assemblies to support the cryptography, data access, and file transfer functionality. I then wrote a COM-Callable Wrapper (CCW) to expose ......

Full Cutting Code Archive