Click here to Skip to main content
15,877,711 members

Comments by Wolfgang_Baron (Top 11 by date)

Wolfgang_Baron 18-Oct-11 19:18pm View    
Deleted
Reason for my vote of 1
The article is way too short to explain anything it wants to show. If you know boost::bind(), the article will not show you anything new. If you don't know, you will have to find out what boost::bind() does by yourself, if you want to understand the article. Apart from that, your knobs are "too big" to replace a mere boolean and "too small" to replace a more complex setup, which requires something more powerful than a state variable and a few guarding methods. If you really need more power, you should go after something like QState (of the Qt framework).
Wolfgang_Baron 15-Oct-11 12:40pm View    
Deleted
No dude, you should not use iexplore. First, it is a silly, slow and retarded program. Second, it will only start itself and not the user's preferred browser. Third, it is not in the default search path and will therefore fail in many situations (the command line in the windows start menu has special handling to make it work).
Wolfgang_Baron 7-Apr-11 12:07pm View    
Deleted
Surely anyone can program whatever he wants for himself and I am not insulted (though maybe a bit frustrated), if you continue to produce code with multiple returns. I was only pointing out, that if you want to be nice to other people by keeping your code readable, you will certainly refrain from using multiple returns.

As an example, look at the function QueryLocalGroupSIDs() in CoreCode.cpp of the codeproject article "GUI-Based RunAsEx". Clearly, a nice program and a good job. However, the cruel things the author does to the lpData2 and bSuccess variables results in two return statements inside a __finally section (which is undefined behavior during termination handling btw). Most of the code does nothing at all, because bSuccess can only be TRUE if lpData2 is not NULL. There is no point in using two return statements, because just calculating a result value and returning that at the end is always easier to read. You need 5 to 10 times more time to understand what this function actually does. I even go as far as to say, that the author did not understand his own code here, or he would not have produced so much non functional code.

Again, my point is only meant as a help for anyone, who is interested in the well being of his readers and of course, you can do with your life whatever you want :)
Wolfgang_Baron 7-Apr-11 7:45am View    
Deleted
The first person wanting to add a debug statement at the end will prove you wrong.
Wolfgang_Baron 10-Feb-11 10:37am View    
Deleted
Sorry, I assumed you were going to use exceptions for your regular control flow, which is unnecessarily slow, produces extra code and makes your debugging experience a nightmare. Maybe you could show a little example to clarify, what you mean?