Random Colors

Crude Java and Agile thoughts

Why Agile Does Not Work

Have you ever been part of/witnessed a team trying desperately to adopt Agile, and the more they tried to adapt it, more hellish their life became ?

I have seen agile adoption failures. And what I have learned from that experience is, that the problem was not Agile. The problem was the way, the processes through which they were adapting it.

The idea of writing this blog originated when I attended the Certified Scrum Master Training few days back. Apart from my colleagues, who are Agile specialists, and really young for this course, I didn’t find any veterans at all. Other than that, most of the people were quiet experienced PMP certified core project managers. These experienced people, who have been working in a completely different environment, following a king-slave sort of process with engineers had become too rigid with time to be mould in Agile. Read more of this post


Interprocess Data Sharing in Android

The database in an Android application is available only to the application which created it. In normal scenarios, applications need to share data quiet frequently. There is a concept of content provider in Android which can be used to share data between different applications. The content provider is a type of data store which has an URI. This URI is the signature of the content providers. The URI is used to get the handle to the content provider and perform operations on it.

Android comes with several in built content providers like call log info, contacts, medial files etc which provide information about the calls, the contacts and the media files stored. Each is having a URI through which the data inside them can be accessed.

You can also create your own content providers and assign an URI to it. In this blog, we will create our own content provider and use it to insert/access data in/from it.

Read more of this post

Android Database Implementation

Android uses SQLLite, which is an open source SQL database system for storing persistent data. The database that you create for an application is only accessible to itself, others applications won’t be able to access it. Android provides API’s to interact with the database which are quite easy to use. The performance of the database also seems to be good.

In this post we will be creating the DatabaseUtility classes which will encapsulate the database centric functionality. Then we will use the utility to create more specific DAO classes which will encapsulate more fine grained functions of talking to the database.

Let’s start with the creation of the database utility. First of all we need to extend the SQLiteOpenHelper class.

public class DatabaseHelper extends SQLiteOpenHelper {

 static final String DATABASE_NAME = "records";
 static final int DATABASE_VERSION = 1;

 static final String TABLE_CREATE = "create table address (id integer primary key autoincrement, " + "city text not null, street text not null,     " + "country text not null);";

 DatabaseHelper(Context context) {
      super(context, DATABASE_NAME, null, DATABASE_VERSION);

 public void onCreate(SQLiteDatabase db) {

 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
      db.execSQL("DROP TABLE IF EXISTS address");

Read more of this post

Scrum Team Size Dictates Productivity

I have been working in Agile Scrum teams all my career. I have worked in scrum teams sizes of two, three, four, eight, twelve and twenty. I have even worked in geographically distributed teams. It has been quiet an experience to work in teams of these flavor.

The team dynamics basically decided the team’s productivity. Here we measure productivity by the number of user stories burnt, the health of the code, the distribution of business/technical knowledge among the team members, the ease with which the team works with each other and the inverse of amount of discussion that happens before implementing things.

Larger Team Size

While working with teams of sizes greater than four-five, I found out that it was quiet difficult for every developer in the team to know about all the code written. This is a great drawback in Agile teams. Generally there is no or very little documentation about the architecture/design of the code.

Read more of this post

Android development with Eclipse

First of all you need an Android SDK(Software Development Kit). Download it from here Windows, Linux, Mac.

Unzip it and extract it to some location. This location will be referred later when Eclipse plug in for android development will be installed.

There is a Eclipse plug in for Android development called ADT(Android Development Tools). It provides a comfortable environment for development and execution of android applications.

Read more of this post

OSGi – Modular development in Java

OSGi is standard/framework which can provide modularity to any java application. Its believed that there is lack of modularized development support in Java and some points sort of justify it. I’ll list few of them:
Low-level code visibility control

Java has very low level code visibility controls like private, protected, package, public. If you want any code in one package to view any code in another package then it needs to be declared as public which might expose certain functionality at other unwanted places. You either keep everything in same package or expose it through  public methods but both has some trade offs.

Not so intelligent class path concept

Applications are generally composed of various versions of libraries and components. The class path does not deals with different versions in an intelligent way, it simply returns the first version that it finds. Even if it did pay attention, there is no way to explicitly specify dependencies.
Read more of this post

Web Crawler Utilities – JSpider tools

JSpider-tool is a set of utilities built on top of the JSpider application. JSpider is an open source product written in java. It is available under LGPL License. JSpider-tool can be used to perform basic crawling functionality. JSpider along with sources can be downloaded from here. After extracting it, jspider-tool is found as a utility in bin folder.

Functionality available with JSpider-tool:

  • Can print the headers sent by a web server
  • Can display information about a web resource
  • Can display the content of a web resource
  • Can download a certain file from a web server to a local file
  • Can find all links to other resources in a certain page
  • Can find all e-mail addresses mentioned in a web page

Read more of this post

Agile sprint backlog change in middle of the sprint

Well, agile strictly says no to changing sprint backlog in middle of the sprint. However, I have faced and seen situations where changing sprint backlog looked really logical to me.

The customer builds the product for selling. It’s not showcase of a perfectly modularized, architect-ed, unit tested and agile followed product. Its build for creating money, apart from other reasons like showing the creativity of the thoughts of the product owner.

Read more of this post

Code Refactoring – Basics

Continuous addition of code to the existing code base can make it unreadable and it needs re factoring and redesigning. There is no doubt regarding that. To redesign the code every time you add a functionality is not quite possible. Sometimes you allow small fixes to get in the existing code as patch with a promise that you will redesign it once more changes drop in.

So, how to manage the continuous inflow of sporadic changes here and there.

There is a trade off between the effort applied to redesign the code every time a functionality is added and the gain obtained from it. You cannot afford to spend twenty five percent of sprint in redesigning the application every time you inject something new.

Read more of this post

Ternary Search Tree

The ternary search tree (TST) is a 3-way tree.It finds all keys having a given prefix, suffix, or infix. It even finds those keys that closely match a given pattern. You can easily search the tree for partial matches. In addition, you can implement near-match functions, which gives you the ability to suggest alternatives for misspelled words.

A TST stores key-value pairs, where keys are strings and values are objects. TST keys are stored and retrieved in sorted order, regardless of the order in which they are inserted into the tree. In addition, TSTs use memory efficiently to store large quantities of data. Best of all, the ternary search tree is lightning fast. The tremendous flexibility of TSTs provides ample opportunity for programming creatively.

A ternary search is an example of a divide and conquer algorithm. It’s a k-ary tree with k=3.

A 3-way tree where every node’s left subtree has keys less than the node’s key, every middle subtree has keys equal to the node’s key, and every right subtree has keys greater than the node’s key.

Read more of this post

%d bloggers like this: