This morning I wanted to check if my newly installed backup scripts were working, but I didn't want to get my laptop out of my backpack. A quick search got me to this little application from Juniper which lets me connect to our VPN easily (equivalent for Network Connect client on desktops) : https://play.google.com/store/apps/details?id=net.juniper.junos.pulse.android

I came across this link representing a visualization of programming languages usage based on a hashtag collect : http://www.ioncannon.net/projects/code2012/

Although this method can be criticized, it provides interesting data : JavaScript is the clear winner with Java just behind. We can see Scala is a growing language too, it has been used more than PHP last year (according to this study).

If you find another study on this topic don't hesitate to comment this blog post to let me know.

Loïc Descotte shared via Twitter an excellent color scheme for IntelliJ inspired by Monokai color scheme.

IntelliJ Darcula + Monokai

You can grab it at the following link (Monokai color scheme) or get the complete corresponding settings jar file here.

Setup is simple, under OS X you have to do the following (and then select the corresponding color scheme in settings) :

cp ~/Downloads/GreaterMonokai.xml ~/Library/Preferences/IntelliJIdea12/colors/
Or you can simply import the jar containing the settings via the File > Import Settings... menu item in IntelliJ. The next time you'll restart your IDE, you should notice the change. The only thing I changed is the font size, 14pt is too big for me, I turned it to 12pt.

groovy-200px

When we migrate data at SRMvision, we use Groovy to focus on the migration logic without loosing time with heavy syntax and POJO mapping. Groovy is a great tool to do this, and its out of the box Sql handling is really very good. I found myself having the need to insert data to multiple existing table filling all columns.

While we can do it easily, it can become a mess rapidly when there is a lot of columns to handle. With this little snippet, you can leverage Groovy's maps to get a solid insertIntoTable

static def insertIntoTable(String tableName, 
                           Map paramMap, 
                           final Sql sql) {
        sql.executeInsert("""
             INSERT INTO ${tableName} 
                    (${paramMap.keySet().join(',')})
                    VALUES 
                    (${paramMap.keySet().collect { key -> ":" + key }.join(',')})
        """, paramMap)
}

To use it, one can simply call it this way (with the sql object correctly bound to a connection)

def paramMap = [ 
    id : 1, 
    myFirstColumn : "My first value", 
    mySecondColumn : "Second" 
]
insertIntoTable("MyTable", paramMap, sql)