`
|
|
Archive for the ‘Agile’ Category
Tuesday, March 19th, 2013
It’s easy to speak of test-driven development as if it were a single method, but there are several ways to approach it. In my experience, different approaches lead to quite different solutions.
In this hands-on workshop, with the help of some concrete examples, I’ll demonstrate the different styles and more importantly what goes into the moment of decision when a test is written? And why TDDers make certain choices. The objective of the session is not to decide which approach is best, rather to highlight various different approaches/styles of practicing test-driven development.
By the end of this session, you will understand how TTDers break down a problem before trying to solve it. Also you’ll be exposed to various strategies or techniques used by TDDers to help them write the first few tests.
Posted in Agile, Design, Programming, Testing | No Comments »
Tuesday, March 19th, 2013
Recently at the Agile India 2013 Conference I ran an introductory workshop on Behavior Driven Development. This workshop offered a comprehensive, hands-on introduction to behavior driven development via an interactive-demo.
Over the past decade, eXtreme Programming practices like Test-Driven Development (TDD) and Behaviour Driven Development (BDD) have fundamentally changed software development processes and inherently how engineers work. Practitioners claim that it has helped them significantly improve their collaboration with business, development speed, design & code quality and responsiveness to changing requirements. Software professionals across the board, from Internet startups to medical device companies to space research organizations, today have embraced these practices.
This workshop explores the foundations of TDD & BDD with the help of various patterns, strategies, tools and techniques.
Posted in Agile, Continuous Deployment, Design, Programming | No Comments »
Tuesday, March 19th, 2013
As more and more companies are moving to the Cloud, they want their latest, greatest software features to be available to their users as quickly as they are built. However there are several issues blocking them from moving ahead.
One key issue is the massive amount of time it takes for someone to certify that the new feature is indeed working as expected and also to assure that the rest of the features will continuing to work. In spite of this long waiting cycle, we still cannot assure that our software will not have any issues. In fact, many times our assumptions about the user’s needs or behavior might itself be wrong. But this long testing cycle only helps us validate that our assumptions works as assumed.
How can we break out of this rut & get thin slices of our features in front of our users to validate our assumptions early?
Most software organizations today suffer from what I call, the “Inverted Testing Pyramid” problem. They spend maximum time and effort manually checking software. Some invest in automation, but mostly building slow, complex, fragile end-to-end GUI test. Very little effort is spent on building a solid foundation of unit & acceptance tests.
This over-investment in end-to-end tests is a slippery slope. Once you start on this path, you end up investing even more time & effort on testing which gives you diminishing returns.
In this session Naresh Jain will explain the key misconceptions that has lead to the inverted testing pyramid approach being massively adopted, main drawbacks of this approach and how to turn your organization around to get the right testing pyramid.
Posted in Agile, Continuous Deployment, Deployment, Testing | No Comments »
Wednesday, March 13th, 2013
Posted in Agile, agile india, Conference | No Comments »
Thursday, March 7th, 2013
Is writing inline comments always bad? Are comments really evil? I keep getting these questions over and over again.
Often you see code like this:
// If the item is taxable, get the taxed amount using tax calculator
if( objItem.bTaxable )
{
objItem.fTax = objCalculator.TaxForLocal(objItem.fItemRate);
}
// Additional tax is applicable if the item is an imported one
if( objItem.bImported )
{
objItem.fTax += objCalculator.TaxForImported(objItem.fItemRate);
}
// Add tax to item rate
objItem.fTaxedRate = objItem.fItemRate + objItem.fTax;
// Return the final amount
double fFinalAmount = objItem.fTaxedRate * objItem.nNumberOfItems;
return fFinalAmount; |
// If the item is taxable, get the taxed amount using tax calculator
if( objItem.bTaxable )
{
objItem.fTax = objCalculator.TaxForLocal(objItem.fItemRate);
}
// Additional tax is applicable if the item is an imported one
if( objItem.bImported )
{
objItem.fTax += objCalculator.TaxForImported(objItem.fItemRate);
}
// Add tax to item rate
objItem.fTaxedRate = objItem.fItemRate + objItem.fTax;
// Return the final amount
double fFinalAmount = objItem.fTaxedRate * objItem.nNumberOfItems;
return fFinalAmount;
What is the real value of these comments?
When I see stuff like this, I usually tell people
When I was learning programming, I was thought that great programmers write great comments. These days I tell people lousy programmer write comments.
Immediately people who write inline-comments get defensive. And that’s completely understandably. I don’t think we’ve really explained our rationale for making such a ridiculous statement. So let me step back and explain the rationale.
Folks in the extreme-programming community will tell you:
Comments are often used as deodorant. Comments represent a failure to express an idea in the code. Try to make your code self-documenting or intention-revealing. When you feel like writing a comment, first try to refactor so that the comment becomes superfluous.
Most people will also tell you, that the biggest problem with comments is that they soon become outdated. The original intent of the person writing the comment was to help a developer who comes later to understand the code better. But unfortunately over a period of time, the comments get outdated and it adds more to the confusion. Speaking to many programmer, they simply delete or ignore the comments because they find them ambiguous. Even though the person who wrote the comments wrote them with a good intension, one needs to ask if it really solved any problem?
And then they question, why not put the same effort and time to write well-crafted code so that comments are never required? Is it impossible to do so?
While this argument is a good one, I find it hard to connivence people just based on this argument.
I’ve found the following approach work really well for me. First let’s understand why programmers write comments. Based on my experience, programmer write in-line comments for 3 different reasons:
- To explain what the code does
- To descrive how the code does what is does
- Why the code is written the way its written
If you think about it, the “what” and “how” of the code should really be expressed by self-documented code. IMHO its simply a failure on part of the programmer if they cannot express the “what” and “how” in the code itself.
However the “why” is little bit more tricky. It’s a reminder, telling us: “Hey, you are doing something complicated and someone else will not understand why. Even if you wrote a comment, they might not necessarily understand it.” At this point I might stop and see if there is a better way to design/model/code this, such that the why becomes obvious via the code. This is certainly more challenging and time consuming than to write a comment and moving on. However this short-term hack might bite me back. Luckily, most often than not, I can find a way to avoid the comment. But there are special cases when I need a comment to explain the why. Let’s see a few examples:
- There is a bug in the underlying framework/library I’m using. Searching on the net, I found the bug report and a workaround. Looking at just the code might not help someone understand the need for the workaround. Generally I would write a small comment saying Workaround with the version number of the framework/library and add the link to the workaround and continue. In future, someone can remove the workaround & delete the comment if the issue is fixed.
- I’m implementing a complex algo and its not common that everyone understands it. I would add a link to the Algo description (rather than duplicating the algo description in the code. DRY principle applies to comments as well.) and continue with my coding.
- And so on…
So think again before you leave a comment 😉
Posted in Agile, Code Smells, Programming | No Comments »
Tuesday, March 5th, 2013
Posted in Agile, agile india, Conference | No Comments »
Tuesday, February 19th, 2013
Lunch Menu
27th Feb – Indian |
28th Feb – European |
1st March – Oriental |
2nd March – Italian |
Soup |
Soup |
Soup |
Soup |
Drumstick Soup |
Cabbage Chowder |
Sweet Corn Veg Soup |
Classic Ministroni |
|
|
|
|
Salads |
Salads |
Salads |
Salads |
Kachumber Salad |
Greek Salad |
Spicy Glass Noodle Salad |
Mix Grilled Vegetable Anti Pasti |
Dahi Gujjia |
Hawain Chicken Salad |
Kimchi Salad |
Mushroom Escabeche |
Mix Bean Salad |
Pasta Salad With Creamy Pesto |
Oriental Veg Salad With Raw Pappaya |
Cannalini Beanse Salad |
Curd Rice/Papad/Pickle |
Bread /Butter |
Curd Rice/Papad/Pickle |
Bread /Butter |
|
|
|
|
Main Course |
Main Course |
Main Course |
Main Course |
Murgh Makhani |
Grilled Chicken With Creamy Peppercorn Sauce |
Kung Pao Chicken |
Chicken Fiorenina |
Malai Kofta |
Lazagnia Vegetable |
Stir Fry Tofu In Green Curry With Thai Basil |
Vegetable Pot Au Feu |
Paneer Butter Masala |
Gratinated Potato |
Stir Fried Vegetable In Black Bean Sauce |
Carrot And Potato Lazagna |
Aloo Muter |
Three Bean Ragout |
Cauliflower Manchurian |
Egplant Parmangiana |
|
|
Schezuan Fried Rice |
Spinach And Riccota Crispelle |
Yellow Dal Tadka |
Dal Panchamel |
Arhal Dal Tadka |
Hare Moong Dal |
Makkai Pulao |
Peas Pulao |
Bhuna Pyaz Aur Pudina Ki Pulao |
Onion Jeera Ki Pulao |
Asst Indian Breads |
Asst Indian Breads |
Asst Indian Breads |
Asst Indian Breads |
|
|
|
|
Desserts |
Desserts |
Desserts |
Desserts |
Shahi Tukda |
Mango Mouse/Chocolate Truffle |
Pinapple Crumbkle |
Tiramisu |
Asst French Pastries |
Mud Cake |
Asst Mousses |
Pineapple Pastries |
Ice Cream With Condiments |
Ice Cream With Condiments |
Ice Cream With Condiments |
Ice Cream With Condiments |
Dinner Menu
28th Feb – International |
1st March – Middle Eastern |
Soup |
Soup |
Tom Yum Kai Soup |
Soup E Murgh |
Cream Of Tomato With Basil Pesto |
Ash E Sabzi |
|
|
Salads |
Salads |
German Style Pasta And Ham Salad |
Hammus/Pita Bread |
Tomato And Bocconcini Salad |
Fetoush |
Fattouch Salad |
Babaganoch |
Shakrkand Ki Chat |
Burani Spinach |
Semiya Bagala Bhath |
Curd Rice |
Papad/Pickle |
Papad/Pickle |
|
|
Main Course |
Main Course |
Gosht Awaadhi Korma |
Iranian Mix Grill |
Paneer Kundan Kaliyan |
Vegetable Skewer On Saffron Rice |
Gobhi Mutter Pudhinawali |
Ghoresht Bamia |
Spinach Corn Gratin |
Vegetable Saloona |
Dal Makhani |
Komeh Sabzi |
Subz Dum Biryani |
Zereshk Polo |
Hing Methi Ki Chote Aloo |
Potato Gratine |
Asst Indian Breads |
Asst Indian Breads |
|
|
Desserts |
Desserts |
Hot Chocolate Mud Pie |
Om Ali |
Seasonal Fresh Cut Fruits |
Asst Melons |
Kesar Rasamalai |
Rosugolla |
Ice Cream With Condiments |
Ice Cream With Condiments |
|
|
Snacks |
Snacks |
Aloo Mutter Samosa |
Falafel |
Muter Kismiss Ki Tikki |
Shish Tawook |
Fish Finger With Tartar Sauce |
Spanokopita |
Hariali Paneer Tikka |
Kubedeh |
Posted in Agile, agile india, Conference | No Comments »
Tuesday, February 19th, 2013
Last year, we had 2 designs, this year we are going for only one. Its a black color, collared T-Shirt.
Posted in Agile, agile india, Conference | No Comments »
Tuesday, February 5th, 2013
Posted in Agile, agile india, Conference | No Comments »
Thursday, January 31st, 2013
Posted in Agile, agile india, Conference | No Comments »
|