jakub holý

building the right thing, building it right, fast

Most interesting links of July


This month about performance, the Java language and patterns, the development process, and a few interesting news.

  • JDBC performance tuning with fetch size - how a query processing was reduced from 45m to 35s by increasing the fetch size from 10 to 5000 (it returns 500k records and runs fast on the DB server but slow on the app. server)
  • You're Doing it Wrong - Think you've mastered the art of server performance? Think again. An (theoretically) efficient algorithm is not enough, algorithms must take into account the hardware and how it is used to be truly efficient - "What good is an O(log2(n)) algorithm if those operations cause page faults and slow disk operations? For most relevant datasets an O(n) or even an O(n^2) algorithm, which avoids page faults, will run circles around it."
  • Java IO Faster Than NIO – Old is New Again! - demystyfying NIO - surprisingly, contrary to the widespread belief, asynchronous IO is usually by 25% faster than blocking IO. By the author of a mail server handling large load. See also the comments (when NIO can be faster, the influence of kernel, JVM versions, ...)
Java & patterns
  • Java QuickTip: Fluent Interfaces - I like Fluent interfaces a lot, because, well, they're so fluent, meaning easy to read and nice to work with. This article is only a short example, a real-world API using the fluent concept is e.g. Mockito.
  • What Volatile Means in Java - something we should all know but only few really do; applies since JVM 1.5
  • M. Fowler - the Range pattern - a great example of object-oriented thinking and Clean Code(TM) where abstraction hides implementation details, provides a much more readable code and a base for a really powerful object (think pen/closed ranges, comparing ranges), plus, of course, you have all the operations within the object and not in your business code that uses the Range. BTW, Groovy has ranges as an element of the languages itself
The development process
  • Clean Code and Clean TDD Cheat Sheets
  • Kent Beck: Responsive Design - this 1h presentation is really worth the time spent watching it; actually even if you watch only the first 7 minutes, where Kent talks about how he extracted the design and implementation patterns, you will gain a lot. A responsive design is a design that evovles through the time, always just "at the right moment", by responding to the feedback from customers, other people, the system etc. Kent talks about all the elements that take part in the design process, such as values, principles, patterns, design evolution strategies. Do not miss it!
  • Why I Don't Like Pair Programming (and Why I Left Pivotal) - It's always good to read about the dark side of any practice. The comments are also very useful, there are even links to two (not very positive) pair programming studies.
Other stuff & news