garyshort.org


I am a Technical Evangelist for Developer Express, my work blog is here but this one is more fun. :-)

December 2005 Entries

Sprint 1 Complete

We recently completed sprint 1 of our bakery control system (on time and within budget :)). There's images below if you want to check out what it looks like so far. I especially like the ribbon-like menu system that Michael designed. Sprint 1 contained all our "setting up of user's" requirements and as predicted a few of the requirements didn't come to light until the users got to see the code. We fed their feedback into the development process and ended up with something that we can be sure is fit for purpose. Score 1 for agile methods. As I said in my last post, we're using SCRUM as a methodolgy for this project. Stick around to find out how we get on with sprint 2.
(Technorati tag: )

ClickOnce Publish Error

If you're trying to publish a ClickOnce project and you get the error
SignTool failed with error: 'XmlResolver can only be set by trusted code'
or something similar, then delete your .sln file and then resave your project. This fixed it for me.
(Technorati tag: )

ClickOnce and Secure Sites

If you publish your ClickOnce application to a server and you wish to protect the Publish.html file by making users log onto your site, you have to remember to get them to check the "Remember password" checkbox, otherwise their download will fail.
(Technorati tags: , )

ClickOnce and .MSI Files

If you publish a ClickOnce application and your users are browsing with I.E., they may have trouble downloading .MSI files that you need to re-distribute (Crystal Reports support for example). If so, then get them to add your site into the "Trusted Sites" on their Internet Explorer. Hat tip to Michael.
(Technorati tags: , )

Bound MaskedTextBox Problem

I'm having a problem with the MaskedTextBox when I'm using bound controls. I have a model object (a stock part say) that has a price attibute. The type of this attribute is decimal. The mask I am using is ###.##. Now, if I use the MaskedTextBox in an unbound manor and type 2.35 and tab out of the control, the control disyplays 2.35, however if I use my model object as a datasource to a binding source and then have the controls created by dragging the datasource onto a form and repeat the process, when I tab out of the control it displays 234.__ which is not good. I've created a screencast that you can view here, that shows the problem. If any one knows how to fix this then put me out of my misery would you?
(Technorati tags: , )
Update: I've discovered I don't need a MaskedTextBox. If I bind an ordinary TextBox to a decimal attribute on my model object, then it automagically ensures that the values input can be converted to a decimal! :)

Update for Outlook 2003 Junk E-mail Filter (KB905648)

This update provides the Junk E-mail Filter in Microsoft Office Outlook 2003 with a more current definition of which e-mail messages should be considered junk e-mail. This update was released in December 2005. Get it here.

Change Management and all that

Okay, let's imagine we've a model object that looks like this... public Class Customer { private string _Name; public string Name { get { return _Name; } set { _Name = value; } } private string _Address; public string Address { get { return _Address; } set { _Address = value; } } } Let's also imagine that we've got it bound to a view as a datasource of a binding source, so now when we change a value in a control and tab out of it, that change is flushed down to the model object. Woot, and we had to do no work! Fantastic! But not so fast, there is a slight problem though. Now let's imagine that we have a BindingList of these objects bound to a list in a view representing the results of a search. Now, select one of the items, right click and select "Edit" and up pops the CustomerView in "Edit" mode. Change a value, tab out of it and now close the view without saving it. Open the item in "Edit" mode again and you can see that your changes have been persisted in the object, grrrrr! That's because the binding source flushes the changes as soon as you tab out. So, what's the solution. Well, you could impliment IEditableObject, but at the end of the day you still have to handle the actions on throwing away the changes - using something like the momento pattern for example, but all that seems a little long winded and complicated to me. My, simplistic, solution to this - especially if the data is volitile - is simply to re-read the data from the database. I just write a "refresh" method on the object, and if the user selects to throw away the changes, I call the refresh method, which makes a round trip to the database and updates all the object's properties. Job done!
(Technorati tags: , )

No Good Deed Goes Unpunished

Well we all know the saying but recently I've experienced the phenomenon for myself. I like to keep up with the goings on in my home town, and I came across this guy who's a struggling amateur trying to make his way as an Internet programmer - not easy when you are self taught and you are trying to get things started from your back bedroom. I also spotted that he was broadcasting MP3s illegally. Now, I thought, the guy's new to the trade and probably doesn't know that what he is doing could get him in trouble with the RIAA, so I mailed him a friendly "heads up". I should have known better. He tracked down my employer, emailed him ranting and raving about an attack on his business etc, etc. He posted lies about me on his web site and then banned my IP address so I couldn't rebut them. What a moron! Jeez, I should have known better. Some days you just can't do right by anyone. Update: I've removed the link as I got his ISP to force him to remove the post as it was totally libellous.
(Technorati tags: , )

Big Upfront Design Vs Agile Methods

You'll all know that Joel (of Joel on Software fame) is a great fan of big upfront design and in a crucial point he is right. The cheapest place to fix a problem with software is when it's still a bunch of text (or a diagram) on a piece of paper. Unfortunatly, there are circumstances where the only sensible approach to take to software development is an agile one. We have such a set of circumstances right now. The company I work for currently sell a Cobol based bakery control system. Not too surprisingly our customers are now complaining that they need a modern gui based system, not to mention the fact that maintaining a Cobol application is becoming harder and harder. So we are going to produce a .Net based, distributed application (that can either be run at the customer's site, or from our site using an ASP model). Now that sounds well and good, but the problem is that all our customers have a clear (and varying) idea of how the system should work. On top of that, senior members of the company (and by that I mean people who have been here since the dark ages) also have a clear idea of what the product should do. Add to this the fact that the company need to start work on this product as soon as possible, the only sensible way to tackle this is using an agile methodology. Doing this allows us to start work before the full user requirment document is complete, as we only need the the tasks in the first iteration to be "nailed down". It also means that the customers will get an early view of the product (as the end of each iteration allows a period of customer evaluation and remediation) and their views can be fed into subsequent iterations. So will this work? Will it be better than big upfront design? Well I think it will be, but why not stick around and find out, as I'll be posting in this category as the development unfolds?
(Technorati tags: , )

Hardware? I Don’t Care!

Here, the author bangs on about how you can't be a real programmer unless you know how the hardware works. What a lot of codswallop! I don't know anything (well not much anyway) about the hardware and I'm a real programmer. What makes me a real programmer? The fact that I solve real business problems for real people in the real world. So why don't I care about the hardware? Simple, because if I'm using Smalltalk or Python my code's portable across chipsets and operating systems.
(Technorati tags: , )

Ruby on Rails, First Impressions

I've just started looking at Ruby on Rails, on a Windows XP platform, and I can say I'm very impressed so far. You can prototype solutions real quick and get your customer's feedback on what works and what doesn't. Any changes they ask for are trivial to make and so you can get into a real collabaritive situation with them. The only thing I've got against it so far is that one of it's main mantras is "Don't repeat yourself", but it seems to me that if you want to change the look and feel of your site, you have to repeat that look and feel in all the rhtml files that Rails creates for you. Granted, I'm only half way through the book, so there may be a way around that, and if there is I'll let you know, but for now I'm really impressed. I must also remember to take a look at Seaside, which is sort of similar but written in my beloved Smalltalk.
(Technorati tags: , )

Twitter Updates


    Follow me! :-)
    www.flickr.com
    GaryShort's photos More of GaryShort's photos