I have seen many times, we have to give needless extensions to our classes for the sake of using a framework. Evident quite enough, this makes our classes glued to the framework. I spend my precious time designing my classes and taking of all the precautions I can, to make it reusable, reusable many will consider as an over rated thing, but I think they need to do some serious stuff before even thinking that way. If you think in a proper direction many of your artifacts YES can be reused. I have done that and seen people do that.
Well back to the point, but at times flexibility built right into the language can be silver bullet for many causes. Have a look at the code snippet above. I have two modules module A and module B, I have one class Foo.
Now I want to add behavior into the instance of class Foo and the class Foo itself. Easiest way possible extend to a fraking SUPER class and have fun and worship it as your DSL, losing all the flexibility to the LORD. As your LORD is one ruling you wont mind sacrificing to the stickiness, but growth in different fileds sooner or latter might change the things.
So what to do? sagasious latteral thinking lead me to above solution. I coud add methods without touching my class. Ruby has beautiful methods to kill the burden of the LORD.
Rest is just another story.... !!!! Have Fun ..... !!!!!
Well back to the point, but at times flexibility built right into the language can be silver bullet for many causes. Have a look at the code snippet above. I have two modules module A and module B, I have one class Foo.
Now I want to add behavior into the instance of class Foo and the class Foo itself. Easiest way possible extend to a fraking SUPER class and have fun and worship it as your DSL, losing all the flexibility to the LORD. As your LORD is one ruling you wont mind sacrificing to the stickiness, but growth in different fileds sooner or latter might change the things.
So what to do? sagasious latteral thinking lead me to above solution. I coud add methods without touching my class. Ruby has beautiful methods to kill the burden of the LORD.
Rest is just another story.... !!!! Have Fun ..... !!!!!
Hi Gaurav
ReplyDeleteWe at Onion Insights (onioninsights.blogspot.com) are always happy to come across bloggers like you. We are also glad to inform you that your writing skills can now be put to good use and you can make some extra money too.
Get paid to shop, dine and report and make some extra money using your writing and observation skills. The concept is pretty simple. Top retail chains, five star properties and fast food chains in India hire our services to get their stores evaluated through the eyes of a normal customer. We are looking for people in Baroda who frequently visit these outlets and write well.
Every week there are a certain number of reviews in your city. Based on your availability and interest, you can choose to perform a review for us. You visit the outlet and notice what’s going on. You then go to our website and fill in a report which has a questionnaire and comment boxes to help you document your observations.
Within 15-20 days you will be paid a pre determined shopper fee which will include an reimbursement for any amount spent in the store plus an additional shopper fee. That’s how the system works.
Follow the below mentioned steps to sign up as an OI reviewer
Go to this link http://www.sassieshop.com/2dcs
Click on new shopper sign up
Click "India" under new shopper and click on "go"
Enter your basic information in the form and click on "sign me up"
Please call us at +919769781001 or shoot us an email at support@onioninsights.com if you have any other queries or any difficulty while signing up.
For more details log on to www.onioninsights.blogspot.com
Warm Regards,
OI Team