March 15th, 2010
Until I used SL4J, I didn’t know that we can templatize String objects in a simple way. As most of us, use Log4J & apache commons logging framework for logging, we know general logging using these widely used open source frameworks. But there is more we can learn from these open source packages than just logging.
Tags: clean code, code, coding, dynamic, java, java coding, messageformat, performance, sl4j, string building, string concatenation, tips, varargs
Posted in java, technology | No Comments »
Read More »
January 15th, 2010
While I was browsing for MySQL Performance Tuning tips online, I found these presentations. You already might know some of these tips. Some are very trivial but yet miss our mind during design process. Some of them are unconventional, followed by high traffic websites. First one is an video presentation by Jay Pipes in Google. Second is a set of slides from MySQL Conference 2008 by Bjørn Hansen.
Tags: database, high traffic, performance tuning, scalability, web applications
Posted in mysql, scalability & performance, technology | No Comments »
Read More »
December 13th, 2009
Recently I attended a job interview, in which they asked me to write an algorithm to reverse a String – “Hello World” to “dlroW olleH”. After the interview, I was tempted to test a few possible methods for reversing a String. I started with recursion, manual reverse using multiple ways and finally using Java’s StringBuilder.reverse(). I was surprised with the results.
Tags: interview questions, java, recursion, StringBuilder
Posted in java, technology | No Comments »
Read More »
November 12th, 2009
I was debugging a problem in our existing java application. It was ignoring the time while sorting. This article contains debug results & fix for this problem.
Tags: Hibernate, java, mysql, SQLQuery, tips
Posted in Hibernate, java | No Comments »
Read More »
October 27th, 2009
We use memcached to cache static or less dynamic content and use java client to communicate with memcached. Memcached is a simple but powerful cache server which sits out side of JVM. Since it sits out of JVM, a cluster of java servers can use single instance of memcached for storing content. Many argue that [...]
Tags: command line, java, memcached
Posted in java, technology | No Comments »
Read More »
February 17th, 2009
A while back I struggled to use java.util.Date as property of a spring bean, as it is not straight forward. We need to write custom property editors. Spring is a fantastic framework which simplifies our lives to a great extent. But I couldn’t digest this custom property editor logic for a basic object like Date.
After [...]
Tags: bean, CustomDateEditor, java, spring configuration, spring framework
Posted in java, spring framework, technology | No Comments »
Read More »