Category Archives: Tool and Debug

JConsole Connection Failed

It is very annoying when you see JConsole failed to attach to a runtime with simply tells you “The connection to pid did not succeed. Would you like to try again?”. This is a completely useless message. How to troubleshooting … Continue reading

Posted in Tool and Debug | Tagged , , | Leave a comment

Isn’t our code beautiful?

Are we programmers artists? Everyone has to agree once they see our artworks. Our two secret paint brushes are GIT and Gource. To see your art own artwork, follow the two steps: install Gource run command “gource” from your local git … Continue reading

Posted in Tool and Debug | Tagged , | Leave a comment

Gradle Task to Validate Clover On OFF Comment

One way to tell Clover to skip instrumentation of a chunk of code is to enclose the code with “/// CLOVER:OFF” and “/// CLOVER:ON”. For example, you may want to skip the JMockit expectation and verifications chunks. /// CLOVER:OFF new … Continue reading

Posted in Build, Java, Tool and Debug | Tagged , , , , , | Leave a comment

Show Query Statistics in SSMS

You can turn on the statistics before executing your SQL statement. In SSMS, you can do This output the time and io statistics to the Messages tab. And you can correlate the numbers to the Execution Plan output the check … Continue reading

Posted in Database, Tool and Debug | Tagged , , | Leave a comment

Trace Deadlocks with SQL Server Profiler

Deadlocks can happen at anytime and processes compete for locks, threads, memory or other shareable resources. SQL server periodically detected deadlocks and kill one of the blocking one as victim. In many cases, we want to know the processes involved … Continue reading

Posted in Database, Tool and Debug | Tagged , , | Leave a comment

Open H2 UI When Debugging in Eclipse

This time it is about debugging the H2 embedded database, which is very similar to procedure used with the HSQLDB I posted earlier. Assuming that the hibernate.connection.url is set to jdbc:h2:mem:myDb, you can following similar steps as in my previous … Continue reading

Posted in Database, Java, Tool and Debug | Tagged , , , , | Leave a comment

Excel Copy Column Value Based On Another Column Value Lookup

Problem: One Excel sheet named “Account Info” contains accountnumber and account name. The other sheet named “Order Info” contains order mapping between orderid and accountnumber. Now we need to add another column to the second sheet to show the matching … Continue reading

Posted in Excel | Tagged , , | Leave a comment