Reputation
31,982
Next tag badge:
95/100 score
28/20 answers
Badges
5 67 117
Newest
 Enlightened
Impact
~1.2m people reached

May
13
reviewed Close Is lack of whitespace a sign of a cargo cult programmer?
May
13
reviewed Leave Open Helping someone who is not and never will be a professional programmer write code that is more legible and usable to use and interpret
May
12
comment Does C++ compiler remove/optimize useless parentheses?
@OrangeDog true, its a shame Ben's comment brought out a few people who like to claim VMs are faster than native.
May
12
awarded  Good Answer
May
12
awarded  Nice Answer
May
12
comment Does C++ compiler remove/optimize useless parentheses?
Time to take the JIT discussion away here or here
May
12
comment Does C++ compiler remove/optimize useless parentheses?
@ratchetfreak and things you are ignoring - running code on a background thread is not free (not unless you're running a single threaded app and have CPU to spare, server code will not agree that you can tie up a CPU for as long as you like). The JIT optimisations that are done in all JITs that I know of are relatively cheap ones that are fast to perform. You also ignore that you cannot run code you havn't yet generated and although the bytecode could be interpreted while waiting for the JIT, this means your app will run very slowly.
May
12
comment Does C++ compiler remove/optimize useless parentheses?
@ratchetfreak ... and the bytecode interpreter will not optimise anything. The original point was that C++ is not as fast as C#... yet now we've got to the conclusion that C# is running interpreted except for un-optimised code because it takes too long to optimise it during runtime :-) (which is roughly true as it happens)
May
12
comment Does C++ compiler remove/optimize useless parentheses?
@ratchetfreak but again, JIT may re-optimise but it still has no time to do any optimisations. Any time spent optimising bytecode is time taken away from running the program. You can't run code that hasn't been generated. E.G. If your JIT took a whole minute to optimise your code, your program would hang for a whole minute. Imagine this happening everytime the JIT was invoked.
May
12
comment Does C++ compiler remove/optimize useless parentheses?
Its about time - a JIT has hardly any time to optimise the bytecode. The bytecode compile stage could perform optimisations, but they just don't - leaving it to the JIT instead. If you spend too long recompiling and optimising at the JIT stage, your app will run very slowly indeed. There are SO questions you can search for more detail.
May
12
comment Does C++ compiler remove/optimize useless parentheses?
@Doval none of this is about C# v C++, but the issue at hand is optimisation of the code. JIT doesn't give you nearly as much optimisation opportunities as a slow compile stage does. Some big initialisations can be optimised away entirely by AOT compiles which could be a factor even though the example given is a ridiculous triviality.
May
12
comment Does C++ compiler remove/optimize useless parentheses?
Absolutely - stick as many parentheses in as you like and let the compiler do the hard work of figuring out what you want :)
May
12
answered Does C++ compiler remove/optimize useless parentheses?
May
12
comment Planning poker with visually impaired colleague
we've done that too - its like rock/scissors/paper. 1..2..3.. and everyone sticks a number of fingers up. You will have to convert the log scale to fingers (eg 1 = 1 finger, 3 = 2 fingers, 5 = 3 etc)
May
10
revised Why was REST web srevice named REST?
added 578 characters in body
May
10
answered Why was REST web srevice named REST?
May
8
comment How to show to management that unit testing is cheaper in the long run than manual testing?
Quite probably - but that's the problem with such rules, you get work done just to fulfil them. This rule is the cause of the problem, and you're trying to treat the symptoms.
May
8
answered How to manage version control company wide?
May
8
comment How to show to management that unit testing is cheaper in the long run than manual testing?
Usually developersa will test the complex parts and not the simple bits. Who wants to write unit tests for the getters like the WTF link? That's a huge load of make-work for no benefit. Devs don't like that. We write tests to prove the awkward stuff works, even if you don't do unit testing, we still write those tests. 100% coverage sounds like a rule from ignorant management rather than a way to actually obtain real quality. I can write unit tests that pass, yet still have a broken app.
May
8
comment What's so bad about pointers in C++?
note that your 'blah' class is effectively (almost) a smart pointer. Nothing wrong with using a pointer in such a way, the problems come when you're passing them around like biscuits.