- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I never heard "beek" used for an artificial waterway, it's always a synonym for brook.
Addendum (2012-01-20 07:31): By the way you forgot the rule for words ending in -s. When there is a double vowel in front of it, remove it and change the s into a z. baas (boss) -> bazen. Otherwise, double the s. bas (bass) -> bassen. Except in the case of exceptions, of course....
Admin
Speaking is easier than writing. FTFY
Admin
In german we have words that have the same singular but different plural.
Admin
Admin
Using Esperanto might help, but I think you'd be much better off using Lojban. Semantic unambiguity and parsability FTW, and suchlike.
Admin
In Soviet Russia, same singular plurals have you.
Admin
Admin
Doesn't arabic have singular, double and plural forms of words? Properly weird language.
Admin
Nope, louse and mouse are both regular English, just regular English from when words where inflected in the middle. They date from the same era as run / ran, slay / slew, throw / threw. When you hear people complaining about how the kids talk and their bad grammar, imagine how it must have sounded when English sentence order changed from subject-object-verb to the modern subject-verb-object. You still get the subject-object-verb order in certain ritual sayings, e.g. "with this ring, I thee wed."
Admin
snort If you thought that's weird, you'll be shocked by this list of plural variations among different languages:
Only one form Two forms, singular used for one only Two forms, singular used for zero and one Three forms, special case for zero Three forms, special cases for one and two Three forms, special case for numbers ending in 00 or [2-9][0-9] Three forms, special case for numbers ending in 1[2-9] Three forms, special cases for numbers ending in 1 and 2, 3, 4, except those ending in 1[1-4] Three forms, special cases for 1 and 2, 3, 4 Three forms, special case for one and some numbers ending in 2, 3, or 4 Four forms, special case for one and all numbers ending in 02, 03, or 04
http://www.gnu.org/savannah-checkouts/gnu/gettext/manual/html_node/Plural-forms.html
Admin
I'm surprised I'm the first to do this...
Firsts!
Admin
It shouldn't handle the conversion of "is" into "are" because that's conjugation, not pluralization. There should be a separate function to handle that.
Admin
It was an example of "stategic" IT thinking. Always try to develop a technicaly ideal solution even if it doesn't actually reflect the users' needs.
Admin
So... An insufficient attempt trying to deal with a really complicated task ? This is supposed to be WTF ? Come on people, we all write things like that. As long, as the pluralization itself is not an essential part of a whole project, it can easily slide.
Admin
Sure, there are loads of odd little languages, but they are spoken by people who are unlikely to form a target market for anything. I bet they don't even have any oil.
Arabic on the other hand is widely spoken and positively cosmopolitan which is why is strange that they've kept odd little grammatical features like duals. Its also vastly more likely to be encountered in the real world.
(Sursurunga has lots of silly plural forms: spoken by 3000 people. The number of Arabic speakers is about 6 orders of magnitude greater. Seriously: only Gnu weenies care)
Admin
At least he added comments.
Admin
Hmm, NetHack's makeplural() thinks the plural of "human" is "humen"?
Admin
Whoa, page 3 already, and nobody cared to mention that Pluralization/Inflection is a standard feature of Ruby on Rails? Suppose you have a class 'person', then RoR will want to store that in a table called 'people'.
Test it for yourself at http://nubyonrails.com/tools/pluralize
Admin
And pointing out that this is a stupid idea is one of my hobby! (On the other hand: Looby!)
Admin
Dear dwarf,
In case you can’t tell, this is a grown-up place. The fact that you insist on being pluralized clearly shows that you’re too [strike]young and too stupid[/strike] small to be more of you.
Go away and grow up. Sincerely, Gimli, son of Gloin
Admin
Ĉu vi parolas Esperanton?
Admin
6 orders of magnitude greater .. until the next arab uprising or oil war ;)
Admin
Fuck me. That has to be the most boring post ever.
Admin
That's how I always do it. Then you don't have to worry about whether whoever wrote some big complex function handled this particular special case. Considering how infrequently the problem comes up, this is a clean and simple solution. And, I might point out, how much more work is it to write
rather than
PS I do generally overload the function to take only the singular value, and default to making the plural be the singular +"s". Then all the standard cases are zero effort above having the big complex handles-all-possible-cases function.
Seems to me this is just an example of the phenomenon we see a lot in this business: "We're going to devote thousands of hours to developing this product, because it's an interesting problem that will be fun to solve, even though the finished product, even if it works as designed, will have little practical use."
Admin
Admin
Ah, so now we know what happened to Chris Osgood after he retired from the NHL.
Admin
Admin
I thought it was quite interesting! And, no, I won't fuck you. But thanks for asking!
Admin
Nope, I don't see the problem with it, and when you point out what it is could you also say how you would write the code?
Admin
Isn't it the whole point of iterative programming to get something out the door that may not be perfect, and then improve upon it incrementally? This seems to be a good first step toward a useful feature. Where's the WTF in that?
Admin
Stupid RoR. If I have a class called Foot it wants to tableize it as foots. Thief to thiefs. Leaf to leafs. Even the WTF code in this article did better than than. Octopus to octopi. Sigh. Octopuses is the normal plural, octopodes is also acceptable. Octopi is an erroneous pluralization. This was added by someone who really wanted to seem smart, but couldn't even be arsed to check wikipedia. I write IMMENSE amounts of code around octopus related topics, especially their eight FOOTS, and this why I don't use ruby.
Final note... Me -> mes? You -> yous? Them -> thems? I -> is? Plural -> plurals? Seriously ruby?
Admin
Ignoring Arabic's duals (interesting tidbit I didn't know), you need one sentence for singular, and one sentence for plural. They can be quite different sentences. So detect which case you're dealing with, and insert the appropriate (translated) sentence. For the plural sentence you need a spot to stick in the number. For the singular sentence, and this is important, you do not necessarily need a number. "You have a single turn remaining" vs "You have (5) turns remaining", or "This is your last turn" vs "You have (4) turns remaining", or "You have no turns after this one" versus "You have (3) turns remaining". It is not just a matter of singular/plural. You may be saying entirely different things based on singular plural. Now, you also may not, it may be as small as "You have (1) turn remaining". But categorizing the entire sentence differently allows you to always be able to use the correct sentence structure, conjugation, and meaning.
Admin
That is not possible in localized applications. E.g. Japanese uses different number suffix based on class of object (e.g. flat objects are counted differently than other objects). Some slavic languages use 3 different suffixes based on number, not just singular and plural, e.g. in Slovak 1 pes (1 dog), 2-4 psy (2-4 dogs), 5-inf psov (5-inf dogs). That is just what I know, and I am no linguist. I am sure you could find other languages even weirder than that. There is no way you can cover all that in a maintainable way, best is not to even try an design your UI in a way that avoids pluralization.
Admin
AFAIK, Russian is the "Three forms, special cases for 1 and 2, 3, 4" case. A bit more than 3000 using that one. Also they have oil.
Admin
So, this will result in "USes Governments"
Admin
So, this will result in "USes Governments"
Admin
TrueWTF is human language. Whats difference in saying 0 items, 1 items, 2 items always. Makes no difference, except for redundancy. Why natural language have to have so much redundance. It make me sick.
Admin
+100
captcha: saluto, i salute you.
Admin
WTF, all local variables have register tag. This is why saying "register" to compiler does nothing. The compiler silent ignore the clueless coders and automatically choose what need to be register variable, better that the coders.
Admin
That code is really old, written when compilers weren't very smart, to run on machines with pitiful amounts of memory.
Admin
Only an idiot would make that statement, since spoken and written English are identical.
Admin
Why not? I had forgotten both of these by the time I was 8 years old!
Admin
I thought it was a reasonable stab to solve a very complicated problem.
Admin
Admin
Captcha: minimim.
Admin
Haha, what a stupid code. Everyone knows it's tomatoes.
Addendum (2012-01-23 03:36): Edit: Whoops, my sarcasm appears to have backfired, as that plural is actually correct. I was apparently thinking of the wrong singular "tomatoe".
Admin
Admin
Oh, really ? It only depends on how do you pronounce letters. It varies a lot from language to language. From my mother tongue's point of view, spoken english differs a lot from the written one.
Admin
But I was lieked this yes about it was is PLURALIZED! story I am ze germans!
CAPTCHA: dignissim - not over here, I would say.
Admin
So say I have 2 mice and they die. I guess then I could say: I once had 2 mice, but now I have merely 2 mouses.
But what happens if only one of the two dies? Do I then have one mouse and uhm one mouse? Worse still image Schrodingers mice. 4 mice in a box with some contraption that might kill them or not. What do I have in the box? A super position of 4 mice, 3 mice + 1 mouse, 2 mice + 2 mouses, 1 mouse + 3 mice and 4 mouses? Sounds good to me!