Sunday, August 29, 2004

Difference between aggregation and association

Was reading UML Distilled over safaribooksonline, tried hard but couldn't determine it clearly explains difference between aggregation and association, so decided to ask couple of gurus i know. Here are 2 replies
---------------------------------------------

Mat reply
----------
Hey. Its a very fine conceptual difference, and I don't think anyone would
fault you for using one in place of the other.

The rule of thumb is, associations are graphs whereas aggregations are trees.

Think of it this way:
An association is a two-way possession (or perhaps more complicated
reference which is cyclic though not immediately visible as such). A
husband object will have an association to his wife object, for example,
and the wife would have an association to her husband.

An aggregation is strictly a one-way possession. A simple example here is
a ArrayList of String objects. The String cannot have a reference to the
ArrayList or a reference to any other Object with a reference to the
ArrayList so the ArrayList has a aggregation of many Strings.

This brings us to the last reference type, composition.
These are basically references to "parts of" the greater object which need
not be private. In UML it is supposed to be treated the same as
aggregation, though in practice, I've seen way more associations than
aggregations come out of a final product. The key difference is that the
lifetime of aggregates is governed by the lifetime of the parent. The
example here is a hand object consists of a composition of 5 fingers. If
you lose the hand, you lose the fingers too.
Note that this harder to pull off in Java because there are no explicit
call to "free" so unless the member is private, its possible to hold a live
reference to a finger from a hand that has been destroyed--it does help to
think about who is referencing what, and how they are getting their references.
---------------------------------------------

Vguru reply
------------
Huu.. Good question to ask,

If u want to implement this aggregation is like array of objects and
association is signle element,
in java terms.
public class C {
private DependentObject[] members; // is aggregation
private DependentObject member ; // this is association.
}

In general, During Class design time u need to think of how does the
co-ordination is required with other classes.

Remember the life of any of these DO(s)are not actually with Class
'C', which meen, There are externally created and 'C' will use those
instaces. may be the array of DO (dependentObject) will come eaither
from the Constructor or some method, but they will exist after the
scope of instance C, Doesn't meen some other object will also cache
these references and they exist further life of the C. The creation
should not happen in C in such a case that should become a
containment.

The other way to find same scope is when u design a Class diagram and
decide on the classes and their behavior with CRC (Class Resposibility
Card), they these two objects C and X will have same scope, scope here
represents the preception of resposibility they do in the system, and
some functionality of one will requirea handshake with other or others
for which the relation between the classes is aggregartion and
association , dependency or containment are defined.

In the life time of C and X, there should not have any comparisions.
they both are indepndent , The more independent is the less dependent
or handshake with other objects, so desin principle is to achive mode
independent objects. want to make more indepent, then u will be
designing interfaces, for other less dependenting that reduces
dependency and provideds flexibility.

The more interfaces and abstract classes it has is more flexible or
easy to write a pluggable code to that framework or extensible.

Ofcoure there are some syntactical elements of above, which can change
depending on the language which u choose to implement ur design.
----------

Friday, August 27, 2004

give me my luck

As more and more I am moving to year end...I have strong feelin probably my luck is again going to be with me{Hopefully}
now I feel most important month for this year will be november, don't asko me why***
Well its friday, another 60 mins and will be FREE beers from office, i hope so free, if not free than on subsidised price, which is again okay :)

Sunday, August 08, 2004

Nokia 3650

Surprisinly I havn't knew about it, Till I face this problem that nokia 6 series fone have problem with there vibrator, I have 3650 and one fine day it refuses to vibrate making me miss calls and i wonder why from morning I havn't got a single calls{Where are those personal loan hunters}
Anyway it finally worked, but how ... Well you need to hit on bottem left with ur finger, yes you heard it right, i said HIT with a finger though.
Now I asked couple of guys and they say ya ya 6 series do come with this firmware problem, maybe because it comes with smartness like it don't vibrate when your charging, etc but this code shouldn't cause this level of problem in firmware and than why the hell on this earth it require hitting by finger and it works, no wonder nokia is loosing...
Now going to read website of hiresh ram chandani the famous website resource for j2ee

Monday, July 12, 2004

Monday 12 July 2004

Once again
I am not feeling like working on monday[though i will end up working late nite] it is being 11.45 am and not started yet with anything though seen what is happening in the whole world :)
at the moment busy reading about lake vostok.
Hopefully after this I will start...ohh will not the lunch start than

Thursday, July 08, 2004

GIFs are free now in ca too

Today 8 july 2004 IST last patent of famous LZW (Algo used in GIFs) is expiring, this last patent was in Canada(so canadian time it was 7th July 2004, it expired.) So now US, Europe, And Canada all are free for LZW usuage
Will be interesting to see what unisys do now
or sites like this will still be needed, I request unisys let it be free now, it is long time they have stopped popularity of GIFs and who can forget who the popularity of GIFs declined since 1995, and yes, you IBM you also don't jump in fight this time.

Thursday, July 01, 2004

Interesting story - Tale of two cities

I was just searching and trying to find the free version of paid story of forbes story
http://www.forbes.com/premium/archives/purchase.jhtml?storyURL=/forbes/2004/0412/094.html&_requestid=11987

I was expecting there must be a free version somewhere in some uni website but to my wonder it was found in forbes.com domain itself, I wonder! don't they know that google crawl forbes.com also
anyhow here is the link
http://www.forbes.com/home_europe/free_forbes/2004/0412/094.html
Pretty interesting story, and seems forbes has done good work of collecting facts.

Saturday, June 26, 2004

Email world is changing -- thanks gmail

Now with the latest hotmail move of giving its user from as lil as 2mb(are we biggers?) to 250mb(here is story)
Complete email service scenario seems to be changing,
Best of hotmail was
- Its speed among internal users and notifications
- U can configure to get zero spam in your inbox, I said Inbox!!
- Great integration with its messanger, which makes email like phone call.

And well now visit yahoo, its best was:
- Reliability
- Wide platform support
- 3x more storage than hotmail
- Good local services, this was the reason most of the people in india used yahoo mail and messanger only
And than started comin time that everyone thought free email will no longer will remain free and indeed many indian email service providers literally made it paid after the both hotmail and yahoo taked out there paid version, and only reason it never got paid at that time that both of them was worried of each other, and noone wanted to take this bold step and than slowly regional players in country (like india, indiatimes, rediff; Russia, mail.ru, etc and so on) also started becomin stronger that also stopped these 2 giants to make there emails paid, but they continued putting strings around like 30 days must check mail, small size attachment, etc, etc.
And then comes the google with its plan of gmail and indeed this got so effective in its early beta that having address with gmail people took it as proud and wildely tried different way of getting one, look here for details.
And now we see these giants changing there face as with increasing ad money(yahoo makes BIG money using mail ad now) also came in picture and no one wanted to loose that good spinning cash. so now you see each of them extending there hand, yahoo has made its inbox size 100 mb, well pretty enough for normal users, so than msn started looking too small and decided to go for 250meg, though according to original track of MS i was thinking it will do this but either 25 meg or max 50 meg, but with changing face of MS(some code finally came out) now, this is also a new thing.
Lets see now what the actual future of gmail is, and no matter what gmail future is, atleast it have made sure that free users will have enough space and good services atleast for comin good years, and this can be one of the reason to say, thanks gmail.

Friday, June 11, 2004

Yahoo!! I can crash Gmail always

Trick is pretty simple
Oh okay, let you know first my configuration
Mozilla 1.8a1
Winbox: Microsoft Windows 2000 [Version 5.00.2195] ( as usual sucker)
Now login to your gmail account, oh wow it logs in successfully and work unlike before, hey but just see what happens after you press F5
hehe, mozilla crashes, why didn't gmail team consulted me before that heavy usuage of layering ;-)

Thursday, June 10, 2004

Gmail allows another 3 invitees per account

Ok it is most important to update everyone about whats up at gmail side
So latest is, It no more crashes over my new winbox(coori's system) and
yesterday google gives a option to existing gmail users to invite there three more friend, and hehe I am just done with distributing all these sweets :)

Wednesday, June 09, 2004

Migrating even from windows to windows so painful

It is so hard to migrate even from one window to another window, So many things, First install most important blood line, MSN messanger, and that dam will give you error code 0x8100031a Now think how u fixed it last time, and go and kill urself and fix it(High priority bug)
Than comes mail client, so what I use is thunderbird, I have no doubt it is excellent email client, One of the best I have ever used, But ehh, It also cries in migration, And how do you move your filters? and I ended up moving the filters manually again(Previously they use to crash, somehow mozilla guys fixed in 0.6, so nice of them !!)
Anyhow I was determined of the migration, But it was pain, so I thought I will let other knows how it painful and save others time, so filed this bug over mozilla

Anyhow I am here now on my new system, well well not new It is cannoi system and my previous one was IBM, But you see this is 70 MHZ more powerful and most important have 256 MB extra RAM(Main reason of migration)
So I can keep many things in parallel now, Specially my buddy iTunes :)

Monday, May 31, 2004

Another monday

I guess it's being long time I got this monday fever, when I just don't feel like working but, do what is just sit or think, sip coffee, or listen to music and ruine half day that also most important part, I have strong feeling if I get late in office say after 8.30am than only I get this lil feeling, But IF I happen to reach over monday around 7am than usually I start working bit early...But If I could come early than why this lil feelin,as that means weekend was GREAT :-)
Anyhow It is being long I wrote here And I YET to enter my experience I had with meeting with Mr James Gosling Goes without saying, He is great guy, But I am not sure why I was not much impressed after meeting with him, even his blog is so interesting, That probably I thought this man is gona be real COOL, But again I strongly believe that I maybe wrong, this dude just got a surgery around 10 days back and maybe he didn't had that much energy to fire around the people, and maybe he was too tired of his trans atlantic ocean drives, or who knows maybe this dude was feeling who the hell I the great among :)
Anyhow, In this presentation I like the way he use huckster and he got a nice vision of future too...

Monday, May 10, 2004

ok Gmail is insane

Okay, the posting I did last time about gmail down was actually wrong and seems some issue with browser, as it anyhow worked in mozilla 1.7b, But strange only after some good crashes and everything else works in my browser but why not Gmail and no html ever crashed my mozilla but gmail did...so gmail is insane...still ?

Start of the day's king Monday

Here is how the monday starts
Try reach'in office @7 am but anyhow able to lend there by 7.40am and there lies email asking status so early morning you compose the status of what the dam you did from 2 weeks and what you plan to do next 2 weeks and than send it across and than as soon as you open indiatimes, bull sh!t again filled with news of Outsourcing...is that is the only news remained in country of a billion anyhow convenced and read something and here I am doing happy blogging and than plan to go back and look at serious stuff of life(yes work!!)

Friday, May 07, 2004

Gmail Gmail Gmail...

Gmail is Great
Gmail gives great space
Gmail is scalable to 100millions users as of now
Gmail is lightening fast
Gmail is very user friendly
and lab lab like this...you can found daily in news and around you, Does anyone reported that Gmail is down...yes it is down since yesterday IST and today after 12 and it is still down, ahhhh don't say this is your browser issue or your system issue, I have checked on more than one system and this is not the only failure it have, it shows like almost always the piece of junk characters while forwarding on some other page and that too on IE, than what the hell google team test gmail on,
Google Guys please people have lot of expectations, do something now or you smarty!! doing this just for beta testers, should nt it act as real ?

Thursday, May 06, 2004

day goes on

Day goes on and Led Zeppelin keep on singing banging on my head big dog.
-----------
Hey, hey, mama, said the way you move
Gonna make you sweat, gonna make you groove.
Oh, oh, child, way you shake that thing
Gonna make you burn, gonna make you sting.
Hey, hey, baby, when you walk that way
Watch your honey drip, can't keep away.

*Ah yeah, ah yeah, ah, ah, ah., Ah yeah, ah yeah, ah, ah, ah.

I gotta roll, can't stand still,
Got a flame in my heart, can't get my fill,
Eyes that shine burning red,
Dreams of you all thru my head.
Ah ah ah ah ah ah ah ah ah ah ah ah ah.

Hey, baby, oh, baby, pretty baby,
Tell me what you do me now.
(Repeat)

Didn't take too long 'fore I found out
What people mean by down and out.
Spent my money, took my car,
Started tellin' her friends she goin be a star.
I don't know what I've been told
Big lipped woman ain't got no soul
----
Day goes on this way and I guess recover from my that little feeling and look around and see the big world, and feel again small.
Well this all goes on like this, so decided to burn mozilla source and VC6 in CD move ahead to home, that s the way life will go on and you will never know...talk again little?