A list of wiki-like editors/notebooks/etc:
Logging JDBC with slf4j
7. October, 2010If you use slf4j in your project and need to log JDBC events, then have a look at log4jdbc. It has all the usual features: Timing statements, showing all arguments, mapping SQL to connections. It can even log stack traces if you need to know where a JDBC call was made. Sample output:
16:32:56.162 [INFO ] jdbc.connection - 1. Connection opened java.sql.DriverManager.getConnection(DriverManager.java:525) 16:32:56.168 [DEBUG] jdbc.connection - open connections: 1 (1) 16:32:56.169 [DEBUG] jdbc.audit - 1. Connection.new Connection returned java.sql.DriverManager.getConnection(DriverManager.java:525) 16:32:56.284 [DEBUG] jdbc.audit - 1. PreparedStatement.new PreparedStatement returned com.avanon.basic.db.XPreparedStatement.prepare(XPreparedStatement.java:84) 16:32:56.292 [DEBUG] jdbc.audit - 1. Connection.prepareStatement(SELECT * FROM V_RCSA_40_4_CTRL_RATING) returned net.sf.log4jdbc.PreparedStatementSpy@423606 com.avanon.basic.db.XPreparedStatement.prepare(XPreparedStatement.java:84) 16:32:56.162 [INFO ] jdbc.connection - 1. Connection opened java.sql.DriverManager.getConnection(DriverManager.java:525) 16:32:56.168 [DEBUG] jdbc.connection - open connections: 1 (1) 16:32:56.169 [DEBUG] jdbc.audit - 1. Connection.new Connection returned java.sql.DriverManager.getConnection(DriverManager.java:525) 16:32:56.284 [DEBUG] jdbc.audit - 1. PreparedStatement.new PreparedStatement returned com.avanon.basic.db.XPreparedStatement.prepare(XPreparedStatement.java:84) 16:32:56.292 [DEBUG] jdbc.audit - 1. Connection.prepareStatement(SELECT *FROM V_RCSA_40_4_CTRL_RATING) returned net.sf.log4jdbc.PreparedStatementSpy@423606 com.avanon.basic.db.XPreparedStatement.prepare(XPreparedStatement.java:84) 16:32:56.342 [DEBUG] jdbc.audit - 1. PreparedStatement.clearParameters() returned com.avanon.basic.db.SetParameters.clear(SetParameters.java:144) 16:32:56.343 [DEBUG] jdbc.sqlonly - com.avanon.basic.db.XPreparedStatement.executeQuery(XPreparedStatement.java:71) 1. SELECT * FROM V_RCSA_40_4_CTRL_RATING 16:32:56.350 [INFO ] jdbc.sqltiming - SELECT * FROM V_RCSA_40_4_CTRL_RATING {executed in 7 msec} 16:32:56.356 [DEBUG] jdbc.audit - 1. PreparedStatement.executeQuery() returned net.sf.log4jdbc.ResultSetSpy@2c5444 com.avanon.basic.db.XPreparedStatement.executeQuery(XPreparedStatement.java:71) 16:32:56.412 [DEBUG] jdbc.audit - 1. PreparedStatement.close() returned com.avanon.basic.db.DBUtil.close(DBUtil.java:114) 16:32:56.418 [INFO ] jdbc.connection - 1. Connection closed com.avanon.basic.db.DBUtil.close(DBUtil.java:129) 16:32:56.418 [DEBUG] jdbc.connection - open connections: none
The strange “1.” is the connection number.
Alternatively, check out jdbcdslog.
Backup Hudson config to a VCS
6. October, 2010If you want to backup your Hudson configuration, why not back it up to a version control system (VCS)?
Stephen Connolly has posted a solution in his blog: Keeping Hudson configuration and data in SVN
Error creating array in JavaScript
6. October, 2010If you see this error in JavaScript (for example in a BIRT report):
org.mozilla.javascript.EvaluatorException: error instantiating (): class java.sql.Array is interface or abstract
then don’t include the package java.sql (as in importPackage(Packages.java.sql);) because if you do, new Array() will find the SQL class first and it will fail.
Extremely complex queries in BIRT reports
30. September, 2010Google Relaunches Instantiations Developer Tools
29. September, 2010From the website:
In early August, Google acquired Instantiations, a company known for its focus on Eclipse Java developer tools, including GWT Designer. We’re happy to announce today that we’re relaunching the following former Instantiations products under the Google name and making them available to all developers at no charge:
- GWT Designer
Powerful Eclipse-based development tools that enable Java developers to quickly create Ajax user interfaces using Google Web Toolkit (GWT)- CodePro AnalytiX
Comprehensive automated software code quality and security analysis tools to improve software quality, reliability, and maintainability- WindowBuilder Pro
Java graphical user interface designer for Swing, SWT, GWT, RCP, and XWT UI frameworks- WindowTester Pro
Test GUI interactions within Java client rich applications for the SWT and Swing UI frameworks
I played a bit with CodePro. The tools look promising even through there were some glitches, namely:
- The JUnit editor looks cool but the table with the current unit results often hangs.
- It was more complicated than I liked to generate test cases
- I couldn’t get the code coverage tool to work
- The dependency works but didn’t play with it long enough to say for sure how useful it is
- The code analysis shows a lot of numbers but the workflow is clumsy. For example, it says that something has a cyclomatic complexity of 16 but I couldn’t find out what and where.
Related Articles
- Google Relaunches Instantiations Developer Tools – Now Available for Free (googlecode.blogspot.com)
StarCraft 2 on Linux: Sound problems
28. September, 2010If you have sound issues in StarCraft 2 on Linux, open WINE config (winecfg) and select the “Audio” tab. Make sure that the correct sound driver is selected (use “Test sound”) and then switch “Hardware Acceleration” near the bottom to “Emulation”.
Related Articles
- HOWTO: Starcraft 2 on Linux with Wine (sathyasays.com)
Thoughts on documentation
28. September, 2010Software developers believe that documentation is just another way to say code is buggy. The reasoning is like this: If the code was easy to understand and/or did what you expected, then why document it?
While this is true at the level of a code line, there should be some documentation explaining your overall view of the world.
Next, we have end user documentation. End users have no idea how software works, they just know they have to get some work done. Stat. For them, good documentation can be the difference between a nice day and weeks of overtime.
Related articles:
- The Evolution Of User Manuals (forbes.com)
LOL of the day
28. September, 2010From programmers.stackexchange.com:
Load a picture of yourself in IE6. Print screen and frame it. Give it to your grandkids to remind them that, no matter how difficult things get, they’ve got it easy compared to what you had to deal with.
Google Transparency Report
24. September, 2010Google now shows usage data by country and service and how many requests it got from where to take items out of their search indexes, blogs, YouTube, etc.
Related Articles
- Google Intros Transparency Report (marketingpilgrim.com)
- Google Transparency Reports Show Content Blocked In USA, UK And Around The Globe (socialtimes.com)
Posted by digulla 