Thursday, July 28, 2016

How effective are your Design patterns

Overview

Object-Oriented (OO) design patterns represent well known solutions to common design problems in a given context. The common belief is that applying design patterns results in a better OO design, therefore they improve software quality as well.
However, there have been very less empirical studies to prove this. How does application of Design patterns affect maintainability, reusability, and understandability. How to evaluate impact of design patterns on software design.
In context of design pattern effectiveness, following questions are of importance:
  1. Are there any traceable/measurable effects of applying design patterns
  2. Do patterns form an effective way of exchanging design knowledge
  3. Does applying the design pattern magic always produce the intended result
In this discussion we will try to answer the measurable effects of (GoF) design patterns using Hegedűs experiment. GoF design patterns are 23 patterns which are classified according to the purpose and according to the scope. This experiment was conducted by P. Hegedűs, B. Dénes, F. Rudolf and G. Tibor [1] and is one of the few studies that uses empirical values to analyze the design pattern effectiveness.

 

Measure effectiveness

To answer above questions the simple relationship that is used is:
         design pattern density : maintainability of software
A direct co-relation between these values would mean that design pattern do help in maintainability of software. There are other relationships also which have been used like defect frequency of pattern classes vs defect frequency of non-pattern classes but there have been more empirical studies around maintainability, and also because of its direct impact on development costs.

Before we start working on this relationship, lets understand what maintainability is, in IEEE standard glossary:
      Maintainability The ease with which a software system or component can be modified to correct faults, improve performance or other attributes, or adapt to a changed environment.

The problem in using this definition to measure maintainability as effort, the common unit of effort being man-hours, is that this unit in itself is very ambiguous. Hence, to measure maintainability in absolute terms, probabilistic quality model[3] is used. This model uses the quality characteristics defined by the ISO/IEC 9126 standard. The computation of the high level quality characteristics is based on a directed acyclic graph whose nodes correspond to quality properties that can either be internal (low-level) or external (high-level). Internal quality properties characterize the software product from an internal (developer) view and are usually estimated by using source code metrics. External quality properties characterize the software product from an external (end user) view and are usually aggregated somehow by using internal and other external quality properties. The edges of the graph represent dependencies between an internal and an external or two external properties. The aim is to evaluate all the external quality properties by performing an aggregation along the edges of the graph, called Attribute Dependency Graph (ADG).
For analyzing the relationship between design patterns and maintainability the following measures for every revision of given software system are used:
  1. Mr - an absolute measure of maintainability for the revision r of the system.
  2. TLLOC - the total number of logical lines of code in the system.
  3. TNCL - the total number of classes in the system.
  4. PInr - the number of pattern instances in revision r of the system.
  5. PClr - the number of classes playing a role in any pattern instances in revision r of the system.
  6. PLnrr - the total number of logical lines of classes playing a role in any pattern instances in revision r of the system.
  7. PDensr - the pattern line density of the system defined by the following formula: PLnr /T LLOC
The results and co-relationships between these measures for the sample system[2] did indicate on patterns improving maintainability of the system.


It can be seen that the two curves have a similar shape meaning that they move very much together. The Pearson correlation analysis of the entire data set shows the same result, the pattern line density and maintainability has a 0.89 correlation. This result may indicate that there is a strong relation between the rate of design patterns in the source code and the maintainability

[1] Hegedus et al. evaluated the impact of design patterns on maintainability directly by conducting an empirical analysis. They analyzed more than 300 revisions of the JHotDraw software system which relies heavily on some design patterns. They calculated the maintainability values with their
[2] http://www.jhotdraw.org/

Tuesday, March 15, 2016

Promise

I look down, when I look down below the hill
the hill of success that I climbed...
All I can see is grim and chill!!

chill that is in return of my coldness
coldness towards the souls I killed
killed them for my selfish ends
killed them to reach atop "the” hill!!

grim that my family and friends are feeling
for I was not with them while their lives were reeling
grim that I’ve caused to my nears and dears
grim in the lives which I had to cheer...

oh!! but no time is it late to begin
to make amends, to keep up the chin
so I promise to the world and I promise myself
I shall not let history repeat itself!!!

Friday, February 17, 2012

Reasons.....

Reasons one should not get married
I have so many single friends who always wanted to be "SINGLE" and got married recently (well, the list includes me as well). But then logic says how can you despise something without experiencing it..and conscience says you can not undo this experience so why in the first place experience it. Anyways, now that I have committed the sin, I realize there are very few who actually want to undo "it", "it" being such a beautiful sin.

I have always been a mamma’s girl and daddy's princess, and could have never imagined going away from them for a single day...let alone marry someone and move away forever. Also the nerd in me always prioritized my studies over loving(?)/marrying someone. But then C'est la vie... and eventually I had to get married with very few hopes of a good life post-event.

“The life will now only consist of kitchen and laundry and cleaning and innumerable satshriakals to unknown faces in social gatherings”. And I soon realized how wrong I was and what a wonderful experience being married is, more importantly being married to a person who loves you the way back you do. With the whole new facet of life, it actually made me feel like having a new birth. From a girl who hated cooking to a lady who would search recipes and prepare them to delight her husband. From a girl who had a horse-eye view of only her study table to a lady who handled whole house (I prefer calling it home though, in any context :-)). From a girl who would dance to her own tunes, to a lady who now matches her steps to her husband's. And surprisingly I could see similar transformations in my husband – from a boy to a man. No and it really does not mean leaving your identity, forgetting all the things you once liked, letting all your passions have a back seat, in fact, it gives you a partner in all the fun,in the joys and in the sorrows as well. Someone you can always look up to. Someone with whom you can also share moments which you would have not shared with your closest of buddies or your parents.
Someone who is just like you...outside you...as they say -
      “Mere jaisa koi meri jindagi me aaye...toh baat ban jaaye”... :)

Life got much more meaningful, new aspirations springing up, instead of previous ones dying, and much more fun now, because now each one was for both of us.

Marriage actually means addition rather than subtraction, with me becoming the princess of one more family, and my mom-n-dad getting the elder son they always wanted. It actually means multiplication rather than division, with my friends multiplied into his friend list and his to mine. It means sharing, caring, loving and getting the same in return.

So to all my friends out there, who are still escaping this beautiful thing and giving their parents a hard time, its time you reconsider the propositions and give life a chance, a chance to tell you how beautiful it can be.

Monday, November 22, 2010

Look around: The World is Angelic!!

Some of my close friends (buggers who have rights to ask any kinda questions to me) ask me why I named my blog like this.  "You....Angel...When??" is what they say. Keeping that self-obsession thing (again awarded to me by those buggers) apart, I think there is nothing special in it. In fact, all of us still have that small innocent angel inside us. At times, it is scared to come out, and at most others, we are scared to bring it on forefront. Might be because we do not see the same angel in others, or we are too protective about our angel :)
This angel inside each of us, which makes life so wonderful, which makes us realize that we are much more than machines.
And when it comes out, it makes even those small little things so awesome. This post of mine is dedicated to that special "Angel" and those special "Awesome" things.
Father-Kid having their share of time....Pleasantly AWESOME
The other day, I was enjoying the welcome evening breeze on my terrace and crying my heart out** (my friends have started calling me "Pichkoo" cos even a small thing said or done these days excites my tear glands). And on one such day when I was obliging to my tear glands, this thing happened. On the terrace of next house, the father was helping his kid in kite flying. And even a small amount of boost to that kite made the kid shout with joy, the father laugh, and me? Off course, smile. I could clearly see the Angel hidden inside that father whom everyone in the locality usually knows by the name "Khadoo Uncle".
**  I know that is an oxymoron, but that is how I am, sometimes even I don't get myself. 

Favourite TV series over a Cup of Coffee....Simply AWESOME
So, I had been working day in, day out last few weeks and was completely exhausted, irritated, frustrated (Am short of adjectives to describe that). And here I have it, in my bag of B'day gifs one of the bugger gifted me a DVD of F.R.I.E.N.D.S (Sweet and Thoughtful Angel...aint it??)
What a way to get out of work hangover watching old sequences of F.R.I.E.N.D.S over a Cup of Coffee.
Meeting Long-lost friends.....Nostalgically AWESOME
All gal group, slumber parties, gossiping for hours, window shopping, in-house salon...I am sure all of us gals had a very gala time in school and college. Living it all over again like we were still those small innocent Angels...Awesome...
Watching your parents living their Youth again....:D :D :D....Amazingly AWESOME
All my friends of my age know how it is with parents, for them in late 40s-50s of their life; their priority lists have changed drastically, with us morons consuming top spots in it. And eventually, allowing them lesser time with each other. Well yeah, so at times this guilt feeling is too much to avoid and one such fine weekend morning, we (yeah you guess it, we "morons") plan to leave them alone at home with few worry-free hours. Angels...aren’t we?? And coming to back to see the same 'ol love birds...Awesome...

Well, the list is endless, and so is the joy of living these moments, timeless...boundless...
Before I sign-off from this post, this time sharing not a song, but a wonderful read:

Sunday, September 12, 2010

10 commandments of being a SiKh BoI

Now, I know this post is going to make sure I get a lot of angry faces and punches, But I have been a part of Sikh family, with 15 SiKh BoI cousins around me (yes gurls, not a single "far-fetched" girl cousin even, so you know how difficult it is for me..and oh well BoIs you won’t understand the pain of not being able to share clothes and accessories and bags and shoes and………..ok let it be :( ) and thus it was becoming very difficult for me to resist myself from posting this. Also that it’s going to help generations to come to become an ideal "SiKh BoI", I decided to sacrifice my peace of mind and bear some swears (Refer commandment#1) and beatings from those so called 15 SiKh BoIs (to say the least :P ). Ahh!!! So Selfless soul I am.

And all the following traits are so closely interlinked, that I really had a tough time classifying them as 10 different points. So please bear with me for a lot of cross references:

1. Thou shall know all kind of swears in this world (need not to know where to use them though), and use them in place of punctuation marks, written communication included.

2. Thou shall own a huge, noise-polluting bike, fondly called Bullet, pronounce it BULL(-e)T ..BULLT, take utmost care of it and treat it like their first GF. As one punjabi song rightly says:
"aap ni nahaunde, Bull(-e)t chamkaunde te hauli chalaunde" (Refer commandment#6)

Eventually, thou shall also aspire to own a jeep (And no brownie points for guessing this one, everything applicable to BULL(-e)T, applicable here also)

3. Thou shall never attend classes, and shall also not allow friends to attend those.
OR (well, you see, SiKh BoIs also always find alternatives....ummm... I should include this as commandment # 11)
3. Thou shall always have 100% canteen attendance.

4. Thou shall never carry books, “I mean is the world over of laptops, iPods or cam cods or for heaven’s sake mobile phones...beep beep beep..(Refer commandment #1)”, shall borrow/steal/ snatch pen + paper, shall draw lecturer ka foto on it during class and toss it after class. (this in case commandment # 3 gets violated)

5. Thou shall always oblige good looking women by use of adjectives like "Totta" or "Kancha".

6. Thou shall remember all the stupid punjabi songs sung by singers with weird names, by heart. (Well, I must say the song names are also weird..check this.. Chah da Cup...and then Chah da Cup- Part 2 and Chah da Cup-Part 3..ummm…I thought of suggesting the singer about Patiala glass so that only one would suffice)

7. Thou shall always strive to get big brands and fight with father for money in order to accomplish it and then again fight with father to convince him on price after accomplishing it. As the same famous song goes again:
"te baapu ghoore…TOMMY diya shartan, ainak ARMAANI"

8. Thou shall religiously and daily go to Gurudwara (Hell NO!!! SiKh BoIs are not religious, and the purpose is not at all religion, but for so called "Totta" and "Kancha".. Refer commandment # 5)

9. Thou shall ceremoniously perform only bhangra steps when in disc, irrespective, the DJ is playing House or Hip-Hop or Techno.

10. Thou shall not hit the author of this post.

Well, these are the 10 can-be-publicly-disclosed-types. For more information, get in touch with author.

P.S. Now I am not a big fan of this song, but it captures the entire essence very well. And, this one also gonna remind all of us of our wonderful college days.

Wednesday, September 1, 2010

Celebrating Festivals...Celebrating Joy...Celebrating Togetherness...

Back then, in school, almost every essay (those stupid 10 points we were supposed to mug up and vomit out in our answer books) started with “India is a land of joy”…or “India is a land of colors”…or “India is a land of festivals”….well yeah because virtually almost every exam collided with one or the other festival (India being a land of festivals indeed :)). With Diwali welcoming the half-yearlies to annuals being coloured by Holi. And then all those Navdurge and Ganesh Chaturthi and Makar Sankranti to what not.

At that time, the only purpose for which we used to cram those 10 lines was to get good marks (and a “v.good” for over-enthusiastic teacher’s pets like me). When the joy related to festivals was to get hols, new clothes and sweets. When the colors related to the colors of our clothes, the colors we wanted for the rangoli on Diwali, the new colors we wanted to use on our friends on Holi.

But now, when the life and its pace has squeezed every drop of joy and color from us, I realise how important these festivals are (and also were, back then). I realise how very synonym-ical these words are FESTIVALS-JOY-COLORS-TOGETHERNESS.

When in 2007 I started with job, “Ah!” .. I thought, “here starts a wonderful period, Independence, Money, Power!!”. Less did I realise, what it actually gonna be. Independence, I have, I am independent inside this stupid office premise. Money, I have, but not the ways to spend it. Power, I have, but only on my keyboard and mouse. It turns to be days when I had last seen my house in sunshine. Days when I had gone to the terrace in the evening and listened to the sweet chirping of birds returning to their homes. Days when I sat with my family, watched crazy movies and commented on each dialogue, with mom bringing in pakoras and samosas. Well yeah, days when I danced in rains without the fear of my immune system failing.

Coming back to from where I started, my normal (I prefer calling it so, even if its not.. :D at least some hope) days are when I wake up at 9 .(oh cmmon! That’s still pretty early by any standard considering the fact I slept at 3 last night). Fight for washroom with my dad, stuff in the breakfast, gulp in cold tea, ride in mad rush and still reach office late by an hour. And ends with reaching home back at 9 in the night, completely exhausted, again stuffing in the dinner, coming online, FB or whatever, just to console my mind that its getting some kinda entertainment. And then the silly weekend, when I just “do” nothing.

And the only good part with this oh-so-wonderful life is that it makes me realize the worth of what I don’t have now. The luxury of time, the luxury of joy, the luxury of being together. It makes me realize festivals are much more than just wearing new clothes and having good food. It’s the time for your family, time for long lost friends, time to be together, time for…for you and for being yourself. When you can go back to your childhood, and can do anything without sounding stupid.

Heres sharing some moments of my joy, togetherness, stupidness; and hoping you all had it too. (oh yes!! Stupidness too)


The Creative Minds
Ok I know this pose is quite an old one,
but its still sweet :)



The sweet innocent soul
The BAD thief
The Super Gurl!!!
Somebody HELP!!!

Dhishum dhushum

Super Gurl to rescue


Thanku Super Gurl....
and they lived happily ever after!!!


Well this last pic...so that you know hum
bina nautanki ke bhi pics lete hai





Sunday, August 22, 2010

System.out.println("Hello World!!!");

So, after a lot of thinking, re-thinking and re-re-thinking I am here (I know, I know, its clichéd and every “new” blogger begins with this, in spite of the fact ki kal raat hi use gyaan hua ho uski apritam lekhan kala ka).

Anyways so as I am here after all, I think I should dedicate this first post to why I am here :) (yes again). Past few months in my life have been really enthralling. Sad moments, depressing moments, suicidal…yeah you read it correct…Suicidal as well. But then I thought, is it really worth it, was “the thing, the person, the situation” worth of my feelings, my emotions and above all, my life.

“NO” shouted my mind. But I had to come out of it and I had to. This was it when amidst all what was happening to me, I could still see some hope, hope of a new beginning ..

And when finally I realised am coming out of it, this long lost love of mine for writing also came back along with all the good things which were neglected by me in that dark phase of my life. (I might elaborate more on this in my posts to come, but for now…rest assured, you don’t need to call 1-Oh-Oh…I don’t plan to spare you so early :) )

And being told that I write complete Rupa & Co. style (if you’ve ever read Chetan Bhagat, or any of IITians…IIM-ians (with due respect to all you guys), you would know what I mean), I thought why not give it a try......

For nights and days..for hours and hours
In the night …under the stars…
There I lie and keep thinking why…(Oh! Why)
My mind and heart are constantly at wars
Was the punishment too big or the mistake too high!!!
Then why there is such hue and cry
Let me end it ..let me say good bye…
No.. but no….in the wrong wasn’t I
The Angel Inside me Refuses to Die


Until my next piece of writing, Keep SMILING!!

P.S. One more of my long lost love….MUSIC.....and am crazy for this song
               Spice Girls...Two become one