Netbeans – My Favorite IDE

Netbeans is my favourite IDE when it comes to Java. Although its too slow but the way it arranges stuff for me is quite COOL!

Some facts that I have noticed so far:

1. It takes request from doGet or doPost and sends it to another method. So it doesn’t matter if the parameters come from GET or POST, you simple work with them! (Really cool for beginners)

2. It creates a dist directory for each project which means you don’t have to explicitly make any such deployment folder. You’ll never want a WAR file unless really required. Just copy the contents of this folder and paste it to your deployment folder.

3. It has also got this feature of starting and stopping the bundled Apache Tomcat server as and when required. You can even configure server’s port with a GUI which netbeans provides.

4. Netbeans mobility pack is just so awesome. Just drag and drop all basic components(reminds me of VB6).

5. Netbeans generates codes for such UML style drag drop behind the scene. Its got this wonderful feature called as Lazy Initialized. This feature is a coding style where the main thread will not initialize all the form elements instead call methods as an when the form/component is required.
I personally find this very interesting as when I program in J2ME, Its really good to initialize the forms as and when the user needs them. For example: Why would you initialize a form which contains About & Version infomation. It will use up unnecessary space if that form was never visited!

6. Netbeans can also adhere to different Mobile environments and JDKs. For example, If you have a Black Berry’s JDE installed, you can make netbeans to compile/run/use Black Berry’s APIs. Which means you work with your favourite editor even if the platforms differ.
My Netbeans is configured with mobility pack which has configured sun’s WTK 2.2, Black Berry JDE 4.1 & JDE 4.2.

7. If you’re connected to the internet, netbeans’ welcome page displays latest happennings with Blogs, articiles posted daily. I always make a point to check out whats the latest there!

8. The overall look and feel is quite good. I have been using it since v.4.x and it has improved a lot.

Although Netbeans is slow(Tell me which one is not!), I’ll still give it preference over any other IDE available for the complete Java Technology I.e Java SE, Java EE and Java ME platform. I wont give preference to Eclipse (from where netbeans has derived!).

Flash and JavaScript Integration

Flash and JavaScript Integration

Follow these easy steps to make flash communicate with JavaScript code and vice versa.

a) Flash to JavaScript: Making Flash call a JavaScript function

JavaScript Function Code. To be put in the HTML

<script language=”JavaScript”>
function alertMe(){
alert(“Hello, world”);
}
</script>

Flash Code. To be put in any event of button, frame, where ever required:

import flash.external.ExternalInterface;
function callJavaScript(){
ExternalInterface.call(“alertMe”);
}

Please note that due to default security these codes will not work if the flash is loaded locally.
To test this, you will either need to upload your .swf and .html to a server and request the files from the server.
OR you will need to set the global security settings( Google it to know how!)

b) JavaScript to Flash : Making JavaScript call a Flash Function.

Flash function code that needs to be called:

import flash.external.ExternalInterface;
function startPlaying(){
play();
}
ExternalInterface.addCallback(“startPlaying”, this, startPlaying);

Java Script code to call the method in the flash:

<script language=”JavaScript”>
var myflashref;
function getReference(){
if (navigator.appName.indexOf(“Microsoft”) != -1 )
myflashref = window.flashObject;
else
myflashref = window.document.flashObject;
}
function playFlash(){
getReference(); //getting the flash reference.
myflashref.startPlaying(); //call the method in the flash
}
</script>

Well, I leave it up to you now to do some R&D and make data pass through flash and JavaScript and vice-versa!

Feel free to leave clarification requests.

GNUnify ’07 : My Experiences

GNUnify is a very sweet event that takes place at Symbiosis Institute of Computer studies and Research(SICSR), the very same place BARCAMP, Pune was held. I was glad to be a part of it on its 5th year on 27th and 28th January 2007. It gave me double pleasure! On the first day I was a volunteer while on the second day I was a speaker.

The event that attracted many students and IT professionals from Pune was very well organized and had a lot of good sessions. I myself conducted many installation sessions of Linux for novices on day one. I also managed to catch up some interesting sessions like “RIA with Lazlo” by Vijay Khambalkar and Debugging apps with GNU Debugger” by Prakash Varandani and some glimpses of jam packed session of Network Security by Atul Kahate.

The evening has a wonderful Networking Party at Symbiosis Institute of Management Sciences-SIMS poolside. Dinner was quite good with some interesting talks with Mr.Narain who had come from Chennai. I also managed to get a good number of pictures along with other volunteers.

Day two started with my workshop on LAMP(Linux Apache, MySQL and PHP) along with Gaurav Pant. It was a 2 hour workshop which lasted for over 3 hours. The very thing that surprised me was there were more number of people who were turned down due tounavailability of space. Instead of Gaurav and me taking simultaneous sessions, two separate tracks could have solved the problem. May be next year!

After I finished with my workshop, I managed to get into two more sessions: “Identity Management” by Pradeep Sinha and “Backup Management” by Anand Bhalve.

I really liked this product Amanda which Anand talked about. I was wondering to create a UI for that! At the end I attended Matt Barker’s session on the next version of Ubuntu called “Feisty Fawn”. He was like a rock star with all girls going crazy about having a photograph with him!

There were many sessions that I missed due to my own workshop.Session that I MISSED and REGRET were like of Tony Wasserman about “Management of Open Source Projects”, “Open Solaris” by “Moinak Ghosh”. Hopefully I will get to see them on the video recording.

Day-2 ended with a photo shoot of all the volunteers.

At the end, another successful event! Hope to see the same next year!

Feel Good

It feels really good after winning the technical quiz at I2IT.

On the first thought I never wanted to participate but when my friend Manish insisted, We formed a team and went there. It was a 3 day event. The questions were from all streams of computers and weren’t easy! The best thing I liked was the last round in which a caselet was given and one had to present a solution to the given problem in about 7 mins. We were given “Air Traffic Modelling”. I remembered my friend Naved doing a case study on Air Traffic System the very instance we got the caselet!

Finally there was an award ceremony where we were given certificates and a gift vouchers from crossword worth 2k(Atleast something as ROI).

Overall experience was good but really really poor management. Anyway, All’s well that ends well!

Steps to receive your bike from Railways.

Are you planning to move to another town with your bike? or Are you in another town and planning to get your bike by Railway’s Luggage and Parcel service. This blog is meant for you!

Today morning I got my bike- At LAST!

I am sorry as I wasn’t the person to book the bike in Indian Railways..(Thank God!). But I went to receive it.This was how I got my bike:

I took a platform ticket and went to the luggage room. There a person took my receipt and searched for the bike. Not found. We both went to search my bike on the platform. After searching 2 platforms we finally found my bike at a place very near to where people commit nuisance. Hopefully it was packed nicely.

The person who accompanied me stood by the side and said “Give me my share here itself”. “Chai” “Pani” are the most commonly used words. He asked for 50 bucks. I gave him 30 and said that even I could take my own bike from here. He agreed and we went to the luggage room from platform 5 to platform 1.

At the luggage room, they made a gate pass for me and another person accompanied me from luggage room to the road. I had to pay him another 30 bucks for just taking my bike out.
This person shook my bike and said “There’s a lot of petrol in here!”

I was shocked. When the bike was ported the tank was empty. How on earth can petrol go inside?!

We went ahead and there was a checking counter. Another man accompanied me. He said, I will take your bike outside. Just give me my “Chai” , “Pani” later. I agreed…

I left the gate pass with the gatekeeper and he took me to a higher official. On the way he said “There’s a lot of petrol in the bike”. I said “I never filled it”.

Higher officer came in and said “Open the tank”. I did. He shook and said “There is a lot of petrol. More than 1 litre”.

I said “But I never put the petrol in it. I can even show the receipt where it says the tank was empty when it was loaded on the train”.

He said : “So you think the railway will put petrol in it?” “Look sir, I have to fine you. I don’t leave people out of this checkpoint. ” ” Go to the court and pay 1000 bucks”. And he went to bring the fine receipt book.

The 3rd man who accompanied me took me aside and said “Look sir, don’t argue with him. Just give me 200 bucks and I will make things work for you. Don’t talk to him directly. I will make things OK for you.” “Sir, these people will cut the receipt if you argue with them”

I gave him 200 bucks and then he went to talk to “Higher Officer”. Suddenly he came back. For a second I felt that the officer didn’t agree. He came to me and said “Boss, Give me 50 bucks more”. I gave it immediately. He went and gave it to the Officer and took my bike outside.

After going outside he said “Come quickly, come quickly! See I saved so much money of yours. Now give me mine and I will leave. Give me 100.

I said “100 is too high. I will give 50.” and I took out 50 rs note and handed him.

He hesitated to such an extent that I had to take out another 20.

This is what actually happened:

Rule says: When your bike comes, it shouldn’t contain a drop of petrol. Fine for defaulters is 1000 bucks.

Railway ensures this by: During time time of acceptance, the officials check for the petrol tank is empty or not. The receipt handed over has it documented as “Petrol Tank EMPTY”.

When the bike is in railway’s custody. They somehow back force petrol inside the tank. The can even do that in the train(who knows!).

There is high amount of understanding between the railway and transport department regarding this. The transport authority or rather say “Higher Officer” never checked for any of my bike’s documents. Neither the registration, nor the NOC.

Question which would amaze anyone at first time:
How did the petrol go in there while at the time of booking one empties it and the OFFICERS assures it by documenting it as “Petrol Tank EMPTY”.

However I am amazed at: I had my bike’s keys, Still how did they manage to put the petrol in the tank? May be some day I would get to know this …. I am still in search for enlightenment….

So for all those who are bringing their bikes from their home town should do this :
While you’re in search for the bike. Instead of paying the man just 30 or 50, give him straight 200 bucks and tell him to take out all the petrol anyhow. This way you will save 200 bucks.

If anyone has any other bright ideas, please do comment to reduce the cost…

Pune Barcamp2

Pune Barcamp2 was simply fantastic! Organised in Symbiosis Institute of Computer Studies and Research last Saturday(16th Dec) was heard to be one of the most well managed Barcamp of its kind.

I wanted to speak but hadn’t registered myself. When I reached SICSR, I found one of the evening slot was still empty. Dibya inspired me to “JUST fill it in” and I did it! The topic was “RICH UI using FLASH + PHP +MySQL”

I wasn’t prepared at all! Went to a quieter place and started to prepare! After two hours I managed to modify some of my earlier animation and bring up something like a presentation!! Haha!!

Meanwhile I attended Freeman’s session. He was talking on “How to start a start up”. Nice talk. Wanted to know more of it but immediately was lunch break.

But somehow the lunch got delayed and I very quickly managed another session on Mobile Application. It was a nice session based on PDAs. The speaker was from TCS whose name I forgot.

Lunch followed. Nice fried rice and sweeties….

I had a session at 5pm but It somehow got preporned as Brajeshwar’s demo on Photoshop CS3 got postponed or I DUNNO! I talked the stuff which I had developed some time ago. One small flash weather widget which would fetch data from weather.com and also an online showroom which website which I did for West Mill USA shoe store.

I also showed some code in Actionscript and PHP.

My session was followed by Abdul Qabiz‘s talk on Apollo, the product coming up in 2007 by adobe.

Networking dinner followed at SIMS and this time I was a volunteer! some good amount of networking happened. Excellent food!


Thanks to the “So Called Organisers”, The volunteers(including me) and all the speakers and everyone!
Catch up some pics of the event…

I wonder Kolkata never had any such events?!! I am very serious in Organizing it in Kolkata!