Work Published At Last

I’ve been working pretty hard for the last few days to complete another revision of a program I built, and finally released it to the client last night. I first wrote the program using Java, until I encountered too many obstacles to allow me to complete it in time for a self-imposed deadline. I then rewrote the application from scratch using C#. Surprisingly, the 15K line program in Java was rewritten in C# in only 2K lines, and it took about a week.

The resulting code was not pretty, or efficient, but it worked. Since then (from the start of 2009) the client has been using it, and filing bug reports and change requests, which I have been chipping away at as quickly as I can.

Two weeks ago, with the number of bugs falling, I decided to clean up the program. Data access was spread all over the place, and needed to be consolidated, and field validation was minimal or non-existent. Mappings from the database to the screens was almost impossible to follow, as I used arrays and lists of values, and you had to follow the queries to figure out which array index corresponded to which field on the screen.

Once I started, I was committed to getting certain segments of the program cleaned up before I could publish the application again. Of course, that’s when another change request and bug came in, both relatively high priority. On the plus side, the bug was something that would be fixed during the clean-up process anyhow (an issue with saving certain characters, which would disappear once I rebuilt the data tier of the program). The change request, too, was a relatively simple change. The problem, however, is that the current state of the program was slightly unstable.

I have not yet heard back from the client as to whether they have noticed any differences in the application, and whether any new issues have cropped up. What I haven’t told them is that while I was refactoring the program, I located 4 bugs that they had not found, with certain fields from the database being mapped incorrectly to the screen, and that these issues were quickly fixed. Considering they’ve been using this program for over 2 months and haven’t noticed makes me wonder if they’ve even looked at that section of the program yet.

  • http://nixliving.blogspot.com/ Inkhorn

    I wonder if the number of lines would be reduced further if you switched from C# to Python :)

  • http://nixliving.blogspot.com Inkhorn

    I wonder if the number of lines would be reduced further if you switched from C# to Python :)

  • admin

    I doubt it. Most of the reduction was because I didn’t have to write UI code, which if I switched to Python would no longer be true.

  • admin

    I doubt it. Most of the reduction was because I didn't have to write UI code, which if I switched to Python would no longer be true.

  • http://nixliving.blogspot.com/ Inkhorn

    I'm a bit mystified here (Python is the only language that I have extensive familiarity with). Does C# make it easier to code for user interface than other languages?

  • http://blog.optimalupgrades.ca Elie

    It's more about the IDE used for developing C# applications. Visual Studio allows you to drag and drop components, putting in place all the code to make it work in the background (which you can edit) and then you just worry about functionality.

  • http://nixliving.blogspot.com/ Inkhorn

    You may be interested in investigating the Python wrapper for Qt (conveniently named PyQt). You can make your GUI in a similar WYSIWYG editor, called Qt 4 Designer, have it generate the Qt code, then you can automatically generate the python code, and then worry about the functionality!

    Although whether Python is appropriate at all for jobs that you do is of course your call! For me, the only programming tool I have is Python and every job looks like a nail 😛