- 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
Your surprise at his assessment suggests you think his assessment of the others was accurate....
I assumed he randomly put some regulars into a basket and added reasonably random comments...We should remember it did start as a request for a flame war.
Admin
Admin
Why would they? I don't come here to joke around.
Admin
Debugging break points are trivial to add anyways, and you can still add the one (before the first test) and then step through the code to see where it goes through the function - this would be more useful in seeing what we actually do too, I dare say.
I've never really understood why people insist on a single return point - I assumed it was to force them to use simpler functions, so it is a touch ironic that people would over-complicate functions to fulfill such a criterion.
Somewhere I once worked, our code went through all sorts of test to measure:
Single return is at odds with reducing number of branching points (sort of) and avoiding too much nesting. It becomes difficult to do:
when you are conscious of depth.... it tends to lead to code that may be more difficult to understand:
Now add a few more conditions, whack a few || in there, and it becomes more difficult to get your head around - but importantly, code complexity is reduced because there are fewer branching points....
Admin
I would like to thank You for this good article and please allow me to have the opportunity to express my satisfaction with the web hosting
Admin
To see a world in a grain of sand, And a heaven in a wild fllower, Hold infinity in the palm of your hand, And eternity in an hour.
Admin
Why is it assumed that "few" refers to a count of eyebrow raises at one point in time and not to multiple raises of an eyebrow over several time points?
Admin
Well, there are actually various interpretations and philosophies of the uncertainty principle, but the point I'm trying to make is that "fundamental" principles are always derived from experiment through a process of abstraction. The reason why if you know the position of an electron with precision dx you know its velocity with precision h/dx is that to know where an electron is, you have to hit it with a photon and measure the photon scattering back to you, and if this happens it means that the electron took such an hit that its velocity has changed. This is a different matter from the experimental uncertainty coming from detector resolution, etc. It then becomes a "mathematical" principle: if we can't measure position and velocity at the same time, it's useless to worry about concepts such as trajectory, and so the concept of wavefuction and probability distribution come into use.
Admin
Actually, I'm pretty sure it started out as a mathematical principle. Heisenberg uncertainty is a derived result, isn't it? It's based on the equations that described the particles in question well before they were observed. It's not based on trying to explain why people were having trouble detecting the position and velocity of subatomic particles. So while I think it's true enough that trying to measure the position and velocity of the balls on a frictionless pool table by bouncing the cue ball off of them is not going to be very informative, I'm pretty sure that problem is a retroactive explanation bolted on to Heisenberg's principle, not the basis for it.
Admin
No. No "finally" in C++.
Admin
Well, going by http://www.aip.org/history/heisenberg/p08.htm I guess that the principle was an intuition derived from the known data.
Still, I must admit that even though I know some quantum mechanics (I'm a physics grad student) I'm a bit lost on the exact process that lead to its development...
But my point is: the uncertainty principle is a limitation of what humans can know and therefore measure. Quantum mechanics is just saying: "ok we can't measure that stuff, let's work around that to see what we can measure instead". And the physical motivation for that limit is that to measure something you have to interact with it, therefore changing its state.
Admin
No argument on this. As I say, I'm not a physicist, only an interested civilian, so what I say should be taken with a grain of salt, plus the salt shaker and the Morton factory, for good luck. In any case, I think we've managed to agree on this statement: "Heisenberg is not about what we can measure, it's about what we can know." Or, perhaps, "... it's about what can be known." Or, if you prefer "... it's about the way the world can be."
Admin
Admin
Admin
Pointless troll - got ya.
Admin
Anyone talking about reasons to fire a C++ programmer while clearly having not a clue about C++ should be beaten and then fired.
int f (int x) { if (x == 0) goto exit; int y = x + 1; x = y * y; exit: return x; }
compiles fine in C but not in C++.
Admin
Ugh! You want to add exceptions to code like this? Go. Read. Sutter. Now.
M4
Admin
Admin
No.
Now, direct me to the humour.
Admin
Admin
CLUELESSNESS ALTERT
This is what's wrong with "the nerve"'s code: C++ Doesn't have "finally".
Admin
Shouldn't it be this "bla"?
'cause while(0) won't execute the block (again). and frist will err-out because it isn't a function call.