Monday, May 17, 2010

Perfect java IDE for beginners

We have many java IDEs. Netbeans, Eclipse, IntelliJ being the most popular.

I'm an ardent netbeans follower. But there was a pressing problem in my mind about IDEs. What is the best IDE for a beginner; for a person who learns java?

The problem with Netbeans, Eclipse and IntelliJ is that they are meant for adavanced programmers. They are production tools and not learning tools.
  1. They have cool yet 'not good for beginner' features like code completion
  2. They have a rather complicated 'project structure' for the code. In other words they are not meant to write small 1 page, 1 file programs.
  3. They are huge programs

Other option for the beginner is to program using a text editor, compile via command line. This is good but the beginner need to learn more 'techy' stufff like command line args, vim etc. This is very troublesome for the teacher.

So what we need a bare bone level IDE which
  1. Does not have code completion and support
  2. Facilitates writing short 1 page, 1 file programs without a complicated project structure.
  3. Can compile the code with a single click
  4. Should be smaller in size

Recently I came across 'Jcreator LE' which is free and crippled version. Yep that is crippled by removing features like code completion and that makes it the ideal IDE for learners.

Friday, November 20, 2009

VPN configurations for internet addicts

Preamble :

One of my friends have blogged on how he managed to connect via VPN and to generic internet in parallel.

http://tdevinda.blogspot.com/2009/11/whats-inside-what-virtualization.html

This ended up in bringing a nice discussion on routing, VPN and VMs.

Following is my solution.


Issue :

Under normal conditions; when you get connected to a VPN, it is not possible to get connected with the internet.

Reason:

When you get connected to the VPN, automatically it is set as the default route.


Solution:

  1. Once you are connected to VPN, remove the default route for VPN. Under linux vpn is normally tun0.
  2. Then add a default entry for your usual network interface. (eth0, ppp0, etc)
  3. Then add the routing entry for the specific IP or the subnet which you need to get connected through VPN for tun0

Friday, October 16, 2009

Installing IE 8

Installed IE 8 in my office pc. (Yes I do use Fedora in my laptop, but the PC at office is still windoz xp). I am an avid follower of firefox. But my job includes testing web pages in many browsers. Earlier I was using IE6. But it was a pain to use it as it had no tabs. So after putting it off for many months, finally I decided to have the plunge.

Installing was a pain. If I participated in testing IE8, I will never give OK for it. There are many improvements to be done.
1. Installing process is awfully lengthy. In fact, an OS can be installed within that time.
2. There is no progress bar in the installation dialog, only a scrolling green worm like bar. So you got no idea whether installtion is actually in progress or something has gone wrong and installer is not responding.

Functionality seems still OK. In fact I'm writing the blog, via IE8. :-)

Hats off for Linux

I decided to use Fedora in my Laptop. The biggest hindrence I had to shift to Fedora from Windoz is now solved. You can plug and play USB HSPA modems now. Now hassles, just plug it and it works, even faster than on windoz xp.

This facility is available in Fedora 11 and Ubuntu 9. Guess most of the new Linux like Oss should have this.

Sunday, August 16, 2009

C++ with netbeans

Few steps should be followed to integrate C++ with netbeans in Windows

1. Download and install MinGW
2. Download and install msys

  • MinGW is the C/C++ compiler
  • Msys is some kind of a unix emulator. After installing it and setting it in the path system variable, you can input unix commands such as mkdir, ls in the dos prompt. This is needed as makefile in C++ needs to access unix commands.

3. In the compile command dialog in netbeans provide the MinGW bin directory for base. Then it will identify C and C++ compilers other than the makefile. You need to provide the makefile.exe in msys/bin as the makefile location.

Then as the K&R said in their famouse C book, "if you have not botched anything, it should work" :-)

Saturday, August 15, 2009

JSP importing class and jar files

Using java class files in jsp files

1. Put the class files in WEB-INF/classes/ folder

2. Import the class as <%@page import="."%>

3. Call that class as you would do in a normal java program

eg:

<%@page import="test.Hello"%>

<%
Hello heloo = new Hello();
String myName = heloo.SayName();
out.println("From scriptlet : "+ myName + "\n");
%>





Using a jar file in jsp

1. Put the jar file in lib folder.

2. Import the jar file as <%@page import=".*"%>

3. Call the class as .

eg:

<%@page import="jarTest.*"%>

<%
jartest.Main m = new jartest.Main();
String name = m.getName("Pinda");
out.println(name);
%>


Monday, August 10, 2009

Vive la Netbeans

Following day's I was completely worries and frustrated with my bad experience on web services with Eclipse plugging for Axis.

Found a solution today. It is netbeans. Really nice and I love the way it creates the implementation from wsdl file.