10/09/2012

Running Hadoop MapReduce on Cygwin with proper credentials




I just kept getting the below exception while trying to run a simple map reduce program on windows(XP).
java.io.IOException: Failed to set permissions of path: \tmp\dinesh\mapred\staging\dinesh-1143336710\.staging to 0700

Nothing worked till I saw a simple workaround for the problem. Download the jar from the below link and follow the instructions. 

Download here

9/14/2012

yoFeedy




Just like google reader and other feed readers available online, In yoFeedy you can signup for feeds and see them all in one place.
Additionally, I've added the search option in feeds which will search for a particular string in the master feed list maintained by feed burner.

Application is running on struts2/ Jquery/google APIs/ JSON and a small percentage of HTML5

Google authentication is used, please log in with your google account.
1. Since I've used HTML5, please make sure your browser supports HTML5 (I used firefox v14.0 for testing). Please note, the app will not work in older browsers.
2. Application is still in Alpha, so please don’t start to curse yet :)
3. Please add comments/ suggestions/ bugs to https://code.google.com/p/yofeedy/


Thanks,
Dinesh

7/30/2012

Abstract Classes Vs Interfaces

Say, we are trying to implement a new behavior 'whistle', to a group of unrelated things.
For e.g.) Assume we are trying to add whistling behavior to parrots, humans, aliens, cookers and a steam engine. Do you find a relationship between these objects? Do these have a is-a or has-a relationship?

 The juice is when we have a group of unrelated objects and you have to define a common behavior between them, Interfaces is the answer. Of course I can write a whistle abstract class and have parrots and humans extend it. The problem is still solved. But does it make sense when Humans and Parrots extend the whistle class just for the sake of implementation?

Imagine you are sitting in a closed room and you hear a whistle sound. At this point, you are not sure who whistles. IT could be parrot or an alien or a human or a cooker. This is another use of interfaces, At run time when you don't know the type of object, it is easier to use an interface and access the behaviors in the object.

I think by now, it is clear to decide between Interfaces and Abstract Classes.

7/06/2012

Jquery fundas

This week was all about Jquery...!

Though I've been using it in bits and pieces, did not get a chance to do something so exhaustive in jquery till now. 

So here are few things, which I learned this week..I'll keep updating this post every now and then..

7/03/2012

Designing and Developing Interoperable Services


SOAP
  • SOAP is a simple XML-based protocol to let applications exchange information over HTTP.
  • Specification for exchanging structured information in the implementation of Web Services in computer networks.
  • Why SOAP?
    ·        SOAP provides a way to communicate between applications running on different operating systems, with different technologies and programming languages.
    ·        HTTP is supported by all Internet browsers and servers.
    Disadvantages
    ·        Because of the verbose XML format, SOAP can be considerably slower than competing middleware technologies such as CORBA.

    Tools used to implement SOAP:
    Apache Axis/ JAX WS/ JAXB

Ignorance makes you more ignorant!


I was working on a personal project for creating an online post-it like application using Jquery, JSF and google Apps..

The idea was to have a text area where user can type and notes will be saved automatically through ajax calls..

Then I thought to add the draggable feature to make it look better, with little effort made I it work to only learn that the draggable feature will not  work on the dynamically created DIVs. Googled a lot and found a work around and made it work..

The previous issue was fixed to land on this new one -  Draggable did not work on text area!  I added borders to DIV so that the user knows where to drag (I know it's crappy!)

After making that work, I thought an in place editor will make the app look better i.e, the text area will be enabled only when it is focussed, other wise it will be disabled…Am no expert in Jquery, all that I saw did not reach me…I was totally frustrated and was in need of a break very badly...

With some hopes, came back and googled to see this HTML 5 attribute contentEditable (http://html5demos.com/contenteditable/) ..sweet, all my issues vanished in no time.
A DIV can be edited directly in HTML5!

Moral:
1. Ignorance makes you more ignorant :(
2. Googling will help you overcome your ignorance :)

dzone.com