2012
03.30

ZOZ Strikes back with a Quiz competition for the Zanians … here are a few snaps of the teams while they were bombarding their minds to take the jackpot :)

2012
01.13

Wishing everyone a very happy Pongal

2011
12.23

ZANEC - GREETINGS

2011
11.21

We recently developed mobile apps for one of our customer on the Blackberry and iOS platforms. These apps are going to go live shortly and we are very excited about them. The response from various users who have seen them and used them has been very positive so far.

On the eve of our apps going live, I would like to reflect and shed light on some of our experiences and learning in the process of doing mobile application development.

Web != Mobile

The first barrier that we had to come across was to jump out of the web design sacks that we had settled into cozily over the years. We did a number of wire-frames initially that were very webby in nature. As a part of our process, we always believe in doing the grandma test and when various peers gave us feedback, we realized that we ought to adopt our mindset to the mobile and touch oriented world where the philosophy was “less clutter is more value”. Eventually we cracked it after a few iterations.

Technology

The next challenge was making the vision happen, we did a lot of analysis for the various layers. For development, we choose against using rapid mobile development frameworks available in the market (although I must say that it was very tempting to choose one of these frameworks, since what they promised was quiet good) and decided to do it the native way. The driving reason was that we wanted to build skills around iOS and Blackberry. For persistance we chose SQL lite as it was the most used relational mobile db that met all our needs.

Approach and Resources

The teams spent significant time reading the manuals and articles understanding the various do’s and dont’s. We then started off with small hello world apps using SQL lite.

Once we had a good grasp of the various API’s we dived down into our iterations and started developing the apps. We made a number of choices based on analysis. Below are some links to the resources that came in really handy for us.

iOS Resources

1. To learn basics about IOS and Cocoa touch, Coding standards, Core OS details, Frameworks and Sample Code.
2. To learn about various UI elements and db operations.
3. To learn about various customization and open source frameworks.
4. To learn about basics of Objective C , Cocoa touch and sample code.
5. For technical Q & A for IOS development.
6. General forum for IOS development.

Blackberry Resources

1. BlackBerry OS 5.0.0 API References.
2. Tutorial on how we can use API’s for building Apps.
3. BlackBerry support forum to discuss topics and issues.
4. Complete list of BlackBerry developer resource.
5. Design principles for BlackBerry devices.
6. Development guide for blackberry.
7. UI life cycle.
8. SQLite Resources.
9. Best practices : writing efficient code.
10. Maximum size of BlackBerry application.
11. BlackBerry how to : Free up device memory.

2011
11.09

When we started with the Cargoware project, we went with a pure waterfall model of development. We identified the key functionalities to be built, and then tried to drill down the functionalities further to prepare functional specifications that are crystal clear. Only then we realized that with the development team already formed, we don’t have too much time with us to get the specs finalized for the entire system before we move ahead with the further stages of development.

We then decided on being more agile in our approach. We started with iterative development, picked a few core functionalities of the product, analyzed them further and prepared the detailed specs. We refined the process further with subsequent iterations and I believe now we have a matured scrum-like process – one where we plan the release scope in advance, prepare the functional specs in advance, conduct walkthrough with the development team which then proceeds with technical design, build and unit test before delivering it for testing and production release.

Now for the new sprint that we’ve started this week, I was looking for quite some time on further process improvements. Incidentally I came across this development model called ‘Pair-programming’, only to realize later that it’s not something new but is into existence for a long time. It’s basically that instead of one developer working on a module from his workstation, it would be two developers building the same module from ONE workstation. The key here is two people working on the same workstation, which means its two brains & two pair of eyes that’s constantly developing/reviewing the module.

At the outset, it doesn’t look wise from a productivity standpoint to engage two developers on the same task. Conventional wisdom would point to getting two modules developed in parallel by the two developers. The catch though is the net effort spent on delivering the module to production with good quality.

Advantages I saw were many – functional knowledge distribution among developers means you don’t rely on one developer, better design and coding means less headache once the module goes to production, better developer morale and greater confidence in the correctness of the code – to list a few.

Hence I’ve decided to try out pair programming for this sprint that we’ve started this week. The challenge was in getting the buy-in from the most important stakeholders – developers & sponsor.

As always, the initial response when the model was proposed was sceptic. It required some explanation on the merits of the model for the developers to accept to try it out. The main concern being – would this mean that the schedule will be compressed to half?

Our project is still new to pair-programming model, but I expect it to cut short the schedule for each of the module to about 60% of its value otherwise. From a effort standpoint, I expect it to take 20% more effort, but I guess it would even out if we consider the improvement in functional & technical quality of the module and the net effort spent on the testing exercise (tester effort factored in).

As a ‘pair-programming’ practitioner, the initial response has been pretty positive. Probably I’ll be able to let know on how it went and comment on the pros and cons of this model during my next blog. Keep watching!

2011
10.31

Steve Jobs – who inspired, innovated and delivered what he believed in, despite many odds!

Steve Jobs was the greatest innovator and entrepreneur of our times.

I am one of the many he has inspired, not just because of what he said, but because of how he innovated, re-innovated an delivered!

His life story is truly inspirational. Soon after he was born, his unwed mother decided to put him up adoption. One of the families who initially accepted to adopt him dropped out at the last minute. His mother did not want to give him to the Paul Jobs family who came forward to adopt Steve because both the parents are not graduates. Eventually she signed the adoption papers when Paul Jobs promised to send Steve to college.

Steve went to college, but dropped out because it was expensive. He didn’t have a room, he slept on the floor of a friend’s room, he returned coke bottles for the 5 cents deposits to buy food with, he would walk 7miles across the town every Sunday night to get a good free meal once a week at the Hare Krishna temple.

In 1976, Steve started a company with his friend Steve Wozniak called Apple, using the money they got by selling Jobs’ old van and Wozniak’s HP scientific calculator. Their first products Apple I and Lisa are expensive failures! But that did not deter them from going forward and inventing another machine called Macintosh. By 1986, ten years after starting from a 2 kids working from a garage, Apple grew to a $2bn company with over 4,000 employees. At 30, Jobs was fired from his own company he co-founded with Steve Wozniak after losing a bitter battle over control of Apple with the CEO John Sculley, whom Steve Jobs hired from Pepsi! Steve was heartbroken!

Later Steve recalls this episode by saying “I didn’t see it then, but it turned out to be the best thing that could ever have happened to me. The heaviness of being successful was replaced by the lightness of being a beginner again, less sure about everything. It freed me to enter one of the most creative periods of my life”.

Steve’s next two companies Pixar and NeXTStep, Pixar is a super success story and made Steve a billionaire. On the other hand, Steve’s old company Apple in the mean time got into trouble and posted billions of dollars loses in 1996, twenty years after it was started. In 1996, Steve persuaded Apple to buy Next and make that the foundation of the next generation Mac OS at Apple, which became the catalyst of Apple becoming the world’s most valuable company. Though he started as an advisor to Apple, Steve Jobs became CEO of Apple in 1997. Under his leadership, Apple delivered many innovations we love today such as iPod, iPAD, iPHONE.

Steve’s advice – “Sometimes life hits you hard in the head with a brick. Don’t lose faith! I’m convinced that the only thing that kept me going was that I loved what I did. You’ve got to find what you love. And that is true for your work too. Your work is going to be a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. Love what do you, do what you love. Don’t settle keep looking until you find it. Your time is limited so don’t waste it by living someone else’s life. Don’t be trapped by dogma – which is living the results of other people’s thinking. Have courage to follow your heart and intuition ”.

Steve’s confidence in the wisdom of his instincts is immense, backed by the products he delivered. He is the greatest innovator and most successful entrepreneur simply because of his pure perseverance.

2011
07.11

Zanians in Deep Thought

2011
03.24

While the Indian players were warming up to beat the WI’s, the Zanians played their first match of the season, two teams were formed “Paruthi Veerargal” and “Mirattal Adi” …. The day begun early for the players and a lot of untouched muscles were put to use. At the end of the day the guys had a great time and the teams are geared to continue the momentum … here are a few snapshots from the bash!

2011
02.28

A collage with some of the fun filled moments of our day out at Mamalla resort.

ZANEC 2011 Feb Day Out

ZANEC 2011 Feb Day Out @ Mamalla Resort

2011
02.28

A common need for data applications is to store bulk of records into SQL database. This article provides step-by-step instructions how to do bulk insert using SQL 2008 and ADO.NET in efficient way.

Assuming we have a Customers table:

create table Customers
(
    CustomerID    int not null primary key identity(1,1),
    Name          varchar(50) not null,
    City          varchar(50) null,
    Phone         varchar(10) null,
)

and a stored procedure that inserts customers rows:

create procedure CustomerInsert
    @Name        varchar(50),
    @City        varchar(50),
    @Phone       varchar(10)
as
    insert
    into Customers (Name, City, Phone)
    values (@Name, @City, @Phone)
go

We would go and call it for each customer row we want to insert:

using (SqlConnection conn = new SqlConnection("..."))
{
  SqlCommand cmd = conn.CreateCommand();
  cmd.CommandType = System.Data.CommandType.StoredProcedure;
  cmd.CommandText = "dbo.CustomerInsert";
  cmd.Parameters.AddWithValue("@Name", (string)row["Name"]);
  cmd.Parameters.AddWithValue("@City", (string)row["City"]);
  cmd.Parameters.AddWithValue("@Phone", (string)row["Phone"]);
  conn.Open();
  cmd.ExecuteNonQuery();
}

Nowdays, we can use SQL Server 2008 Table Valued Parameters and solve this problem in the most efficient way, and still use the same ADO.Net API you use in your application.

First, we should declare a new Table User Defined Type in the database:

create type CustomerTableType as table
(
    Name        varchar(50),
    City        varchar(50),
    Phone       varchar(10)
)

Then we can create a stored procedure that gets a parameter of that type, and inserts many rows in a single command.

create procedure CustomersInsertMany
(
    @CustomersTable CustomerTableType readonly
)
as
    insert
    into   Customers (Name, City, Phone)
    select Name, City, Phone
    from   @CustomersTable;
To execute this procedure using script, I declare a new instance of the Table Valued Parameter type, and insert rows into it. Then I execute the store procedure in order to insert all the rows all together.
declare @customers_temp CustomerTableType
insert into @customers_temp values ('Customer #4', 'Jerusalem', '2343245')
insert into @customers_temp values ('Customer #5', 'Tel Aviv', '0987345')
insert into @customers_temp values ('Customer #6', 'Haifa', '275466')
execute CustomersInsertMany @customers_temp

For ADO.Net, the code really looks similar to the above. First I create a data table, and fill it with data:

// Create a data table, and provide its structure

DataTable customerTable = new DataTable();
customerTable.Columns.Add("Name", typeof(string));
customerTable.Columns.Add("City", typeof(string));
customerTable.Columns.Add("Phone", typeof(string));
// Fill with rows
customerTable.Rows.Add("Customer #1", "Berlin", "123");
customerTable.Rows.Add("Customer #2", "Paris", "567");
customerTable.Rows.Add("Customer #3", "London", "789");

Then, I call the above stored procedure and pass the data table as a parameter.

using (SqlConnection conn = new SqlConnection("..."))
{
  SqlCommand cmd = conn.CreateCommand();
  cmd.CommandType = System.Data.CommandType.StoredProcedure;
  cmd.CommandText = "dbo.CustomersInsertMany";
  SqlParameter param = cmd.Parameters.AddWithValue("@CustomersTable", customerTable);
  conn.Open();
  cmd.ExecuteNonQuery();
}
Happy Coding,
Guru