Author Archives: andrewosipenko

About andrewosipenko

Java dev. Groovy dev. Grails dev. Project man.

Windows vagrant breaks sudoerc

Running vagrant on windows I bumped in the following issue doing sudo: sudo: >>> /etc/sudoers.d/logreaders: syntax error near line 5 <<< sudo: >>> /etc/sudoers.d/logreaders: syntax error near line 6 <<< sudo: >>> /etc/sudoers.d/logreaders: syntax error near line 7 <<< sudo: … Continue reading

Posted in Linux | Leave a comment

Global ANT or MAVEN build event notification

I want to get notified when the build is finished. I prefer ANT to play a small sound saying that the build is finished so I can stop reading news, drinking coffee, doing self education of course. Luckily ant and … Continue reading

Posted in IT, Java | Leave a comment

Java webapp performance riddle

We have two servers: acceptance an production. One day I noticed that an average page loading is 2 seconds on production while it is 0.5 seconds on acceptance. Hm, fucking DB guys are fucking around with fucking DB. I thought. … Continue reading

Posted in Uncategorized | Leave a comment

Safely get the first element from Groovy list

In Groovy it is safe to get the first collection element using standard bracket syntax even for empty collections. So you can use: list[0] For example: assert [][0] == null

Posted in Groovy | Tagged , | Leave a comment

Javascript !! construct

In JavaScript I often see the construct !!object The construct converts an object into boolean. I remember it as “bang, bang, you are boolean“

Posted in IT, JavaScript | Tagged | Leave a comment

Fighting SQL injection in hibernate may hit down the performance

The problem A couple of days ago I found a query which hangs when running from the application but goes fine when running from a SQL client. The problem was in the way I was calling the query. It was: … Continue reading

Posted in Java, MSSQL | Tagged , | Leave a comment

Mouse triple click

Most browsers and text processors support mouse triple click. Triple clicking selects the entire paragraph. Very usefull in firefox if you want to select some word with underscores in a table cell. Example: Let we have the following text in … Continue reading

Posted in IT, Lifechanger | Tagged | Leave a comment