[Home]LinkPatternSuggestions

MeatballWiki | RecentChanges | Random Page | Indices | Categories

See LinkPattern for the current definition. See MeatballWikiSuggestions for suggestions on other topics.


I'm starting a wiki for Information Architects, and I expect there to be a number of two or three letter acronyms which will get used a s prefix in many cases. IA, UX, ID, UCD, etc. I'm not real keen on suggesting link patterns like IaDeliverables?. Unfortunately IAdeliverables isn't a link pattern, and in any case the word splitting expansion now makes no sense (I Adeliverables). Oh bother, said Pooh.

What would be the basic change to the link pattern grep to allow for AAzzzz as a valid link pattern, while still allowing AzA?, AzAz?, but not Az?

Thus combining:

 [A-Z][A-Z]+[A-Za-z]* or 
 [A-Z]+[a-z]+[A-Z]+[A-Za-z]* ... 

then this should work:

 [A-Z]+[a-z]*[A-Z]+[A-Za-z]* 

[... off to do testing ...]

it works!

-- EricScheid

Unfortunately that now breaks ISBN 1234567980 (alternate, search) links :-(

Any suggestions?

-- EricScheid

What is the problem? (Trying to help without installing UseMod . . .) -- AlexSchroeder

Update - the problem was that ISBN was being recognised as a LinkPattern, and thus the magical arrangement of ISBN followed-by-ten-digits was being interrupted with the LinkPattern html link. Problem solved by moving some lines about in the module so that ISBN (and RFC) links get grepped before the LinkPatterns. -- EricScheid (who knows just enough perl to get into trouble)

I suggest not changing the code (you will be doomed to trace Cliff's changes). The regexp you suggest allows for zero non-capitalized letters. Therefore try this (which forces a non-capital letter at the end):

 [A-Z]+[a-z]*[A-Z]+[A-Za-z]*[a-z]

Or this, which forces at least one non-capital letter before the end of the word:

 [A-Z]+[a-z]*[A-Z]+[A-Za-z]*[a-z][A-Za-z]*

-- AlexSchroeder (who has enough Perl experience to not like it)

Hmmm ... forcing a non-caps on the end would prevent ACRONYMS, so it's not on the preferred list.

Hmmm #2 ... actually, my regexp does require at least two caps, that's what the "+" symbols mean, right?

As to the doom .. too late - I've made other little hacks which I'll feed back to Cliff sometime. It's now possible to specify a stylesheet url in the user prefs, and got the ScriptLink? to properly url-encode the ampersands which means the pages validate now. -- EricScheid


Any particular reason for not allowing leading lowercase chars (ala aLinkPattern)? I just made that minor change to a copy of usemod for use here at work (our perl module namespace has leading lowercase chars - otherwise our names are pretty good CamelCase citizens). FYI the resulting pattern is [a-z]*[A-Z]+[a-z]+[A-Z][A-Za-z]*. --ErikDeBill

I think it should work, although if "Free Links" (like [[page name here]]) are allowed the link "abcLinkPattern" will lead to the page AbcLinkPattern. (The first character will be capitalized--this allows [[foo]] and [[Foo]] to point to the same page.) I suppose it could slow down the page parsing, which might be a problem if you're running on an old 80486 box. --CliffordAdams

I'll not hit a performance barrier, given the incredibly low traffic/overpowered box it's running on, but I can see how a WikiFarm might view things differently. In my case at least I think the "Free Links" issue won't trip us up - and shouldn't it be possible to change the free link handling code to check for both? It's not an issue for me, but in theory? Of course, I've always considered free links as a last resort when you can't get something to work w/ normal WikiNames. The notion of using them for otherwise good WikiNames seems rather alien. --ErikDeBill

I didn't like fooLinkPattern because it made talking about programs really aggravating. (Think about variable names.) It also violates the PrincipleOfLeastAstonishment?. -- SunirShah

could you explain a little more? "It makes talking about programs really aggravating" doesn't make sense to me (I just spent a bunch of time fighting an API with calls like FnNewCustomer?()). And I was actually surprised when I first noticed that fooLinkPattern didn't work. --ed

A common naming convention is like CamelCase, but with the first letter lowercase. For example, imageDecoderPool. Java programs often have this.

I attempted to fix the fooLinkPattern problem with the new version of the script. I haven't tested it enough, though. Is it showing up? -- SunirShah

I'm aware of the naming convention. Notice, I changed the code of my wiki at work to allow the link pattern to match our standard module naming convention - I want module names that show up to be links, so they can take people to more detailed info about those modules.

Even more importantly, I don't want to have to explain how to link to things (even if I was allowed to copy MeatBalls TextFormattingRules I'd still end up explaining to people who don't want to read the docs). Fine distinctions like "it's a link if it has mixed caps and lowercase, but it has to start with a cap then a lowercase" make it harder to understand what's going on. After all, the first question I got after setting it up was (paraphrasing) "I added some stuff to one page, but could you add another page for me to put this other stuff on?" The notion of a website where people can just edit things is hard for people used to HardSecurity and the usual web publishing paradigm to understand.

I'm not necessarily asking to add this pattern to MeatBall. I was actually just curious as to the rationale for excluding it. That exclusion seems pervasive among wikis - which usually means something was thoroughly thought out. Or a tradition carried on from WikiWiki. Perhaps there needs to be LinkPatternDiscussion? (after all, what one uses as a link pattern has implications for discussion on a wiki).
I would say CamelCase was a tradition carried from WikiWiki. I don't think links like fooLinkPattern were excluded explicitly--they simply were not included in the original LinkPattern. Note that the UseModWiki LinkPattern is much more inclusive than that of the original WikiWiki which doesn't allow numbers or consecutive capital letters (as of early 2002). --CliffordAdams

What was the fooLinkPattern problem? They aren't turning into links, if that's what you mean.
They used to turn into links like fooLinkPattern. (I used nowiki tags to demonstrate the old look here.) Now they don't turn into links at all, since the link pattern requires a word break (\b in Perl regex-language) before the link. I disagreed mildly that this was a problem, but it bothered Sunir enough to fix it. --CliffordAdams

My personal recommendation for new sites is to turn on the "Free Links" feature which allows links like [[link pattern suggestions]]. Pseudo-automatic linking (requiring users to use the CamelCase convention) seems to be an advantage for those who have invested a lot of time writing with CamelCase, but it appears strange to others who are not used to CamelCase. (Meatball mostly caters to people used to Ward's C2 Wiki, so it is likely to remain CamelCase-only for the near future.) --CliffordAdams

Free links are nice and a tremendous advantage as opposed to CamelCase links. Free links do, however, in their current form encourage (or at least not discourage) very long page titles. On WikiPedia, this is not much of a problem, because Wikipedia is an encyclopedia and often wants proper, long titles; long term linkability is not as problematic as long term readability. However, even this is limited to the encyclopedia articles, on the articles in the Wikipedia: namespace (used for help, policy discussions etc.), the system is breaking down. You have a huge amount of pages with titles like "How does one edit a page" or "Pages needing attention". Now remember that you have to type "Wikipedia:" before a linkname into that namespace, so you get monster-links like "Wikipedia:How does one edit a page". Not very helpful. And then they do this thing where they turn off the namespace prefix because it's ugly and confusing, so they use a pipe to specify an alternate link name. Then you get "Wikipedia:How does one edit a page|How does one edit a page". This is the ugliest form of free links with namespaces -- ugly not so much for the user, but for the editor. A distinction which is, of course, only marginally useful in a true wiki.

A better long term solution, which I have discussed with Sunir (who seems to be fed up with LinkPatterns? for the next 10^39 years or so), is to use smart underscores. With that I mean a pattern that is very simple to type for short links, but annoying for long links.

That way you automatically encourage short links, while keeping correct word rendering possible (the big, big flaw of CamelCase). As for linking to pages using a different link title than the link name, I suggest this syntax:

By using the -> notation, we give the reader of the wikisource a visual clue, as opposed to the pipe, which gives no clue as to the direction (what is the link title, what the name of the linked to page?). We should keep the syntax as simple as reasonably possible, so we should require the leading underscore only if we have no other hint as to what might be meant. So when a "->" is in the middle of two words, we don't need any other indicator.

The underscore has the important advantage of also looking visually similar to underlining, which is of course forever identified with links. --ErikMoeller

This is in addition to CamelCase (rather than replacing it)? I think it's a good idea, but "free links" should be kept in, too; often it's convenient to copy/paste a link name as is into a free link. -- BayleShanks

I think wikis that use CamelCase have to continue using it, it's more or less an irreversible decision, especially for large wikis. There are still old CamelCase links floating around on Wikipedia even though it only used them for a few weeks. As for copy & pasting, ThomasWaldmann has given me some good ideas in that respect. First, if you underline the title of a page, you can put underscores into it, and people will not notice that they are there. But when you copy & paste the page title, you get the underscores. Second, you can directly copy & paste link names from URLs (where they appear with underscores), which you currently cannot do. --ErikMoeller

Discussion

MeatballWiki | RecentChanges | Random Page | Indices | Categories
This page is read-only | View other revisions | Search MetaWiki
Search: