|
Don't all C++ object assignments invoke the copy constructor?
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
"Given the chance I'd rather work smart than work hard." - PHS241
"'Sophisticated platform' typically means 'I have no idea how it works.'"
|
|
|
|
|
I suppose they do - Except for some special cases (private copy constructor, as seen in the QObject class).
You know the world is going crazy when the best rapper is a white guy, the best golfer is a black guy, the tallest guy in the NBA is Chinese, the Swiss hold the America's Cup, France is accusing the U.S. of arrogance, Germany doesn't want to go to war, and the three most powerful men in America are named "Bush", "Dick", and "Colon."
|
|
|
|
|
Wrong asssumption, the
template <class T> struct Expectation bit gives it away.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
haha:
int p = 0
int i = 2
int m = i
int o = m * i
if (p = 10){
o = i;
print(o);
p++;
goto haha;
}
else
{
p++
}
i don't know what i just wrote, but yeh, have fun XD
|
|
|
|
|
Its exactly the same as if you had written:
while (true)
{
print(2);
}
Although I think that this is not code you've run. First of all "print" isn't a function (nor does it take an integer parameter if it was printf). Next, the "if" statement isn't a check (it will always be true), and it won't compile with all the missing semi-colons.
|
|
|
|
|
It may a language with which neither of us is familiar.
But, yes, more likely a language with which the poster is unfamiliar.
|
|
|
|
|
Hi
Found this Little gem in our codebase:
public static class volldepp
{
public static string getRant()
{
return "Moron";
}
}
volldepp is german and i - with my Little knowledge - would translate it to bleeding fool/moron...
it´s a "self-produced gem"...i must have been really pissed of by my own stupidity while coding...
edit: the Point is, btw, i can´t even remember writing that class...
|
|
|
|
|
And the class name isn't even capitalised...
speramus in juniperus
|
|
|
|
|
i was in rage, i had no time for "Peanuts"...
|
|
|
|
|
And so am I
And the more of me the better!
/Ron
|
|
|
|
|
Advice:
Be as much in rage as you like but never forget to delete your curses in code [edit] before checking in[/edit]..
this could lead to some embarassing situations...
|
|
|
|
|
Hopefully, the output was not displayed to an end user, that is when it can get really embarassing.
Just because the code works, it doesn't mean that it is good code.
|
|
|
|
|
what an awful Imagination...
no, it was "only" in code behind...
but it´s really some sort of when a Team mate gives you advice to delete some codefragments because of possible discomfort...
|
|
|
|
|
Oh it's not imagination, I have known coders who thought they had removed some code with embarrassing output, but it made it into production code. Fortunately it was in a rarely accessed part of the code and we found it and got it fixed before end users actually saw it. I now keep telling fellow programmers to not put in in the code unless they want the end users to see it. Inevitably, some of that stuff will make it into production code.
Just because the code works, it doesn't mean that it is good code.
|
|
|
|
|
CIDev wrote: ...code with embarrassing Output...
cursing in code - [edit]but never with Output to the Client Interface[/edit] - is a way for me not to curse out loud..
i do this at home Office when i´m absolutely alone with myself and no one can hear me.
my cursings are definitely not for kid-sister´s ears nor for any others... (i tend to loose my political correctness e.g.)
so the only way for me to avoid instant embarrasing situations is when i curse silently in code...
bad Habit, i know...
|
|
|
|
|
Clodetta del Mar wrote: i curse silently in code...
I always thought that shouting and swearing at some stubborn code which insists on doing what I told it to, not what I want it to, was the only way to make it work!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
i once thought that too, but after a short period of time i thought following the above described path would do the trick...
It doesn´t...
|
|
|
|
|
As long as the cursing is limited to the comments it is safe. Unless you show the source code to a client.
Just because the code works, it doesn't mean that it is good code.
|
|
|
|
|
Yes, my opinion, too.
i am convinced, that "distracting" output to the Client can be a reason for instant dismissal...
not good...
edit:
oh,no. as far as i´m concerned, no Client was/is/will be looking into the codebase...
|
|
|
|
|
Clodetta del Mar wrote: i was in rage
I am afraid I must deny this. To be exact, I did not notice anything, but it could be me.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Do not feed the troll ! - Common proverb
|
|
|
|
|
|
Clodetta del Mar wrote: i can´t even remember writing that class...
Maybe you didn't.
Maybe you left the office without locking the workstation and somebody did it for you. That recently became a tradition in my office.
|
|
|
|
|
|
Well, for me the case is clear: This class translates insults from german to english.. Well, only one, but hey! You can always add some derived classes!
|
|
|
|
|
if (_Framework.DuplexPlatform)
{
Synchronize.Visibility = Visibility.Visible;
}
{
Synchronize.Visibility = Visibility.Collapsed;
} *face-palm*
Software Zen: delete this;
|
|
|
|