www.jlion.com

Sunday, November 29, 2009

Over the holidays I had some time to do some reading. Two books that I've been meaning to read for a while and finally did are: Learning XML, by Erik T. Ray, and Eric Sink on the Business of Software by Eric Sink (of course!).

I found Learning XML to be an easy read. It's an O'Reilly Press book and Erik Ray does a good job of presenting the content. I found his coverage of XLinks and CSS/XHTML to be of particular interest. He also covers DTDs and XSL. Recommended.

Eric Sink's book, The Business of Software, has been on my "to read" list for quite a while. I'm an avid follower of Joel Spolsky's The Business of Software forum which Eric Sink co-moderates and have already read "Micro-ISV", a book written by Bob Walsh, who is another Business of Software moderator.

Probably what I retained the most from the book were Eric's thoughts on "programmers" versus "developers". Eric defines programmers as folks who want to focus specifically on the software. They have no interest in other parts of the business such as marketing or the customers. Developers, in contrast, are flexible folks who, albeit with varying degrees of skill, are happy and eager to tackle most anything thrown at them.

As an example, Eric cites one fellow who accidentally slipped a nasty bug into one release of a shrink-wrap product. This fellow, a software developer (not a programmer), identified the bug himself and worked directly with affected customers to ameliorate any damage caused by the bug. By quickly identifying the bug and proactively notifying affected customers, he not only prevented the bug from causing any lasting harm at the customer installations but impressed the customers and increased their trust in the company.

Labels:

Wednesday, November 18, 2009

I've occasionally encountered a problem with FTP, using either WS_FTP or applications that I've written that use the WININET libraries, that manifests itself as a timeout when downloading lots of (many hundreds or thousands) of files with FTP.

The FTP transfer process just seems to stop, with no discernible error. If disconnected then restarted (using WS_FTP) I am able to continue transferring files using FTP so no error with either my own or the server's network.

Today I happened upon what I think is the solution: "keep-alive". FTP uses two IP ports. One is a control connection, the other a random high number port, is used for actually sending data. It seems that the problem might be that the connection for the port used as a control connection is timing out and that the solution is to periodically send some data (a "ping") to the control connection on the server so that the server doesn't decide that the control connection is no longer needed and close it down.

Fortunately, this "keep alive" functionality is built into WS_FTP under the "advanced options" on the "site options" dialog. WS_FTP accepts a value in seconds between 10 and 3600 with a default is 0 (no keep-alive message). I tried changing this parameter in WS_FTP then executing a transfer that had been problematic for me in the past, and the transfer succeeded without issue.

It looks like the WININET library might also include support for keep alive. The HttpOpenRequest function supports a INTERNET_FLAG_KEEP_CONNECTION flag. This flag is described as causing the connection to "use keep-alive semantics, if available". I'm not sure if this is the same thing as WS_FTP's keep-alive option but it seems likely and I intend to try it out.