On Sun, Sep 26, 1999 at 03:01:22AM +0900, Keita Maehara wrote: > Country Codes is an ISO 3166 country code finder. I'll upload it as > "countrycodes". Here is some example output: > > % iso3166 -d ftp.chiark.greenend.org.uk > > Domain name : ftp.chiark.greenend.org.uk
You don't need to echo back the input argument, the user knows it already. > Top domain : uk (Great Bretain (iso 3166 code is gb)) This seems to be the only useful part of the output. The output format is all wrong, however. Anyone familiar with the Internet host namespace knows that .uk is the top-level domain because it is the last component of the hostname. Again, you're telling the user something they already know. You misspelled "Britain". Is it misspelled that way in the ISO 3166 text file that ships with libc6? Did you know an ISO 3166 table ships with libc6? The nested parentheses are also a bad idea for automated parsing reasons. > Sub domain #1: org (Organizations) > Sub domain #2: greenend (Unknown) > Sub domain #3: chiark (Unknown) > Sub domain #4: ftp (File Transfer Protocol) There is no way you can know the meanings of the names of all possible subdomains. It looks like you're destined to hardcode a massive table which will be staggeringly daunting to update and which will be necessarily doomed to fall out of date. > % iso3166 jp > > Country 2 letter 3 letter Number > ----------------------------------------------------------------------------- > Japan jp jpn 392 This output is needlessly dressy. It looks like a DOS program. Remember one of the core design principles of Unix is for the output of one program to be easily manipulated by another. Finally, I must question the utility of this program altogether. Fundamentally, it tells us nothing useful that grep UK /usr/share/zoneinfo/iso3166.tab does not. At the risk of starting another flamewar or being called some kind of cultural chauvinist, this isn't the first program I've seen from .jp that has big flaws like this. Many Japanese programmers seem to be utterly unaware of many of the Unix idioms, reinventing the wheel over and over again, and usually with ugly output formats (to spread blame a little more evenly, dpkg -l is just as awful in this regard and I really hope our Japanese brethren aren't using it as an example). To be fair, there is plenty of that among "Western" programmers as well; freshmeat is rife with programs that have been done before, better, and just as freely licensed. But I do not see the debian-devel list bombarded with ITP's of these marginal toys. I really wish we could get this psychotic ITP obsessiveness under control. Before posting an ITP, usually with a comment like "I'll upload this tomorrow", why not ask the development community of such a tool is truly needed? Why not take a look around the existing distribution, which is very large, and see if something that can do the job is already present? -- G. Branden Robinson | Debian GNU/Linux | It tastes good. [EMAIL PROTECTED] | -- Bill Clinton cartoon.ecn.purdue.edu/~branden/ |
pgprrIapNJF5t.pgp
Description: PGP signature