Monday, September 29, 2008

Mister God This is Anna : Fynn

Everybody has got a point of view, but Mister God hasn't. Mister God only has points to view.

God made man in his own image, not in shape, not in intelligence, not in eyes or ears, not in hands or feet, but in this total inwardness.

Questions were a sort of inner itch, an urge to go forward. Questions, that is real questions, had this about them, they were exciting. You never quite knew where you were going to land.

She made no effort to help me catch her, no effort towards her own safety. Being safe meant not doing these things at all, being safe meant trust in another.

The daylight schooled the senses and the night-time developed the wits, stretched the imagination, sharpened fantasy, hammered home the memory and altered the scale of values.

'love' meant the recognition of perfectibility in another.

Installshield: Change product name, but not MSI file name

Want to change the product name of an installer but not change the MSI file name?
BTW. If you change the MSI file name you may break upgrades!
Simply change the product name and then under release, specify the 'MSI Package file name' to be the old product name. (the MSI file name defaults to the product name, if not explicitly specified.)

EDSK ... being a developer is not the same as being a designer

Every developer should know that being a developer is not the same as being a designer.

Just because you can program the server side of a website doesn't mean that you are the best person to design the graphics, layout, colour scheme or logos.

Just because you are an expert at optimising data retrieval from relational databases doesn't mean that you should be designing the layout of the forms used to display that data.

Or, if you're a design whizz, it doesn't mean that you should be writing the code of an application that uses your designs.


 Why is this important?

Be honest with yourself. Know your limits.  Focus on what you are best at. Let the people who are best at different tasks work on those tasks.
I know I'm not a great designer. Just look at this site. (One day I'll get a designer to make it better.)
I'm not saying you can't be both, just that most people aren't.




What do you do once you know this?


Don't be afraid to defer a task to someone better skilled.
It'll allow you more time to focus on what you're best at.
Would you rather be the developer of some amazing software that someone else designed? Or the developer and designer of some software that is only OK?

Keywords in different version of SQL Server

(Added: EXTERNAL, SECURITYAUDIT, PIVOT and UNPIVOT, REVERT)
(Added: MERGE)

Newer versions actually have fewer keywords.

Friday, September 26, 2008

EDSK: Some unofficial research

I sometimes feel like I never post on EveryDeveloperShouldKnow.com. In reality I know I've got over 100 drafts that I've yet to finish. Why do I find finishing writing so hard?

Anyway, before I force myself to finish what I've started, I thought it was worth checking that other people agreed with my assumptions on what I thought was important.

I decided to do a bit of research and see what other people thought that other developers should know.
I only hope that the post I put on stackoverflow doesn't come more comprehensive than what I put on my site.

Wednesday, September 24, 2008

Poor ASP.NET error handling now slightly better

The highlighted part stops the javascript erroring if the erorr message contains CRLF. (Which most of the custom error messages in the system I'm working with do.)
try
{
    ...
}
catch (Exception ex)
{
    DBUtils.RollbackTrans();
    bdyDetail.Attributes.Add("onload", "javascript:alert('" + ex.Message.Replace("\r\n", "\\n")  + "')");
}

Tuesday, September 23, 2008

Monday, September 22, 2008

Saturday, September 13, 2008

Thursday, September 11, 2008

Tuesday, September 09, 2008

Not using a system properly?

Can a user not use a system properly?

I can see how they might not use it as it was intended or designed, but properly?

Assuming that properly means the same a correctly. (http://www.google.co.uk/search?q=define%3A+properly)
If a system can be used in a way other than a correct one, doesn't that mean that the program is at best flawed or, at worst, contains errors?

I suspect that this phrase ("not using it properly") is typically used when they mean not as intended.  If that is the case it means that the program is unnecessarily complicated. Doesn't it?

Incorrect shortcut icon in start menu

Had an issue with an InstallShield 11 created installer.

One of the installed shortcuts was displaying a `default` exe icon, rather than the one specified.

Digging in the MSI, with Orca, showed that the shortcut incorrectly had an IconIndex of 1.

The Installshield IDE displayed an icon index of 0.

Something was obviously wrong.

The "Icon" table, in XML mode, showed the problem:
It was:
<row><td>NewShortcut2_B78C30FEFEEC4393B73638863E86FFA5.exe</td><td/><td>&lt;PATH_TO_PROGRAM FILES_FILES&gt;\StatMon.exe</td><td/></row>

Instead of:

<row><td>NewShortcut2_B78C30FEFEEC4393B73638863E86FFA5.exe</td><td/> <td> &lt;PATH_TO_PROGRAM FILES_FILES&gt;\StatMon.exe</td><td>0</td></row>

The IDE was showing a different value, if none was specified, than was put into the MSI.


Hope this helps save someone a headache in the future. ;)

Friday, September 05, 2008

My First Ubiquity command

It redirects the current tab to the root of the current domain.  - I find this helpful when there isn't a home link on a website.


/// http://blog.stevenlevithan.com/archives/parseuri
/*
 parseUri 1.2.1
 (c) 2007 Steven Levithan 
 MIT License
*/
function parseUri (str) {
 var o   = parseUri.options,
  m   = o.parser[o.strictMode ? "strict" : "loose"].exec(str),
  uri = {},
  i   = 14;

 while (i--) uri[o.key[i]] = m[i] || "";

 uri[o.q.name] = {};
 uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
  if ($1) uri[o.q.name][$1] = $2;
 });

 return uri;
};

parseUri.options = {
 strictMode: false,
 key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],
 q:   {
  name:   "queryKey",
  parser: /(?:^|&)([^&=]*)=?([^&]*)/g
 },
 parser: {
  strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
  loose:  /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
 }
};


function cmd_domain_home() {
// heavily ripped from Utils.openUrlInBrowser

 var windowManager = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator);

  var browserWindow = windowManager.getMostRecentWindow("navigator:browser");

  var browser = browserWindow.getBrowser();

  var uriParts = parseUri(browser.mCurrentBrowser.currentURI.spec);

  browserWindow.loadURI(uriParts.protocol + "://" + uriParts.host + "/", null, null, false);

}

Defrag chaos


This is after I managed to delete unneeded files from the C drive, which had run out of space.

Lesson for the day: If someone is responsible for admin of a key (read business critical) server, don't let them go on holiday if you'll have to pick up the pieces and sort out any problems, when it hasn't been proactively managed, while that person is away.

Tuesday, September 02, 2008

Example of poor usability

It's definitely a good idea to be consistent within software.  This is especially true when indicating special behaviour or requirements.

For example. It's not a good idea to highlight a textbox in one part of a program to indicte that it is a required field and then highlight a textbox in another part of the program, in the same way, to indicate that the text box is read only.