Monday, November 20, 2006

Setting up menu items in Ubuntu's Edgy Eft build

Have I said lately that I really like Ubuntu!?! What a great Linux distro that makes it easy enough so that the Linux novice can now use Linux on the desktop.

Anyway, I have a brief article on how to setup a menu item in the Edgy Eft build of Ubuntu.

Wednesday, October 18, 2006

An Open Source Team

As I have moved from the .Net team (yet I still have .Net apps I am modifying in my own small business) to the J2EE team at work (day job), I have been busy learning more about the commercial financial software we sell and the inner workings of J2EE.

One thing I am thankful for is a group of co-workers who do not hold their knowledge close to themselves but are ready and willing to share and teach. When I have a question, they are helpful and provide the needed information. Moreover, they have an array of tips and tricks that they provide.

That is the core of a successful team. When members understand that by sharing information, they open themselves up to receive more knowledge. It has been my experience that the more knowledge I share the more I learn.

Wednesday, October 04, 2006

A GoDaddy Ready MySql.Data.dll for .Net 2.0

In a previous post, I discussed how to build a MySql assembly to use with .Net 2.0 hosting on

A blog reader, Bill Clark, recently asked me if I could post the assembly that I created for others to use.

Here you go.

The file includes the compiled (specifically for GoDaddy) MySql.Data.dll assembly that you will reference. Also included in the zip is ICSharpCode.SharpZipLib.dll assembly that is referenced by the MySql.Data.dll assembly.

Thursday, August 17, 2006

Dynamic vs. Compiled Languages

I was doing my usual run this morning listening to my IPod shuffle when on came a particular podcast that I enjoy called Hanselminutes. The host of the show, Scott Hanselman typically has great discussions on all things ASP.Net and sundry other topics.

This show dealt with a discussion on Dynamic vs. Compiled Languages with a particular emphasis on the advantages of Ruby.

The show also details the values of Test-Driven Development and the next rev of C# with more potential dynamic language features.

Sunday, August 06, 2006

Is Untested Code the Dark Matter of Software?

According to Cedric Beust's blog, untested code is the dark matter of software. I like this analogy. Just what is dark matter? Wikipedia states:
In cosmology, dark matter refers to matter particles, of unknown composition, that do not emit or reflect enough electromagnetic radiation (light) to be detected directly, but whose presence may be inferred from gravitational effects on visible matter such as stars and galaxies.
I find it interesting that just like untested software, dark matter has observational evidences such as gravitational effects on galactic motion but we really do not fully know what it is. Our calculations detect its presence, but due to obvious limitations, we lack the current ability to conduct extensive empirical investigations. Similarly, in software development, (not because we can't do extensive test but because we won't) we will run limited tests on a module and observe a small scope of expected behaviors. In essence, like the observable effects of dark matter on stellar objects, we infer that the software is coded correctly because of its observable outcomes. However, if not properly tested with the array of possible circumstances the module may not function as planned.

I understand that the limitations for software programming are different than cosmological research. Shear distance and inconclusive understandings of gravitation hinder a fuller understanding of dark matter. With software development, customer expectations, unmitigated risks, and changing requirements can hinder proper developer testing and confidence. However, if we really want to, unlike the astrophysicist, we have the ability to test and empirically understand most of the potential effects of the software we write.

What do you think would become of an astronomer who had the opportunity to more closely research dark matter and did not because of time pressures at best, and laziness at worst? Now that matter is dark.

Wednesday, August 02, 2006

Microsoft's Port 25 - their Open Source Software Lab

I came across this site today. Of interest is an interview with Tim O'Reilly at OSCON 2006.

My hope is that Microsoft will support cross-platform efforts in the open source community. I am already fond of DotNetNuke, NUnit, and other open source tools that are, at least in part, supported my Microsoft for the Windows platforms. We shall see if they support Mono and the like.

Saturday, July 29, 2006

Moving from Windows XP Pro to Ubuntu

I decided to take the plunge with Ubuntu on my old laptop that had Windows XP Pro installed. First I pulled down the Desktop CD of Ubuntu 6.06 ISO and burned it to a CD. Ubuntu fits on one CD-Rom disk, nice. Then after setting the BIOS settings to boot off the CD-Rom/DVD drive I inserted the CD with the Ubuntu 6.06 ISO.

After booting from the Ubuntu CD, you can test drive it to see if you want to install it on your hard disk. If so, there is a handy install icon. Select the icon, answer a few standard questions for language, timezone, userID, and password and it will install.

Then, I inserted my Linksys WPC11 wireless NIC and Ubuntu recognized it lickety split. I added my WEP settings info via the Administrator|Network tool and I was browsing.

I have to say that this was the most trouble-free install of any linux distribution I have seen. Then, with the help of the Urban Puddle blog, I was able to get Ruby, Rails, and MySql installed.

See my messing with Interactive Ruby (IRB) below on my new Ubuntu install.

Ubuntu Screen Shot

Also of note was that Ubuntu was able to browse to my Windows server shares as Server Message Block (SMB) shares. I did not even have to mess with SAMBA. Sweet!!!

Sunday, July 23, 2006

If you are hosting ASP.Net 2.0 on GoDaddy and using the MySql .Net Connector for MySql please read

First download the Connector/NET 1.0 installer from the MySql site (do not get the source code only download as it is buggy. The installer download contains the source also.)

After installing the MySql .Net Connector, in VS 2005 Add an Existing Project to your solution by browsing to C:\Program Files\MySQL\MySQL Connector Net 1.0\src\ MySql.Data.csproj file.

After adding the project, open the MySql project and add the following to the AssemblyInfo.cs file in the perspective locations:
using System.Security; //added for GoDaddy Host
[assembly: AllowPartiallyTrustedCallers()] //added for GoDaddy Host
Build the project and then either reference the MySql project or browse to the new MySql.Data.dll assembly directly.

Special thanks to a post from Alek at GoDaddy’s Support team on Microsoft’s Asp.Net Forum site. Apparently, as of June 22, 2006, "has updated the custom medium trust configuration to allow the MySql.Data.Dll to work in a medium trust environment for the .Net 2.0 development environment." He then goes on to instruct you to set the AllowPartiallyTrustedCallers attribute in the AssemblyInfo file. Also thanks to others for pointing out the referencing the System.Security namespace in the AssemblyInfo file.

UPDATE: By request I have posted the compiled MySql.Data.DLL Assembly. Get it here.

Saturday, July 22, 2006

The value of multiple input

I was waiting for the app I was working on to build as I was listening to an old Led Zepplin tune and started thinking, what has the great bassist/keyboard player John Paul Jones been up to? A quick Google on John Paul Jones and I found his personal site at A quick look at the photos and I was surprised to see John in a picture with Nickel Creek band member Chris Thile, at a mandolin symposium (See the image below).

John Paul Jones with Chris Thile and others

For the unacquainted, Nickel Creek is a progressive, blue grass group that many would not even label as blue grass. Any way I always read of the various blues and other world music that was the influence of Led Zepplin. I also know John Paul Jones played mandolin at least on Led’s fourth album song, Going to California. The point of this post is to be aware of the value of various influences. One should resist the temptation to limit oneself to only what is comfortable. I then thought of the literary influences that were listed by futurist Alvin Toffler in a recent C-Span interview. He spoke of a array of topics on which he regularly reads. Moreover, he explicitly stated that one needs to expand the genre and subject matter of what one reads to get a better, holistic view.

How does this apply to technology and business in general and software development in particular? One general application is that inputs of various topics helps one to better anticipate the ebb and flow of the information technology market and adjust one’s direction accordingly. Secondly, and more specifically, a broader understanding of things makes one more able to understand the various business domains for which one will have to write software solutions. Finally, the understanding of various programming languages enables one to develop a broader knowledge base by applying the concepts, idioms, and problem-solving patterns of one language to another, potentially combining the strengths of two or more languages to a solution.

Sunday, July 16, 2006

RSpec and the Empty Executable Spec

One great side effect of utilizing the agile approach to software design is the first thinking about, at lease as well as one can given the available information, the desired end result. This is typically started a failing test in the Test Drive Development (TDD) camp. However, the more I am exposed on RSpec the more I like the idea of design that is driven by specifications that are fulfilled in short, iterative cycles. Therefore, instead of having a "failing test" one would have an "empty executable specification." (If you could not already tell, I am not attempting to coin a new phrase. The expression "empty executable specification" is neither clever nor catchy. To be honest, I really do not know what else to call it.) In fact, it is the use of existing terms in TDD that do not really communicate the great results of TDD.

Click here for more.

Wednesday, July 12, 2006

Hegel's (or rather Jim Weirich's) Ruby Dialectic: the synthesis of Design by Contract and Behavior Driven Development

At a great Extreme Programmers User’s Group meeting here in Cincinnati, Ohio, Jim Weirich gave a thought provoking presentation on the experimentation of utilizing the semantics of a Behavior Driven Design (BDD) and the more traditional Design by Contact (DbC) with the Ruby rSpec tool. Having come out of the VB/ASP/COM/.Net world and now working on the J2EE team at US Bank, I appreciate the semantic qualities that various languages possess and more importantly the "idioms" they teach. I agree with the classic Sapir-Whorf hypothesis that the language(s) you use can either aid or hinder your ability to form thoughts and even solve problems.

With that said, the potential of Jim’s experiment with BDD and DbC is rich in its bringing together two divergent methodologies into a potentially better one. The question that the experiment is attempting to answer, from my understanding of the presentation, is can the thesis of DbC and its emphasis on getting the specifications completed upfront, pre and post conditions, and assertions combined with the antithesis of BDD’s executable specifications (a.k.a unit tests in Test Driven Devlopment) and short iterations produce synthesis of the two--a clearly understood contract (or set of contracts) between customer and developer that is the requirement for a short, iterative BDD’s executable specification(s)? Moreover, are there any unanticipated results that will emerge from the experiment that can be immediately useful or spawn more questions? One might state this is similar to an "alchemist experiment to see what comes to the top of the mixture of the two elements."

In summary, after showing us his Ruby framework to support Design by Contract, Jim explicitly stated that the experiment’s result(s) are not intended to replace Test Driven Development, BDD or DbC. However, in my view, it could produce a client initiated contract that can be solved in a few iterations with BDD. Or, sticking with the previous alchemist analogy, Jim's experiment could provide some proverbial "gold from silver and copper."

Sunday, July 02, 2006

Testing .Net Properties with FIT

Just got a comment on .Net and FIT from a blog reader. This caused me to remember that I submitted a proposed patch to source forge, artifact 1255429, which deals with using properties instead of member variables. The patch was submitted to source forge in August of 2005. Nothing as of this post has been done, that I am aware of, so I thought I would put it out for public consumption and comment.

In more detail, fixtures deriving from RowFixture have instantiated classes with public variables, instead of exposing the instantiated object’s members via public properties. With these modifications you can write fixtures directly against objects under test, which are typically the actual application classes, exposing properties instead of variables to the RowFixtures. This enables the .Net developer to avoid writing additional code beyond the fixture and the actual application objects under test.

Here it is.

Thursday, June 29, 2006

Re-writing and copying HTML files with Ruby Refactoring

I submitted a previous post on re-writing and copying HTML files with Ruby. I could not let that rather large and unruly script go as is and had to refactor, a.k.a. extract, much of the script code out into a ruby class.

Here are the goodies.

Wednesday, June 28, 2006

Php 4 Quick and Dirty Model and View Separation Example

I was coding a site in Php and needed to display announcements and needed a quick and simple way to do this. Moreover, I wanted to keep the design in the good ole MVC pattern.

See how I, at least somewhat, did this here.

Monday, June 26, 2006

Re-writing and copying HTML files with Ruby

A personal goal of mine is to read through the Bible this year on a daily basis. To assist me in this I have an HTML file for each month of the year with links that call a JavaScript function passing the text-section value and then putting the value into a URL QueryString and opening a new window with the loaded URL. This worked OK but because the JavaScript opens a new window, the daily links were not showing with the visited style that I set in the CSS file. Here is where Ruby came in.

I thought about just rewriting the HTML but having to create 12 separate files, one for each month, was not what I wanted to do. Why not, as I am learning to use Ruby, use it to parse the existing HTML into a new file, a txt file in this case and then run script to rename the new into the old files, with links that use the traditional target attribute to open a new browser.

Click here to see what I did to parse the existing HTML files into TXT files.

Click here to see the copy of the TXT into HTML files.

Saturday, June 10, 2006

What are we thinking?

Okay. So now you have inherited someone else’s code. You typically review the automated tests (if any), available documentation (if any), and then the code itself. It is here that at lease one person in each development group will say, “What were they thinking? This code sucks.” It is at this point that I cringe. Yes, the code may not be the most elegant. But to just simply state, in your self-proclaimed superiority, that the previous programmers were stupid is both unprofessional and short sighted. Don’t misunderstand me. I am not saying that in the name of being nice to overlook and tolerate crappy code. My point here is that there is more than initially meets the eye.

What got me thinking about this was an article that I ran across by Dave Hunt and Andy Thomas entitled, Software Archaeology. In it the authors state:

Archaeologists generally don’t make wisecracks about how stupid a particular culture was (even if they did throw dead bodies into the only good drinking well). In our industry, we generally don’t show such restraint.

As stated above, it has been my experience that in the software development field, we are too quick to criticize. They then go on to write:

But it’s important when reading code to realize that apparently bone-headed decisions that appear to be straight out of a "Dilbert" cartoon seemed perfectly reasonable to the developers at the time. Understanding "what they were thinking" is critical to understanding how and why they wrote the code the way they did. If you discover they misunderstood something, you’ll likely find that mistake in more than one place. But rather than simply "flipping the bozo bit" on the original authors, try to evaluate their strengths as well as weaknesses. You might find lost treasure—buried domain expertise that’s been forgotten.

Therefore instead of just asking, "What were they thinking?” we need to consider “What and how are we thinking?" to get the most out of the code that we sometimes unearth and/or must excavate.

Sunday, May 21, 2006

Ego is not your friend

I was listening to Scott Hanselman's podcast called HanselMinutes and noted a statement from the host of the show Carl Franklin, "Ego is not your friend." The context was that as a developer, your ego, if too sensitive or too large, can keep you from learning from the developer community. The ego typically prohibits you from being honest and saying, "I do not understand or know what you are talking about, please explain." This prohibition is manifested in your feeling ashamed to state that you do not know what is presently being discussed or you want to appear that you know more about the topic than you actually do.

It has been my experience that my ego, if not monitored, can cause me to view my present lack of understanding in an incorrect way. The reality is not that I lack the ability to understand the information, but rather I lack exposure to the information. From that aspect, I am now informed about what I need to learn. Moreover, if I do understand a topic better than someone else, this does not mean that my level of intelligence is greater. It simply means that I have been made aware of the topic and have taken the time to learn. Otherwise, my ego could falsely cause me to think that I am more adept than I am in reality and cause me to not consider various aspects of a topic, since I think I understand more than I do in reality.

In summary, either by causing one to think they can not improve or that they have no need to better their understanding, ego is not your friend.

Thursday, April 13, 2006 now on linux

For those who care, I took the plunge and am now hosting on linux. This is in preparation to eventually move the site to Rails.

I will still have sites on just to keep my .Net skills current, but since I have moved to the J2EE team at my real job, I thought it best to make this move with

Wednesday, March 15, 2006

Installing Ruby on Windows XP Pro

In my readings on Ruby I have yet to run across a step-by-step example of how to install it on Windows XP Pro. Anyway, since I bought a new laptop, I decided to record the steps in the installation of Ruby 1.82-15.

Here are the steps.

Tuesday, February 21, 2006

Truthiness?? Alrighty then!

In a blog from Brian Marick I saw this: The American Dialect Society voted "truthiness" the 2005 word of the year. It "refers to the quality of preferring concepts or facts one wishes to be true, rather than concepts or facts known to be true." On a private level that may be well and good. However, the older I get the more that I am aware that “no man is an island.” In other words, in some small way we affect on another.

Therefore, if you are my family doctor, don’t use that in your medical practice. If you are my employer, do not use “truthiness” when you calculate my pay. If you are a civil engineer, do not go about “preferring concepts or facts one wishes to be true” when engineering the bridges I drive over.

Brian goes on to show that in the development of code, more tests are the answer to “preferring concepts or facts one wishes to be true, rather than concepts or facts known to be true”, not ignoring the facts.

And yes, when designing software, more tests please, and less "truthiness."

Thursday, February 16, 2006

The Scandal of Prediction (a.k.a We think we're purty smart)

Just listened to an interesting program on IT Conversations dealing with the problems of predictability and why the various models and systems of predictors fail by Nassim Nicholas Taleb entitled, The Scandal of Prediction.

What I gathered from the program is that the overall problem with accuracy in predictions and forecasting is systemic arrogance. We fail to acknowledge what we do not know and inflate the little we do know. We should not stop attempting to utilize our forecast models and systems , but let us do it with an honest look at the vast amount of knowledge we are yet to discover.

An interesting note is that Taleb refers to the concept of Yesterdays Weather with which agile developers should be familiar. Simply put, this concept is based on the understanding that there is a 70% chance that today’s weather patterns will be a repeat of yesterdays. Statistically, we know this but still we employ vast machinery to "predict" what the weather will be like in the future. Admittedly, there is more value in the use of models and formulas the further out one attempts to predict. In any event, I humbly predict (without any meteorological training or know how) a 70% chance that tomorrows weather is like today’s.

Tuesday, January 10, 2006

Learning Ruby

The Cincinnati Extreme Programmer’s Group January meeting was treated to a presentation by Jim Weirich, a consultant for Compuware, about Ruby On Rails. I could not make the meeting but watched a recorded video of the presentation and reviewed Jim’s blog concerning the meeting. As I was perusing Jim's blog I came across his link on a talk that he will be giving at the upcoming Dayton-Cincinnati Code Camp entitled, "10 Things Every Java Programmer Should Know About Ruby."

I must say that Ruby looks intriguing. In fact, I have registered for the Dayton-Cincinnati Code Camp and am looking forward to Jim's talk. Moreover, I ordered the Agile Web Development with Rails: A Pragmatic Guide book. I can not wait to dig in!!

Thursday, January 05, 2006

Output Parameters from C# Method

I know that this is “old hat” to many but I am working on an application where I needed a method to return two separate values. I turned to good ole output parameters. I know I could have created two separate methods but the values within the problem domain are always associated. Therefore, it made sense to me to use output parameters with one method.

Here is an example using a NUnit test and the method returning two values via output parameters.

public void TestParseAndReturnTwoSeperateStrings()
string toParse = "00050000999";
string strOne;
string strTwo;

ParseAndReturnTwoSeperateStrings (toParse, out strOne, out strTwo);

Console.WriteLine("String 1: {0}", strOne);
Console.WriteLine("String 2: {0}", strTwo);

Assert.AreEqual("000", strOne);
Assert.AreEqual("50000999", strTwo);

private void ParseAndReturnTwoSeperateStrings (string input,
out string strOne, out string strTwo)
strOne = input.Substring(0, 3);
strTwo = input.Substring(3, input.Length - 3);