Friday, May 30, 2008

DWT - Dojo on GWT

Just yesterday I posted about "thinking" to create the Java API to work for Dojo on GWT.

And today, it's kind of official.

Edujini Labs is going to sponsor this project. Check the posting on Eduzine here.

In fact, a mail to the Dojo Team has already been sent about the intimation of the same.

Have a look at the "Hello, World!" on the early-stage DWT.


Thursday, May 29, 2008

Dojo on Google Web Toolkit

My real love for GWT started only a couple of days ago... and it prompted me to get started with Dojo on GWT.

I have, so far, written a couple of core-classes in Java mainly to abstract out the interaction with JavaScriptObject.

My next target was to directly jump on to dijit, and start creating the UI. And then I realized that it uses mixins. And now I am left wondering what's the best way to handle mixins.

For the new comers, JavaScript allows single inheritance but Dojo (and other libraries) make use of mixins to pseudo-inherit methods and properties from other objects by copying them to the sub-object.

In Java, this can be achieved only by making use of interfaces. The other possibility is to introduce a class between the parent and the child class that encapsulates the mixin objects.

I think the latter is a better approach. Simply expose the object or may be create delegate methods.

Let me think over it... what's the best way to marry Java and JavaScript.

19 year-old gamer becomes mayor of Oklahoma town

This is a good news, so it seems. Young blood looking to take control and put things straight. I wish it happens in my country as well. Note that the position is an unpaid post... so, no monetary incentives for Tyler Hammons.

Associated Press reports, "Muskogee, Okla., teen ready for mayoral challenge". It reads:
The University of Oklahoma freshman is moving out of a dorm and back in with his parents as he gets ready to be sworn in next week as mayor of this 38,000-person city made famous by the Merle Haggard song "Okie From Muskogee."

However, my favourite is:
As mayor, his first priorities are the creation of an independent ethics commission to monitor elected and appointed city officials. He also wants to establish campaign finance reporting requirements for those running for office.

Wikipedia article on John: https://en.wikipedia.org/wiki/John_Tyler_Hammons

Media does it yet again

I really don't know when will the Indian Media become socially responsible.

I cite media as one of the biggest reasons for continuation of Casteism and call for Reservations in the country. I think India is the only country in the world that takes pride in being called backward and people agitating to include themselves in the backward class. What a Shame!

Take the latest incident here, e-Paper from Times of India, May 29th, 2008, Bangalore Edition or directly this item.

I don't really understand what is the need of the media to dig into such issues. If the categorization is done on the basis of region, gender, age, educational qualification, economic background etc demographics, probably it makes sense. And they are measurable. What's cast, btw?

Caste! What a ridicule. And unless media gets responsible, I think we will continue to lose lives and property. What do we gain - I am yet to take a note. Some recent incidents:
Hope there's some saviour who takes off Caste from the political agenda and from the front page in newspaper, and more importantly, does not call for unnecessary articles like the one I mentioned earlier.

Let's aim towards making an equal India. Classify, but not divide. Segregate but not exclude.
Is anybody listening out there?

Tuesday, May 27, 2008

Google Web Toolkit

On Monday, I talked about the training on Visual Studio Team System 2005 Extensibility and I said that I would probably post across a sample piece of code.

But I did not get time.

What more interests me is the web. And there is Google Web Toolkit to help us write structured JavaScript in Java. Sounds great, isn't it?

So, what I did was to quickly compile a couple of articles on GWT and post at Eduzine™ here and here.

Enjoy working with Google Web Toolkit, JavaScript and Ajax!

Thursday, May 22, 2008

Windows Image Acquisition and Windows Portable Devices

I had been working with WIA (for Windows XP) and WIA 2.0 (for Windows Vista) to design an application to capture images.

WIA for Windows XP works perfectly fine. And WIA 2.0 is supposed to do the same on Vista.

And then, I hit a hurdle - WIA 2.0 always gives me "0 devices" while using EnumDevices method.

Finally, I hit yet another set of documents - Windows Portable Devices (WPD) here.

What the heck! Do I need to rewrite the entire application for Windows Vista? What does Microsoft want? Spend all time and money only to rewrite entire code every time a new version is released from their side?

At times, I really hate to develop any application on Windows.

The only good thing, at least at moment as it seems, is .Net Framework. At least, there I need to do minimal work. I wish it was the same case elsewhere also.

Tuesday, May 20, 2008

Events during training on Monday

Without any introduction, let me just list down some intersting events of the day...

Reached the entry gate of the company premises only to find that the contact person is on leave.

The contact person did not delegate his responsibilities, if at all any, to somebody else.

Upon reaching the training room, there was not a single computer for the audience to lay hands on for the case studies. Hey, you know that it's an IT Training.
During the break, we figured out the way to the pantry for tea. For one of the vending machines, the tea preparation was supposed to be as usual - take milk, use the tea-bag and add sugar. But to take the tea from the jar, there was no spoon.

Ok! I told a lie. There was spoon, rather a paper spoon crafted probably from the tea-bag box. We somehow managed to get the spoon - though wet - to stir and mix the items. My colleague did it first and then I washed the spoon myself and did the rest for myself.

Now, that's called self service. Even for the guests.

And again, my colleague remarked, "The company is still the same as it was back in mid-90's".

What more - this company is one of the top IT services companies of the country, and one of the most respected ones.

But I don't think I'll ever have any respect for the company, ever.

Monday, May 19, 2008

A Trainer's Life is always filled with Fun

As I mentioned in one of my earlier postings that I had to do study of some internal stuff in Team Foundation Server - mainly related to Custom Check-in Policies, Custom Work Item UI Controls, Custom Alerts and Notifications (Events) etc.

I reached the client's office (office gate to be precise) at around 8:25am. The company premises has about a dozen entrances because of the sheer size of the campus.

After going around a couple of gates, found the correct gate. As what the professionalism says, the security was informed about our (my colleague and mine, who else) arrival. So, no problems in getting the visitor pass.


However, to my surprise, there was nobody to guide us to the actual training room. Well, my colleague was not surprised. Just a soft remark, "The company has not changed a bit. It continues to be at same left of professionalism as 12yrs back."

Finally, we reached the training room (the client's premises) at around 8:45am in the morning, and as expected, the room was empty. You don't expect the team to get in to the room at 8:30 if the training is to start at 9 o'clock. However, to my surprise, one person was in the room and he said, "The training is supposed to start at 8am".

I was amused and little mused. :)

The team was to arrive from Mysore. Guess what -- the team started their journey to Bangalore today morning at 5am. Now, that was a shocker to me.

Somebody starts his on-road journey at 5 o'clock in the morning with the expected journey time of 3-3.5hrs. He's stuck in the traffic jam because of a road-accident, something that's getting more and more common in and around Bangalore these days. Finally reaches the venue 4-4.5hrs later. And you expect him to directly jump on to learning the new stuff.

And did I tell you that he is supposed to start his return journey at around 5-5:30pm in the evening.

And of course, the management would expect him to productive from the moment he joins his office the next day.

Now some more interesting stuff.

The room was without any machines! And you're talking about an IT Training. Again, my colleague remarked, "It's same way the company has been doing since ages." And if plan to narrate her incident, it would be another blog post :D

At last, one of the team members got his personal machine that was half-ready but okie-dokie for me to get started off. And I banked up on the same.

And post lunch, we had to switch to another room because of availability problem.

I wish I had even audio recording of the complete session. I would have been a 5-6 episode TV Series. :D

I will talk about some "strange stories, amazing facts" about today's experience in my next post. It has grown too long right now.

Keep watching!

Sunday, May 18, 2008

"Ban on food exports from India fueled world prices", says Aiyar

Swaminathan S A Aiyar, in Times of India, writes that the ban on food exports form countries like India is one of the main reasons for the fueling of the prices across the world.

IMHO, every country will first protect its own interest than that of the world. That's what the "Western World" has been doing for ages.

During the British Territory days, East India Company / British Government always wanted the "Lagaan" irrespective of what was the state of the crops. They cared a damn about the weather. They cared a damn about whether crop was good or something wrong happened.

Now if the countries protect their own interests, what is the harm?

I object to Aiyar's article making this item as an agenda... an item to even think about.

Customizing Team Foundation Server

Yes, that's what I am doing for couple of days.

No, it's not about customizing how TFS works but looking at the integration points. In short, the TFS SDK.

The following items are the items on my radar immediately:
  • Customizing WorkItem Types
  • Creating custom fields
  • Creating custom UI controls during WorkItem display in Visual Studio
  • Creating custom check-in policies
  • And making all of them backed by some database?
Well, I have already worked with the first two items - creating custom fields and customizing WorkItem types, predominantly using custom fields and choosing the layout - several times.
Now, I need to master the remaining items.

And yes, it's mainly for Edujini™, my baby. So, what I promise is that once I am through with my experiments, I will publish them at Eduzine™ and Edujini Downloads™.

Saturday, May 17, 2008

Beggars and Beggary in India

Being a weekend, I had to complete several pending work items, for which I had to travel several parts of the city (Bangalore / Bengalooru, of course) today.

I was shocked and surprised to see the number of beggars "deployed" at the junctions / signals. The kids seem to have done well off - at least few things could not be made hidden - but are into beggary.

Looking at one of girls - somewhere in the age of 14-16yrs - my wife's remark was astonishing, "See, her face looks so fresh. Why can't she join a retail showroom". Though it may have been a bit exaggeration because at showrooms / malls, looks is not the only thing. "English" is also the other important thing, at least in Hindustan (Oh yes, it's better known as India).

Now, is the government and police doing to stop this "child labour"? Well, I read in some magazine / newspaper some time back that few "influential" and "connected" people are involved in the "business of beggary".

And if that is true, again, God save the Country!

Friday, May 16, 2008

Sad State of Indian Politics and Worse state in Security

The TOI article "Security scenario grim, admits Govt" comes as a shock to me.

Excerpt: "Briefing the Cabinet on Friday on the terror strikes on Jaipur, national security adviser M K Narayanan painted a grim, if accurate, scenario".

Now if - National Security Adviser - the top security person in the country expreses his inability to resolve the matters or even get the coordination between various parties involved - the Prime Minister's Office, State Governments, Research and Analysis Wind (RAW), Intelligence Bureau (IB) - how can you expect the "real men" to do their work effectively.

And added to this are two worse situations:
  • Home grown terror is increasing faster. Whatever be the actual groups, they are slowing creating or finding base within India itself. Now, if there's an insider doing all this work, it becomes impossible for the castle to be safe
  • The terror outfits are increasingly finding base along the eastern borders, specially, Bangladesh. I am not quite sure but I feel that ISI and other agencies still have the memories of East Pakistan and how it was freed as Bangladesh by India.
We really have to see how safe and secure we are.

And if the PMO is involved in just saving the face of the government, Gods save the country! I don't think even armed forces will be able to do it.

Wednesday, May 14, 2008

Room Setup for a Technical (IT) Training

When I started my day yesterday, I thought I would be going off to a great day ahead for my training.

The Monday evening, I was severely troubled because of the red-burning-eyes and severe headache caused due to inefficient and insufficient lighting in the training room. As such, I did nothing in the evening but took dinner and went off to a long sleep.

Reaching the venue, I noticed that not all machines were properly configured, yet. We spent another 1hr for the setup - just to ensure that we get going as quickly as possible and do not waste more time.
And by the end of the day, I figured out that we are running late by around 4hrs or so. Really, couldn't see any hope to recover that time anywhere.

So, here's a list of things that you must take care of before / during the training:
  • There should be appropriate and sufficient ligthing
  • There should be lights focussed at your laptop screen, to say the minimum, lest your eyes get strained
  • The screen should be sufficiently large
  • The maximum distance between the screen and the participant should be such that he is able to view any content / text / code written at font-size of 14-16.
If not, be prepare to strain yourself and get doomed!

Sunday, May 11, 2008

The new Rajiv Gandhi International Airport, Hyderabad

The new international aiport at Hyderabad is definitely a big chahge against the old one. Infact, I somehow found it better than the upgraded Mumbai airport. Probably, one of the reasons for that may be that the Mumbai airport - already an international one - was upgraded without changing the location. Whereas, at Hyderabad, it's a whole new location altogether.

Now, I would be eager to see how the new Bangalore airport fares as comparision to the other ones.
Frankly speaking, I do not have high hopes looking at the pace at which the things I have seen here for the last three years and the will power of the state government for looking into the long term.

Having said that, I still have decent hopes from the Public Private Parternship (PPP, as they call it in short).

So, waiting eagerly for the new airport to open. But yes, will be a little disappointed because of the distance. I will have to plan at least 4-5 hours in advance. Don't really know if I will get any benefit travelling to Hyderabad. Chennai - I anyway prefer the overnight train. Just lie down and enjoy the sleep.

Saturday, May 10, 2008

Trip to Airport

My training finished early today, because we were supposed to leave out some of the topics.

And I had to leave for the new airport at Hyderabad for my 8:45pm, errr.... 9:45pm flight. Yes, that's where the fun is!

There were three options for me:
  • Take an auto rickshaw all the way to the airport
  • Take a taxi all the way to the airport
  • Take an auto / taxi to either the old airport or to a place called Mehdipatnam, and catch the AeroExpress bus to the airport.
When I left my hotel room, I had 9:45pm in my mind. And I thought, let's have fun! Haven't done adventure trips for a long time now.

So, finalized on the last option.

Left the room at around 5:30pm. Got into the auto rickshaw and reached Mehdipatnam at, surprisingly, around 6 o'clock.

And I was feeling a little hungry. And also noting that the Air Deccan flight, well - the last option left for me, does not serve dinner. Hey, after all it's a low cost, no-frills carrier. Getting down from the auto, I enquired about the departure place for the bus. And then, I suddenly saw a host of eatouts attracting me to have something in the snacks.

I fed myself with a plate of chicken noodles, and got a water bottle for the way.

Now put yourself in my shoes and imagine that you start walking down to the bus-stop. You start walking down instead of taking another auto because you find that, firstly, the place is only about 1km away and secondly, the rickshaws are charging an earth. Asking few traffic policemen and local people, you are finally nearing the bus-stop.

As you are about to reach the stop - it's only 50m left, you see the big, blue AeroExpress starting to move. It won't help screaming or yelling because there's a lot of traffic and the driver is well seated in the air conditioned bus.

And whoosh! The bus is gone. :(

You ask the incharge about the next bus. He tells 7 o'clock. And adds, "It will reach the airport in the next one hour." You start thinking hard, "Should I take an auto from here now."

You ask, "How much with the auto charge."

"They charge Rs 300", he responds.

And you are stunned!

Added to that, you think, "Oh! No. The flight is at 8:45pm and the bus starts at 7pm." (Go back to the second paragraph, and you now know the catch.)

What do you do now? You say, "Ok. Let's wait."

You open the laptop and start writing this blog entry, waiting for the 7pm bus. You anxiously open the mail to confirm the ticket timings. You have won! It's 9:45 and not 8:45. You are relieved.

And then the shocker. At 6:58, the incharge tells you that there has been technical fault with the scheduled bus. The next will arrive at 7:30pm. He, out of care and worry, enquires you about the time. You respond, "No problem. My flight is at 9:45pm."

You connect to the internet and post this entry!

The worst state of Indian Politics?

I have never heard a statement as shameful as the one issued by one of the ex-Prime Ministers of India yesterday. Well, I learnt this at CNN IBN.

He says, "Will wait to be approached by the winning party".

I don't really know what he meant. But whatever little or better understanding that I have, what he means to say is, "I cannot win of my own. But I want to be either in power or very close to the power.
I want to be either the king (but cannot do it directly since I cannot win) or the king-maker. So, don't forget me."

I consider it "A Shame!".

I wish we had something good.

At the moment, all I can say and urge, specially the young Indians and the large pool of Software Engineers, IT Professionals, BPO Executives and other literates, "Please! Get up. Go out. Vote!"

Friday, May 9, 2008

Indian Cricket and Sports

There is one thing that Indian media has done to the cricket. They have removed it from the "list of sports". I think there would be no channel that does not say "Criket News" followed by "Sports News". Guddie! :)

But what has worried me is the partiality in coverage.

When Zee Sports announced Indian Cricket League (ICL) with Kapil Dev, one of the greatest captains of the Indian cricket team and the only one to get the World Cup home, it got a very little coverage in any form of media.

Even in the leading daily, The Times of India, I would find only a couple of paragraphs lying in some corner of the page.

Now come Indian Premier League (IPL), and all forms of media cover it.

Why is that the cricket promoted by Kapil Dev is not worth coverage while the one that resulted in "sale of crickets" is for everything.

In fact, I say, "Wow! Human beings auctioned". I thought that till now only antiques, animals, buildings etc were auctioned.

So, do these cricketers fall in any of these categories? Or they are just cricketers, playing cricket which, by the standards of India media does not fall in the category of sports.

Whatever be it, I am truly enjoying the fun. I'm enjoying the cricket - I enjoyed ICL and now am enjoying IPL. And then, I enjoy tennis and the recent controveries in it. I enjoy Premier Hockey League (PHL) and the recent controversies in Indian National Hockey. I enjoyed recent interest in Football.

Thanks to Zee Sports for reviving several sports. And thanks to Zee Sports to put up a face against BCCI, which simply fails to be answerable because it considers itself a private authority controlling Indian Cricket. And thanks to Zee Sports' ICL - because it was only because of ICL that IPL became a reality where human beings were auctioned!

Who does not love controversies? Mirch Masala, eh! :)

Flex, Panel and Focus

I really can't get this one working. And it's really frustrating.

A very simple task... use tabs to change the focus across the panels. I have "tabEnabled = true" and "tabIndex = {appropriate-index}". Still, a sad state. Now I am worried if the tab really works with Panel.

If you know the solution, please do write in. Well, I don't even know if anybody is reading me!

Thursday, May 8, 2008

I should not become obsolete

I started my day today on a slightly lazy note. Having spent a late night-out yesterday, it seemed like a never ending sleep in the morning. But then, it's the work that does something weird to me - all my sleep is gone.

At times I wonder and find lucky of the guys who are into software development or otherwise. Lucky that they get and wonder how they get, all the time in the world to update their daily diary.

Over a period of time, life and work tends to become monotonous. But, not surprisingly, that is never a case with a trainer. The moment a trainer fails to update himself, he may be losing the race. Specially so with trainers in IT. Poor guys like me always on the run. I know I have to reinvent myself daily.

During my sleep at night, several changes may have happened to the IT world. I must ensure I do not become obsolete. The moment I become one, I would be a waste -- read to be garbage collected. And that's one of the primary reasons I don't a time to "update my daily diary".

Meanwhile, several changes have happened in the company recently. Right from team to structure to tie-ups and joint-ventures. Now, do I sound big? Well, not really.

Wednesday, May 7, 2008

Arrangements by an air-carrier... what a shame!

I happened to travel from Bangalore to Hyderabad last weekend. Since I had a hectic schedule during day, I booked the 10pm JetLite flight. Upon reaching the airport, I was informed that the flight is late by 50 minutes.

That's ok... given that flights are no better than Indian Railways in terms of timings, at least most of them if not all.

Well, the flight landed at 11pm. We were able to depart only by around 11:45pm, for whatever reasons. Landed Hyderabad at 12:40am or so.

And the best part is... there was only one bus carrier to take us to the port from the flight. I think I'll upload the video that I captured. It's almost 1am in the morning and what the passengers are expected to do -- stand and wait for the pickup vehicle. What a shame!

I took JetLite (the erstwhile Sahara Airlines) after a couple of years... in emergency and hoping that after being in the Jet stable it would have improved. Not a single sign!!

Sunday, May 4, 2008

Hello, World!

Finally, I got some time - albeit just past midnight - to look into Facebook API. And as history goes with me, I was looking for that "Hello, World!" application.

And then my Mindless Mind©... once again thought of asking Google to show about some interesting things about "Hello, World!". Well, basically, I was searching for the original code -- no, no, not the "Programming in C" by K&R -- but the one at Bell Labs, by Kernighan in "Programming in C: A Tutorial".

I got some really nice references, listed below, worth looking into:

Friday, May 2, 2008

Scaling out to 200million hits per day

Today I happened to have a discussion with one of the "core team" members of a startup in USA (don't ask me what that is up to -- I'm never gonna tell that).

Anyway.. the interesting part of the discussion was how to go about designing and implementing a system to support an average of 200 million hits per day. A big number? Well, if we translate it to lower base, it turns out to be lower than 2500 hits per second.

Of course, you need a cluster - web-server cluster, load-balancer, sticky-sessions (to be avoided completely), distributed database, machine configuration etc etc etc.

The real questions are:
  • Which programming language to choose?
  • Which database to go for?
  • Which file-system to use?
  • What about the caching?
  • What should the load-balancer be and how should it be configured?
I have got answers to almost all - based on whatever systems I have studies on the basis of case studies on the web, feedback from my friends who have worked in those "big" companies with such implementations.

Have a look at the discussion on Facebook here. And then I found some great for MySQL here. And finally, I linked PHP and MySQL with memcached.

Finally, I came down to a conclusion... let me take a nap. I will think over this, analyze this and do some experimentation... I hope to publish at least some of the useful findings.

A start... yet again?

Should I say that I am giving a yet another fresh start to my blogs?

I think it does make a sense to say that. Especially noting that now I am a married man.

So, I made up a resolution in the new life -- arey baba, post-marriage life --  that I will have one post every fortnight. That is, to start with.
Once I regain my original glory of writing diary, I intend to be more general and generous.

... It's time to get started. What now? Expect another entry pretty soon.