Monthly Archives: October 2005

Eclipse Tool Tip #3: Code Perspective

Even though I have two monitors, I need to utilize every possible dpi of IDE real estate. Eclipse has provides for different perspectives such as Debug and Java but it does not matter what perspective I am using, I am most interested in the code. To focus on the code select the source [...]

Posted in IDE, TechKnow | Leave a comment

Put JavaScript To Sleep

Every Java programmer will tell you that you can pause a program using the sleep static method of the Thread class.

Thread.sleep(milliseconds);

JavaScript does not have a wait or sleep method but instead provides the setTimeout and setInterval functions. Here is some JavaScript code to demonstrate the setTimeout function:

setTimeout(’alert("Hello, World")’, 4000);
alert(’Hello, Web’);

The Hello, World message will [...]

Posted in Java, JavaScript, TechKnow | 4 Comments

Hard To Debug

Whenever I start debugging the struts based web application I am working on the server freezes. I am using JBoss/Tomcat with Struts 1.1 and Eclipse 3.1. Since I can’t fire up the debugger, mark breakpoints, and set expressions I fell back to the tried and tested ‘printf method of debugging’. I call it [...]

Posted in IDE, Java, TechKnow | Leave a comment

Yes Comments

There is more than one way to say it. A rose in any other name is still a rose, or better yet a comment in any other language is still a comment. Every C++ and Java programmer will tell you that end of line comments start with two forward slashes such as:

// This [...]

Posted in HTML/XML, Java, Ruby, TechKnow, Visual Basic | Leave a comment

Random Shell Script

Welcome to the random shell script of the week! This shell script is trivial but useful, especially if you don’t write this kind of stuff every other day. The following shell script will iterate over every file in the current directory and print the filename out.

#!/bin/sh

for file in ./*
do
echo "$file"
done

You [...]

Posted in TechKnow | Leave a comment

Ruby On Rails, J2EE On Dope

I remember those ‘this is your brain on drugs’ commercials from back in the day when they showed an egg in a frying pan. Well, having worked on a J2EE project and following programming developments I feel that many developers feel like this after a big J2EE project. There is a paradigm shift [...]

Posted in Rant, TechKnow | Leave a comment