May 20, 2008 at 5:49 pm (Software Development)
My colleague David Kemp taught me a very useful technique yesterday: how to easily back-out (ie erase) the effect of one or more Subversion commits, even when those commits happened in the past and are not at the “tip” of the repository. Barring merge problems, its as if those commits never happened.
merge -r243:242 file:///c:/projects/arcadia/Development/Repository/Arcadia
Note how in this command, we merge from a higher number revision backward to a lower number, on the same branch. This creates working copy modifications with the changes contained in Revision 243 undone.
Here’s a screenshot from within Eclipse:
May 9, 2008 at 8:34 pm (Software Development)
I have to spread the word on the goodness that is the Java Hotspot runtime’s Full Speed Debugging.
I have measured the performance of Java code and observed that, essentially, running a JVM in debug mode incurs virtually no performance cost unless you are actually doing debugging (eg on breakpoints, stepping through code, etc). This appears to be true even while you are connected to the debug process, but not intercepting the activity (such as launching processes from the Debug facility in your IDE).
So you can routinely start your JVMs, even in production, with remote debug turned on (& appropriate security of course). Whenever you feel like having a look, attach a debugger to the JVM and do some debugging, then disconnect and let it run on at full speed.
I have been using this technique alot with Heroes of Arcadia test-play and are loving it; if I observe weirdness in the game, I immediately stop, hook in with a debugger and examine the game state. No messing around trying to replicate the problem later.