Comment On get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

"As part of my new role for a software development firm," writes David Mayer, "I was assigned to sift through some code looking for bugs in the dictionary and spellchecking system. That's how I came across a function called get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function." [expand full text]
« PrevPage 1 | Page 2 | Page 3 | Page 4 | Page 5Next »

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-16 16:14 • by operagost
379278 in reply to 379222
Cad Delworth:
mschaad:
I just appreciated the fact that the English output is still wrong.

[GrammarNazi]
13,387,281 rendered as words should read
"thirteen million three hundred eighty-seven thousand two hundred eighty-one". Note that the word "and" is not in there at all, and tens are properly hyphenated. :-)
[/GrammarNazi]
In the USA, yes, BUT:

[UKGrammarNazi]
In the UK, 13,387,281 rendered as words should read "thirteen million, three hundred and eighty-seven thousand, two hundred and eighty-one" (yes, including the commas).
[/UKGrammarNazi]

The American tic of removing "and" from such phrases is one of the many reasons I loathe so-called "American (or "US") English."

The British tic of critiquing American English is one of the many reasons I loathe British people on the internet.

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-16 16:19 • by operagost
379279 in reply to 379273
Ben Jammin:
Cad Delworth:

The American tic of removing "and" from such phrases is one of the many reasons I loathe so-called "American (or "US") English."


One thing I dislike is improperly embedded quotation marks. Does that use different rules across the pond as well?

By the way, "loathe" is a pretty heavy word. I'd loathe someone who shot my dog or burnt my house. Getting that angry over grammar rules that we Americans supposedly don't even know of anyways and much less follow points to other issues in the psyche.

They do it all the time. Apparently, our short form nationality of "American" bothers them as well, since they insist on inserting the laughable "USian" designation from time to time. Everyone needs a hobby, I guess.

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-16 16:38 • by chernobyl (unregistered)
Methinks this code has come from beyond the Ballmer peak.

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-16 17:01 • by Stew (unregistered)
379282 in reply to 379222
mschaad:
I just appreciated the fact that the English output is still wrong.


Cad Delworth:
In the USA, yes ... I wish someone would have the guts to just call their variant of the language "American,"


F:
You clearly don't know about standard English style in writing numbers. AFAICT you are confusing it with standard American style.


Ah yes, because clearly there's such a thing as "Standard English" as opposed to "American English". Not at all ethnocentric there.

But kudos for seeing through the insipid facade of critiquing the code sample and spotting mschaad's clearly nationalistic agenda.

operagost:
Apparently, our short form nationality of "American" bothers them as well, since they insist on inserting the laughable "USian" designation from time to time.


Good point. I suppose for maximum semantic clarity with minimum of panic-inducing nationalist saber-rattling, we should really starting using the terms "English" and "USish". Although, to avoid the appearance of disingenuity and insensitivity, I suggest we go one better and adopt "UKish" and "USish".

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-16 17:05 • by LANMind (unregistered)
379283 in reply to 379256
geoffrey, MCP, PMP:
LANMind:
geoffrey, MCP, PMP:
Jaunticed:
I'm banking on this being just a joke. Evidence?

'Shortened name of the function due to errors on polling the function

Considering that the EXAMPLE USAGE shows what we can guess was the previous function name, and how the new name is needlessly verbose... yeah.


One of Visual Basic's many useful features is an Eval function, which executes any text string you hand to it as code. The original author is probably using Eval, and has discovered a limitation on length for the argument.


There hasn't been an eval in VB since v6.
Which is why this re-envisioned ".Net" pales in comparison to classic Visual Basic.


I can tell you're trying hard to troll, but someone should smack you back into reality just the same.

get_paid_by_lines_written

2012-04-16 17:13 • by swschrad (unregistered)
include (lib.universe)
include (lib.nothought)
include (lib.greatbooksofhistory)

.
.
.

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-16 17:24 • by Jerry (unregistered)
379285 in reply to 379273
Ben Jammin:
I'd loathe someone who shot my dog or burnt my house. Getting that angry over grammar rules that we Americans supposedly don't even know of anyways and much less follow points to other issues in the psyche.
You did that on purpose, didn't you. Doesn't matter; I'm coming to burn down your house.

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-16 17:33 • by Carl (unregistered)
What we have here is a simple misunderstanding of object-oriented principles. Someone told him "every function should have a this self-reference" which becomes apparent once you look at some of his other function names:

system_will_wait_for_a_connection_request_when_you_call_this_function
handle_initial_connection_request_with_this_function
login_page_will_be_shown_when_control_is_passed_to_this_function
look_up_user_id_and_password_in_database_using_perimeters_passed_to_this_function
check_for_successful_drop_table_sql_injection_and_if_it_happened_restore_the_table_with_this_function
...

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-16 17:34 • by RS (unregistered)
379287 in reply to 379209
Hey Nagesh is not the only one guilty of butchering the English language. I work with many WASPs and their use of the English language is not much better.

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-16 17:37 • by Jeff (unregistered)
379288 in reply to 379286
Carl:
What we have here is a simple misunderstanding of object-oriented principles.
Makes sense. After all, this is obviously a getter:

get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-16 17:43 • by szufler (unregistered)
What a great project. It can only be compared to Great Pyramid in Giza.

The manager should hire a few million Egyptian slaves. They would complete the source code with all the elseif-s.

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-16 17:55 • by szufler (unregistered)
379290 in reply to 379170
MikeN:
My favorite part is that it's version 15.1.


Isn't it obvious? It supports numbers up to 15, right? Then it had to be AT LEAST 15 versions of this product. After all, each supported number should be carefully designed, coded and tested.

You can't possibly expect for such a product to support, say 10 numbers in version 1.0, can you??

CAPTCHA: transverbero

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-16 19:24 • by Darth Paul (unregistered)
The first .NET project I worked on made use of "temperate" variables and "temperate" tables.

Perhaps it was the same guy?

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-16 19:31 • by Norman Diamond (unregistered)
'*** Product name: numbers to word enterprise edition Current version 15.1

Others have commented on the version number but that is random. The giveaway here for the humour-impaired is the words "enterprise edition".

THIS CODE IS IRONIC, YOU GUYS. IT WAS WRITTEN BY SOMEONE WHO HAD TO SUFFER WTFS CREATED BY COLLEAGUES, OR IMPOSED BY MANAGERS. IT'S LIKE SOME OF THE INTENTIONALLY ENTERPRISEY CODE WRITTEN IN COMMENTS ON OTHER POSTINGS, i.e. A HIGHLY SARCASTIC RESPONSE WELL EARNED BY OTHER WTFS.

If it were a calculator it would suit the old WTF calculator contest. BY DESIGN.

Sheesh.

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-16 19:49 • by Silverhill
379295 in reply to 379276
Tasty:
Bonus Spanish language oddity:
The "hundreds" in Spanish have an irregular 500.

cien (100)
dos cientos (200)
tres cientos (300)
...
quinentos (500) (the first N is N+~)
Not quite. "Five hundred" in Spanish is "quinientos". It has almost the same sound as "quiñentos" would have, but there's an extra syllable: qui-ni-en-tos.
(Also, 200, 300, 400, 600, 700, 800, and 900 are written without a medial space: doscientos, trescientos, cuatrocientos, seiscientos, setecientos, ochocientos, novecientos.)

[/Spanish vocabulary rant]

============================================

zzo38:
<snip>
5:twelve-th]:twelvth
This was written on the Twelfth of Never, right?

============================================

Stew:
I suppose for maximum semantic clarity with minimum of panic-inducing nationalist saber-rattling, we should really starting using the terms "English" and "USish".
Nah -- just use a colloquialism from Québec: "tasunien". (Pronounced tah-zu-nee-ENH [nasal N], from the latter sounds of États Unis [United States].)

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-16 20:37 • by ozzie (unregistered)
379296 in reply to 379216
mschaad:
I just appreciated the fact that the English output is still wrong.

[GrammarNazi]
13,387,281 rendered as words should read
"thirteen million three hundred eighty-seven thousand two hundred eighty-one". Note that the word "and" is not in there at all, and tens are properly hyphenated. :-)
[/GrammarNazi]

Also, to render numbers correctly as words (with the hyphens and everything) is a harder trick than you might think.
Thankfully, standard English style dictates that you pretty much never spell out any numbers above nine.

So where would you need a library like this, unless your app writes checks?


[SpellingNazi]
You mean cheques?
[/SpellingNazi]

Captcha - opto - I opto point out your spelling mistakes while you point out grammar mistakes.

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-16 21:36 • by geoffrey, MCP, PMP (unregistered)
379297 in reply to 379283
LANMind:
geoffrey, MCP, PMP:
LANMind:
geoffrey, MCP, PMP:
Jaunticed:
I'm banking on this being just a joke. Evidence?

'Shortened name of the function due to errors on polling the function

Considering that the EXAMPLE USAGE shows what we can guess was the previous function name, and how the new name is needlessly verbose... yeah.


One of Visual Basic's many useful features is an Eval function, which executes any text string you hand to it as code. The original author is probably using Eval, and has discovered a limitation on length for the argument.


There hasn't been an eval in VB since v6.
Which is why this re-envisioned ".Net" pales in comparison to classic Visual Basic.


I can tell you're trying hard to troll, but someone should smack you back into reality just the same.


You can't do it, you a weak bitch, you gotta keep tha PMP hand strong.

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-16 21:51 • by Not Frist (unregistered)
I've only seen 2 developers that write code worse than that, but amazingly most other developers I've worked with aren't that much better. Only about 10% of software developers are worth a shit, while the rest just get in the way. Pathetic.

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-16 23:46 • by Nemo (unregistered)
My Python version... I wrote this before I saw Gavin's post, then tweaked it a little.

http://pastebin.com/dyeU8ykb

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 00:12 • by Anonymous (unregistered)
379300 in reply to 379185
TGV:
THE BUG FIXES! THE BUG FIXES!! OMG, THEY DO NOTHING!!
The OP made me lol, but this post made me LOL. ;D

The first WTF is VB (VB.NET?).

The second WTF is the blatant spelling error.

The third WTF is the ridiculous symbol names.

The fourth WTF is assigning an error message to a 'mode' parameter... I first lost my composure here.

The fifth WTF is the NOP when the first parameter is an empty string, and worse it checks for the condition again after it can't possibly be true!

The sixth WTF is writing the 'mode' to the response stream.

It keeps going and going... What's worse, some of these behaviors are evident in my colleagues' code...

Captcha: tation - The first thing that popped into my head was "tater nation", and for that I'm sure I'm going to Hell.

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 01:45 • by AndyCanfield (unregistered)
I had to write one of these recently. Downloaded one from the Internet and translated it into PHP. Only mine had to be multi-lingual (warning - different languages parse numbers differently). Had to build in a limit of 999,999,999 because America and England can't agree on 1,000,000,000.

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 01:50 • by sirhegel
I'd be keen to see the German equivalent of this function.

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 02:55 • by Watson
379304 in reply to 379301
AndyCanfield:
I had to write one of these recently. Downloaded one from the Internet and translated it into PHP. Only mine had to be multi-lingual (warning - different languages parse numbers differently). Had to build in a limit of 999,999,999 because America and England can't agree on 1,000,000,000.


I thought you said it had to be multi-lingual?

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 03:02 • by dkf
379305 in reply to 379301
AndyCanfield:
Had to build in a limit of 999,999,999 because America and England can't agree on 1,000,000,000.
You'll be “pleased” to know that you can go further now. Usage in the UK has changed over the past couple of decades to use the US style of naming 10⁹ as “one billion”, probably due to the influence of the financial sector and the business world's close transatlantic links.

Myself, I'd have preferred the use of the SI prefix scheme: gigaquid or terabuck.

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 03:26 • by Joe (unregistered)
This is a good demonstration of why VB and VB.NET should not exist at all. These supposedly easy-to-handle languages attract a whole lot of idiots who demand they can write code when in fact they don't even know how to turn it off and on again. C++ or C# might have stopped them in time, but they can feel right at home with Basic dialects and squeeze out something that is rather a crime than any use.
We will sad examples like this as long as there are programming languages that pretend to be simple.

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 04:46 • by English Man (unregistered)
Self-documenting functions. Why have sqrt(x) when you could have calculate_the_square_root_of_the_number_you_want_to_get_the_square_root_of_which_is_passed_into_this_function(x)

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 04:57 • by Claxon
379308 in reply to 379216
mschaad:
I just appreciated the fact that the English output is still wrong.


13,387,281 rendered as words should read
"thirteen million three hundred eighty-seven thousand two hundred eighty-one". Note that the word "and" is not in there at all, and tens are properly hyphenated. :-)


Also, to render numbers correctly as words (with the hyphens and everything) is a harder trick than you might think.
Thankfully, standard English style dictates that you pretty much never spell out any numbers above nine.

So where would you need a library like this, unless your app writes checks?


I've written something like this before (by "Like this" I mean, it had a similar desired output). It was to act as a poor mans speech synthesizer. I needed audio notifications that would read out numbers, so had wav files for 0-20, one for each ten from then to 90 (20, 30, 40...) and then words like "Hundred", "Thousand", "Million" and importantly "And". Then my code would parse an integer and create a queue of which sound files to play. As I recall it took maybe 15 lines of code...

Then again, I'd hate to see what happens when this guy discovers recursion!

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 05:03 • by Claxon
379309 in reply to 379307
English Man:
Self-documenting functions. Why have sqrt(x) when you could have calculate_the_square_root_of_the_number_you_want_to_get_the_square_root_of_which_is_passed_into_this_function(x)


You forgot to say how it's passed to the function? Is it a perimiter? A circumference? What?!? How do you expect people to understand what your function does if you don't name it correctly!??!

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 05:05 • by L. (unregistered)
379310 in reply to 379249
Nagesh:
I am not seeing a problem here. It is always being recommened to use long names for better code clarification, even names of perineters and function.


/agree . java modern style function naming inside of VB . how much worse can it get ?

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 05:19 • by L. (unregistered)
379311 in reply to 379298
Not Frist:
I've only seen 2 developers that write code worse than that, but amazingly most other developers I've worked with aren't that much better. Only about 10% of software developers are worth a shit, while the rest just get in the way. Pathetic.

That's a weak point of view. imho it's closer to .001478% --

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 05:22 • by Musaran
As others said it is so hilariously bad it has to be a joke.

But then, if it actually got in the codebase and stayed there, I guess the author was making a point about some WTF going on around.

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 07:05 • by Geoff (unregistered)
379314 in reply to 379220
You know now that you say that it must be a COBOL conversion. I have seen some (automatic) COBOL to C 'compilers' that would turn the entire DATA DIVISION into one large struct or depending on how it got used elsewhere in the program a union of a few large structs. It was clear no human being evening if they had never written printf("hello world"); before would have come up with it.

Similarly I can't imagine anyone would come up with this naming scheme for functions in BASIC unless they were working with an existing code base, perhaps (hopefully or my faith in humanity will die) automatically generated in some way.

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 07:21 • by Cad Delworth
379315 in reply to 379235
Ryan:
Problem is, this was a government facility, so the check amounts were usually pretty big numbers. And those printers that don't do lower case don't do fonts either. So before long the text wouldn't fit in the allotted space. The fix, sadly, was to print the numeric amount both in the box where it originally was, and on the "text" line.
If these were for cheques, many machine-printed cheques here in the UK have a workaround for that.

They use 'special' cheques which have separate pre-printed boxes for each text 'digit,' with a pre-printed 'label' above each box. So for example, 'millions,' hundred thousands,' 'ten thousands,' 'thousands,' 'hundreds,' 'tens,' 'units,' 'pence.'

When the cheque hits the PC (or other) printer, each box has the text for zero to nine (as appropriate) printed into it. Much simpler, and avoids any grammar problems (!).

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 07:22 • by The_Assimilator
My favourite bit is how the example given doesn't even work with the current implementation. get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function("pass_a_number","13,387,281") would return "Exceeds word range."

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 07:48 • by the beholder (unregistered)
379318 in reply to 379304
Watson:
AndyCanfield:
I had to write one of these recently. Downloaded one from the Internet and translated it into PHP. Only mine had to be multi-lingual (warning - different languages parse numbers differently). Had to build in a limit of 999,999,999 because America and England can't agree on 1,000,000,000.


I thought you said it had to be multi-lingual?
Yes, but haven't we established on this very thread that the bastardization of the language USians speak/write is a lot different of the way UK-born people butcher the language themselves? Might as well call them different languages altogether.

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 07:52 • by trollalot (unregistered)
379319 in reply to 379188
Michal:
He meant definitely "parameter" when writing "perimeter".


Do you think?

Michal:
Then it starts making sense.


Yeah... I'm not so sure anything about this code makes sense... ;o)

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 08:13 • by Nagesh (unregistered)
379320 in reply to 379287
RS:
Hey Nagesh is not the only one guilty of butchering the English language. I work with many WASPs and their use of the English language is not much better.

Not understand. Wasp is insect meking nest in corner of my ofice. We are not being able to kil this leving creatures, even though I am geting stinged daily. :(

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 09:12 • by blank (unregistered)
379321 in reply to 379279
operagost:
Ben Jammin:
Cad Delworth:

The American tic of removing "and" from such phrases is one of the many reasons I loathe so-called "American (or "US") English."


One thing I dislike is improperly embedded quotation marks. Does that use different rules across the pond as well?

By the way, "loathe" is a pretty heavy word. I'd loathe someone who shot my dog or burnt my house. Getting that angry over grammar rules that we Americans supposedly don't even know of anyways and much less follow points to other issues in the psyche.

They do it all the time. Apparently, our short form nationality of "American" bothers them as well, since they insist on inserting the laughable "USian" designation from time to time. Everyone needs a hobby, I guess.


i'm a native english english speaker. i try to overlook spelling and grammatical errors in written language (unless it's a proofreading task, or something i have to sign.) communication is the aim; syntax, spelling and punctuation conventions make comprehension easier and misunderstanding less likely (in theory*)

"USian" is twee and cliche, and sounds like someone spelling out "usen."
if i had to use "US" instead of "American" (for example, if my audience were pedants or wierdos likely to be respond with the "2 continents" argument regardless of the context) then i'd say "US-esque", just because it sounds nicer; "USian"

as for the OP: it's clearly been written specifically for submission to TDWTF; TRWTF is commenters who don't realise this.

p.s. the captchas are so trivial (and repetitive) that very few robots are incapable of solving them, we should just be thankful they don't deign to comment here.

*In theory, theory is the same as practice. In practice, it is not

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 09:15 • by blank (unregistered)
379322 in reply to 379312
Musaran:
As others said it is so hilariously bad it has to be a joke.

But then, if it actually got in the codebase and stayed there, I guess the author was making a point about some WTF going on around.


+2

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 09:56 • by Brad (unregistered)
I've been a reader for a very long time, and this is the best I've seen. I'd call fake, but it'd be very difficult to come up with something this good. Amazing, dazzling, scintillating... awe inspiring! It's so good it goes to eleevn!

BTW (related), if anyone needs a decimal to English currency converter, I have one posted. I was surprised when I looked and couldn't find one before I wrote it.

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 10:00 • by Strolskon
379324 in reply to 379309
Claxon:
English Man:
Self-documenting functions. Why have sqrt(x) when you could have calculate_the_square_root_of_the_number_you_want_to_get_the_square_root_of_which_is_passed_into_this_function(x)


You forgot to say how it's passed to the function? Is it a perimiter? A circumference? What?!? How do you expect people to understand what your function does if you don't name it correctly!??!


It calculates the parameter (2*pi) of the first perimeter. Duh.

Re: VB Programmer Fail

2012-04-17 10:32 • by Mark (unregistered)
379325 in reply to 379254
geoffrey, MCP, PMP:
Anymouse:
C'mon. The number of VB fails is approaching the number of VB "programmers" in the world. They're hardly worth mentioning any more. Programmers need software engineers to tell them what to do, otherwise they end up writing crap. Software engineers do not allow VB in their engineered creations. Ergo, virtually all VB is crap.

A real WTF would be any well-written VB, since that's an infinitely rarer animal.

Captcha: minim -- the amount of education necessary to write VB.


*sigh*

To accept this argument, one would have to ignore the fact that Visual Basic applications have delivered more business value, in the aggregate, than all other personal computer languages combined.

FTFY. (n.b. COBOL, most likely PL/I)
And only because Excel contains VB (otherwise Excel would beat it).

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 10:48 • by Nagesh
geoffrey is plain pagal - (crazy).

java has created more value for business. java is not restricted to just business apps, but also used inside your car, your camera, your phone, your alarm clock and everywhere you can care to think of.

So geoffrey is failing in providing any true picture of world.

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 11:04 • by wonk (unregistered)
[quote=Article] 'Sometimes a 'four' would be outputted when '5' was passed through the perimeter[/quote]
NOW that episode of Star Trek makes sense. Heh. 4 lights....

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 11:07 • by Kempeth (unregistered)
I like this section a lot more than the actual conversion:
If p_mode = "" Then

' String.Replace returns the changed string which in this case is simply dropped
' instead of just assigning a new value you call an expensive method
' String.Replace throws an exception if the first parameter is an empty string.
p_mode.Replace("", "No perimeter was passed through")
Else
' NOP
p_mode = p_mode
End If

' unless you pass this delimiter in the parameter through the perimeter the if clause will never trigger
If p_mode = "No perimeter was passed through" Then
' so you're essentially undoing everything you almost did in the first part...
p_mode = ""
Else
' uhm, you already did this 10 lines ago.
' But then again. If that code didn't do anything can you really say that you have already done it?
If p_mode = "" Then
p_mode.Replace("", "No perimeter was passed through")
Else
p_mode = p_mode
End If
End If

It is strangely Zen like...

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 11:33 • by Nagesh (unregistered)
379330 in reply to 379326
Nagesh:
geoffrey is plain pagal - (crazy).

java has created more value for business. java is not restricted to just business apps, but also used inside your car, your camera, your phone, your alarm clock and everywhere you can care to think of.

So geoffrey is failing in providing any true picture of world.

Here in Hyderabad, we use chicken for alarum clock.

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 11:43 • by RandomGuy (unregistered)
379331 in reply to 379260
Gavin:
Here is my quick attempt at a proper implementation of this function in Python. Note that I'm using the American method without 'and'.


Yes, but who buys new beer if the last bottle falls down the wall?

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 11:46 • by A 'Brit' (unregistered)
379332 in reply to 379278
The British tic of critiquing American English is one of the many reasons I loathe British people on the internet.


The American tic of loathing the English defending their language (notice that the Scots, Welsh and Irish won't defend it); and getting confused between Britain and the coutries that make it, is one of the many reasons I loathe Armerican people on the internet.

Re: VB Programmer Fail

2012-04-17 11:47 • by the REAL geoffrey (unregistered)
379333 in reply to 379325
Mark:

FTFY. (n.b. COBOL, most likely PL/I)
And only because Excel contains VB (otherwise Excel would beat it).


Neither COBOL nor PL/I have provided the value of VB in aggregate. While everything may have been running one of those mainframe languages at one time, it was also at a time when total business activity was far lower than it was at the dawn of RAD platforms. Additionally, computing was a far smaller percentage of total business activity. There is a difference between greater reach and value provided.

One could argue that VB broke ground in business computing. Being able to rapidly deploy user-friendly tools for workers' every day tasks, as well as seamless integration with Excel and Access, made Visual Basic a pioneer in the business world.

Re: get_words_from_a_number_which_is_passed_as_a_perimeter_into_this_function

2012-04-17 11:49 • by frits
379334 in reply to 379332
A 'Brit':
The British tic of critiquing American English is one of the many reasons I loathe British people on the internet.


The American tic of loathing the English defending their language (notice that the Scots, Welsh and Irish won't defend it); and getting confused between Britain and the coutries that make it, is one of the many reasons I loathe Armerican people on the internet.

The opinions of folks from a fallen empire which has shrunken to the size of the Philadelphia metro area do not interest me.
« PrevPage 1 | Page 2 | Page 3 | Page 4 | Page 5Next »

Add Comment