Wednesday, May 18, 2005

Java in 21 Days!!!

Last week, at CityMart, I just sported the book "Sams Teach Yourself Java 2 in 21 Days, Professional Reference Edition", phew. Pouring over the book it was quite to my liking and I bought. Please with the purchase, I begen to go over Day 1, install the required software and make the required configurations. Compiled my very first Java application (suprisingly it wasn't your standard "Hello World" program, so I woulds assume that this book is pretty much aimed at a intermediate level, rather than for a beginner)... but could not run it. I was using the JDK provided by the book, which was verion 1.4.1. I was receiving a wierd error saying can't find "jvm.cfg", which was real funny. Posted that to the authors website, but didn't really get any reply. Being stuck, decided to move on and installed Sun ONE studio as provided on the disk and tried it. It's a way to simple IDE for this time and age. Didn't really like it. Hence decided to try the Eclipse IDE. The real cool thing about eclipse is that it's an open, extensible IDE with plugins available for almost anything you'd wish to do for. Much like Visual Studio .NET, which is also hihgly extensible (you can develop Python, Perl, Java etc in Visual Studio!)

I had to download both Eclipse 3.1 M6, and MyEclipse 3.8 which is required if you'd be developing Java. Eclipse alone is not that good enough for Java devlopement. MyEclipse seems to be super for devloping Java (for Enterpise Java), and after waiting for the download, I headed over to blogs and forums to see the latest cries and critism about Java IDEs. There was an imbalance in the Force, with the Evil Sun devloped NetBeans IDE gaining ground over Eclipse. Come to think of it, there's a lot of disturbance in the Force, as the two camps -- Java is pitted squarely against Mono, the former purported as a good and viable alternative to be adopted and standadized by the Gnome Foundation, while Miguel thinks Mono is better suited to be officially incorporated into Gnome. The verbal duels (over technology, ethics pluse business sense and safety) provides for a very good weekend reading. I'll follow this up with a jist, but before that, let me get back to me Java woes.

It seemed that I needed Java 1.4.2 for the version of Eclipse that I downloaded. I was about to download Sun's J2SE 1.4.2, when I noticed that J2EE was almost the same size as J2SE. So decided what the heck, since I have already got MyEclipse, which supporst J2EE developement, I got on to grabbing J2EE 1.4..2. When all done and installed I still had the exact same error.

Error: could not open `C:\Program Files\Java\j2re1.4.1_01\lib\i386\jvm.cfg'

Which was real funny, since it's refering to a i386 directory which would be untypical of Java. Hence I decided to run both the Javas that I got under the JDK 1.4.1 directory and the JDK 1.4.2 diretory. To my suprised, both run perfectly well. Tried, running eclipse again, and upon looking more closely, found that it was refering to a Java under C:\windows\system32\java. Hmmm, I run that directly and sure enough that was the culprit. But the thing was when googling for this error, I found absolutely no references. Seems like I am the only one with such an error. Would be posting that to but Sun's Developer Network, and lang.java.help and lang.java.development. My solution was just to rename both java.exe and javaw.exe, and also remove JDK 1.4.1 directory (since I already have the latest from the 1.4 branch) and run MyEclipse. It worked. That felt really good. Got presented with the Hello World tutorial to learn MyEclipse. Quite cool, if NetBeans going to be better than this, I can't even imagine how much the programming the world has changed, since I last coded (which was with Turbo C, in 1977).

Now, all this took one whole week, and I'll really need to ranch up the speed, if I am to finish the book in 21 Days..But... but. there seems to be more than 21 days in this Sams book, as the author, presumably to cover Java more properly added one more bonus week. That is 28 days in total.

On the Eclips vs. Netbeans front, the consensus among all developer including hardcare eclipse fans that, when it comes to Mobile (J2ME), Netbeans has some clear advantage due it's implementation of MDIP (Mobile Device Independent Profiler ), their main cry is that most customers wants the use of this profiler. On other grounds Netbeans converts claim that it now uses much less memory than Eclipse, and is only half the size to download, and most important of all it's faster and intuitive. Will update this a bit after I finish trying all the excersices in the book. So far Eclips 3.1with MyEclipse 3.8 just rocks.

Tuesday, May 10, 2005

Designing PCs the Ndiyo way: Build port replicator into the screen/display device.

Designing PCs the Ndiyo way: Build port replicator into the screen/display device.

After looking at the thin client concept from Ndiya(meaning 'yes' in swahali), which is basically Network In Video Out (NiVo) technology, it occured to me than even desktop PCs could be designed this way, and make life much simplier for administrators and users alike. So what we would have, in place of so many ports (Display, Sound, USB, Keyboard, Mice) at the rare of the PC, is just have one Ethernet Cable which connects to the PC; and the rest of the ports would be replicated back at the Monitor for easy accesss. Keyboards would be plugged into the Display, so would speakers and mice, even network ports could be replicated back on the Display which is more easily accessable. But it terms of an engineering perspective, how feasible is this? Lets look at the issues:

Motherboard Design
Since motherboards are already designed to have all these ports (and the electronics behind it) totaly integrated, cost would definitely go higher should it be redesinged so that these bits travel accross and ethernet jack, hence more electornics would be needed.

Screen/Display
Screens already have multiple ports (DVI/VGA),and adding an ethernet port with the electronics to convert back to graphics, keyboards and pointing devices would be cumbersome, and costly.

Limitations
May not be suitable for graphics intensive applications as there would be only so much data that can be compressed onto an ethernet jack so that it can be converted back into the bits necessary for display, or am I wrong here? I am after all, just a power user.

References.
www.ndiyo.com
www.osnews.com/
www.ravichhabra.com/blog