A kludge (also spelled kluge) is simply defined as a functional, but inelegant solution. A kludge is often a clever programming trick that solves a difficult problem in an expedient manner.
One type of programming solution that is often referred to as a kludge is a program that writes the program that does the actual work. Some problems that would be extremely complex become much simpler when addressed in this manner. However, this is not a type of programming that every programmer can do. It requires a detailed understanding of the programming language being used as well as a soid understanding of the subject matter being addressed.
Example of a Kludge
One example of such a solution was created for a client whose data warehousing solution needed to be able to parse addresses from inconsistent data. The organization chose to purchase software from a leading vendor that was supposed to perform this task.
The commercial product that was purchased was unable to parse the addresses in Brazil or Mexico in a consistent and useful manner. The addresses in Brazil and Mexico have far greater variations in format than US addresses. The street address alone (such as a US address of "123 Main St. Apt. 45") would sometimes contain several different pieces of information in a random order. The additional information could be a building, lot, block, floor, entrance, etc. There was no consistent order in how these additional pieces of information were presented and data from different sources would include or exclude different sets of this information for the same individual. The off-the-shelf software that was purchased could not differentiate between numeric street names, street numbers, apartment numbers, and other numbers. This low quality of data parsing would translate into a poor ability to match records later in the process.The solution was to write a parsing engine that used descriptions of address patterns and lookup tables to create complex regular expressions. These regular expressions were compared against each address line on the input and when a match was found, SQL statements were generated to insert the parsed data into a database table. This solution took a few months to write and refine, and provided good parsed data that exceeded the clients' expectation given the poor quality of input data provided.
The end result was a program that was less than 10 pages of code, driven by a few hundred rows of data in a few database tables that was able to parse data much more effectively than a leading commercial product. This program was also easy to adapt to different countries using different languages and address formats due to all of the country specific information being parameters specified in the database rather than parts of the parsing engine.
Business Justifications for a Kludge
Does your business need a solution which is fun for your techies to implement, using the latest and greatest technologies? If you have an bottomless budget and no timeline pressure, I'll send you my resume because it sounds like your company would be a great place to work.
On the other hand, if you do have budget and timeline pressures like every company we have ever seen, and care more about results than letting employees play with the newest technologies, you probably want a Kludge. We focus on finding the core requirements that will allow your solution to be up and running as quickly as possible. Small companies cannot spend the time and money necessary to create an elegant solution. Large companies can afford to, but usually chose to cut corners wherever possible due to budget concerns. The most important part of something being a Kludge is that it must be a functional solution to the problem. Sometimes the corners that get cut are the ones that will prevent a solution from ever working or reaching the light of day. Our extensive experience in systems architecture helps us make sure you understand the consequences in the short and long term of the decisions you make to ensure that your project will succeed.© 2009 Kludge Technologies, LLC