Thursday, April 17, 2014

This Week I Learnt - 2

Ok. I am posting this after two weeks of the first one. But had a lot of work and couldn't find time for this.
So without much further ado, here are the learnings of the past two weeks.


1. Create a project with Gradle
I attended a training called - 'Agile Development With Scrum' and the trainer said if we are really following scrum, we should be doing atleast three things.
1. Daily Scrum Meeting
2. Test Driven Development
3. Continuous Integration.
Though we have heard things so many times, sometimes hearing it just one more time clicks (Tipping Point) and we are pushed into action. So I wanted to do
Test Driven Development. For that, a good build process becomes essential. So I surveyed the build tools available in the market. There are Apache Ant, Maven, Gradle,
Buildr and SBT (Scala). And the Spring team, for whom I have a lot of respect and who eased the development in Java, have started using Gradle. It added a lot of
momentum to Gradle. The syntax of Gradle is a seperate DSL (domain specific Language) written in Groovy and it is very concise compared to Maven. I decided to give it
a try and set it up for a web project. The dependency management is very easy and it can use both Maven and Ivy libraries.



Advantages: Very less work compared to Ant. Adding "apply plugin 'java'" to the build file will magically add all java related tasks like compile,build,jar,test etc to the build file
Very concise compared to maven. No big XML files.

Disadvantages: Not many plugins available. I used the jettyRun command which has options for automatic deployment by scanning the project for changes, but it is not working well.
It seems the tomcat plugin overcomes this problems. But I have to say I am a convert to Gradle. It makes dependency management lot lot easier and a first step to TDD.
Definitely going to use Gradle for the coming projects.

2. One-On-One Manager tools:
I don't remember how I came across this, but I learnt that using weekly scheduled one on one's with all the direct reports is one of the best ways to work together
and better with the team. The important things to remember are that it is an employees meeting rather than managers meeting. So employee should set the agenda.
http://davidjaxon.wordpress.com/2014/03/28/the-right-way-to-do-one-on-ones/
The key to a good one-on-one meeting is the understanding that it is the employee’s meeting rather than the manager’s meeting. This is the free-form meeting for all the pressing issues, brilliant ideas and chronic frustrations that do not fit neatly into status reports, email and other less personal and intimate mechanisms.

If you like structured agendas, then the employee should set the agenda… During the meeting, since it’s the employee’s meeting, the manager should do 10% of the talking and 90% of the listening… While it’s not the manager’s job to set the agenda or do the talking, the manager should try to draw the key issues out of the employee. The more introverted the employee, the more important this becomes.

Some questions that I’ve found to be very effective in one-on-ones:
If we could improve in any way, how would we do it?
What’s the No. 1 problem with our organization?
Why? What’s not fun about working here?
 Who is really kicking ass in the company?
 Who do you admire?
 If you were me, what changes would you make?
 What don’t you like about the product?
 What’s the biggest opportunity that we’re missing out on?
 What are we not doing that we should be doing?
 Are you happy working here?

3. PostGIS Installation on Amazon Ec2
I tried to install PostGIS on Amazon Linux AMI Ec2 instance but couldn't do it. All the forums seems to say that it is better to use Redhat or Ubuntu instance.

4. Trying to get a video to play using JAVA.
Currently I am just writing out the response using a servlet, but this way there is no way to seek through the file. It seems we need to allow for range queries for it to work. There is solution here by Java Guru Balusc Simply wondering why there is no framework level solution for this.  [OSS]