Journal Articles

CVu Journal Vol 16, #3 - Jun 2004 + Francis' Scribbles from CVu journal
Browse in : All > Journals > CVu > 163 (11)
All > Journal Columns > Francis' Scribbles (29)
Any of these categories - All of these categories

Note: when you create a new publication type, the articles module will automatically use the templates user-display-[publicationtype].xt and user-summary-[publicationtype].xt. If those templates do not exist when you try to preview or display a new article, you'll get this warning :-) Please place your own templates in themes/yourtheme/modules/articles . The templates will get the extension .xt there.

Title: Francis' Scribbles

Author: Administrator

Date: 09 June 2004 13:16:04 +01:00 or Wed, 09 June 2004 13:16:04 +01:00

Summary: 

Body: 

The ACCU Spring Conference 2004

At the very successful ACCU Spring Conference 2004 (Yes, the committee that replaced me did a pretty good job, apart from ensuring that I could not participate in the only item that I did not want to miss) I took on a new mantle by volunteering to video the keynotes.

The first of these was 'World Domination: The First Five Years' by Eric Raymond. He is one of those speakers who presents off the cuff and does not use slides. I have a lot of sympathy for that and have been known to opine that 'if I need slides to hold your interest, I cannot be doing a very good job.' Anyway back to the point.

We had obtained Eric's permission for videoing and I set up the camera and continued with my apprenticeship for yet another trade. About twenty minutes in Eric opened up for questions from the audience. I had several (well when don't I?) and put up my hand. Seeing it, Eric asked if there was a problem. I said no, I just wanted to ask a question. He said he would get back to me in a moment and then explained to the audience that he thought the video guy needed a moment to fix some equipment problem but it seemed he wanted to ask a question.

Clearly the ACCU Conferences are of such high calibre that even the video technicians ask technical questions about software development. If you missed the event, you missed another extremely enjoyable one with a vast range of presentations and many other activities. On the second day we were interrupted by the fire alarm and had to make an orderly exit. Fortunately it wasn't raining and we all got a few minutes of fresh air and Spring sunshine. Apparently a workman had but a drill through some critical wiring.

The grandiosely titled "Speakers' Banquet" was a very enjoyable evening that I very nearly missed; I did not realise that the person I was talking with in the bar wasn't going. I just managed to get in after all the other speakers had been seated. It was after one o'clock in the morning when another fire alarm dragged sixty or so of us that were still socialising out into the street. I am not sure whether the hotel decided to annoy its more normal guests in order to get us out of the ballroom but I never did hear an explanation for the alarm going off.

I realise that the cost is fairly high for those that have to pay their own way but next year treat yourself to a special four days by attending the ACCU Spring Conference 2005. You will find a wide range of people who are not only intelligent and very knowledgeable about software development but are often great fun and potentially good friends. Which leads me to:

ACCU in Melbourne

My intensive three weeks of Standards meetings started in Melbourne. Those of you who have flown to Australia will know that the most common flights to Melbourne and Sydney start at around nine in the evening and reach their destination some time before 6 in the morning. In our (my wife and I) case we left on Sunday evening to arrive at 5.45am on Tuesday (flying against the sun means that you lose a day somewhere). Alec Clews, a long-term member of ACCU, now lives in Melbourne with his wife and two children. He had noticed my itinerary and had volunteered to pick us up at the airport and take us to our hotel. This he did despite being in the throes of having his employer considering sending him for a six week job somewhere in the US. Had that come off he would have been flying out of Melbourne on the Friday. I do not know about you, but I would have been preoccupied by all the necessary arrangements. As it happened the job fell through so we had a pleasant dinner with Alec later in the week. He then took time out to reschedule our flight from Melbourne to Sydney (I had not been paying attention in the Travel Agent's and had managed to accept a 6am flight thinking it was 6pm - and had not been able to change the booking from the UK end) and then drive us out for our plane.

This kind of friendship is common in such communities as Science Fiction Fandom and it is nice to find that it has transplanted itself into the programming community as exemplified by ACCU. Indeed a couple of conference delegates independently commented that our conferences were more like Science Fiction Conventions than most technical conferences. I am glad that is so because that was my model for ACCU during my decade at the helm.

Sydney

Our two weeks in Sydney started out with a day spent with one of my oldest friends, David, who was my best man and his wife Sheila who was my wife's best friend at college. Entirely by chance their two months touring Australia happened to place them in Sydney at a time that overlapped our visit by a few days. I had to get on with Standards meetings on Sunday evening but David and Sheila took my wife off to stay overnight with the friends who were putting them up before going to visit the Blue Mountains. I gather they had a great time.

I did get some time to look around Sydney and it's a pleasant enough place with pleasant weather but I remain unimpressed by Bondi Beach (nothing that special, there are many better beaches round the world) and perhaps it is just ennui but give me Clifton Suspension Bridge over Sydney Harbour Bridge.

Anyway we did get a lot of work done in both WG21 and WG14. Several of the six papers I presented to the C++ evolution group were very well received and I was basically told to go and add some more and then bring them back for further consideration. The paper on forwarding constructors that I co-authored with Herb Sutter was interesting in that Herb and I did not agree on one important issue: when an object should be deemed to be alive. Herb wanted it to be only on completion of the whole chain of constructors whilst I was representing the UK view that it should be when the final delegated to constructor had completed.

When it came to our usual straw poll (strongly in favour, weakly in favour, weakly against, strongly against) the UK view prevailed by a substantial margin. The interesting point was that Herb was one of those giving strong support to the UK view. Technical arguments do win the day if put clearly. That paper is the first Evolution Work Group item to go to ready status. That is, we think we know what we want and what changes need to be made to the Standard to achieve the objective. There is now a six month cooling off period after which, if there are no objections, the working paper will be modified to incorporate the proposed wording.

Now I have to work hard at my other two major proposals (unifying the initialisation syntax for object definitions, and providing an 'explicit class' in which the compiler is not allowed to implicitly generate code for such things as default constructors.)

My second week in Sydney was spent at WG14 meetings. As I have said before, this is a much smaller group with a somewhat different work structure. This is further highlighted by the fact that at the five-year review point it chose to reaffirm its Standard. That means that currently there is no work being done on a new C Standard. While WG14 could start work on a new Standard any time that it wanted to it is actually unlikely to do so for several years.

However this does not mean that there is no work to do. Quite apart from handling defect reports (i.e. fixing bugs in the Standard) it is also working on a number of technical reports. These do not have the force of a Standard but are strong statements about how we would like to see specific things done, and attempt to provide a path for extensions so that compilers remain close. We have just moved the second Technical Corrigendum (formal errata for a Standard) to ready status (i.e. we think it is right but want to take a few more months before putting it out to vote). We intend to ask that TC1 & TC2 be incorporated into the Standard and that a new corrected edition be published (as did WG21 with the C++ Standard). Note that Wiley published the C Standard corrected by TC1 though this is officially the collation of two distinct ISO documents. The difference is that next time ISO will publish a new document that is the result of applying both TC1 and TC2 to C99 as a single document ISO/IEC 9899:2005 (or perhaps 2006).

I was tasked with drafting the WG14 response to the longest outstanding Defect Report. Having listened to the Committee discussion it was clear that their well considered opinions were actually different from a commonly held view. The core of the issue is whether the bit-patterns representing a value can change without explicit access. The simple surprising answer is that WG14 is intending to stipulate that they can as long as the value does not change. The most extreme case is where an object has indeterminate value. In such a case all bit patterns are of equal status. WG14 intends to state that using arrays of unsigned char to examine the bit pattern of an indeterminate value twice does not require that the two patterns be identical.

Their reason is that it is an unnecessary burden to require that the bit patterns of indeterminate values be preserved (e.g. when paging out memory). What about determinate values? Well there are times when these can have alternate representations; the implementation is allowed to arbitrarily change between representations (e.g. it can normalise a floating point value whilst idling for input, or more specifically, at a time when it is only accessing the object for reading a value.)

None of this should affect the working C programmer but it does have implications for compiler developers.

Worse is Better

During a newsgroup discussion of how to study C++ we got into a few exchanges on the subject of Dijkstra prognostications, in particular EWD 498, 'How do we tell truths that might hurt'. (for more start at: www.cs.utexas.edu/users/EWD/indexEWDnums.html)

I have some fairly strong opinions on some of the things Dijkstra said and a feeling that despite his good intentions the way he addressed the problems often put people off. During the course of the dialogue I wrote:

Yes, and it does not work. Practically every successful language has been developed pragmatically. Algol (both versions) were probably better designed than the contemporary FORTRAN. I hear all kinds of reasons why functional languages, Pascal, Modula (all versions), Ada, Scheme etc. are better tools but they have mostly remained in academia.

On the other hand, languages designed by those who wanted to program may be theoretically flawed but they are used. Instead of telling us (or researchers) that they should be doing a better job' it might be more effective to determine why those actually doing productive work choose something else.

One respondent gave the following url: http://www.dreamsongs.com/WorseIsBetter.html

I think many of you might find a little surfing starting there would challenge your thinking. Please take a little time to visit the site and follow some of the links and then, if you find them thought provoking share your thoughts with the rest of us. Unless you want to settle down to writing a full scale article on the subject I think that a letter to the editor would be appropriate and would give our new C Vu editor a helping hand.

Making Contact

Once again lost email has surfaced, this time from Brett Fishburne, a longterm quiet contributor to ACCU. Here is some of what he had to say:

Spam and Personal Data

I'm so very disappointed. In one section you call for our ISPs to parse all of our mail and in the next you decry a loss of privacy. Well, as GMail has shown, anyone parsing everyone's mail (for any reason) would be considered "invading privacy."

Now, suppose that all these ISPs got busy and started parsing mail and pulling out viruses. What is their liability if they miss one? What if they don't meet the requirement for "identifiable" for some reason (perhaps they use Macafee instead of Norton and are an hour behind)? The ISP's job is to deliver the mail. This is like expecting the post-office to intercept chain letters. The presumption is that it would be OK for them to peruse our mail in the hopes that chain letters are removed. Now, you could make the argument that it is the post office's responsibility to prevent bombs from going through the mail, but my understanding is that they do not take this responsibility. They generally prevent bombs from going through the mail out of the interest of protecting postal workers. Similarly, if you wrote a mail program that forwarded all of your SPAM to your ISP requesting that the sending offender be blocked, perhaps all people using that mail program could effect a "denial of service" to your own ISP and (assuming that alone wasn't sufficient for your ISP to cut you off personally), perhaps your ISP would determine that, in the interest of preserving itself, it would prevent such viruses from ever getting to your mail program. A longshot at best. Perhaps, if a government were to make it illegal for an ISP to forward a "known" virus...but there, again, we trip over privacy. [Privacy is not an absolute.]

I certainly don't understand why companies don't do this at the firewall. It makes no sense. Given that there are lots of people with corporate accounts and corporations are the ones who get dinged when networks get trashed, I would think that corporations would be very, very touchy on this issue and not leave it to each individual PC.

Perhaps the reason this doesn't work at ISPs is due to performance. Can you imagine how bad Internet telephony would be if every packet was parsed for a virus? What about innocent applications (like telephony) which may contain byte codes that could be a virus if executed, but are never intended to be executed (ditto for any binary source)?

Tools

I really like TextPad. I use it for everything and have gladly paid the price requested. I like that I don't give up EXREGEXPs for my searching and replacing and I especially like the "block select" mode which lets one select columns of data instead of just rows!

Commentary on Problem 13

You make so many obvious mistakes that I can only assume that this was done for effect. Nonetheless, I will address them:

  1. You treat the pointer to the structure in the compare function like they are structure objects. You would need to use an arrow "->" instead of the period, ".".

  2. In the call to qsort, you refer to sixeof(X) which has both a typo and an error and should be sizeof(struct X).

    The original was in C++ and I forgot to change that line.

  3. In the version of qsort() I use, it is necessary to supply the number of elements in the array as the second parameter. I can only assume that this was an oversight on your part.

    Again a careless conversion problem from a C++ sort().

  4. compare is required to return an int, but the addition and subtraction in the final return statement could possibly exceed an int.

  5. The compare statement doesn't handle a NULL pointer (although that shouldn't happen).

Cryptic

Here is my clue: The millenium problem in 4 digits in the correct ascending order and, of course, bookending but not naught.

The millenium problem centered around using the last two digits of a year and the problem that occurred when these were sorted. 01 was sorted in front of 99 when the desired sort was 99 then 01. The millenium in two digits is "00" or naught, but the years we want are just before "99" and just after "01" (bookending).

Another clue: What you get when you see and take away one followed by the reflection of a Downing Street address (4 digits).

"See" is a pun for the roman numeral "C" which is 100. 100 - 1 = 99. The Downing Street address is, of course, #10, which can be reflected in a mirror to "01" if the number one is written as a single line (implied by the reflective symmetry you mentioned).

Thanks

Thanks, Brett, for the time spent and I am only sorry that it did not arrive in a timely fashion. Now perhaps a few more of you could get into the dialogue. By the way, Brett also sent me 3 items for my project repository. Isn't it time you wrote up and sent in your contribution?

Commentary on Problem 14

Somehow under the pressure of getting half a dozen papers proposing future developments for C++ it got left out. Which is fortuitous because I am about out of space.

Problem 15

#include<iostream>
#include<cstdio>
using namespace std;
main() {
  int n;
  int waste;
  char name[51];
  cout << "Enter any integer number...\n";
  cin >> n;
  cout << "Enter your name...\n";
  cin >> waste; // 'gets' does not read the
                // name if this line is omitted
  gets(name);
}

A little examination will tell you that the above should not work. Why did it?

No space for cryptic clues this time so try:

Sounds like a perfect result when a score dine together. (2 digits)

Notes: 

More fields may be available via dynamicdata ..