Tuesday, December 16, 2008

create your own twitter client

I this video somewhere...

You can create a twitter mobile widget by drag and drop :)

Thursday, December 4, 2008

GridMACD FOREX Algorithm Explored for Meta Trader

Ive been lost in GridMACD Forex trading algorithm and I tried to explore it more and more.

Then I just came across this wonderful flowchart.

Then I came across someone who added another logic to enhance it for better performance. (none other than my brother Johan from Indonesia!)

Will someone be interested to write an OPEN SOURCE version until I write it?

Click on the image for a larger view

Thursday, November 27, 2008

Barcamp Pune 5

I'm going to speak at Barcamp Pune 5.

I will be talking about a framework on mobile phones and the topic is:
Building Enterprise Mobile applications without programming.

Some interesting topics I'd like to listen to:

Microsoft Windows Mobile Development - Mayur Tendulkar
Rapid Robotics Development using Microsoft Robotics Studio - Nikhil Dandeker
Mobility application development with moblin - Sachin Kelkar Intel
Performance Tunning on Application Server -Tara Lodh

Sunday, November 9, 2008

Yes I'm lazy

I'm known to be a lazy person. The whole world tells me, I tell myself. But what to do.

Here are some TOP secrets to cope up with my lazy attitude while running an enterprise solution..

1) I don't re-invent the wheel. I use what is available. 'Google it' is my favorite dialogue. People misunderstand this with lack of creativity but whats so wise in doing something already done!

2) Use open source. I just love open source. Everyone who believes in open source are my team mates.

3) Automate. This is perhaps my one word advice to ALL. Try to automate everything. Try to make it "one touch and done". (If I could, I would have automated something to scratch my back...ha ha ha .. ok back to serious stuff)

4) Plan to be lazy from the start: Always design to scale and make it generic. Always think of huge numbers. Assume double the size of scale than the scope. Always make your designs generic to adapt to change at minimal cost and time factor. Some tips for young lazy enthusiasts.

5) Sometimes things may have to be manual, Use monitors - Open source monitoring tools are available at call. Use them. They are quite good.

6) Use schedulers. I must admit, many of my emails are just scheduled to send out automated replies. I just type them and choose date/time for sending. Let your clients feel you're there for them 24/7/366!

7) Test your apps. I believe in thorough testing and benchmarking. Believe me all the clients should know this. Don't release anything just for the sake of releasing, it has a bad impression about your quality of work even though you may have won the battle by delivering on time.

8) Communicate when needed -Here's another tip to be laze around. Communicate with the fastest channel. It may cost a bit, but it will buy you a lot of laziness to enjoy with! Trust me, it works...

9) Use the proper tools and technology. Don't pick up some xyz technology just because you know it. My experience says that its a mirage of laziness. If at a point your xyz technology is not suitable for the client, the client will take away your laziness..

10) Now that you have so much time to laze around, try to find more ways to be lazy..Facebook, orkut, You don't have to be so hard. Just laze around all the more...

Monday, October 20, 2008

Rediff.com Coding Standards: An Analysis

By Hussain Fakhruddin


Rediff has a lot of portals within its main portal.

This is how they organize their re-usable code.

The first thing I did is logged on to: http://indian-railways.rediff.com/

I opened my Fire Fox’s Error Console and found this:

The next thing I did was to open up the source code:

I was shocked. I could really figure out that this type of code was

1) Written by just “Jugard” of code from their own paces here and there!

2) Not at all reviewed!

3) Done in haste to meet the deadlines!

I will put some screenshots to prove my point:(Please enlarge them as needed)

  1. Are these written by the same programmer?

Subsequent lines of code, but one in caps and other in small.
- Seems like they have just copied it from some previous page.

  1. Dirty CSS to look good? : Reuse of CSS codes, but not at all arranged in a proper manner. They are probably using the code which is lying here and there.

  1. Code lying here and there + insert what is needed and get the things done!

  1. JavaScript in the middle of an external CSS.
    Why not place it together along with the code above!

  1. Just Wow: Internal JS > CSS > External JS > Internal JS
    CSS surrounded between JavaScript and JavaScript surrounded between CSS!

  1. Where are your code conventions Mr. Rediff?
    See the CSS classname ‘Naming standards’

  1. Rediff’s way of importing external JS!

They are using JavaScript to import another JavaScript code!
Look carefully!

  1. Debugging debris remains…

  1. Reuse the code, but not in the same page man!
    I saw this CSS defined AGAIN somewhere below the code!
  2. What a waste of memory!
    Everything commented inside the function, what does this function do then?!

  1. Agreed we all use broadband, but what a waste of Bandwidth?

Why so many wide spaces!

Don’t you guys know browser ignores them but bandwidth network doesn’t!

  1. Broken Link

Wanna report?

  1. Total time over 512KBPS
    No comments!

  1. 19 Requests to the server! Woah!
    Thank you that I have an advance browser to do these for me!

  1. So many DNS resolutions
    My ISP might think I am doing a DNS attack!

16. Best of all:
Around 8 MB of Memory occupied by just 41KB of HTML code!

Thursday, September 25, 2008

Life without Apache : Meritocracy in Action.

I am obsessed with Apache. Yes! I am and I am proud that I am!

I was just wondering how life would be WITHOUT Apache!

  • We would still be doing ASP. Many of us would have gone into ASPX and C#

  • CGI and PHP wouldn't have come out..

  • Total no. of websites in the world would be less. I don't know how much % but yes, it would surely be less.

  • There would all be Windows Hosting Services everywhere and the prices would be higher and higher...

  • Who can forget the popular Tomcat. Java wasn't open source before, other app servers were not that comfortable interms of price, simplicity and ease of use. Every newbie in JSP/Servlet starts with Tomcat. People crib that Tomcat doesn't have EJB, who needs EJB these days?

  • No Java projects would compile using Make, so Ant came it. Imagine how difficult life would be without ANT scripts.

  • MVC the most popular design pattern: Struts is the name you think of. If it weren't there, you'd still be writing your own servlets and JSP and controller logic.

  • Almost 80-90% of GOOD Java EE developers would use Apache Commons. I mean who doesn't use it?

  • Logging your application for debug and support, What would you do without Apache Logging Sevices

  • Forget all programming, there is still no comparision with Xerces for XML. I challenge.

  • Make your code as Webservice? No words about Axis, yet again apache product!

  • You want a middleware java messaging framework for your JMS? Use ActiveMQ

  • Object relation model: Try iBatis, you wont leave it again.

All in all, If there was no Apache, Life wouldn't have stopped but would have been SO SO damn difficult. My many many thanks to Apache...

Some Javascript Tips

I have been doing a lot of JavaScript these days. Each day I learn newer things and each day I am starting to like it more and more.

I am going to compile a few queries where I broke my head.

Q) If I do window.open('anotherPage.html'), How can I change the DOM of the parent window.
This problem arrived when I was trying to add more rows to a table from another window itself.
Problem: Firefox allows it. But IE doesn't allow.
Solution: Use cloneNode() for FF. For IE , create the row again by attachRow()
Now for each cell, loop through it and do insertCells() and then copy the innerHTML to it.
All this is done in a simple loop through the table.

Q I have 3 frames on a page, I want to submit requests to page 2 and 3 at the same time
Do: document.forms[2].functionName();
yes, its as easy as this...
in your functionName(), you can add code to submit the form.submit();

Q Recursive Ajax calls.
Problem: To keep refreshing content of a page through Ajax.
One might typically use setInterval() but what if setInterval fires while a request from your ajax is coming back?
Solution: Use a global variable called "lock". Everytime you make a request set this lock, the call back function should release the lock.
When setInterval fires your ajax request function it should exit if its locked.

Q. getElementById('idname'). Don't use it too often, Try to traverse though the DOM by your code.

Q. Always give IDs to your form. Someday you'll find that this is very useful. You can submit a form from anywhere if you do this by getting the refrence of the form and then yourform.submit()

Q. Try to avoid excess IDs, This will occupy more browser memory interms of DOM parsing.
For example, If you have a table, don't give ID to each row. instead give the id to the table and then traverse the table.

Q. Do overuse Ajax and submit multiple requests simultaneously. Browser might allow this, but your database will not. Specially when you're doing connection pooling. In connection pooling , you have the same connection object and multiple execution of sql queries on the same object from different clients will result in failed transactions.

Q. attaching events is a good idea , but beware, IE and FF behaves differently. The API is completely different.

Q. Always use a common Javascript Browser detection Module. Make the detected browser global and then customize your scripts that way.

Q. Often while debugging we use alert("debug msg here.."); and waste time in commenting and uncommenting it. Instead use a global variable called "debug=true". And use if (debug) alert("");
You wont have to comment or uncomment it all the time.

Q. There are some good Javascript debuggers. Use them. The simplest one is FF error console. But what about IE? Yes, now you can use FF error console to debug IE related Errors too.. Install the FF IE tab plugin and have fun.

Q. Another great FF extension is Firebug. MUST MUST have for all you JS guys....

Saturday, September 13, 2008

PHP Camp 2008

Barcamp, BlogCamp.... and now Introducing PHPCamp

I am attending PHP Camp on 20th Sept 2008. I will be presenting on

PHP Vs Java:But I love them both...

Tuesday, July 1, 2008

Practical DWR Guidelines

I have written a Paper on Practical DWR (Direct Web Remoting) Guidelines. You'll enjoy it if you're a J2EE guy who wants to do some Ajax.

Saturday, June 14, 2008

Hussu Linux: DWR : Direct Web Remoting

Hussu Linux: DWR : Direct Web Remoting

DWR : Direct Web Remoting

Direct Web Remoting or DWR is the future for Ajax and Java.
DWR is a tool which allows you to invoke a Java Method residing on your AppServer from the browser through JavaScript.

Here's a little introduction about it and a small tutorial which you can try out.
You will also find all the necessary ingredients' links as you move along.

Thursday, May 15, 2008

TIBCO GI (General Interface) : A boon for Open Source RIA

Tibco GI is cool.
Tibco GI is fascinating.

Tibco GI (General Interface) is a small little tool for building RIA.
The most amazing part of TIBCO GI is that it provides a fine IDE. And the IDE itself is built on the same framework. You don't need any installer to run the IDE except a standard browser. And yes, ANY browser. I have tested with IE and Firefox and it runs smooth!
I have used Flash, I have used Ajax, I have used Flex, I have used Laszlo.. I like them all but I like this GI a lot! I always say : Rich User Interface = Rich User Experience! And TIBCO GI is quite satisfactory in that.

I would like to mention some cool things you can do with TIBCO GI:

- Integrate it with all major J2EE Frameworks: Struts 1.1, 2.0, Spring etc etc....
Links for some tutorials:

- Javascript based: Runs on browser, no other downloads required.

- One page application: Just like flex, Single Page Application.

- Drag and Drop IDE: Just like flex builder, Drag and Drop Components and do lots of stuff with them. What's more, remember the old days with VB6, It provides an IDE just like VB!

- Javascript: Organize all your business logic in Javascript. Add javascript functions and just call them from component's events. Yes, the components have events and they can call other javascript functions or directly write code into that.

- Java Like API: If you download and goto the help section, You'll see all the API's are well structured Java Classes. Very well documented.

- COOL TOOLS: I must say some really really cool tools: Everyone knows how difficult it is to debug javascript(Until firefox came out with an Error Console) . TIBCO GI provides a small window where you can paste your JavaScript code and it can run it for you! No need to write functions! I use this for checking some external JavaScripts too!

- Error console. Before you actually deploy your application, the IDE checks all the javascript errors for you and lists them out.

- Another cool tool: XML Mapping. TIBCO GI has thought for Web 3.0. When websites become webservices. Expose all your business logic on webservice and call them by a WSDL. You can drag and drop your components to say what's gonna be your input and what's gonna be your output. You really gotta try this!!!

- Integrates quite well with All other TiBCO Products like TIbco Businessworks, Iprocess etc.

- Charting: Add in components provide a bundled set of charting tools. You will really like it if you're into charting. It can give tough competition to FLEX Charting!

- The TibCO framework size is just around 350 KB. Bye bye dial up users. Web 2.0 is not for you!

- Lastly, TIBCO is open souce. I love open source. I have been into open source for quite sometime and something like this is really a boon for RIA World.

Saturday, April 19, 2008

A challenge to non-vegetarian, if they can contradict the answer

I'm a strict vegetarian as a result, I'm always taunted. I always felt embarrassed. I always used to think that why in our religion we are asked to have vegetarian diet and not the non-vegetarian diet. As all the non- vegetarians used to tell the various benefits of non-vegetarian food. I used to feel that there should be some very strong reason that why vegetarian food is preferred. Something which can make all other reasons appears trivial. I always used to search for that reason.

But, after surfing a lot of internet I have finally got a possible answer. The very reason of why we eat food is the answer to this question i.e. the survival of the human being on this earth.

I have found on many websites which says that eating meat causes increase in the global warming. Probably all the readers must be knowing that if the temperature of our earth increase by few more degrees then our planet will become like any other planet. Then, probably the aliens (if they exist) from other planets will come and search for evidence of life as we search for evidence of life on mars and moon.

All this happens because of the concept which I had read in my ninth-tenth standard. I won't go in science of the concept. But, in the laymen terms I will say that from a plant to animal and from animal to animal only 1% of the total energy is transferred.
For example:

If we need 3000 calories per day and from each plant only 1000 calories is obtained. Then we need to eat only three plants.

But suppose if we eat beef rather than plants which can give say 3000 calories. Then most of you will think that the beef is a better option. But, I would like to say that for accumulating those 3000 calories we would have to feed cow at least 300 plants which means that we need more space and energy to feed one person.

Now greater the energy used, then greater will be the demand for energy and greater will be the burden on our natural fuel resources and hence greater would be the production of the greenhouse gases.

So, with greater consumption of meat, there would be more and more increase in greenhouse gases which will make the global warming condition worse.

Now, I think you all can conclude that by maintaining a vegetarian diet we are actually saving ourselves.

However, probably one may point out that what about the various diseases at which we all are at risk if eating of non-vegetarian food is stopped. To this point, I would like to say that many people in India are vegetarian and all those who take a balanced vegetarian diet with regular exercise always live a healthy life.

Saturday, February 23, 2008

Meta Trader 4 : Auto Forex Trading Platform

I took a session on MT4 in Barcamp Pune 4. Here are the slides

Monday, February 18, 2008

Barcamp Kolkata : Why Kolkata still doesn't have a Barcamp

Why Kolkata still doesn't have a Barcamp

October 2007, I went to Kolkata for a conference called WebOSS '07 and I can probably make out why there's no way Kolkata can have a barcamp in near future. I tried to carry out a Barcamp in Kolkata. My sympathies to the wonderful city where I grew up.

1. What is BarCamp? A 'Drinking Bar' may be...I'm not interested.
2. People don't know what a WIKI is. They don't know how to edit it despite the instructions.
3. No one willing to take the effort. They have all the time to sleep.
4. The so called 'open source' community sucks big time. The so called HEAD of LUG group look out for publicity more than helping to get a job done. I am not afraid to take the name of Krishnendu Paul who promised and suddenly disappeared.
5. The student community is suppressed by the colleges.
6. The colleges are more interested in Placements rather than knowledge sharing.
7. College professors are trying to get some freelance projects all the time.
8. Big shots like IBM, TCS etc. are least bothered to even have a look.
9. Free T-shirts = Bring in all your friends and leave in next 1 hour.
10. Free food = hog as much as you want.
11. The IT dept of the government want to just hold on conferences and publicity stunts to make their place in the newspaper. I am again not afraid to blame the minister for not checking his Mailbox which is always full. And also to be not available to common people without a PROTOCOL!
11. What is sponsorship? What will I gain. How many people are going to come? This is the question which all news/publicity media ask!
12. Lastly, Who's wanting to spoil their weekend!

Way to go Kolkata, I don't see a Barcamp Kolkata until some revolutionary thing happen!
Dear City of Joy, I left you some time back and I don't feel like returning!

Saturday, February 16, 2008

Barcamp Pune 4

"Barcamp Pune 4: Love for technology" took place today at Thoughtworks Pune.
I gave a workshop on PHP & Ajax along with Priyank. This time I didn't develop any website but rather a Proxy server using PHP!
We also conducted a BOF session on PHP and Ajax Security and Meta Trader the online forex platform.

Get some pics here:

Barcamp Pune 4 Logo

PHP & Ajax workshop

Barcamp schedule.

Preparing for workshop

Slides and Video to come next..

Sunday, February 10, 2008

Gnunify 2008 Pics 2

With David Axmark, Co-Founder of MySQL

With Robert Adkins, Alolita Sharma and Manish Singh

Me, Manish, BC Shekhar, Shridhar

Helping Hand?

In Atul Kahate's Session

Saturday, February 9, 2008

Gnunify 2008 Pics 1

Rush to get inside my workshop I

Rush to get inside my workshop II

Gnunify 2008 Ajax Workshop

I attended GNUnify today took a 3 hour workshop on PHP and Ajax. The session was jam packed with people. Here are some pictures.

Gnunify 2008 Banner

With Volunteers


Workshop that I took

Me, conducting the workshop

Workshop scene.

More pictures to come soon..

Thursday, February 7, 2008

Gnunify 2008

I am going to speak in Gnunify 2008. This is a yearly event organized by students of Symbiosis Institute of computer studies and Research(SICSR), Pune. The event is a dedication towards Open Source.

I am going to take a workshop on PHP & Ajax.

Catch up some more events at : www.gnunify.in

Will keep updating about the events.