Tuesday 31 March 2015

How to Tune Java Garbage Collection

How to Tune Java Garbage Collection

This is an excelent and very clear article on Java JVM tuning.

Think about the fundamental cause of GC tuning. The Garbage Collector clears an object created in Java. The number of objects necessary to be cleared by the garbage collector as well as the number of GCs to be executed depend on the number of objects which have been created. Therefore, to control the GC performed by your system, you should, first, decrease the number of objects created.
 The following table shows options related to memory size among the GC options that can affect performance.
Table 1: JVM Options to Be Checked for GC Tuning.
ClassificationOptionDescription
Heap area size-XmsHeap area size when starting JVM
-XmxMaximum heap area size
New area size-XX:NewRatioRatio of New area and Old area
-XX:NewSizeNew area size
-XX:SurvivorRatioRatio of Eden area and Survivor area
I frequently use -Xms-Xmx, and -XX:NewRatio options for GC tuning.  -Xms and -Xmx option are particularly required. How you set the NewRatio option makes a significant difference on GC performance.Some people ask how to set the Perm area size? You can set the Perm area size with the-XX:PermSize and -XX:MaxPermSize options but only when OutOfMemoryError occurs and the cause is the Perm area size.


The full article can be founs at : http://www.cubrid.org/blog/dev-platform/how-to-tune-java-garbage-collection/

Slides on HTTP authentication methods

HTTP authentication methods

These are as usefull set of slides on Http authentication.

Click to view "HTTP authentication methods"

See: http://talks.codegram.com/http-authentication-methods

Monday 30 March 2015

Cool tool of the day: zapier

According to its website zapier does the following:
Unlock the Hidden Power of Your Apps
Zapier connects the web apps you use to easily move your data and automate tedious tasks.
I've used this tool to move data between PivotalTracker and JIRA and found that it was very, very easy to set up.
The cost of this service (https://zapier.com/app/pricing)  rins from $0 to $125/month which compared to development costs is epic.
The variety of services that can take information from one place to another is truley epic (https://zapier.com/zapbook/).
Considering this tool can take information from places such as Amazon SQS and Amazon RDS the scope for setting up easy process creation is huge!

I will return to this blog post at a later date.

But until then their promo vid ...

Friday 27 March 2015

Issue with Cordova 4.3.0 behind a corporate firewall & Proxy

While working with npm and cordova I have encountered an issue with Cordova when running it behind our corporate firewall & proxy.
Initially we thought the issue was related to the issue described here: http://wil.boayue.com/blog/2013/06/14/using-npm-behind-a-proxy/.
But we discover that while npm could be fixed as described here this didn’t fix Cordova.

We have configured npm to point at our Sonatype repository but we discovered that Cordova does not pick up the ‘registry’ setting from npm as it has the registry hard coded in several places.
ie.  In lazy_load.js

Line #148 is the original line which we have had to modify with line #149.


This issue manifests when we do a “cordova platform add ios” for example.

You can go throught all the js files and replace all the lines where it occurs but only lazy_load.js seemed to be the problem.

I would also update the 'version' entry in your cordova package.json file as well to ensure that you know you have patched your instalation.

See: https://stackoverflow.com/questions/29306422/issue-with-cordova-4-3-0-behind-a-corporate-firewall



Wednesday 18 March 2015

Set up Node for Eclipse on Windows

A quick note on setting up The Node JS plugin for eclipse.
The plug in is fine but it is often better to have a client eclipse & a server eclipse at the same time & these are easier if they have different tool sets installed.

  1. Install ENIDE - Actually NODEECLIPSE http://www.nodeclipse.org/enide/
    Download and install in the same way as any usuall eclipse install. (Unzip to your selected folder)
  2. Install note JS - Down load the Node installer:
    https://nodejs.org/download/
    Follow isnstructions on the screens
  3. Configure your windows path - Add an envirion ment variable NODE_HOME to be the path you just installed to to.
    Add the text ;%NODE_HOME% to your PATH environment variable.
  4. Configure Path to NodeJS in eclipse - In Node Eclipse (ENIDE) add the new node instaltion under
    Preferences-->Nodeclipse
    Edit box "Node.js path";
And that is about it.

Tuesday 10 March 2015

Cool tip of the Day: Dark Theme, Top Eclipse Luna Feature

Configure the Dark option!
In a previous post I talked about setting up a more relaxing theme for Eclipse.
Well the LUNA release of Eclipse has gone one better and it now comes as standard.

To use the dark theme, go to Preferences -> General -> Appearance and choose ‘Dark’.

The theme extends to more than just the Widgets. Syntax highlighting has also been improved to take advantage of the new look. However I still like the themes from Eclipse Color Themes plugin as it allows a little more flexibility.

This is a great new additional feature.