How to make most out of Jira?


It has been quite a while (still < 1 year), I am using Atlassian Jira for bug/issue tracking withing my team of roughly 15. Previously, we were using a version of Redmine, doped to suit company environment.

I had read, heard a lot about Jira's abilities regarding how it can be useful to ease the project management and accurately measure the project's progress. But, recently under peer pressure of my group, where I was required to file some appropriate bugs/improvements/tasks, along with doing myriad of other things, I learned  importance of using Jira.

How we can make most out it?

Well, Jira is no magic, but just a tool; rather, it provides a platform for task management. So, all task management is left to you. Here's how I did and worked well for me
  • create a high-level abstract issue of big task you will be working on and put in the initial estimates if you already know or leave it to the sub-tasks
  • divide the task into concrete sub-tasks with concrete estimates
  • and work !
That's it! Its that really simple. Instead of adding a bunch of many issues, this way of filing issues into Jira really helped me to work efficiently and convey accurate project progress to my mangers. At times, I also had to update the estimates for the tasks but earlier you do it the better it is. That was the overall gist of it.



getting android emulator to work normally on 64 bit linux

Recently I started working on a nfc android app but I was stuck with very basic thing of getting emulator to work normally on my home laptop running Linux Mint. I tried numerous ways to configure eclipse, java paths, AVDs (android virtual devices), checking adb logcat etc but nothing really helped. The emulator could start but always hanged on the boot screen. (believe me, I even waited a complete day for it to boot up).

Thanks to StackOverflow again! As described in the comments here and also here, the Android team still has some more work to do until they make the emulator ( and other stuff) work with 64-bit version of java. But, I could happily run my android project with emulator ( which works quite fast now :) ) by simply configuring eclipse's default jre to be a 32-bit version of java 7. While 64 bit jdk being default for other things. 

unique id generation at high scale

Moving away from relational db allows us to work with huge data, which would otherwise be not feasible. But, it also mandates us to look into the issues that we didn't have to consider much about.

One of such thing was generating unique ids. With mysql you get auto-incremented ids which work absolutely fine for most of the use cases. But, for other systems, in context of nosql/distributed systems, that job is on system designer's shoulder. Inherently one-size fits all solution is difficult to come with.

There are many solutions proposed for this ubiquitous problem.

Twitter has developed snowflake which solves it.  They guarantee id generation with the following constraints :
  • minimum 10k ids per second per process
  • response rate 2ms (plus network latency
The other solution I found is  flake  by boundary. It achieves the goal of generating ids with good performance and adequate bit size 128 which snowflake lacked.

I will update more information on it later, as I confront with more of these.




Migrating svn repository to git


After googling I found this StackOverflow link. First, I needed to install git-svn module.
$ sudo apt-get install git-svn
Now we also need to map svn users to git users. we can get all svn users  ( skip if you already know them) with this command ( execute under svn project root )
$ svn log | grep '^r[0-9]' | awk '{print $3}' | sort | uniq 
Once you get all users, create a users.txt file mapping svn users to git
user1 = first_name last_lame <email@address.com>
user2 = first_name last_lame <email@address.com>
Once you make sure all of your svn users are mapped to git, then execute
$ git svn clone --stdlayout --no-metadata -A users.txt svn://hostname/path dest_dir
It will start fetching svn repository into git. If you run into other problems, like
Author: (no author) not defined in users.txt file 
then simply add following line to users.txt
 (no author) = first_name last_lame <email@address.com>
Note : If, due to this error, git svn command stops then simply update users.txt file and resume the migration
$ git svn fetch 

Now you can transfer your existing git repository to remote git url e.g.
$ git push --mirror git@github.com:username/project.git 



Setting up Own Maven Repository

 
 <settings>  
  <mirrors>  
   <mirror>  
    <!--This sends everything else to /public -->  
    <id>nexus</id>  
    <mirrorof>*</mirrorof>  
    <url>http://myhost.com:8080/nexus/content/groups/public</url>  
   </mirror>  
  </mirrors>  
  <profiles>  
   <profile>  
    <id>rakuten</id>  
    <repositories>  
     <repository>  
      <id>myprofile</id>  
      <name>My Internal Repository</name>  
      <releases>  
       <enabled>true</enabled>  
       <updatepolicy>never</updatepolicy>  
      </releases>  
      <snapshots>  
       <enabled>true</enabled>  
       <updatepolicy>always</updatepolicy>  
      </snapshots>  
      <url>http://myhost.com:8080/nexus/content/groups/public</url>  
      <layout>default</layout>  
     </repository>  
    </repositories>  
   </profile>  
  </profiles>  
  <activeprofiles>  
   <activeprofile>myprofile</activeprofile>  
  </activeprofiles>  
 </settings>
 

Getting cross domain Ajax to work!

Last week I was working on a project which required me to use ajax to fetch the results from 3 different servers and use the result together to have a comparison side-by-side.

I had a little knowledge of Ajax, so I had to strive a bit for getting things to work. Here, I share my findings.

 

Problem: Using Ajax to fetch cross domain data.

What does it mean?

Suppose my current domain is blahblah.com and I want something from phewphew.com then I need to do a cross domain fetch with Ajax.

By conventions Javascript doesn't allow to fetch such cross domain data. It involves security issues. Anyways, I didn't go much into that !!

Quick solution 1 :

One solution to this problem is to use a custom servlet ( or php, whatever you use, it will act as a proxy ) /JSP page that downloads the JSON ( or any other type ) and simply reproduces it.  In that case, you will put your Ajax calls to a page on same domain and that will work perfectly fine.

 

Solution 2 :

Another solution, if using JQueries, using JSONP would help retrieving JSON data easily.

 

NOTE: These were really abstract solutions, I would try to illustrate it with example code soon .

 

 

 

 

How To: Successfully set up Amazon EC2 micro instance

Amazon Web Services is a very rich arsenal of web services. Surprisingly, using them is really easy and simple. I tried my first hands on Amazon's Elastic Cloud, in layman's terms, it is a server
I tried to set up a AWS micro instance on Amazon EC2. The setup is very simple and we can set a system running in just few minutes. I could also quickly set up a tomcat server running on it.
I will quickly list down the steps that I followed.

(1) From EC2 console launch a new Instance. For quick start select any AMI ( Amazon Machine Image) that suits your need. It can later be changed or upgraded.

(2) Once an AMI is selected, fill in the details related to instances (Micro instance's usage falls under free tier for the first year), kernel, ram, monitoring details etc.

(3) Next, create a key-value (optional)

(4) Select proper security group. (This is also important to keep your instance secure. Once I got my instance hacked due to careless firewall settings ). Don't allow many ports to be open, only the few that you intend to use for your need.

(5) Review everything and click 'Launch' and done!! Your instance will be ready to use within few minutes.
(6) Create a new key-pair and download the private file.

(7) Once the status of the instance turns 'running' it can be used to connect.

$ ssh -i aws.pem ec2-user@ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com
(8) This is it!! Time to have fun!!