Oh man...
-
string drinkType = tbDrinkType.Text; if (drinkType != "") { tbDrinkType.Text = drinktype; }
Mark Brock Click here to view my blog
It's very useful debugging technique, especially in loops, although you can use "Breakpoint Conditions" for that matter:
for(int i=0;i<100;i++)
{
if(i==10)
i=i; // <- break point
}Mostly, when you see programmers, they aren't doing anything. One of the attractive things about programmers is that you cannot tell whether or not they are working simply by looking at them. Very often they're sitting there seemingly drinking coffee and gossiping, or just staring into space. What the programmer is trying to do is get a handle on all the individual and unrelated ideas that are scampering around in his head. (Charles M Strauss)
-
It's very useful debugging technique, especially in loops, although you can use "Breakpoint Conditions" for that matter:
for(int i=0;i<100;i++)
{
if(i==10)
i=i; // <- break point
}Mostly, when you see programmers, they aren't doing anything. One of the attractive things about programmers is that you cannot tell whether or not they are working simply by looking at them. Very often they're sitting there seemingly drinking coffee and gossiping, or just staring into space. What the programmer is trying to do is get a handle on all the individual and unrelated ideas that are scampering around in his head. (Charles M Strauss)
Mladen Jankovic wrote:
It's very useful debugging technique, especially in loops, although you can use "Breakpoint Conditions" for that matter:
sometime I insert quick and crappy code for debugging purposes. But always I comment that portion as being a debug code and not to be included in production. I insert the comment in case I forgot to remove the code and some one may catch it. Most of the time I use break point conditions :)
/* I can C */ // or !C Yusuf
-
string drinkType = tbDrinkType.Text; if (drinkType != "") { tbDrinkType.Text = drinktype; }
Mark Brock Click here to view my blog
maybe too much: drinkType == Whiskey
-
Funny. He/she still keeps on coding? :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain ClarkeHe should be a
Technical Lead
now.Vasudevan Deepak Kumar Personal Homepage
Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson -
He should be a
Technical Lead
now.Vasudevan Deepak Kumar Personal Homepage
Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis LevinsonDefinitely. :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke -
string drinkType = tbDrinkType.Text; if (drinkType != "") { tbDrinkType.Text = drinktype; }
Mark Brock Click here to view my blog
this could only be better with getter/setter methods!!
tbDrinkType.Text
{
get
{
return drinkType;
}
set
{
drinkType = value;
}
}
-Spacix All your skynet questions[^] belong to solved
-
He should be a
Technical Lead
now.Vasudevan Deepak Kumar Personal Homepage
Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson -
haha!
Mark Brock Click here to view my blog
-
Funny. He/she still keeps on coding? :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain ClarkeSome people like hitting themselves on the head with a hammer. Others even enjoy hitting other people on the head with a hammer. This mental singularity obviously is one who innovates on the second group with a _jack_hammer. ;P
Jeff Dickey Seven Sigma Software and Services Phone/SMS: +65 8333 4403 Yahoo! IM: jeff_dickey MSN IM: jeff_dickey at hotmail.com ICQ IM: 8053918 Skype: jeff_dickey
-
There's a difference in your shop?!? Lucky ruddy you! N.B. The above expression of technical information and/or opinion shall not be construed as having anything to do with any previous, current, future or potential client; with competitors, successors and/or assigns of the same; nor with any organisation staffed exclusively by individuals each of whom posess at least two functioning brain cells. N.N.B. The exceptions to the preceding disclaimer should be obvious, self-evident and not in any way identified by (and therefore actionable against) me. So there. ;P
-
string drinkType = tbDrinkType.Text; if (drinkType != "") { tbDrinkType.Text = drinktype; }
Mark Brock Click here to view my blog
Management material. Why? 1. discussing what management likes to discuss most, drinking 2. In the way management communicats: repetition and redundancy 3. In the way management thinks: nonsensical Marc
-
string drinkType = tbDrinkType.Text; if (drinkType != "") { tbDrinkType.Text = drinktype; }
Mark Brock Click here to view my blog
Can you explain the horror? At first I thought you were getting a value from a text box and putting it right back into the text box, but after closer inspection I see that isn't the case (assuming the language is case-sensitive).
-
Can you explain the horror? At first I thought you were getting a value from a text box and putting it right back into the text box, but after closer inspection I see that isn't the case (assuming the language is case-sensitive).
David St. Hilaire wrote:
Can you explain the horror? At first I thought you were getting a value from a text box and putting it right back into the text box, but after closer inspection I see that isn't the case (assuming the language is case-sensitive).
then what else is the code doing. The only exception is when the text in the TextBox is empty
Yusuf
-
Can you explain the horror? At first I thought you were getting a value from a text box and putting it right back into the text box, but after closer inspection I see that isn't the case (assuming the language is case-sensitive).
The person who wrote this is simply checking if the text in the textbox is empty. a simple:
if (tbDrinkType.Text == "") { // Do stuff }
would have been quite satisfactory. ;)Mark Brock Click here to view my blog
-
Some people like hitting themselves on the head with a hammer. Others even enjoy hitting other people on the head with a hammer. This mental singularity obviously is one who innovates on the second group with a _jack_hammer. ;P
Jeff Dickey Seven Sigma Software and Services Phone/SMS: +65 8333 4403 Yahoo! IM: jeff_dickey MSN IM: jeff_dickey at hotmail.com ICQ IM: 8053918 Skype: jeff_dickey
:) Can i categorize it with advice ?