Subscribe to the RSS feed then follow me on twitter at @mrlacey (misc) and @wpug (WPDev news)

Wednesday, July 30, 2008

... some standard design patterns

“Design patterns do not lead to good design. Good design leads to design patterns."
- Alan Shalloway

If you've built Windows Phone or Windows Store apps you can cross-promote them with AdDuplex to get more users.

Friday, July 25, 2008

Intuitive is subjective

You can't tell me something is intuitive.

You can tell me that you think something is intuitive.  Or 8 out of 10 people that used it thought it was intuitive.

Only I can say if I think something is intuitive.

If you've built Windows Phone or Windows Store apps you can cross-promote them with AdDuplex to get more users.

Friday, July 18, 2008

Don't catch NullReferenceException

Consider the function:

private string GetObjectValue(object param)
{
                try
                {
                    return param.value.ToString();
                }
                catch (NullReferenceException)
                {
                    return "";
                }}

It would be much better to do this:


private string GetObjectValue(object param)
{
                if (param != null)
                {
                    return param.ToString();
                }
                else
                {
                    return "";
                }}

Exceptions are expensive. 
Handling the error adds an average of 16 ticks to the execution in my testing. This will add up.

If you've built Windows Phone or Windows Store apps you can cross-promote them with AdDuplex to get more users.

Thursday, July 17, 2008

Make applications understandable

"One of the jobs of the appliaction is to make it easier for you [the user] to understand how to use the application"
- Joel Spolsky

If you've built Windows Phone or Windows Store apps you can cross-promote them with AdDuplex to get more users.

Installshield conditions

The condition for a first time install is:
Not Installed

For a complete uninstall:
REMOVE~="ALL"

For any maintenance operation (repair, modify, uninstall, anything except first time install):
Installed


The above came in handy when I ended up wrting this to not display a messagebox on a silent install:

function WarnUserIfNotSilent(hMSI)
  STRING szProperty;
  NUMBER iSize;
begin  
  iSize = 256;
  if (MsiGetProperty (ISMSI_HANDLE, "UILevel", szProperty, iSize) = ERROR_SUCCESS) then
    if (StrCompare(szProperty, "2") != 0) then
      MessageBox("A message.", WARNING);    
    endif;
  endif;
end;

If you've built Windows Phone or Windows Store apps you can cross-promote them with AdDuplex to get more users.

Wednesday, July 16, 2008

Why do I work in IT?

Because it affords me the opportunity to make things simpler and easier for people. Improving lives through technology.

It's also a relatively new industry and while this can sometimes be frustrating, it's also exciting and there's always something new to learn.

If you've built Windows Phone or Windows Store apps you can cross-promote them with AdDuplex to get more users.

Monday, July 14, 2008

I accept nothing

???

If you've built Windows Phone or Windows Store apps you can cross-promote them with AdDuplex to get more users.

Xobni Setup

This is the last screen on the Xobni installer. A pleasant change from the usual practise of hiding a list of staff names somewhere in an app.

If you've built Windows Phone or Windows Store apps you can cross-promote them with AdDuplex to get more users.

Friday, July 04, 2008

why write unit tests before fixing bugs?

Because it's really satisfying to see the number of failed tests go down as bugs are fixed.  How else can you be sure that you are making progress and actually fixing the bugs?

If you've built Windows Phone or Windows Store apps you can cross-promote them with AdDuplex to get more users.