Dr. Dobb's Journal February 2004
Verity Stob, November 2003
Dear DDJ,
Keats and Chapman were discussing writing one day. Chapman remarked that he had been in the habit of sending pithy observations to a certain computer magazine.
"But the editors cut them up mercilessly," he complained.
At which Keats cried, "Aha! Doctored obs!"
The Plain People of Ireland: Is there to be anny more of this?
Myself: No.
Peter Chase
bluefox@overland.net
ISO Follies
Dear DDJ,
If the ISO thinks it can charge royalties for using its standards ("News & Views," DDJ December 2003), the organization is doomed to irrelevance. When Adobe tried to charge for its Type1 font format, the industry invented another (royalty-free) font encoding. When the patent holder started to charge for LZW compression, the industry invented other (royalty-free) compression algorithms. What will happen if ISO starts to charge royalties for these standards is that they will be ignored, and the industry will invent other (nonISO, royalty-free) standards and ignore the ISO versions. The fragmentation will be minimal, but there will be some delay.
Tom Pittman
tpittman@sbuniv.edu
AutoLogout
Enhancement
Dear DDJ,
In the October 2003 issue of DDJ, Jonathan Lurie wrote a wonderful article, "AutoLogout for Application Security," in which he rightfully explained the importance of a system's ability to lock down after a period of inactivity. He also generously offered some simple sample code to help understand how to achieve this feature.
Coming up on a release build at work, the last couple of weeks have led me seeking out areas of our product that could be more efficient, and I couldn't help but spot a slight one in Jonathan's code. Sometimes such a slight enhancement can be overlooked however, with such a system interrupting routine, I feel it's necessary to expose this enhancement.
In the CheckForExceededIdleTime() method, the thread is set to suspend for 1 second (and there is the comment above it that states "Perhaps every minute would be better in a production system"). My thought here is there is no need to interrupt the system every minute or second or any fixed amount of time. Since we know the dtLastActivity and the maxNumberOfMinutesIdle, we can simply calculate the amount of time to sleep by adding the two values and shoving that in the Sleep() call. This way, we only bother the system when absolutely necessary (instead of every minute or second). For example:
// To be really nitpicky, I'm changing
// maxNumberOfMinutesIdle to
// maxNumberOfMillisecondsIdle to take
// the extra multiplications off (as I'm sure
// the System.DateTime is stored in milliseconds
// anyway. No need to do an extra implicit
// division just to multiply it back out), so
// assume necessary implications earlier
// in the function.
Thread.Sleep( dtLastActivity.AddMilliseconds
(maxNumberOfMillisecondsIdle) );
Dave Noonan
dave.noonan@sbcglobal.net
Registering & Testing
Software Engineers
Dear DDJ,
Following Jonathan Erickson's June 2003 editorial regarding the establishment of a standardized test for software engineers, and Rick Tillery's letter in the October 2003 issue, I felt I should tell you about the system in the UK. As seems to be the case in much of the USA, the title "Engineer" is not legally protected in the UK, and therefore can be used by anyone, regardless of their education, ability, or job.
However, the title of "Chartered Engineer" is legally protected, and may only be conferred upon, and used by, those who meet the requirements laid down by the Engineering Council (or EC[UK] as it is now). These requirements include having an approved degree from an approved course (or passing suitable examinations), and having completed a considerable period of industrial training, or responsible experience in lieu. Those who feel they have met the requirements for Chartered Engineer status must submit details and proof of their education and experience, as well as references. They must then attend an interview with existing Chartered Engineers, who then decide whether the candidate is suitable. This process is open to engineers of all disciplines, and is carried out through the candidate's professional institution. Software Engineering candidates would normally apply through either the Institution of Electrical Engineers (IEE) or the British Computer Society (BCS). Whilst I do not pretend that this process is perfect, the use of an interview panel does allow for candidates who work in specialized fields to be interviewed by peers from those fields. Combined with the educational and experience requirements, this ensures that people cannot just pass a few exams to acquire the status.
The main problem with this system appears to be a general ignorance of its existence in the electronics and software industries. However, on balance I feel that such a system is a good one. Almost all of the best software engineers I have worked with either are Chartered Engineers or could become them if they wished. Those of mediocre or worse ability would not have a chance. Surely this is the kind of differentiation we need in an industry where staff ability has not always been the highest priority, yet can make the difference between success and failure of projects and, indeed, companies.
Jason Ross
jason_ross@bigfoot.com
Pirate This Perception
Dear DDJ,
Thanks to Jonathan Erickson for his often evocative and informative editorials. I especially appreciated the September 2003 "Pirate This Page." As a software developer, I am concerned about piracy. Moreover, I'm concerned about the perception of those around me that feel that it's their right to have bootlegged software, movies, and games. Why is it our "right" to have things for free? Hopefully, as policies develop regarding piracy, they will be motivated by doing what's right and not by the influence with the most $$.
Debbie Ehrlich
dehrlich@relisoft.com
DDJ