Feature Based Versions

May 13, 2008 by rennywenny

I am developing software for almost 3 years though I have not done any significant or noticeable piece of software but the most common thing I always faced, my supervisor saying:

  • We need to implement this feature.
  • We need to omit this we ain’t gonna need it anymore.
  • Oh we need that feature again.
  • We need to change that feature it must work now this way.

And all time I used to comment the code so that if I need it again then I don’t have to develop or search this snippet again therefore it should better stay there in comments. See figure below

Sometimes the feature implementation is so much scattered that you can’t figure out. Like if we have some address field e.g., phone-1 and phone-2 to be added in different modules of our customer management systems e.g., customer, employee and then after a month we want to have only phone-1 and want to remove phone-2 now its difficult to track all code-paths.

In recent 2 years, I have seen so many tools and techies that make our job easy and allow to never be freaked out with donkey-coding and help us to avoid spaghetti coding. So I think we start thinking of our project in terms of features then we can organize our work. Its simply may be just another myth or may be just another philosophy or may be it’s gonna define a much better way to get the job done. With agile changes are so frequent that we get sometimes frustrated to deal them each time.

I believe IDE and Version control systems must work together. Because both are providing a way to develop code in an efficient and safe manner. So why they think they are strangers to each other, They must get marry and help us to improve our productivity. If some IDE claims to be IDE it must provide a mechanism for any version control system to be added to extend its usability. If some version control system claims to be best then it must know the manners to be integrated with any IDEs. Now I think time is to compel the vendors of IDE and version controls to work together and come up the way they can extend each other.

Now you can say feature based version is a practice its not necessary to have such system, we can still hold with our existing IDEs and Version controls. Like we continue to work on one feature and check-in the code with some decent comments, and then we can recover the files to older version if we don’t want that feature. But still we need an automated system that will help us to be more effective in our thinking of feature based versions. As we may have developed many features within those files, so reverting to previous versions cannot help us to roll back one feature it will take us to the start where we need to develop 10 other features.

First we need to define what a feature can comprise of,

  • Is this feature? we need to implement security
  • Is this feature? to add some address field to all modules
  • Is this feature? to change a color of header text in webpage

Feature can be a broad abstract or it can be little thing. But somewhere our system may be an intelligent one that if we want to remove any feature we can do that without disturbing other functionality. Our version system and IDE needs to be intelligent to track feature code not by just line numbers but by content also. Suppose if developed feature_A in method my_method, I also added a line for feature_B in the same method it can change line number of feature_A code, may be I have added a feature_B line within the lines of feature_A, so things are going to be tricky and feature-based system needs to deal with all such possible hurdles like may one feature depends on another feature so roll-back may not be done.

Well main point is to have system to identify the code developed in different files for one feature. We need to roll-back changes for example layout we defined 3 times differently for the grid view template.

We need some intelligence to refine the concept of feature; I think feature must be as small as possible and as reasonable to be done as Feature-based to be worthwhile. The concept is to not get panic and develop one thing at a time, finish it, test it and make it reliable and then move next. Prioritize your task. May be there can be a system which may allow to work at multiple features and we can switch between features.

Benefits:

  • start and end time of feature development and time taken for feature report for manager
  • Feature can be recognized by meaningful title rather than 1000 of line of code.
  • There can be an interface where Supervisor can upload/write number of features and assigned to a developer and they can be automatically loaded into developers to-do and therefore we can repository who is working on which tasks also that can be used for different reports.
  • feature roll-back, feature removal
  • Developer can work on multiple features and when he wants to commit code he can just commit changes for specific features. IDE has the tracking system to track changes done in different/same file for different features, and will commit code without selecting files manually.
  • Conventional way of selecting files will no longer be required

Critics:

  • We are with habit to do so many things at one time (add a comment, replace an error message), so handling multiple features require extra efforts. Will this be a gud thing to do One task/feature at a time, and never take freedom to any small change in any other file, there may be a marker system which allow to relate a change to s specific feature.
  • Do we need to develop a feature-based system, or we may have freedom to define some features that we think are critical tasks and are more prone to change in future and do rest of the jobs in conventional way. Or take every small thing into feature-based. Both ways there can be so many hurdles or impossibilities, need lot of study.
  • Sometime when project goes in maintenance mode mostly changes are done at that time if our customer can afford which actually create hassle to deal them. But may be during development phase there is less a case we may need such frequent changes.

Note: to be continued, not completed yet

Related Readings:

Creative Commons License
Feature Based Versions by Rehan Munir is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.

Confession

December 13, 2007 by rennywenny

Confession June 2002
{chorus}
I am feeling sorry
I know God I am sinner
In your grace I’ll be saved
I know God you only love me
{chorus}

My heart full of lust, ever bad dead
I walked against your will
I followed my own will
People are judging me, in their eyes hatred for me
Why are they judging me when they are to be judged by you?

[Chorus]

My heart is crying, I know I am frail
My eyes are not pure, my body is not pure
No one is sincere, I am in despair
No one loves me, I need your care

[Chorus]

Tabeer

December 13, 2007 by rennywenny

Tabeer 27 April 2005

Tabeer

Empathy

December 13, 2007 by rennywenny

Empathy June 2005


Long ago on my way to home
I met an angel with a crown

His face was pure and I fell down
I was speechless and just like a stone

Then angel smiled and I felt peace
I cried a lot and asked for help

But then I thought angel cannot be empathetic
And I was true he was sympathetic

I asked in wrath to angel why you are here
I prayed to God to send my late Mom

And why he sent an angel who can’t understand me
How can an angel counsel me the way my Mom did

Hobson’s Choice

December 13, 2007 by rennywenny

Hobson’s Choice May 2005


Life is more worse than you can think of it
And there is no escape unless you taste of it

I was hopeful of good in life but
I lost my passion when I was hurt

I delved in life to find delight
But then I realized its fruitless sought

Life sometimes dazzled us by its light
And these are delusions of our sight

Life was hobson’s choice for me to select
And even then it has no regret

Life is a certain je ne sais quois I thought
And whatever was worst it brought

Life is a deluge and I have no life-boat
All I have to do is, follow its rough route

hobson’s choice = The choice of taking what is offered or nothing at all
je ne sais quois= Something indescribable of high quality

ME

December 13, 2007 by rennywenny

Me APRIL 2006


Have I been so brilliant?
And have I been so strong?
That makes me to think of it
That makes me so wrong
But I never been to there
And that makes me alone
And how then I feel so high in me?
And why I think been drawn?
No reason no specialty and no even a star
But how I feel inside of me someone holding on?

Simply

December 13, 2007 by rennywenny

Simply -01 DEC 2006

Moving in a circle of mine
And think all of me is divine

Oh this fallacy I enshrine
still its like a star to shine

But why you are asking its holy crime
when all of us live in such a sign

We are playing hoopla all the time
to loose or win and think winning is all mine

Look everything is not E=mc² done by Einstein
May be simply done with love of thine

sign = A gesture that is part of a sign language
sign language= Language expressed by visible hand gestures
hoopla= [Brit] Game in which a ring is thown to fall over an object and win it as a prize

Automatic or manual NOESIS

November 14, 2007 by rennywenny

Life is not just what our life is all about, or how we think life is, or how we see it or feel it. Life is combination of different colors, and these different colors switch our modes every moment we live i.e., when we see blue color our brain releases relaxing hormones. These different colors of life define our behaviors and our behaviors are defined by our philosophy that we have devised for our self-image about life. Our behavior does not necessarily depict to the external world what is inside of us. Suppose if I am laughing it does not necessarily mean that I am happy. To exactly and precisely infer any result from anyone’s behavior there are behavior determinants.

There are billion humans living in this world and still humans have feelings of loneliness and insecurities. There are people who are confident, bold and sharp enough to face the adversities and it seems they are mature and have learnt to live a life. But actually this is not the case. First let see other kind of people who are shy, diffident, timid and dull. But still they are living and fighting life for their survival. And it seems they are immature and are not ready to face the world or haven’t learnt much about life. But the question is still they are living and facing the world somehow. After so many years it became possible for me to learn what the possible reasons are and what exactly is true. First let’s consider there are two persons A and B. Person A is bold and confident and Person B is somewhat coward and timid. These two persons are given a task that is somewhat difficult to do. The two common features of both persons are: they are hardworking and consistent and focused towards their goals. Now let’s see what steps come to any human’s mind when he is assigned a difficult task:

NOESIS FIGURE

Thanks to one of my friends who someday shared the above idea with me. This is how every automatic or manual cognitive process works. But the major difference between Person A and Person B is that of being unaware of these mental cognitive processes and being aware. Now there is one good and one sad news to Person B, he is very much aware of his mental noesis but unfortunately that awareness comes with one major fault and it is that his noesis is manual not automatic. Though even person A has so many incidences where his automatic noesis cannot cover every possible case and he has to manually deal with it. But still there is one assistant that is his automatic noesis that helps him deal with it. Life offers same challenges to everyone but the difference comes how we deal with them. It is not the case that Person B is not capable or don’t have special reason to live a life but the case is his manual noesis makes him somewhat slow and confused. Because Person A don’t have to do conscious processing about making decisions from simple one what he wants to eat while going out with his friends or colleagues.

But the greatest question is world is not the same, world is progressing at a very fast pace and each human needs to be aware and sharp enough to accept new challenges. Now one person cannot survive while sitting in a corner and not interacting with the world. Now person B achieves what he wants but may be at a slow pace or may be facing the cruelty of the world. There is too much extra burden on him to face the challenges. Person B is always concerned how to improve him but don’t know the way out.

 
 

Creative Commons License
Automatic or manual NOESIS by Rehan Munir is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.

Annotate Coding

November 14, 2007 by rennywenny

More or less with new task assigned we have to face new challenges. Especially we start thinking about questions who, what, why, how to solve problems. Recently I have been assigned a new task and I was getting troubled with questions who, what, why, how. I tried on my writing pad to figure out the solution. Sometimes we have all the resuable functions written and we need to integrate new modules/ features. But if things are tricky you need to think 100 times to get possible workable solution. I figured out a way at the verge when my nerves get frayed is to write pseudo-code in comments form so, i started commenting the code which yet not conceived, and talking with myself now this now that and all that I got is below:
load_note: function(note_id){
// get selected node
// has sub_nodes
// IS node expanded
// select notes modules
// if notes is expanded{
// select specified note}
// else get_notes{
// select specified note}
// get submodules
//select notes
// get all notes
// select specified notes
}

and got the desired solution

select_and_expand_node: function(node){
if(node != null){
if(node.get_has_children()){
if(!node.get_is_expanded()){
node.on_toggle();
}
}
else{
node.on_toggle();
this.get_nodes_data(node, this);
}
}
}

load_note: function(note_id){
var notes_module_node = null;
var selected_node = tree_view_ctrl.get_selected_node();
if(selected_node != null){
this.select_and_expand_node(selected_node);
notes_module_node = selected_node.search_node(’Notes’);
if(notes_module_node != null){
this.select_and_expand_node(notes_module_node);
notes_module_node.search_node_database_id(note_id);
………
}
}
}
now it gave me pretty much idea of how to accomplish the desired functionality. I added more comments, more checks and figured out some repetitive code and created another function and in the end I got my way to solve the problem in less time.
Adding comments is another sub-task of developing nice code, which I sometimes hate why not I make function-names and variables-names so understandable to avoid commenting code no doubts there be pieces of code where commenting is inevitable but we can avoid as much as possible.
Try it…

Creative Commons License
Annotate Coding by Rehan Munir is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.