|
Peer Networking over Public Forums like Virtual Private Networks over Public Internet.
|
|
|
|
|
It is one thing to put one's email address in a post, but a cell number
"I've seen more information on a frickin' sticky note!" - Dave Kreskowiak
|
|
|
|
|
Paul Conrad wrote: but a cell number
They are endeavoring to stand out of the crowd by doing distinctly unique things.
|
|
|
|
|
I found a piece of javascript code when i did a code review. I am just sharing with you
function getState(radioButton)<br />
{<br />
if(radioButton.checked == true)<br />
return true<br />
else<br />
return false<br />
}
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
We have a principle engineer that has a habbit of doing something like this.
Always makes me laugh.
|
|
|
|
|
(There is no laugh-and-roll smiley. So just putting two laugh smileys)
|
|
|
|
|
Actually...the laughing smiley is .
|
|
|
|
|
Somewhere I have seen a laugh-and-roll animated smiley. I was actually intending to mention that.
|
|
|
|
|
Hi, I actually have this kind of "mania/panic" coding style. But I have a reason.
Many times I found while programming functions that call other functions made in another language that in one language TRUE value is 1 but in others TRUE value is -1.
So... the ideal is always compare if a variable is different or equal to false to prevent problems but many coders, like the e.g., compare values with true. If the variable i'm comparing was retrieved in a function in other language, problems may arise.
Best regards,
Mauro H. Leggieri
|
|
|
|
|
#define FALSE 0
#define TRUE (!FALSE)
|
|
|
|
|
In Visual Basic TRUE is -1... in most languages TRUE is 1.
For e.g. if I call a C function in a dll from visual basic and the return value is a boolean you will have problems if you test the result against "true".
Best regards,
Mauro.
|
|
|
|
|
Mauro Leggieri wrote: In Visual Basic TRUE is -1... in most languages TRUE is 1.
Not necessarily. False is normally 0, and True is any non-zero value.
|
|
|
|
|
Yes... but like the first post of this thread, you find lots of code that compare values against true instead of doing it with false where its value does not change across languages.
Best regards,
Mauro.
|
|
|
|
|
And by the same token, you must be careful in C when calling VB code to use -1 (VARIANT_TRUE) in boolean parameters.
It's easier by far to just avoid VB... or failing that, wrap such ugly interactions in a dedicated facade such that you can continue using the boolean type in your language as it was intended.
----
Yes, but can you blame them for doing so if that's the only legal way they can hire programmers they want at the rate they can afford?-- Nish on sketchy hiring practices
|
|
|
|
|
How about we just shoot all the numpties* that learn VB (that was sarcasm: I am one), just to get into the swing of it, you know, hobbyists? People that aren't getting paid to learn modern-day hieroglyphics for an extra 20% performance in their app, [to cue the sarcasm again] because they are noobs and know not the way of truth, light, and irritating bugs to do with random punctuation mistakes.
[Start of ostentatious, verbose humour, with nationally-specific "u"]
* To prevent a language war, a "numpty", or pl. "numpties" is Scots slang for someone who is incorrect or inferior on a matter. Note that it is about as offensive as mistaking the gender of someone's budgie.
Example: "Ye** should be passing parameters here, not using a global variable, ye numpty."
** "Ye" is a reference to "You". No, not you, "you".
[End of humour...or is it?]
Need Another Seven Acronyms... Confused? You will be...
|
|
|
|
|
Wait now, i'm confused - which language was it that decided only one value out of 4 billion+ available was valid as true ?
(but that's the problem with grand abstractions - they tend to leak around the edges...)
----
Yes, but can you blame them for doing so if that's the only legal way they can hire programmers they want at the rate they can afford?-- Nish on sketchy hiring practices
|
|
|
|
|
[Terminal screen display on Ninja]
> ping 127.0.0.1:Brain
Timeout.
Timeout.
Timeout.
Timeout.
Warning! Critical system component failure detected.
OK to continue living, (Y)es or (N)o?
* Please note: Computers do not understand sarcasm *
> ...
In otherwords, huh? Oh, you're insulting VB? Ach, shameful.
I'm not fussed about defending VB, so long as someone realises it is at least easy to learn, using less than all of the keys on the keyboard.
I'm just here for the humour; he says, getting serious and rolling up his sleeves...;P
Need Another Seven Acronyms... Confused? You will be...
|
|
|
|
|
How many values do you think should be equated to true?
|
|
|
|
|
All of the ones that aren't equal to false...
----
Yes, but can you blame them for doing so if that's the only legal way they can hire programmers they want at the rate they can afford?-- Nish on sketchy hiring practices
|
|
|
|
|
Let me nominate the value 47 as true.
Why?
Because I've always liked that value.
So lets pustulate a language where zero and 47 are both true.
|
|
|
|
|
2b|!2b==? wrote: Let me nominate the value 47 as true.
47, being not equal to 'false', is 'true'.
What is your problem with that concept?
2b|!2b==? wrote: So lets pustulate a language where zero and 47 are both true.
Stop, 0 is defined to being 'false'.
You might use the Humpty-Dumpty-boolean-logic, but please lets not confuse others.
*) Humpty appears in Lewis Carroll's 'Through the Looking-Glass', where he discusses semantics and pragmatics with Alice.
"When I use a word," Humpty Dumpty said, in rather a scornful tone, "it means just what I choose it to mean -- neither more nor less."
Among other things, he (mis-)explains the difficult words from Jabberwocky.
Failure is not an option - it's built right in.
|
|
|
|
|
Mauro Leggieri wrote: in most languages TRUE is 1
One of the things I like about languages like Pascal and C# is that true is not a number at all, true is a true true.
---
single minded; short sighted; long gone;
|
|
|
|
|
Tee-hee-hee. Hey, it's Javascript. You weren't expecting software engineering, were you?
|
|
|
|
|
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
Many years ago I was working for a semi-govt agency here in Australia (who must remain nameless to protect myself and the guilty), and we had a contract programmer in to develop some portions of a system that was deployed (via CD in those days) to 87 sites across the state.
During testing, the client complained to me that if they performed a specific function the system would hang. I tested and tested and couldn't recreate it, so I finally asked them to step me through it over the phone while I ran the code in debug mode... Turns out they were adding an entire list of around 12500 items into a particular function to flag those items... Voila!! The code appeared to hang... I stepped into the code to find this particular gem:
for intCount = 1 to numItems
// Grab some data
for intCount2 = 1 to numItems
// do some processing
loop
loop
In essence, the system wasn't hanging, it was stepping through a nested loop - a cartesian product of the items in the list (12500 of them) - I calculated that the function would have eventually returned - after around 36 hours of processing...
<sigh> And I was a full-time staff member being paid far less than the contractor who inserted that gem into the code...
---------------------------------------------------------------------
Damian - Wondering why he has to be the one to sort the mess out!!
|
|
|
|