Excellent Quote.

Confidence is the result of hours and days and weeks and years of constant work and dedication. Roger Staubach, American Football Player

Advertisements

Real Programmer..

Today I came across an article about The challenge of teaching yourself a programming language on Reg Braithwaite   blog.  An interesting post.  I searched around the web and found the following articles which are related to this.

Ultimately, my goal in life is to become of A Real Programmer. I  know the  journey is very long, but I am confident that I will get there one day.

NUnit Core Concepts…

I started learning NUnit. Currently I am reading the book Test-Driven Development in Microsoft .NET by James W. Newkirk ,Alexei A. Vorontsov. I have finished reading and working through examples from a couple of chapters . I would recommend this book for who wish to get started in Test Driven Development. I was of the thought that getting started in NUnit would be a difficult task. But the truth is otherwise. Its easy. Here are the some of the basics and core concepts about NUnit to get started

This attribute is to specify the class that contains the test case. This attribute is placed before the classes that contain test code.
using System;
using NUnit.Framework;
namespace NUnitCoreConcepts
{
[TestFixture]
public class CoreConcepts()
{

}
}

The [Test] attribute specifies the Test Methods inside the Test Class. The Test Methods are the methods that contains code for testing.

using System;
using NUnit.Framework;
namespace NUnitCoreConcepts
{
[TestFixture]
public class CoreConcepts
{
[Test]
public void AdditionTest()
{
int num1 = 3;
int num2 = 4;
Assert.AreEqual(7, num1 + num2);
}
}
}

In NUnit, Assertions are the way to determine whether the TestCode in the Test method passed or failed. In the above example Assert.AreEqual() method verifies the actual and expected and says whether the test passed or not. There are many static methods in Assert class. Some of them are
Assert.AreEqual()
Assert.IsTrue()
Assert.IsNull() …

The [Setup] attribute specifies the method that has to be executed before every Test method is executed. It normally contains initialization code.
The [TearDown] attribute specifies the method that has to be executed after the Test method is executed. Its normally contains code to release the resources.
using System;
using NUnit.Framework;
namespace NUnitCoreConcepts
{
[TestFixture]
public class CoreConcepts
{
private int num1 ;
private int num2 ;
[SetUp]
public void Init()
{
num1 = 3;
num2 = 4;
}
[Test]
public void AdditionTest()
{
Assert.AreEqual(7, num1 + num2);
}
}
}

ExpectedException attribtue specifies that executing the test code would raise an exception. See the example below

using System;
using NUnit.Framework;
namespace NUnitCoreConcepts
{
[TestFixture]
public class CoreConcepts
{
[Test]
[ExpectedException(typeof(DivideByZeroException))]
public void DivideByZeroExceptionTest ()
{
int zero = 0;
int num = 100;
int result = num / zero;
Assert.Fail(“We are failing the test if it doesn’t raise an divide by zero exception”);
}
}
}

Write some test code using NUnit and you can start using it in your projects right away.

Extreme Programming Explained: Embrace Change: Kent Beck

Today I completed reading Extreme Programming Explained: Embrace Change, by Kent Beck , Cynthia Andres. This books gives a brief idea about the Values, Principles and Practices of Extreme Programming. It also talks about how to get started with Extreme Programming and briefly about Theory of Constraints, Toyota Production System, Test First Programming, How to scale XP teams etc.

Author emphasizes that one should understand the core values and principles of XP first. A good read. I feel that this book only gives you an idea about what Extreme programming is. Each principle, value and practice by themselves are topic of exploration and learning.

I definitely did had inspiration from reading this book. Here are some of the inspirations from the book translated into my own words.

I have to work on things what experts call simple and obvious. Read this sentence 10 times and you will understand its importance.

Don’t wait for the perfect moment to start. Start immediately and you can always make change to the plan by doing a reflection ( This one disease of mine is the one that holds me back from doing many things. Tonight I plan that I should wakeup at 5 AM and start reading the book. Tomorrow, I would wake up at 5.30 AM. My mind tells, its not a perfect start.. Start reading from tomorrow., Heck.. How did the author read my mind..)

One cannot improve anything without first improving himself.

Probably this the first book, I read cover to cover after a long time. I feel refreshed and energized after reading this book.

Well, I am going to start another book tomorrow..

Agile Chennai 2007 Conference Oct 4 & 5th 2007

I attended the Agile Chennai 2007 Conference and this blog is to record my learnings and information I took away from it.

04-Oct -2007

It all started with welcome address by Dr. P. Narayanasamy HOD Department of Computer Science and Engineering (DCSE),Anna University and an inaugural talk by Dr K Jayaraman, registrar, Anna University. Dr K Jayaraman gave an overall view about Agile Development methodologies and some statistics; like 80% of the features in software remains unused etc. What surprised me was; a man whose primary work is not Software development was able to speak about Agile. Its evident he has done his homework and It was a good speech. Then Dr. Appa Rao from CTS spoke. He quoted a survey result from Forrester that some XX % of CTO’s and CIO’s wanted to switch to Agile Development. Well, will switching to Agile Development will ensure success of project??.. I dont know.. Dr. T V Gopal, professor, Department of Computer Science and Engineering (DCSE),Anna University ; the man behind organizing this event in Anna University thanked the speakers. I was inspired by Dr. T V Gopal. He is simply great. The way he spoke in the conference showed that he is very informative and well educated. He gave some anecdotes in between the conference talks. Here are some of them

Estimate yourself whether you are in a position to estimate project. He quoted some facts from Dr. Parnas paper. It was very interesting.

As a student one has to excel individually and at work he/she has to excel as a team.

One dark night, a man was searching something around the lamp post for a long time. A passer by stopped and asked him what he was searching? The man replied -he lost his keys and light is available only near the lamp post and he is trying to find his key there. Likewise we are trying to solve all the problems with the limited knowledge we have..

Overview of Agile by Siddharta Govindaraj, Silver Stripe Software and Balachander Swaminathan, ThoughtWorks US

Bala gave a breif overview of Agile. He started of with a definition for Software Engineering from IEEE. He explained that the software development as an Engineering principle worked in NASA and the cost for it is very high which cannot be applied in business software. He spoke about lean thinking, eliminating waste and The Toyota Production System and how to apply lean thinking in software development. He spoke about the agile practices at Team level, Individual level and Organizational level. A good talk and a presentation.

Siddharta spoke about the importance of understanding the Agile Values before practicing them. He gave some examples of how the practices may go wrong without proper understanding of values. Here are some of them

  • Retrospective : when done without understanding the value, it will become a blame game
  • Standup : The value of standup meeting is to let know others what one is doing and what bottlenecks he faces. without understanding the value, it may become a status report meeting
  • Agile is not a set of practices, but a set of values

A good talk by both Bala and Siddharta.

Introduction to XP and Scrum : Pradyumn Sharma, Pragati Software

Pradyumn gave a breif introduction about XP and Scrum. He explained what stories are, what are the various testing in Agile. He gave a small introduction to Scrum, role of scrum master etc. Pradyumn had a very natural flow and gave a good talk.

Introduction to Agile Testing : Narendra Parihar, Microsoft

Narendra spoke about his experience of implementing Agile testing in Honeywell. He had contradictions with the previous speakers like – they had 40 members in the standup meeting etc. He said he has used Yahoo widgets for the dashboard.. Got to explore how to use it in my project. He also said that they were using StarUML in their project. So, finally I found an opensource UML tool.. Honestly, I think this presentation could have been avoided.

Ashok : Elsevier

Ashok was a participant and was very enthusiastic. He volunteered to give a speech on how Agile is practiced in his company. He works from London office and he attended this conference while he is on vacation. Here is what he talked about

Kick off Meeting

  1. Business owners give the high level overview of the project
  2. Development teams, stakeholders attend the meeting
  3. Master story list is identified
  4. Story card contains the requirement and the acceptance test
  5. Story cards are given to developers for estimation
  6. Iteration planning is done

XP Game :

The day ended with XP game to illustrate various activities of XP. A nice program.

Overall the day was very good.

04-Oct -2007

Day -2 started with a keynote by Jeff Patton. He spoke about Blending User Experience and Analysis in the Agile Customer Role. I would say it was a great speech. He told that people learn skills in a 3-stage progression

Level 1 : Following (shu) .

Learn a technique that works. At this stage people feel that success == following a technique

Level 2: breaking away (ha) .

Learn the limits of the technique, learn to shift between technique ( shu, ha , ri are the japanese terms used in martial arts)

Level 3: fluent (ri)

Shift technique at any moment

He used Jesse James Garrett’s (the person who coined the word AJAX) user experience model in his presentation. He also spoke about usability by showing many examples.

Case study 1: Fixed Price Offshore Agile projects. Marco Jansen. ThoughtWorks UK

Jansen spoke about his experience of handling an insurance project from India. The client is UK based. He spoke about how the team was split, how the stand up meetings were held when the team grew etc. A very nice talk. It gave an idea of how the agile project will be executed in a distributed environment

Case study 2 : Effective Product Development using Agile Methods. Bapiraju Nandury, Curam Software

He spoke about how he introduced Agile into the product development. A good talk. They use J2EE and he shared about his experiences. He showed some screenshots of how they are effectively using Microsoft Sharepoint for their project. He talked about his experience of introducing Pair Programming in his project

Lab Session: An Introduction to Pair Programming
Bhavin Javia & Naresh Jain, ThoughtWorks India

This is one of the wonderful sessions. If at all, I was asked to pick up one session I liked the most from this conference, I would pick up this. I should thank Anna University for allowing us to use their labs for this hands on session. Naresh and Bhavin showed us how to do TDD. They did a stack implementation. Then we were asked to pair among ourselves and do a sorting algorithm. It during this time I found a wonderful person Balaji Sowmyanarayanan (Read his blog and achivements and you will understand why I call him wonderful person). I paired with him for the first part of the session and Marco Jansen paired with me during the second part. A great experience. I got a feel of what Pair programming is and also how to do TDD. Note that I dont know how to do Unit testing. But I learnt from this session. A wonderful session which I will not forget..

Retrospective

The conference ended with a Retrospective. We talked about what went on well, what has to be improved and what are the things should be avoided.

A great conference.

How the heck are the programmers keeping themselves motivated?

My biggest dream and goal in my life is to become a better programmer. For now, better for me means: become better at what I am doing (programming).  That means the measure of my knowledge on programming should have gone up at least by a small point than what it was yesterday; everyday.

I know, to achieve my goal, I have to work hard; work more hours; read more and above all write more programs. In short, I should have plans. Of course, I have plans; and here they are with its retrospect.

1. Plan: Health – Play Basketball

Retrospect: Heck, there are no basketball courts near my home. So I went for swimming for a week. Then I went to Gym for a week. Now I don’t do anything

2. Plan: Read books.

Retrospect: I have a long list of books to be read. But I hardly concentrate on reading.  I don’t read them cover to cover.. I read N pages in one book and then jump to another book; read N pages and jump to another book..

3. Plan: Explore Opensource projects

Retrospect: I have sofar installed two open source projects. I didn’t spend time to read the code and for that matter, make it work.

4. Plan: share what I learn. In other words, write at least two/three blog entries a week; speak at local user groups etc

Retrospect: I hardly write blogs.  This blog is standing proof :). I haven’t sofar spoken in any conferences.

5. Plan: Learn New Language

Retrospect: No action sofar

Looking back, I have a plan – a good plan to make myself better.  What I am missing is “Motivation” and  the killer instinct to achieve my goal. I don’t know why I am not having them. I know I am failing to make improvements and will regret for it later, I know it will hurt my future.  I know I have to bring back my motivation.  Here is my attempt to bring back my motivation. I feel that if I get rid of my bad habits and bring in a DISIPLINE in my life, Motivation will come in. So here it is

1. Concentrate on only the important things

Heck, I read hell a lot of blogs every morning (6AM – 8AM). That eats almost all of my early morning hours. From now on, I am not going to read those blogs every single day and will read it during weekends. My priorities are my goals and not what everyone  does everyday.

2. Stop Procrastinating

Ask my wife and she would say how I procrastinate. I never do things immediately – either its writing blog when an idea strikes or taking care of family chores. Hey…. Reward comes after Labor in dictionary and real life.  Stop procrastinating. Procrastination is my worst kind of attitude for a long time. I have to get that out of me.

 3. No TV..

Someone once told me “People who watch Television(TV) doesn’t come on TV”.  “TV stands for Time Virus and it eats your time” Of course TV is the worst virus next to procrastination I am infected with. TV eats almost all of my time during weekends.  I am going to force myself for NO TV. 

4. Rome was not built in a day

I wanted to achieve so many things in a day. I have to understand that I can’t do everything in a single day and become a better programmer the next day. My To-Do lists gets bigger and bigger every single day – the reason – I  procrastinate. I feel that if I stop procrastinating and do things, I will be ok.

5. Google is good Friend and Worst Enemy. 

Yes, Google is good friend when I wanted to find information. At the same time, it’s my worst enemy.  It makes me lazy: If I want a piece of code, I search and find the code.. Heck, I am so lazy to figure it myself.  So, less of Google on stuff that I work on in my office. Try to reduce Google as much as possible in my programming job. I am only a half Google Driven Programmer. I can live without Google 🙂 (For my future recruiter)

6.  Get rid of the Thinking that I should do everything perfectly.

This is what “de-motivates” me all the time when I wanted to do something.  I wanted to do everything perfectly or dont do it..   I do the later more often and never do anything.  From now on, I am going to do a little something instead of not doing.  It will give me sense of progress..

7. Retrospect your progress every week and write a blog