- 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
Gaiden outta here!
Aleph you all!
Admin
The funny thing is that the second comment is in fact in English. :) But well, I think it was a Quebecois boss just being an assclown.
Admin
Sure Blame Canada... well I'm a Canadian and I don't think that multi-language code be acceptable at any company I've ever worked for. Even working in Europe (the Netherlands) we had to stick with one language for an entire project (English or Dutch). There's nothing that I dislike more than multi-language variable names... impossible to read.
Besides, all of the code that I write reads like a book, so comments aren't necessary. I use "AlephComments", which are silent and invisible :)
Admin
Are you sure the second submission isn't a very creative ploy by systransoft to get a little free advertising to the geek demographic? :)
Admin
I hope that's a joke. lol
Admin
I am Mexican and I keep my variables in English and my comments in Spanish. The languages (C#, Java, etc) and base classes and libraries are always in English so I keep the code in English make it cleaner and make it easier to post and make sense if you need help. But that's just me.
Admin
At least they specified the other language and provided a site for translation. They could have just left the coders guessing, and therefore making a bigger WTF.
Admin
I code in C, but I write my comments in Java.
Admin
That first comment sounds like it was generated using The Commentator with verbosity=10, self-importance=10.
http://www.cenqua.com/commentator/ (I'm sure it's been linked from here before).
Admin
So, during my childhood the Nintendo game I was playing was really called "Ninja side story"? I'm glad I woke up this morning just to learn that.
Admin
That's what happens when a programmer is told to "document your code now that you're done" and given no other interesting things to do.
If I can't figure out that a GaidenCommand is some kind of metacommand, from context, then I really don't want to be reading this code.
Admin
Clearly, there are people who don't understand that comments are not for the author, they're for the people who come along later. If there isn't a 100% likelihood that future maintainers will know French, then you have no business commenting in French!
Of course, as soon as I saw "the names speak for themselves" I'd run away. Yes, self-documenting code is a good idea. No, it is not enough.
Same goes for "find us to ask what a comment means." I've worked in those conditions, and it's a farce. Expecting a maintainer to stop every five minutes and hunt down the original author for questions is unacceptable. The manager might as well make a bonfire out of money.
I wonder if it's possible to give the original author a taste of his own medicine by sending him encrypted e-mail without any keys, prefaced with the unencrypted statement "See me if you want to know what this says."
It's WTFs like this that have led me to insist on seeing a sample of the project's javadoc before I accept a job.
Admin
To ensure proper internationalization and localization of comments, always be sure to store your comments in a string table.
(Kidding! Ha ha! Oh never mind.)
Admin
Hear, hear!
And if there isn't a 100% likelihood that future maintainers will know English, then you have no business commenting in English! (Feel free to substitute your language of choice).
But what the hell is "100% likelihood", anyway? "Absolutely probably"?
Admin
I like comments, but they are not really part of the code, more written as an aside, so I generally prefer GaidenComments. Taste is personal.
On a more serious note -- while I realize that you are being sarcastic, there is some truth hidden in your statement. If you find yourself drawn to writing a huge and complicated comment to explain a point about your code (say, your weird idea of naming a class using an obscure language), then you're probably on the wrong track. Go fix the code instead.
What really gets me about the anglo-saxon code comment is the fact that it tells me nothing whatsoever. By reading the code, I would be able to spot pretty quickly that that most of the variables are named in English and that all comments (except the one shown here) are in French. WTF...
Admin
If Nessie IsTrue() Then..... [<:o)]
Admin
dude, you like that movie *way* too much...
-ds
Admin
I'm sure that each of us would run out of fingers (and toes) if we tried to count the number of times we've seen where this is the case. I know I would.
Admin
What's really amusing is that the Japanese version was called ?????, or Ninja Ryukenden - "Legend of the Dragon Sword Ninja." Why they changed the name is beyond me, they exchanged one Japanese phrase for another and both are meaningless to most foreigners.
Admin
<rant>man.... wtf... d00d spends more time in his comments on the origin of the work Gaiden and Aleph than he does saying anything else... like anyone cares where he got the word from. Sure, it might help cuz variables should get named what they are... but that only works if people know what the words are. if you have to tell people what the word means, then you shouldn't name any variables by it. i mean cmon people... as for the language... being developer support, i get very many questions, in very many different languages... most of the time, the code is in english, and the comments are in their native language. This is fine. the comments i could really care less about, as long as the code is in english. If the syntax of a language uses english words, then use english ppl... it doesn't take a rocket scientist to figure that out. Oh yeah, if you don't know english, then don't use single letter vars... use your native language... cuz even though I hate seeing variables named words that I could never even take a guess to the meaning of, it's better than a variable named "v".(at least if i need to i could probably run the variable name through a translator)</rant>
Admin
The machines I played on called it Ninja USA. Never could figure out why the end boss was so much easier to beat than his three poison-claw henchmen before him though. Maybe he had spent the last 20 years building up an immunity to Iocaine poison...
That game required such precise timing though. I remember practicing until I could get to the end with one quarter but if I stopped playing for a few months I could not even get past level one.
Admin
Admin
Ha ha brillant! IsTrue() shoulda done that in JavaScript they were paid per line of code Hungarian notation MS Paint expertise C-pound
Now that I just used them all, this post will never make it past 40 replies! Eat it suckers! Muahahaha!!
Admin
Something along the lines of 100% probability.
Admin
bi-lingual code ... I love it
Keep the diversity strong
Admin
And we have all noticed how much he hates to type!
As for the second comment, without a cultural background watching Quebec's language laws with their, HONEST TO GODS, I KID YOU NOT - LANGUAGE POLICE (actual division of the quebec legal system punishing those who do not follow quebec's anti-english language laws) you might not appreciate the need for a disclaimer like this. Frankly, I am surprised that some in the governemt has not yet drafted an addendum that requires that all languages be translated into french, require the all identifiers be in french and that all english comments may only be 40% as significant as the french comments.
Think I'm nutz? Google "quebec language laws". And here you thought your neighbours to the north were just wussier toned down versions of americans. Not if you live south of Quebec.
So ya, if it was written in Quebec, I am amazed that there was even THAT much english in the code.
Admin
As a native English speaker myself (from the place that has given its name to the language, no less), I always feel sorry for non-English speakers who are forced to program in English. Perhaps it's time to redress the balance.
French example:
si(condition)
// quelquechose
ousi(condition2)
// encore quelquechose
fin
German example:
wenn(condition)
// etwas
oderwenn(condition2)
// noch etwas
Ende
I'm sure our French and German friends could do better.
Admin
You're absolutely right.
If I'm writing software that's going to a company in Europe (but not the UK), then it is my responsibility to make sure the comments are in a language their maintainers can understand.
I suppose "reasonable expectation" should be substituted for "100% likelihood." And I think it's reasonable to expect that not every Georgian will understand French comments.
At the very least, I would have sent the code back with a message like: "Since you chose to write in French, I hereby place on you the burden of translating the comments for us. It's your doing, so it should eat into your time, not ours."
Comments are meant to save development time, not increase it.
Of course, if the whole codebase was inherited as the result of buying up a French company, then this seems like an inevitable risk. But it sure appears the author knew non-French-speakers would be looking at it.
Admin
In fact, if the quebec language police ever find out that some languages have a pre-processor, they will likely require that all french companies use government mandated include files and program ENTIRELY in french. Could you imagine entire system libraries translated through <#define>s?
Frankly, I could almost find the concept amusing enough to send an anonymous email to the quebec governement complaining about how english identifiers in programming languages undermine the french distinticiveness and how said pre-processors could fix the problem.
The economic damage would be amazing, and would not cause the quebec government to hesitate for a second before passing new laws to cover it.
Let's make that evil plot #31.
Admin
How inconsiderate of you to not post the page. Look, I am B-U-S-Y. I do not have time to surf to that page!
(Actually, I did go, and it is a hoot. Thank you.)
Sincerely,
Gene Wirchenko
Admin
I can identify with this. I work for a French-owned company, and much of our code was originally developed in France and has lots of French comments. Which makes it really annoying to maintain here in the US.
On the other hand, I am actually picking up a little French (very slowly) just from maintaining the code. But don't tell the French people that. They'll think they're justified.
Admin
I'm not, fuck'em all.
And I say that being french and living in france...
Code localization should die, plain and simple. Standard libs are in english anyway, and it's a frigging pain switching to an english mindset (because you're coding and reading the docs and using the standard api) to a french mindset just because your stupid coworker doesn't want to use english in his code.
Now if you *really* want code localization, there is an (ugly) french (heap of dung) L5G/IDE called Windev (do not use it, seriously... wouldn't come to your mind anyway since you're not french but I still warn you) that allows you to code either in french or in english (and that can switch between both).
Admin
Admin
With the email headers translated into French I don't think there's much risk of your mail getting to its intended destination.
Admin
Admin
Goodness me! That sounds like something the Quebec government would love to invest billions into...and then billions more changing it so it is French only. English is for those heathens in the rest of Canada, anyway.
Admin
Well done, but honestly, I'm quite happy that all keywords are English; that makes it easier to keep domain specific words and programming keywords apart.
For example, "client" can mean two totally different things: In the domain of the application, "client" is the one who places an order. In the computer domain, client is a program or device that connects to a server. To distinguish this two meanings, I use German words ("Kunde") for domain specific meanings and English words ("Client") for computer related meanings.
Admin
It could just be job security .....
Dev: "You can't fire me! I'm the only one who understands [some essential-yet-badly-written/commented project]!"
Boss: "F***, you're right. And you can have a raise after we fire Johnson."
Admin
Besides, all of the code that I write reads like a book, so comments aren't necessary. I use "AlephComments", which are silent *and* invisible :)
Well, it may come as a surprise to you that not all french canadians are able to write properly sentenced comments in english. Where i work, comments used to be made in english (as is everything in the code) but after having comments that we're so badly written that they were more confusing than anything else, we opted to have all comments written in french.
I agree that in a perfect world, i should be all written in the same language, but in the real world, that is not always possible.
I see no WTF in this, i live it everyday. Sadly, i live in the real world.
Admin
<FONT face="Courier New" size=2>i think this is the funniest daily wtf i've ever seen.</FONT>
Admin
Fortunately email and FTP would be largely unaffected, given the decidedly non-english nature of most of their 4-letter command words and how few mail relays actually care about anything else.
HTTP, on the other hand, may be in for a bit of a shock.
Admin
You all think I am joking about Quebec's language laws and wanna run with it. Sadly, the truth is stranger than fiction ever could be: "
<FONT size=2>MONTREAL - </FONT><FONT face="Verdana, Arial, Helvetica" size=2>A couple selling maple syrup over the Internet has been fined for operating an English-only Web site in Quebec.
Muriel and Stanley Reid were cited for violating Quebec's language law, Bill 101."
http://cbc.ca/cgi-bin/templates/view.cgi?/news/2001/05/21/internet010521
If the Quebec government ever took it seriously into mind, yes, the could very well pass laws that would be disruptive enough to require french based protocols only.
Even the WTFs we see daily pale beside the delibertate dementia of the Quebec's crusade for "purity". I only bring them up because they could be combine with programming to create some of the greatest programming WTFs of all times, HONESTLY.
</FONT>Admin
Heres some danish C-pound code:
<FONT face="Courier New" size=2><FONT color=#0000ff>hvis</FONT>(ErSand(<FONT color=#0000ff>sand</FONT>))
{
<FONT color=#0000ff>retuner</FONT> <FONT color=#0000ff>sand</FONT>;
}
<FONT color=#0000ff>ellers</FONT>
{
<FONT color=#0000ff>retuner</FONT> <FONT color=#0000ff>falsk</FONT>;
}</FONT>
Brillant!
Admin
<font face="Courier New" size="2">C:\Kode>kompiler kode.cs
<font color="#0000ff">retuner</font> <font color="#0000ff">sand</font>;</font>
<font face="Courier New" size="2"> ^^^^^^^ F01123: Syntaksfejl. Ukendt identifikator.</font>
<font face="Courier New" size="2"> <font color="#0000ff">retuner</font> <font color="#0000ff">falsk</font>;
</font><font face="Courier New" size="2"> ^^^^^^^ F01123: Syntaksfejl. Ukendt identifikator.</font>
<font face="Courier New" size="2">C:\Kode>_
</font>Does D-flat have macros like good old C/C++?<font face="Courier New" size="2">
// got_danish.hpp
#define afbryd break
#define tilfaelde case
#define fang catch
#define karakter char
#define klasse class
#define konstant const
#define fortsaet continue
#define standard default
#define slet delete
#define goer do
#define dobbelt double
#define ellers else
#define oplist enum
#define ekstern extern
#define flydende float
#define ven friend
#define gaatil goto
#define hvis if
#define ilinie inline
#define heltal int
#define lang long
#define ny new
#define privat private
#define beskyttet protected
#define offentlig public
#define returner return
#define kort short
#define medfortegn signed
#define stoerrelse sizeof
#define statisk static
#define struktur struct
#define skift switch
#define skabelon template
#define denne this
#define kast throw
#define proev try
#define forening union
#define positiv unsigned
#define virtuel virtual
#define ingenting void
#define volatibel volatile
#define saalaenge while
</font>
Admin
You misspelled "returner".
Admin
Hillarious! To bad it's not possible to use ø æ and å
A question regarding comments.
At my current place of employment we are discuraged from putting comments in our code in general. The two exceptions to this exist rule, is API programming and code which cannot be made self-explanatory and therefore deserved commenting. The reason for this being that comment are often not updated as the code evolves, thus ending up being misleading to the maintenance programming in the end. Obviously this approach this approach assumes that an effort is being made to keep the implementation as clean. What are our thought on this approach to commenting?
Personally i'm very fond of stuff like javadoc commenting. I generally like make a javadoc comment block for each and every function/class/global/constant in my code, regardless of whether it's use is self-explanatory or not.
Admin
About programming language localization:
I don't think it could be done "pure enough" with simple #def's and keyword translation/substitution. How can we claim that the language we use is in our mother language ([^o)]), if sentence structure is not taken into account? Below is my proposal for the Turkish BASIC. (I did not translate the keywords themselves, only the structure, in order to minimize the obfuscation factor.)
Please note that a* is a string variable. I could not use a$ now, using the dollar sign would be against the whole principle. (Come to think of it, I could use aTL -- for Turkish Lira.)
Admin
In Java, you can. But there is no preprocessor to change the keywords.
The perfect programming language is still to be invented.
(in my own little one, there is no keyword, just symbols so it is I18N ready)
Admin
In Oracle's PL/SQL the can be used for identifiers, but that's a bad idea.
Good comments do not repeat what the code already says, but why something is done. This "why" doesn't need to be updated that often.
Admin
Probably in order to make it more pronouncable.
Marketing people just go crazy when it comes to foreign languages. The movie name "Couching Tiger, Hidden Dragon" is a literal translation of the original Chinese name. In Japan, where people would actually understand the Chinese characters, it was titled in English, "Green Destiny".
And in Germany, where rampant anglicisms are the norm, Hollywood movie titles are usually kept unchanged - English is just "cooler". At least that has its advantages as you don't have problems identifying the movie when talking to Americans or Englishmen. But once in a while, they'll "translate" an English title into a DIFFERENT English title! For example "Bend it like Beckham" was called "Kick it like Beckham". Because while English is automatically "cool" to many, those are usually the same people who don't speak it all that well and would be confused by non-trivial words and idioms.