* Paolo Amoroso | Suppose the <H1>, <H2>,... <H6> HTML tags had been used for what they were | intended. It would have been trivial for search engines to generate useful | outlines of indexed documents.
If the CSS had been available from the start, things could have developed that way. It is, however, far better design not to use explicit levels but rather nesting constructs. The fact that these headings do not nest but sort of "float" in the overall body may have been a good idea to some people at some time, but it is generally only a recipe for abuse, which is also the development we have seen.
-- Erik Naggum, Oslo, Norway
Act from reason, and failure makes you rethink and study harder. Act from faith, and failure makes you blame someone and push harder.
>On the subject of a few lines of Perl, I'm curious to know what my >Common Lisp "do-combinations" macro would look like if you implemented >the same functionality in Perl. Using it in Common Lisp I can write >something like:
>(do-combinations (a b) '(1 2 3) > (print (list a b)))
>and the output will be: >(1 2) >(1 3) >(2 3)
This is how I would write it (and it looks mildly Lisp-ish); it might not be the most efficient way, but I like it:
sub combinations (&$@) { my ($code, $size) = (shift, shift); do_cmb($code, $size, [@_], []); }
sub do_cmb { my ($c, $s, $set, $idx) = @_; if (@$idx == $s) { return $c->(@$set[@$idx]) } else { for my $i ((@$idx ? $idx->[-1] + 1 : 0) .. $#$set) { push @$idx, $i; &do_cmb; pop @$idx; } } }
If you want a detailed explanation, I can offer one. The function is used like so:
-- Jeff "japhy" Pinyan RPI Acacia Brother #734 2002 Acacia Senior Dean "And I vos head of Gestapo for ten | Michael Palin (as Heinrich Bimmler) years. Ah! Five years! Nein! No! | in: The North Minehead Bye-Election Oh. Was NOT head of Gestapo AT ALL!" | (Monty Python's Flying Circus)
* Pascal Costanza <costa...@web.de> | ...but you could also argue that HTML is a language that instructs a computer | to generate a certain kind of output on screen.
I believe the interesting difference is between languages that instruct a very general-purpose engine to do specific things for which it was explicitly designed or intended in the concrete sense on the one hand, and on the other languages that are mere input languages to specialized applications that affect how it does its one task, but cannot change that task in any useful way. That is, HTML is a data language, while JavaScript is a programming language.
| The reason for this is that there is no sharp boundary between programming | languages and "non-programming" languages
Of course there is. It is not clear a priori, however, in which category every language would fall. There is a difference between fuzzy categories and things that do not fall neatly into only one of them.
| Someone who implements a parser generator doesn't see any real difference | between HTML and "real" programming languages
That is obviously because he deals with the syntax of the languages, not their semantics. Just as one who implements a file transfer protocol does not see any real difference between HTML files and images.
-- Erik Naggum, Oslo, Norway
Act from reason, and failure makes you rethink and study harder. Act from faith, and failure makes you blame someone and push harder.
> > As somebody else asked, what exactly was wrong with _Code Complete_? > > grelbr
> Nothing new inside. But come to think of it, maybe there was something > in there for a newbie, which was the question. I just meant it was all > old news to this old hacker.
I would agree that there is nothing "new". It has all been discussed before. The problem is that little of it is followed or known to your average programmer. Much of what is in there will probably be new to the reader. I've been programming over twenty years and I just last week was looking over Code Complete again and learned new things (in particular the quote from Dijkstra's "The Humble Programmer", which said that most of programming is an attempt to compensate for the strictly limited size of our skulls).
There are also many myths of programming that many take as rules. Code Complete dispels many of those myths.
On the subject of learning to be a better programmer, I am currently reading an interesting book, "Software Craftsmanship: The New Imperative" by Pete McBreen. It argues against the software engineering methodology and suggests that programming is really a craft much like being a blacksmith. He advocates a craftsman style system for programmers including apprenticeship as a means of learning it. -- Dale King
Tom Beer wrote: > Donald Fisk wrote in message <3D868533.65A4F...@enterprise.net>...
>> As for the mess of ifs and conds, could you explain this? All >> programming languages have conditional statements or expressions.
> Perhaps you mean "all procedural programming languages". There are > variants of Prolog that do not have conditional statements or > expressions.
I think Donald meant "All programming languages have conditions or other means of control flow control" As you mentioned neither statements nor expressions are really necessary (functional languages don't have statements, assemblers don't necessarily have expressions)
Erik Naggum <e...@naggum.no> writes: > * Paolo Amoroso > | Suppose the <H1>, <H2>,... <H6> HTML tags had been used for what they were > | intended. It would have been trivial for search engines to generate useful > | outlines of indexed documents.
> If the CSS had been available from the start, things could have developed > that way. It is, however, far better design not to use explicit levels but > rather nesting constructs. The fact that these headings do not nest but > sort of "float" in the overall body may have been a good idea to some people > at some time, but it is generally only a recipe for abuse, which is also the > development we have seen.
For the record, XHTML 2 will finally have nested sections, and generally seems to make it from a lousy to a tolerable *ML application. Maybe there's hope, but I still think getting rid of HTML altogether is more promising than fixing it.
* Dale King wrote: > On the subject of learning to be a better programmer, I am currently reading > an interesting book, "Software Craftsmanship: The New Imperative" by Pete > McBreen. It argues against the software engineering methodology and suggests > that programming is really a craft much like being a blacksmith. He > advocates a craftsman style system for programmers including apprenticeship > as a means of learning it.
Poo. I could have written a book arguing this when I realised it 13 years ago and got famous.
* Henrik Motakef | For the record, XHTML 2 will finally have nested sections, and generally | seems to make it from a lousy to a tolerable *ML application. Maybe there's | hope, but I still think getting rid of HTML altogether is more promising | than fixing it.
I quite agree, but the cost of the transition will be considerable. The only good things about the Web are that web pages are rewritten and applications scrapped at an alarming rate even in our current recession and that there is apparently no resistance to any kind of design in the community as long as they can get their desired visual results. Such a pragmatic focus may be a good foundation for making the necessary changes relatively quickly.
-- Erik Naggum, Oslo, Norway
Act from reason, and failure makes you rethink and study harder. Act from faith, and failure makes you blame someone and push harder.
Erik Naggum <e...@naggum.no> writes: > Many are surprised to find that DDC and UDC are multidimensional.
Does this mean that a given Dewey classification encodes multiple attributes?
That's interesting, but not quite as good as independent features. Please correct me if I'm wrong, but I assume that the Dewey system (and the others you've mentioned) are designed for physical objects like books, where each item belongs in exactly one place.
With online systems, it would seem much better to label each data item with a whole set of applicable features, and then basically navigate through the hierarchy by doing searches and building virtual indexes. In such a scheme, a given object might appear at numerous "leafs" in the classification tree, rather than only one.
Do Dewey systems already allow for this somehow? Or do you think the idea that an item might not have a unique classification is misguided?
-- Don ___________________________________________________________________________ ____ Don Geddis http://don.geddis.org d...@geddis.org I don't think God put me on this planet to judge others. I think he put me on this planet to gather specimens and take them back to my home planet. -- Deep Thoughts, by Jack Handey
* Don Geddis | Does this mean that a given Dewey classification encodes multiple attributes?
Yes. Geography and audience are particularly well-utilized examples. E.g., a book about Indiana high-school women's basketball would be classified under sports, basketball, pre-college, in Indiana, for women. A book about cats for children would be classified under cats, intended for children.
| Please correct me if I'm wrong, but I assume that the Dewey system (and the | others you've mentioned) are designed for physical objects like books, where | each item belongs in exactly one place.
Yes, the books would be in one place, but you would obviously have multiple index cards for them if they were cross-classified. It is useful to find related items grouped in the bookshelves, but this is a consequence of the nature of bookshelves, not of the classification.
| With online systems, it would seem much better to label each data item with | a whole set of applicable features, and then basically navigate through the | hierarchy by doing searches and building virtual indexes. In such a scheme, | a given object might appear at numerous "leafs" in the classification tree, | rather than only one.
This is already the case. I have several books that are cross-classified.
| Do Dewey systems already allow for this somehow? Or do you think the idea | that an item might not have a unique classification is misguided?
I think you have assumed that a classified item has only one classification. This is false. It must have one, and the better it is, the more useful that one is, but if a book covers some more than subject, there is nothing to stop it from getting several classifications. (Unless, of course, it is a "general collection", where the classifiers basically give up on it with the assumption that people would not look for it under any specific area.
-- Erik Naggum, Oslo, Norway
Act from reason, and failure makes you rethink and study harder. Act from faith, and failure makes you blame someone and push harder.
> > On the subject of learning to be a better programmer, I am currently reading > > an interesting book, "Software Craftsmanship: The New Imperative" by Pete > > McBreen. It argues against the software engineering methodology and suggests > > that programming is really a craft much like being a blacksmith. He > > advocates a craftsman style system for programmers including apprenticeship > > as a means of learning it.
> Poo. I could have written a book arguing this when I realised it 13 > years ago and got famous.
On Tue, 17 Sep 2002 10:03:18 -0300, Paolo Amoroso wrote: > On Mon, 16 Sep 2002 05:28:33 -0300, synthespian > <synthesp...@debian-rs.org> wrote:
>> All these things matter a lot to me, being from the medical community, >> and quite aware of the importance that being able to integrate the data >> that continues to grow at exponential rate in the field (genome, for >> instance, the barrier that tradional statistics methods are up against >> in a large medical database, etc...)
> I suggest that you have a look at all the books by Edward Tufte you can > afford. Lots of food for thought.
On Mon, 16 Sep 2002 07:59:07 -0300, Erik Naggum wrote: > I envision a future where people are sufficiently encouraged by > computers to learn the skills of rhetoric, argumentation, and logic to > actually achieve what education cannot achieve when there is no clear > benefit to learning either of these skills. I also believe that > something like Dewey's or the Universal decimal classification system > needs to be taught as the optimal means of searching for information > with computers. (The actual numbers is not the point -- the > hierarchical structuring of human knowledge that is embodied in the > coding into numbers is an unparallelled achievement. The silly > re-invention of "ontologies" in the Semantic Web context is pathetic > in comparison.) All of this actually means that philosophy, > epistemology, the nature of concepts, etc, will have to become > fundamental in people's approach to information. Today, we are > hampered by many false starts in these areas and much muddled thinking > and expression thereof.
There's one thing that I definitely think is a basic flaw with ontologies, at least the way they're set up (I may have a very limited understanding on the topic, however): the ontology is defined by the "definer". For example, the person who defines the ontology has motives for indexing something in the ontology. Why does he/she do it? What are the "economics" or "psychology" behind it? This is relevant, as anyone who works with narketing will tell you. Another thing is the very meaning of a word.How then, does he/she understand the meaning of the word? Words change meaning over time, a fact any linguist will tell you...And, if that wasn't enough, they mean different things to different people. I'm not talking about you defining that <zp> means <zip code>, but the very concept of zip code (ok, my example isn't so good. But let me give you a *real* example: a sociologist here in Brazil set out to discover what percentage of the population understood the correct meaning of the concepts of "right" and "left" in politics...A total disaster...An amazing amount had no clue, and actually exchanged meaning. Now imagine a candidate for the the congress asking for votes...you get the picture...) So, at some point, words cease to mean what they initially meant. This, from the point of view of a database of ontologies introduces quite a lot of noise. So maybe you end up eventually with inference rules that are really bogus.When you have the emergence of new meanings as in language you need software that a software that is intelligent enough to sort out the new meanings, perhaps even in a temporal way which, AFAIK is totally out of the design of the ontologies as they are being proposed for the Semantic Web. You end up with a huge amount of entropy.
Here in comp.lang.java.programmer, "Michiel Konstapel" <a...@me.nl> spake unto us, saying:
>> >> This appears to be something of a religious issue among programmers,
>> >Oh, so that settles it once and for all, then. Call in the Spanish >> >Inquisition!
>> I didn't expect the Spanish Inquisition.
>Nobody expects the Spanish Inquisition!
Of course not. It's chief weapon is surprise. :-)
-- -Rich Steiner >>>---> http://www.visi.com/~rsteiner >>>---> Eden Prairie, MN OS/2 + BeOS + Linux + Win95 + DOS + PC/GEOS = PC Hobbyist Heaven! :-) Applications analyst/designer/developer (13 yrs) seeking employment. See web site in my signature for current resume and background.
Here in comp.lang.java.programmer, "Michiel Konstapel" <a...@me.nl> spake unto us, saying:
>> >> This appears to be something of a religious issue among programmers,
>> >Oh, so that settles it once and for all, then. Call in the Spanish >> >Inquisition!
>> I didn't expect the Spanish Inquisition.
>Nobody expects the Spanish Inquisition!
Of course not. Its chief weapon is surprise. :-)
-- -Rich Steiner >>>---> http://www.visi.com/~rsteiner >>>---> Eden Prairie, MN OS/2 + BeOS + Linux + Win95 + DOS + PC/GEOS = PC Hobbyist Heaven! :-) Applications analyst/designer/developer (13 yrs) seeking employment. See web site in my signature for current resume and background.
> This is how I would write it (and it looks mildly Lisp-ish); it might not > be the most efficient way, but I like it:
Yes, it's an elegant algorithm. I'm basically comparing how people accomplish the same functionality in different languages, using whatever algorithm seems appropriate for the language. The versions for languages such as Scheme, OCaml, etc. are in comp.lang.lisp in discussions about macros etc.
My CL version is a macro which builds nested loops, so there is no need for it to call any functions at run time, recursive or not. I'm curious to know if Perl has macros, or if it makes sense for a Perl program to rewrite Perl code in some situations.
I also wonder if that "print" block of code in your Perl code is a closure. If outside of the call to combinations, you were to define a number of local variables, and in the block, you were to add code which used those, would it work, even though it would be executed by combinations rather than in line?
i.e. combinations { print "(@_)\n" } 2, (1..5); ^ block of code ^ (add other code inside the same block, and use variables defined outside)
I also wonder why the 2 has a comma after it, when the other arguments to combinations don't.
In article <a6789134.0209180215.3e75d...@posting.google.com>, cubicle...@mailandnews.com (Software Scavenger) wrote:
> My CL version is a macro which builds nested loops, so there is no > need for it to call any functions at run time, recursive or not. I'm > curious to know if Perl has macros, or if it makes sense for a Perl > program to rewrite Perl code in some situations.
Perl doesn't have macros, but it does make sense sometimes for a Perl program to create Perl code and pass it to eval().
> I also wonder if that "print" block of code in your Perl code is a > closure.
Yes, Perl functions are closures (if they refer to free variables). If you put the appropriate magic character as the declaration of a sub argument then you can pass a function body in using just { } around it, as you saw there.
> If outside of the call to combinations, you were to define a > number of local variables, and in the block, you were to add code > which used those, would it work, even though it would be executed by > combinations rather than in line?
Yes. In fact, since you can walk the entire tree of namespaces and fudge about with the "globs" (like CL symbols, except that they have more than just a value and a function slot), you can actually do just about *anything* you like, although perhaps not quite with the syntax you'd like.
synthespian <synthesp...@debian-rs.org> writes: > But let me give you a *real* example: a sociologist here in Brazil > set out to discover what percentage of the population understood the > correct meaning of the concepts of "right" and "left" in > politics...A total disaster...An amazing amount had no clue, and > actually exchanged meaning. Now imagine a candidate for the the > congress asking for votes...you get the picture...)
What I find even more amazing is that this ``sociologist'' apparently thinks that it is so entirely clear what right and left means, that there is much of a difference between them and he knows what it is and everybody else should, too. For another viewpoint see, for instance, ``The Road to Serfdom'' by F. A. Hayek.
Regards, -- Nils Goesche "Don't ask for whom the <CTRL-G> tolls."
> Well, why didn't the thousands of other people who knew this? It's > still annoying.
So, in other words, if good practices in a given field are already known to many of the experienced practitioners in the field, nobody should bother writing a book describing them for the benefit of those newcomers who don't already know them? Books should only be written about revolutionary new ideas that no one ever thought of before?