Monthly ArchiveAugust 2008
.NET 20 Aug 2008 04:34 pm
Sorting a DataTable
When you’re starting out with DataTables in .Net, it might surprise you to know that you’re not able to sort the rows. Apparently there’s a principle behind this, but when you’re in a position like I was where you’re constructing a complicated report that doesn’t obey the usual rules, then sometimes you need a DataTable that doesn’t obey the usual rules either.
Continue Reading »
Software development 20 Aug 2008 11:11 am
Streamlining Simple Business Applications with Habanero
Can you mix up a small business software application in a matter of weeks? If a small outlet at the mall needs an application to record their stock, list their customers and record their sales, with some additional customised behaviour not available in the off-the-shelf packages, would you be able to do it within a small shop’s budget?
The challenge with enterprise frameworks like Hibernate is that their big-thinking design becomes a challenge for the junior developer whose requirements are fairly simple. Even the .Net approach of data-binding requires some leg-work. In truth, there is a vast amount of repetition between business applications.
Continue Reading »
Software development 19 Aug 2008 07:36 pm
Refactoring Use Cases
One of the best features of modern IDE’s are the Refactorings. Visual Studio even has a few built in now, but if you want the really good ones you want to get a plugin like Resharper. I, and all developers here at Chillisoft, have been spoiled by this tool - we’ll refuse to ever go back to vanilla VS. Now when I work in Word or Excel I find myself wanting the same kinds of things for the task I’m doing.
Let’s say I’m doing a requirements document, which I have been doing a bit lately, creating use cases that are text descriptions of events and responses. I might write two use cases like this:
Use Case 1: Add a Drug
- The user selects the Data – Drug Maintenance menu option
- The system displays a list of all drugs. The fields shown are drug name, unit of issue and schedule
- The user clicks the add button
- The system pops up a form, allowing the user to capture the drug’s details. The available fields are drug name, unit of issue and schedule
- If the user clicks the save button the system saves the drug to the database and closes the popup form
- If the user clicks the cancel button the system closes the popup without doing anything
Use Case 2: Edit a Drug
- The user selects the Data – Drug Maintenance menu option
- The system displays a list of all drugs. The fields shown are drug name, unit of issue and schedule
- The user selects a drug by clicking on a specific row in the list
- The user clicks the edit button
- The system pops up a form, allowing the user to edit the drug’s details. The available fields are drug name, unit of issue and schedule
- If the user clicks the save button the system saves the drug to the database and closes the popup form
- If the user clicks the cancel button the system closes the popup without doing anything
Obviously I’ve repeated myself. Now this might not be how you personally write requirements, but having gone through TDD’s Red, Green, Refactor mill for a while now I think like that when doing these documents - get the Use Case done as it should be from start to finish, then look at what can be taken out as common. Refactor under a green bar, as such. So, after writing these, I really don’t like the repetition - what if we decided to change it from a popup to a sidebar on the same form? The DRY (Don’t Repeat Yourself) principle should apply to requirements too, shouldn’t it? This set of two use cases is actually going to reuse a ton of code in the end, so how do we actually estimate time for each one? Do we say the first will be 5 points (a point being a portion of time that is unknown, but fixed in length) and the second only 2 because of the reuse? What if we don’t pick up on the reuse between the cases (maybe they’re far apart in our document) - then our estimates are going to be at least a bit off.
.NET 15 Aug 2008 10:50 am
Solution File Corrupted: TeamCity Build Fails
We deal with a variety of build failures on TeamCity. When there is no obvious solution, you can try using “Enforce Clean Checkout”. You can also delete the checked out source on the build server. My error this time was:
“error MSB4051: Project {259E613F-1893-45D3-B0A7-6D778900C843} is referencing a project with GUID {8D503931-7BF0-4A4C-AA72-E9601719C9C3}, but a project with this GUID was not found in the .SLN file.”
Continue Reading »
Microsoft 14 Aug 2008 01:12 pm
Tech-ed South Africa 2008
So last year I was debating going to Tech-ed, and in the end the cost of going all the way to Sun City prohibited us from sending someone for what was going to be of uncertain benefit. This year it was held in Durban at the ICC, and, us being only about 80kms from Durban the cost was much less, especially since I could stay with family.
When it comes to Microsoft I’ve always been a sceptic because they focus on technologies and API’s over principles and practices, and I worry about their internal coding practices (I know they’re all very bright, but there’s a case for developers being too bright for their own, or their customers’ good).
Continue Reading »
.NET & ASP.Net & C# 01 Aug 2008 04:49 pm
Habanero and Visual WebGUI (VWG)
A few months ago we, were commissioned to undertake a project that required what most of us in the office cringe at, an ASP project, more specifically and ASP intranet project. So after some bad and tedious experiences with ASP just a few weeks earlier but still wanting to do this project, we scoured the interwebs for any tool that could some how help our interaction with ASP. We found what can only be described as a GOD-Sent, Visual WebGUI or VWG as its known. After spending some time using the VWG framework, testing it out and convincing ourselves that it met all our requirements, we made the monumental decision of reviewing our ORM architecture, Habanero, to see how easily we could fit the two together. The task seemed simple enough, all we really needed was to use the VWG controls instead of Windows controls. However after going down this route we decided that a more elegant soultion was required.
And so it began…
Continue Reading »
