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:
- Founder of FDD Jeff DeLuca
- Feature Driven Development
- feature based web development with bazaar
- presentation feature based web development with bazaar
- Bazaar

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







Annotate Coding
November 14, 2007More 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…
Annotate Coding by Rehan Munir is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.
Tags: Annotate, Annotate Coding, best practices, comments, developing nice code, pseudo-code
Posted in Software Engineering | Leave a Comment »