The input line is too long - Windows command line error

Today I wanted to run the bat file shown below to run a java program. This file is mainly used to set the classpath as you can see below.

@echo off
setlocal

set BROKER_HOME=C:/Documents and Settings/user/workspace/myProject

set CP=%BROKER_HOME%/out/lib/activation-1.0.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/activeio-2.1.jar;%CP%
set CP=%BROKER_HOME%/out/lib/axis.jar;%CP%
set CP=%BROKER_HOME%/out/lib/axis.ns.jar;%CP%
set CP=%BROKER_HOME%/out/lib/axis.org.jar;%CP%
set CP=%BROKER_HOME%/out/lib/axis-ant.jar;%CP%
set CP=%BROKER_HOME%/out/lib/connector.jar;%CP%
set CP=%BROKER_HOME%/out/lib/csv.jar;%CP%
set CP=%BROKER_HOME%/out/lib/csvman.jar;%CP%
set CP=%BROKER_HOME%/out/lib/jakarta-oro-2.0.8.jar;%CP%
set CP=%BROKER_HOME%/out/lib/jaxrpc.jar;%CP%
set CP=%BROKER_HOME%/out/lib/jmxri-1.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/jmxtools-1.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/log4j-1.2.8.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mail.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/backport-util-concurrent-3.0.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/commons-beanutils-1.7.0.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/commons-codec-1.3.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/commons-collections-3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/commons-digester-1.7.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/commons-discovery-0.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/commons-httpclient-3.0.1.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/commons-jxpath-1.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/commons-logging-1.0.4.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/commons-net-1.4.1.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/commons-pool-1.3.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/dom4j-1.4.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/jug-2.0.0-asl.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-core-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-module-acegi-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-module-builders-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-module-client-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-module-management-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-module-ognl-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-module-pgp-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-module-scripting-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-module-spring-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-module-xml-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-ejb-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-email-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-file-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-ftp-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-http-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-jbi-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-jdbc-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-jms-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-multicast-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-quartz-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-rmi-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-soap-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-ssl-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-stream-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-tcp-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-udp-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-vm-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-xfire-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mule-transport-xmpp-1.3.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mx4j-impl-2.1.1.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mx4j-jmx-2.1.1.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mx4j-remote-2.1.1.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/mx4j-tools-2.1.1.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/ognl-2.6.9.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/xpp3_min-1.1.3.4.O.jar;%CP%
set CP=%BROKER_HOME%/out/lib/mule/xstream-1.2.1.jar;%CP%
set CP=%BROKER_HOME%/out/lib/muleOpt/commons-attributes-api-2.1.jar;%CP%
set CP=%BROKER_HOME%/out/lib/muleOpt/commons-dbutils-1.0.jar;%CP%
set CP=%BROKER_HOME%/out/lib/muleOpt/commons-io-1.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/muleOpt/commons-lang-2.2.jar;%CP%
set CP=%BROKER_HOME%/out/lib/muleOpt/geronimo-j2ee-connector_1.5_spec-1.0.1.jar;%CP%
set CP=%BROKER_HOME%/out/lib/muleOpt/geronimo-jta_1.0.1B_spec-1.0.1.jar;%CP%
set CP=%BROKER_HOME%/out/lib/netsuite-2.0.0.jar;%CP%
set CP=%BROKER_HOME%/out/lib/ojdbc14.jar;%CP%
set CP=%BROKER_HOME%/out/lib/quartz-1.4.0.jar;%CP%
set CP=%BROKER_HOME%/out/lib/saaj.jar;%CP%
set CP=%BROKER_HOME%/out/lib/spring-beans.jar;%CP%
set CP=%BROKER_HOME%/out/lib/spring-context.jar;%CP%
set CP=%BROKER_HOME%/out/lib/spring-core.jar;%CP%
set CP=%BROKER_HOME%/out/lib/wsdl4j-1.5.1.jar;%CP%
set CP=%BROKER_HOME%/out/conf;%CP%
set CP=%BROKER_HOME%/lib/commons-dbutils-1.0.jar;%CP%
set CP=./;%CP%
set CP="%CP%"

ECHO Using Classpath:
ECHO %CP%

cd ..

java -classpath %CP% com.mycompany.myproject.Client

An error message resulted saying "Input line is too long" as shown in the image. This is not an error in the java program which you would guess first.



I have set up a variable for classpath which makes my command too lengthy. This message pops up since the command is too long for the Windows® command line environment to handle.

The number of characters that can be entered into a single command is limited to 8191. (this is including spaces).

For example total number of charaters in the below command is 42.
C:\>javac -classpath myclasses.jar Client.java

There was no solution to the issue other than somehow making the classpath shorter by moving the jar files into a folder like "C:\jars".

Do you have any other solutions for this issue?

Margin Vs Padding - CSS Properties


CSS provides two properties named margin and padding for keeping space between HTML Box type elements. But why do we have two properties for the same reason? Are they similar?
No. They have a main difference.
Padding - defines space between border and element content
Margin - defines space between border and other outer elements
(Look at the above diagram)

So when elements needs space between them, better to use margins. When text or an inner element needs space between the parent box and itself go for paddings.

Look at this example for visual clarification generated with this code.
<div style="margin:25px; background:#cccccc; border:#000000 2px dashed;">
Text inside element
</div>
<div style="padding:25px; background:#cccccc; border:#000000 2px dashed;">
Text inside element
</div>


Text inside element

Text inside element



In the first <div>, space is set between the border and outside elements but in the second one it is between the boder and text.

Hope this will help.

Setting Java classpath option with spaces and quotes under Windows®

Java provides two methods for setting paths of the classes.
1. Set the command line option classpath
2. Set the CLASSPATH environment variable

The second option is easy, but has a draw back as a common CLASSPATH is shared within all the projects and classes, which makes it harder to test different projects with different classes.

So the first option is the prefered way. It is used as;
java -classpath first.jar;second.jar TestClient


When the paths to the jar files have spaces, the command line classpath option causes errors. Under Windows installation like 2000/NT/XP, all the users get a folder with the user name under a folder named "Documents and Settings" (which has a space). And if the jar files are under the user folder, path would look like "C:/Documents and Settings/someUser/.." which would cause the above error.

How to over come this issue
1. Put quotes and group the whole class path
java -classpath "C:/Documents and Settings/user/project/lib/axis.jar; C:/Documents and Settings/user/project/lib/axis-ant.jar;" TestClient

2. Put quotes on individual paths
java -classpath "C:/Documents and Settings/user/project/lib/axis.jar"; "C:/Documents and Settings/user/project/lib/axis-ant.jar;" TestClient

Do not complain on what you haven't got

As human beings we always tend to complain on what we haven't got. Many people forget to appreciate the things that they have received; even they forget that they have so much to appreciate on their living status than looking at the negative sides.



For example think how you feel when your (expensive) meals are little less tasty than how it used to be. You get so annoyed, right?

Have a look at the images as they tell a lot on the above topic.





See how much you are fortunate to have this type of a life (even having a chance to have access to computers to do internet surfing while some people do not have a chance to get a drop of water.

(I have no idea on who is the owner of these images, but thanks for the nice images).

Change of "My day time world"


Yes, I said "My day time world". The company I'm working always becomes my day time world, but there are sometimes I happend to make it "My full day world" when project deadlines are getting closer.

Hey all, now I'm in a new company as I left the previous one after 2 1/2 years of experience there. It's about 1 1/2 months now in my new world. I could not do any blogging after I joined here, not because my new company do restrict it, since I had to do some home work and put extra time and effort to get to the speed on the new projects and all that.

Now I'm planning to spend some time here as well. So don't forget to come back often.

My BASIC? Your BASIC? Tiny BASIC?

Not infrequently people will post questions in our community forums (http://libertybasic.conforums.com and http://groups.yahoo.com/group/libertybasic) asking how to implement a programming language. Usually someone will chime in with a link to some very detailed tutorials hundreds of pages long. This is fine if the reader is sufficiently well motivated.

The other day I stumbled on a very cool page on Wikipedia about Tiny BASIC, a language implemented many years ago and published in the seminal Dr. Dobbs Journal magazine. I realized that budding language implementors would really go bonkers for this!

http://en.wikipedia.org/wiki/Tiny_Basic

Check out the links at the bottom. There are a couple of implementations there written in BASIC with source code. What better way to get your feet wet but to port Tiny BASIC to Liberty BASIC or to your favorite BASIC? Doing the port shouldn't be too hard, and you'll learn enough to venture adding some new commands. :-)

External Sorting

C++ External Sorting

What is external sorting is the first thing that comes into mind. As the name signifies, it must be related to sorting and in fact it is.

External signifies that the storage for the data is to be external to the memory where it could be loaded. For example, in files.

It becomes a requirement if the data to be sorted is huge enough to not load at once in memory and hence restricts us from applying the common sorting algorithms (like quicksort) to them.

The idea behind this technique is to divide and rule. The whole set of data, say in a file, is put into several different files that can individually be loaded fully into memory. Since, they can be read completely into memory we can sort them. But this doesn’t immediately bring us to the completely sorted data as we are not sure if the largest in the first file is smaller than the smallest of the next file.


Still that is the first step to the solution – sorting the individual files.

Let us take a simpler case and build up on that assuming the restriction that we have is not on memory but count of values that can be read at once.

The algorithm that’s used can be something like this:

(Pseudo code)

Step 1:
Read limitValue number of values from input file and
use std::sort to sort them. Write the sorted result
into an intermediate file. Repeat this process for
(int) (TotalObjects / limitValue) + 1 times.
There would get that many number of intermediate files created.

Step 2:
Read first
((limitValue / ((int) (TotalObjects / limitValue) + 1)) - 1 )
numbers from each intermediate file.

Step 3:
Pick the first
(limitValue - the above count of objects in distinct batches)
smallest (or largest) values from those.
This logic stops if you got that many objects or exhaust
the objects in any batch.

If (objects in a particular batch exhausted)
If (no more objects in the intermediate file left)
Re-adjust the batch count etc and
proceed ignoring that intermediate file)
Else
Fill it up with the next batch count
of values from intermediate file it belonged to
End if
End if

If (output buffer i.e. limitValue -
the above count of objects in distinct batches gets full)
Write to the output file
(final sorted objects output file)
and repeat step 3 iteratively
End if

Step 4: The output file should contain the sorted objects.

In the above Pseudo code:

limitValue = the upper limit of the count of values that can be read at once

TotalObjects = total number of values in the input file (> limitValue else sorting can be done in one go!)

Sometime later we shall try out a sample implementation. Till then have fun!

C for Beginners?

I recently responded to someone's blog comment that said that BASIC is not a good language for beginning programmers. He suggested instead that beginners learn C. I responded that C is a fine language for many purposes (like operating system development), but that it contains too many difficulties that are not fundamentally related to learning programming. Here's a cool page that I found using StumbleUpon http://www.stumbleupon.com that illustrates my point effectively. ;-)

http://www.andromeda.com/people/ddyer/topten.html

BASIC's culture of diversity

One of the really interesting things about BASIC is that there are probably more dialects than any other programming language. Perhaps this is because BASIC really is the people's language. Sure, there are different versions of C (a few), Cobol (why?), Forth, etc. but people just love to create their own version of BASIC for whatever reason.

I guess that since BASIC was born into a world where it was shoehorned into many, many different computers it became part of the BASIC culture that it is okay to have many broadly different implementations. Every early home computer had it's own BASIC.

Now I've heard it said that this is a weakness of BASIC, and many people complain that there is no commercially viable standard BASIC. I'm not sure why this is a problem. The standard (by committee) is very old and limited. Since the world is constantly changing, I think it's a good thing that BASIC hasn't settled down into a rut. BASIC is still a place where people feel free to explore and innovate.

The world is big enough to accomodate variety.

Liberty BASIC gets some attention

Although Liberty BASIC isn't mentioned by name, the Liberty BASIC site gets a mention and a link by Jim Kelly here:

thenxtstep.blogspot.com/2006/10/learning-basic.html

Right away some debate about the suitability of BASIC arose in the reader comments. My how things never change. ;-)

Telengard and learning to program

Many years ago a close friend and I loved to play Telengard on his Commodore 64. This was a classic Dungeons and Dragons styled game. It was very well done and lots of fun. It seems to me though that was most fun about it was that it was written in BASIC. With very little effort we managed to break into the running game and customize it.

In fact recently I mentioned the game to him. He seemed to enjoy remembering most that we were able to hack the game. I was an experienced BASIC programmer at that time and it didn't impress me as much. I simply enjoyed playing the game.

I think what this makes clear to me is that programming novices like my friend really enjoy the process of learning by monkeying with a running system. You can just break into a program, examine or change a variable, add/change code and resume execution. I wonder how many beginners do not go on to become competent programmers without access to this kind of interactive system.

This is something that interpreted BASIC is excellent at. More systems need to be like this.

[JBoss] Logging JBoss CMP SQL

JBossIn many occassions developers tend to get errors when calling the CMP finders. The best method to fix such issues is to view the generated SQL queries, as it's easy to understand the error in terms of general SQL rather than looking at the EJB-QLs.

With the help of log4j, CMP generated SQLs can be logged into a file as follows.

1. Goto the conf folder inside your server instance.
2. Open the log4j.xml file and add the following two entries to it.

<appender name="CMP" class="org.jboss.logging.appender.RollingFileAppender">
<errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
<param name="File" value="/log/cmpSQL.log"/>
<param name="Append" value="false"/>
<param name="MaxFileSize" value="800KB"/>
<param name="MaxBackupIndex" value="1"/>
<layout class="org.apache.log4j.xml.XMLLayout"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
</layout>
</appender>

<category name="org.jboss.ejb.plugins.cmp">
<priority value="DEBUG" />
<appender-ref ref="CMP"/>
</category>

With the above given entries, a file named cmpSQL.log will be created inside the log folder. SQLs send to the server will be logged into this file. If required, name and place of the log file can be changed by changing the value in File param.
<param name="File" value="/log/cmpSQL.log"/>


It's about computer literacy

David Brin wrote an article about how computer users (kids in particular) need an easy language like BASIC again, and it should come with the computer. Read it all here http://www.salon.com/tech/feature/2006/09/14/basic/index.html

I absolutely agree with Mr. Brin's stance. The trouble isn't that there aren't tons of programming languages to choose from, many of them free. The problem is that the computer doesn't come with an easy language. And if it did come out of the box (like DOS had QBasic), it really should be an icon on the desktop. Hiding it away would be a bad thing.

Also the programming culture worships complexity. What the professional programmer today considers easy sets a bar way too high for the child or casually interested adult. The result is that the fun is removed from the experience. No fun = no learning.

Schools today think that computer literacy is about using Photoshop, Microsoft Office and Frontpage. That's a low-minded place to be. Teach kids to program. Some of them will latch onto the experience.

Security?

Scriptman responded to my last post with the following questions:

O.K. point taken, but how do you overcome security issues such as passing "nasty" commands to the interpreter? (yes even Perl has them if scripts are not properly configured.)

This is a very good question. Our web BASIC uses a custom web server with the language engine built right into it. We are trying to be very security minded. We will sandbox each session to prevent improper access to files and to avoid server swamping, processes that fail to terminate, etc.

Another question I have is, will your Basic have a feature to "get" (sorry no pun intended) parameters such as the IP of the client ?Much like the Perl $ENV{REMOTE_ADDR}

We don't have this yet, but I see no reason why it cannot be made available.

Not about Perl. Not about cgi.

Scriptman replied to an earlier post about our web BASIC effort:

What's wrong with PHP and PERL? They are both free and easy to learn.

So I replied to him with the following:

Perl is a useful tool, but let me explain why this is different from what we're doing.

First of all this is about BASIC, not Perl. If you like Perl then that's great. Use it. Enjoy. ;-)

A lot of people know and like BASIC, which is a perfectly useful language. There's no reason why a nice BASIC for the web shouldn't exist.

With Perl you have to manage at least three components. Your web server, your cgi scripts (you write them using a text editor), and to use your programs you use a web browser.What we're doing will allow the BASIC programmer to do everything in the browser. There is no concept of a remote procedure. An application with sophisticated interactive features can exist in one file, written in a very standard desktop app coding style. In other words this is going to be easy. If you think cgi programming with Perl is easy, this is going to be even easier.

Read the original post and comments here:

http://basicprogramming.blogspot.com/2006/05/web-20-extremely-easy-web-programming.html#comments

[JBoss 4] How to change port 8080 in JBoss?

With default configurations, JBoss listens on port 8080 for web connections. But this can be changed easily as this port is defined in an configuration xml file.

This is how port 8080 is changed on JBoss 4.

1. Goto the deploy folder of the server instance you use.
2. Goto the jbossweb-tomcat55.sar inside that deploy folder.
3. Find the file named server.xml inside that folder. (tomcat service file).


Look for the HTTP Connector section inside the server.xml where 8080 configuration is available. Change the port value to what ever the required port number.

This change wiill be available when JBoss is restarted.

Related: Change port in Tomcat?

What is ACID?

In database world, ACID is an acronym. It stands for; Atomicity, Consistency, Isolation and Durability. Databases should have these four features for them to become a reliable databases. All of these four features relate with transactions.

  • Atomicity:
    A transaction has to be completely commited or roll-backed, a portion of the transaction should not be committed to the database due to any issue even on a hardware failure.
  • Consistancy:
    After any transaction the data in the database should be correct and vailid according to the requirements. Database should not be having any illegal data after a transaction.
  • Isolation:
    When two or more transactions exists, one's behaviour should not give invalid data for the other transaction. That is, when one transaction is in progress, the data alterations made by that transaction should not be visible to any other transactions.
  • Durability:
    After the commit operation is aknowledged by the database, the data inside that transaction should not be lost. The updating of those data into the database has to be guaranteed.

Related Posts:
What is CRUD?

Happy birthday to me

Birthday Cake
My 26th birthday

You know...
Leo Tolstoy one of greatest Russian authors was also born in the same day as myself, but in 1928. If he was here, he would have celebrate his 178th birthday.

I'm not a author like him, but a good logical thinker (as I feel).

"I tried" Vs "I did"

Court
< in a court >

Judge : You have tried to kill him, and trying to kill is same as killing. So you have done a crime. I demand you to pay money of Rs: 1,000,000/=.

(Verdict thinks for a while.... Put his hand into his bag. Count cash and take Rs: 1,000,000/= to his hand and try to give it to the officer who waits to collect money. Then puts that money back into his bag).

Judge : Why? Don't you pay money? You have to pay it !

Verdict: (Softly) I tried to give him the money which is same as giving money.

Judge: (puzzled !!!!)


Even though this story is a bit debatable, there's something to learn.

I think TRYING IS CONSIDERABLE, BUT NOT IMPORTANT AS MUCH AS DOING SOMETHING.

So better to avoid saying "Yes I tried, but ...".
Say "Yes, I did it".

What do you feel?

Today's To Do List


This is a To Do list that matches many people who stay infront of a computer for the whole day. "Playing Solitaire" can be changed with what ever the game you play so that it can exactly match you. At the end of the day if you think a bit, you'll recognize that you haven't done anything valuable but just wasted the day.

If you are one of those, it's time to change the list and add something important to the list.

But this do not apply to all of you.

Four liquid stages of life

This is how life goes from birth to death of many people in this world.

My first ever article published

I'm really happy to announce that my first ever article (a tutorial) got published yesterday, which was related to JUnit one of the greatest unit testing tools for Java.

You can have a look the tutorial at JUnit - Getting Started

This was first published on my blog and due to the comments and appreciations from the readers, I decided to publish it.

World Record Test Cricket Partnership - 624

The two Sri Lankan cricketers Mahela Jayawardana (captain) and Kumara Sangakkara (vice captain) put a world record partnership - 624 for any wicket on last Saturday (29/07/2007) against South Africa, a leading cricket team. This is the first time a partnership grew over 600 mark in cricket history.

In this brilliant knock the scorecard of the two players;
  • Mahela J - 374 (752 mins, 572 balls) with 43x4 & 1x6
  • Sangakkara K - 287 (675 mins, 457 balls) with 35x4

This is Sangakkara's 4th double hundred (& carrier best) while Mahela's first ever 300. This is the 21st time a player passed the 300 mark ever in history.

Updates for record books

World
  1. Best partnership for any wicket - 624 runs (& so the best partnership for the 3rd wicket as well)

    • 576 - Sanath Jayasuriya & Roshan Mahanama (SL) v IND 1997
    • 467 - Andrew Jones & Martin Crowe (NZ) v SL 1990

  2. Best scores by two batsmen in the same innings.

    • Garfield Sobers (unbeaten 365) and Conrad Hunte (260) for the West Indies against Pakistan in 1958

  3. 4th best score by a player (374)

    • 400 - Brian Lara, WI v ENG (2003)
    • 389 - Mathiew Hayden, AU v ZIM (2003)
    • 375 - Brian Lara, WI v ENG (1993)

  4. 6th top score in a inning by a team

    • 952-6d SL v IND (1997)
    • 903-7d ENG v AU (1938)
    • 849 ENG v WI (1929)
    • 790-3d WI v PAK (1957)
    • 758-8d AU v WI (1954)
Sri Lankan
  1. Best score by a player (374)

    • Previously held by Sanath Jayasuriya - 340 SL v IND (1997)

  2. 2nd Best score in a inning

    • 957 - SL v IND (1997)

[I believe these statistics are correct and if there's something missing just remind me]

And.....Congradulations
SL won this match by an innings and 153 runs.


This is a wonderful time for Sri Lankan cricket which reminds the 1996 world cup tournament. All cricket fans are waiting to see the coming adventures of Sri Lankan team while wishing their success.

All the very best guys.

Mastering Enterprise JavaBeans 3.0


Mastering Enterprise JavaBeans 3.0 book is publshed. I still could not read it but must be a great book, same as Mastering EJB Third Edition which we usually read when ever small clarification is needed on EJB.

The book is available for download in PDF format at theserverside.

I feel this is really a great work.

What is CRUD?


The word 'CRUD' is a acronym in the computer world. It stands for Create, Read, Update and Delete. Sometimes R in 'CRUD' is used for the word Retrieve and D for Destroy.

Most of the time 'CRUD' is related to SQL database operations as follows.
  • C: INSERT
  • R: SELECT
  • U: UPDATE
  • D: DELETE

Liberty BASIC v5.0 for Linux Screenshots

Well, I promised to post some screenshots of Liberty BASIC v5.0 running on Linux, so here they are. Keep in mind that these are pre-alpha shots. Visit this link and click on the topic "Linux Screenshots"

http://libertybasic.conforums.com/index.cgi?board=lb5

-Carl

JUnit Getting Started

Main object:   Write a test case using JUnit as simple as possible.
Approach:   First write a class, then write the TestCase and the TestSuite.
Readers:   Should have some experience or knowledge in Java

by Kamal Mettananda

JUnit is a regression testing framework written by Erich Gamma and Kent Beck. This is used by developers to implement unit tests in Java.

Why unit testing is needed?
With unit testing the end product is completely checked for the correcteness of the code. With the time, the set of tests grow and the ease of testing improves. One of the most important things is that developers can be confident on the code and less time needed for debugging.

What is JUnit?
JUnit is a Test framework. The features available are;
  • Assertion methods (test methods)
  • Running tests (TestRunner)
  • Aggregating tests (test suites)
  • Reporting results (text based and GUI based)
One factor that developers may worry is : the developers has to write tests.

Writing a JUnit Test in 5 minutes
First add the junit.jar file to the project (All the following classes are tested using junit-3.8.1.jar). Then write the follwing classes.

Writing JUnit class
  1. Define a subclass of TestCase.
  2. Override the setUp() & tearDown()methods.
  3. Define one or more public testXXX()methods
    all the methods starting with test will be run by the TestRunner
    • call the methods of tested object
    • check the expected results with assertXXX() methods
  4. Define a static suite() factory method
  5. Create a TestSuite class containing all the tests.
  6. Optionally define main() to run the TestCase in batch mode.

1. Write a class - Calc.java


package com.parcelhouse.myproj;

public class Calc {

     public Calc() {
          super();
     }
     public int add(int a, int b){
          // errorneous method
          return a+b+1;
     }
     public int multiply(int a, int b){
          return a*b;
     }
}


2. Write the test case - TestCalc.java (anyname can be used)


package test.com.parcelhouse.myproj;

import junit.framework.TestCase;
import com.parcelhouse.myproj.Calc;//testing class

public class CalcTest extends TestCase {

     Calc c = null;

     public CalcTest(String name) {
          super(name);
     }

     protected void setUp() throws Exception {
          super.setUp();
          c = new Calc();
     }

     /*
      * Test method for 'com.parcelhouse.myproj.Calc.add(int, int)'
      */
     public void testAdd() {
          int x = c.add(5,6);
          assertEquals(11, x);
     }

     /*
      * Test method for 'com.parcelhouse.myproj.Calc.multiply(int, int)'
      */
     public void testMultiply() {
          int x = c.multiply(5,6);
          assertEquals(30, x);
          }

     public static void main(String[] args) {
          junit.textui.TestRunner.run(CalcTest.class);
     }
}

  • Run test case using;
    >java CalcTest

  • The line junit.textui.TestRunner.run(CalcTest.class) is where the trick occurs. The TestRunner runs all the methods in the CalcTest class which has testXXX() signature using reflection.

  • c.add(5,6) line should return 11 if the method works fine. The return value is checked against the expected value in the assertXXX() method.
    As the method is errorneous, this throws junit.framework.AssertionFailedError.
    But the multiply() method works fine and causes no errors.

3. Write the Test Suite - TestSuite.java (anyname can be used)


package test.com.parcelhouse.myproj;

import junit.framework.Test;
import junit.framework.TestSuite;

public class Tests {
     public static void main(String[] args) {
          junit.textui.TestRunner.run(Tests.class);
          //junit.swingui.TestRunner.run(Tests.class);
          //junit.awtui.TestRunner.run(Tests.class);
     }
     public static Test suite() {
          TestSuite suite = new TestSuite("Test for test.com.parcelhouse.myproj");
          //$JUnit-BEGIN$
          suite.addTestSuite(CalcTest.class);
          suite.addTestSuite(ComputerTest.class);//another test case
          //$JUnit-END$
          return suite;
     }
}

  • Run Tests class with >java Tests
    all the testXXX() methods in all the testCases which are added to TestSuite inside suite() method are called.
  • junit.textui.TestRunner.run() gives results in text mode.
    But if junit.swingui.TestRunner.run() or junit.awtui.TestRunner.run() used, results come in UI mode.
  • Add the TestCase to the TestSuite inside suite() method, when ever a new TestCase is needed.

Oh! you are done. The complete TestSuite is completed.
One important thing to keep in mind, write code to do small operations as much as possible.

If you have any question or comment, just add as a comment and will be here to help you guys.

References:
www.junit.org
www.javaworld.com/javaworld/jw-12-2000/jw-1221-junit.html
www.admc.com/blaine/howtos/junit/junit.html

LB5 update

I know a lot of people are eager to know how Liberty BASIC v5.0 is coming along.

First of all, please don't hold off purchasing Liberty BASIC because you think LB5 is about to be released. It won't be available until the end of 2006. Please go ahead and purchase LB v4.03. The upgrade to v5.0 will only be about $20.

Okay, so now some details. I am trying to wrap up an alpha release for testing by invitation only. The alpha will be Windows and maybe Linux. I'd like to release a Mac alpha also, but I'm having some issues that I'm seeking support for. Later this summer we will have beta versions which anyone can test, and these will probably all be Windows, Mac and Linux from the start.

A lot of energy has been going into the core language including user types, support for the new syntax for GUI controls, and graphics drawing.

In a few days I'll post some screenshots of how things are coming along for the general public, including an image demonstrating a grid control and the current (rough) state of the debugger.

I'm also going to blog soon about the new web BASIC Scott and I are working on. It is coming along nicely.

06:06:06 06/06/06



If you check the date and time today at 06:06:06 in the morning, you will see that it's full of sixes.

06:06:06 06/06/06

This will appear again only after 100 years. If you were living at that time (2106), better to add a comment saying this blog is 100 years older.

Related Posts:
01:02:03 04/05/06

Programming should be easy

The BASIC programming language was the original easy to use language. This was no accident. The inventors of BASIC designed it to be easy. People from all walks of like created their own software in BASIC on small computers that plugged into their television sets. I was one of those people, and many of you visiting this site remember what that was like. These computers were called home computers. They were simple and could be completely understood by someone without formal training. Anyone could learn to make the computer do what they wanted, and it was a lot of fun!

BASIC was at the center of all this.

However, once the IBM Personal Computer (the IBM PC) made its debut, the home computer began to fade. Every company wanted to make PCs, and home computers began to disappear from stores. With every year, creating software for PCs (which are really business computers) became more and more complicated.

Most home computers came with BASIC built right in. Just turn one on and it says something like:

**UltraBASIC v2.23 - 28374 bytes free**

READY>

Then you just jumped right in and started to program your computer in BASIC because BASIC was the startup mode of the computer. It was easy, everyone did it, and an entire industry grew up from it. This was real computer literacy, not just knowing how to use a word processor or play games and music. People wrote their own games and word processors. Much of the time this was out of necessity, but many people discovered they loved doing it!

Today we have a completely different picture. Programming languages are complicated. The software culture worships complexity and the popular programming languages of the day require thick manuals. Lots of money is made selling training. Programming it seems, is not for the rest of us.

My first car

Today I bought my first ever car. It is a Toyata Corsa of 1986 model. I drove it a bit as well.

Still I could not get some photos of it, wait for the coming photos.

WWW (Which Wolf Wins?)

A valuable story...

One evening an old grandfather told his grandson about a battle that goes on inside people.

He said,
"My son, there is a battle between two wolves inside all of us.
One is Evil. It is anger, envy, jealousy, sorrow, regret,greed, arrogance, self-pity, guilt, resentment, inferiority, lies, false, pride, superiority, and ego.
The other is Good. It is joy, peace, love, hope, serenity, humility, kindness, benevolence, empathy, generosity, truth, compassion and faith."

The grandson thought about it for a minute and then asked his grandfather,
"Which wolf wins?"

The old grandfather simply replied, "The one you feed."

Short term plans for the web BASIC

Scott and I had a sitdown design time last Friday and also managed to get started on some code for the web BASIC he is working on. The idea here is that you will be able to visit a site with a tabbed interface. The first few tabs will each have a code pane with an example program, and a Run button. Click on the button, and the program will run underneath on the same page. This should be a good way to get a feel for what kind of programming is possible. An additional tab will have an empty code pane so that you can try writing your own.

We will support the INPUT statement, so you can create interactive programs. The standard style of BASIC will be supported in this way. We will also include the ability to draw graphics and embed them into the output so you can draw graphs or game boards, etc. Fast animation won't really be possible using an http style of interaction, but if you want to create games that draw images (Star Trek, or Mastermind, or Sudoku) it should be fine.

Programs will be cached on the server for a few hours (or a day perhaps) so if you create a program on the site that you really like, you can share it with a friend by pushing a button to send an email with a URL that will take him straight to the program in his web browser. I think that's pretty cool because there's no need to install any software. It should work in any popular web browser including most phone browsers.

Scott already has some of this working. This should be fun. :-)

Web 2.0 - Extremely easy web programming

While I am busy working on Liberty BASIC v5.0, my development partner Scott is working on something fun on the side. We are working on a dynamic web front end to Liberty BASIC so that you can write web programs in LB. We have some ideas for a unique tool for web programming that doesn't require all the crazy bits and pieces that are needed for the mainstream web solutions.

This will be an all-in-one solution with its own web server and it can be hosted behind Apache if so desired. We hope that in a month or so we will have a neat demo site up with some example pages that show how it works.

So, there's lots going on! :-)

01:02:03 04/05/06

On the 4th of May (today), at two minutes and three seconds after 1:00 in the morning, the time and date will be 01:02:03 04/05/06.
That won't ever happen again in our lifetime.

It is said that, it will be approximately 400 generations before it happens again!!!

Maybe not about BASIC Programming, but cool!

I heard a radio news story the other day which I thought was really significant. A researcher working with the Jet Propulsion Laboratory was interviewed about a new methanol fuel cell that can be used to produce electricity (like a hydrogen fuel cell). The special thing about this new cell is that it can also be run in reverse to produce methanol from carbon dioxide. This means that industrial plants that produce lots of carbon dioxide can use this technology to scrub their output clean of carbon dioxide and also have methanol to sell in a methanol based economy.

This is significant beyond it's greenhouse gas reducing properties. Methanol can be transported and stored much more safely than hydrogen, can be mixed with gasoline, and burns cleanly. What's especially cool about it is that methanol is useful for more than just a fuel. It can easily be used to make all kinds of other useful things like ethanol, plastics, etc. You can't easily make anything useful out of gasoline or hydrogen (or ethanol).

Anyways, it's a really cool story. Check it out at:

http://www.npr.org/templates/story/story.php?storyId=5369301

Now back to our regular programming (pun intended).

The 20 dollar's bill

This is a story with a valuable advice which I read today.

A well known speaker started off his seminar by holding up a $20 bill. In the room of 200, he asked:

"Who would like this $20 bill?"
Hands started going up. He said:
"I am going to give this $20 to one of you but first, let me do this."
He proceeded to crumple the dollar bill up.

He then asked:
"Who still wants it?"
Still the hands were up in the air.
"Well," he replied, "what if I do this?"
And he dropped it on the ground and started to grind it into the floor with his shoe. He picked it up, now crumpled and dirty.

"Now who still wants it?" Still the hands went into the air.

"My friends, you have all learned a very valuable lesson.
No matter what I did to the money, you still wanted it because it did not decrease in value. It was still worth $20.
Many times in our lives, we are dropped, crumpled, and ground into the dirt by the decisions we make and the circumstances that come our way. We feel as though we are worthless.

But no matter what has happened or what will happen, you will never lose your value. To those who love you, you are priceless.
The worth of our lives comes not in what we do or who we know but by who we are!

Object Orientation and LB5

In a recent thread in the Conforums (http://libertybasic.conforums.com) someone asked the question of whether QBasic style types would be supported, and I elaborated and posted an example of what I was thinking about this for LB5. This prompted a reaction about what was perceived as a move toward object oriented programming.

Here is part of my reply:

Liberty BASIC 5 will not be an object oriented language. LBers will not be expected to learn OO programming.

There have been objects (the UI controls) in Liberty BASIC from the beginning, but I tried to avoid treating them like objects. I'm convinced this was a mistake. Since we have been using objects in our non-OO version of BASIC, we might as well fix the syntax to make it easy to do. The new syntax for programming UI controls is designed to treat them more appropriately.

Instead of printing to a button for example, it makes more sense to call a function on it like so:

#myButton enable(1)

Types and objects are very similar things. Therefore it makes some sense to try and cover them with a unified syntax, and not try to support two different syntax extensions. It makes sense to me to implement types as a sort of lightweight object. This makes even more sense because it will act as a conceptual bridge towards the new BASIC which will actually have a useful OO programming mechanism. This will be the simplest OO feature set I can get away with, and I hesitate to call the new language an OO language.

Interactivity in Programming

One theme that I keep coming back to is interactivity. As much as possible your programming tools should let you affect what is going on at any moment.

A neat new feature in the upcoming Liberty BASIC 5 that I demonstrated in New York is a more interactive debugging capability. Just as before you can start a program in the debugger from the editor, of course. One really cool new thing that you can do is just run the program without starting it in a debugger. You can then at any time decide that you want to debug the program. Just bring any window of the program to the top and break into it. A debugger will open on that program. You can examine variables, or if you like click on a line of code where you want to stop in the debugger and click on the Run To button. Then use the program and when that line of code is reached, the debugger will stop and highlight that line of code and you can see the variables. Then single step through the code, or just click the Run button to proceed full speed.

This is the sort of thing that I'm trying to provide that will bring back the interactivity of classic BASIC, which is one of it's more important features. Most newer programming languages (including most versions of BASIC) are pure compilers and do not let you stop a program in the middle are restart it.

Meeting Details Nailed Down

Okay, the Liberty BASIC 5 presentation at the NYC Smalltalk Users Group will be held Thursday, Apr 6 at 6:30 (actually the meeting starts at 6:30 and my presentation will start at 7:00) at the following address:

440 33th Street 8th Floor
New York City

It'll be great time, and for those interested after the meeting we'll retreat across the street to the New Yorker to spend some time in the restaurant together.

So if you're interested in a sneak peek of the next major release of LB, come and join us!

Smalltalk about BASIC in New York

I've been invited to demonstrate and speak about the new version of Liberty BASIC I'm working on. The venue is the New York City Smalltalk Users Group on April 6th, a Thursday evening. The reason this group invited me is because Liberty BASIC is developed in a version of Smalltalk so it's an interesting project for other Smalltalk developers.

I've been given permission to invite Liberty BASIC users to come also for a sneak peek. The meeting will be held a couple of blocks from Madison Square Garden. I'll post more details about the meeting place when I have them.

I hope we have have a few members of the Liberty BASIC community join us.

Programming for Fun in 10 Minutes

I found an interesting article where the author (Peter Norvig) complains about book titles that promise to teach programming in 24 hours, 7 days, 21 days, etc. He makes a really good point which is that it usually does take several years to become skilled as a programmer. However, in my own experience it doesn't even take a single day to learn enough programming to have fun doing it. Many of my readers will certainly agree with me when I say that doing it for fun is reason enough. If it isn't fun, you're probably not ever going to be any good at it. ;-)

For the curious, here's the link to his article: Teach Yourself Programming in Ten Years

Evolving a language

Over the years I have tried very hard to maintain a simple and backwards compatible syntax with Liberty BASIC. This has worked well for the most part and most people seem to find Liberty BASIC easy to make friends with.

Sometimes in programming languages it is necessary to be willing to break with the past, especially when bad decisions have been made that hurt the programmer. In Liberty BASIC there is probably one decision in particular that I've been meaning to rectify for some time now, and that is the syntax for interacting with GUI widgets.

Originally it seemed like a cool idea to treat windows and widgets like streams, controlling them by printing to them, and getting information by reading out of them. This was fine in theory, but people don't automatically feel comfortable with this. For example:

'set the font to be Arial of size 10
print #myWidget, "font Arial 10"


Several things about this approach are unpalatable. First, printing to a widget is perhaps more of a leap than most people are comfortable with. Instead they might prefer a straight statement, and not put the command in a string.

The other problem with this approach is that it is just too noisy. I came to realize this a few releases ago and implemented a shorthand without the print keyword and comma, like so:

'set the font to be Arial of size 10
#myWidget "font Arial 10"


Well, that is better but still slightly foreign. Behind the scenes it is exanded to the full form.

Okay now here comes the really difficult part. Since we're sending the command as a string, this can get messy if we want to use variables. We need to concatenate a bunch of stuff together.

'set the font to be Arial of size 10
#myWidget "font ";fontName$; " "; fontSize


Can you say ugly?

Okay, so let's fix this. With Liberty BASIC 5 were going to make another evolutionary step that will give us a lot of flexibility. Instead of treating widgets like streams, we'll treat them like the objects they are. So widget commands will be turned into function calls (or method calls in OO parlance):

'set the font to be Arial of size 10
#myWidget font(fontName$, fontSize)


This is much simpler and cleaner. It is also more similar to the conventions that programmers are used to.

There are also commands which return a value. Here is an example in the current syntax that places the contents of an input field into a variable:

'set myVariable to the contents of this input field
#myWidget "!contents? myVariable$"


In our new syntax you will be able to return a value from a function in the familar way, like so:

'set myVariable to the contents of this input field
myVariable$ = #myWidget contents$()


Were still going to support the old syntax for backwards compatibility, but all the examples and documentation will use the new form.

In addition to using this convention to control widgets, we also hope to use this syntax to add some scriptability to the Liberty BASIC IDE. I'll blog about this in more detail in the coming weeks.

Microsoft still supports Visual Basic?

I recently received some email critical of my claim that Microsoft no longer supports or provides Visual Basic. I suppose this is a fair point. They do after all still sell a product called Visual Basic.

So what gives? An awful lot of people don't think that the new Visual Basic .Net product is Visual Basic at all. It's more of a version of C# (a Java clone, more or less) with some BASIC syntax thrown on top. It's not hard to use Google to find many articles of people who agree with this sentiment.

Here are some examples that I found in just minute:

http://www.sqlmag.com/articles/index.cfm?articleid=21050&

And from Wikipedia:
http://en.wikipedia.org/wiki/Visual_Basic_.NET#Comparative_samples
http://en.wikipedia.org/wiki/Visual_Basic_.NET#Controversy_concerning_VB.NET

If there's any dishonesty here, I claim that it's on Microsoft's part. For years people complained that Visual Basic isn't BASIC. Now people are complaining that VB.Net isn't Visual Basic. Where does it end? ;-)

Whatever happened to PEEK and POKE?

Sometimes I'm asked how to PEEK and POKE using Liberty BASIC. The short answer to this is, you can't. The long answer is more complicated.

The original home computers (like the classic Commodore 64, TRS-80, and Apple II models) were designed to be completely open to their owners. Most of the different parts of the computer like the sound, graphics, keyboard and joystick (there were no mice back then) were controlled by mapping them to different memory locations. So, the built-in commands didn't do everything you need? It was common to control the computer's equipment directly by sticking values into the memory locations that control that equipment, and reading the status back out. This was done with POKE and PEEK. This was a lot of fun, and usually useful too.

Since these early machines didn't multitask it was pretty safe to steal control of things away from the BASIC interpreter (which was a much operating system as there was). Then computers started running Windows, the Mac OS, Linux, etc. and allowed more than one program to run at a time. PEEK and POKE became problematic because if one program decided to mess with the screen for example, it might interfere with what other programs need to do their thing. Not only that, but computers today all have different kinds of hardware in them, so even if you could PEEK and POKE the exact memory locations would be different from machine to machine. So that's the bad news. :-(

The good news is that we can still have a power trip. How? Your operating system manages all the hardware for you behind operating system functions. These functions make every computer look more or less the same to the programmer. You can use these functions to do a lot of powerful things and most languages have a way to use them. For example Liberty BASIC programmers can use the CALLDLL command to make Windows API calls, which are the operating system calls of the Windows operating system. These are more complicated in general (and you can fill a whole bookshelf with information about them) than the old fashioned PEEK and POKE, but at least we aren't left without some way to pull rank on our computers. ;-)

So if you're missing the power and coolness of PEEK and POKE, why not try your hand at API calls?

Here is a useful link to get you started: http://babek.info/libertybasicfiles/lbnews/nl108/api.htm

Redevelopment price hike?

In a comment to a previous post Isaac Raway wrote: "I see that you note you're going to change the syntax for controlling widgets in the new basic you're working on. Awesome! This may actually make me want to switch to LB as my main platform--maybe."

I'm glad to hear this. The new LB is coming along nicely now.

Isaac continues: "However I'm a bit concerned. I've seen this sort of "redevelopment" happen before, and often times it comes with a higher price tag. One of the strong points of LB I think is that it is truly useful but very inexpensive. I think you're the kind of person who realizes that though, so I have faith you'll keep it affordable."

Well, you're right. Pricing is a marketing issue and it isn't always clear whether to raise or lower prices. I can't promise that I will never raise the price of Liberty BASIC (in fact I've done it before) but I am committed to keeping it affordable. Many times I get feedback that LB is too inexpensive and that I should raise the price, so you see this is not a simple matter to determine.

Also remember that now we have a free BASIC (http://www.justbasic.com).

Extend Firefox Contest - Winners


Extend Firefox Contest winners are announced, a set of great developers are appreciated. Congradulations to all.

Grand Price

  • Best New Extension Overall:
    Reveal by Michael Wu

  • Best Upgraded Extension:
    Web Developer by Chris Pederick

  • Best Use of New Firefox 1.5 Features:
    Firefox Showcase by Josep del Rio

  • Extension Evaluation

    Reveal Extension
    Reveal allows you to see thumbnails of pages in your session history and quickly find the page you want. Reveal also includes a magnifying glass to help you see everything. Try it now - it comes with a quick tour of all features. Screenshots do not fully capture the experience of using Reveal.

    As Reveal is an extension that I'm not familiar, I installed and experienced it.
    It is really easy to use, as a small tutor comes with it so that anybody can easily pick up the idea. Thanks and Congradulations Michael Wu.


    The thumbnails of my browser looked like above.

    Related Topics:
    Extend Firefox Contest finalists

    Source
    addons.mozilla.org

    Don't dance so fast

    Today I received a mail with a nice but advicing thoughts. So I thought of adding it here.

    As the mail explained, this poem was written by a terminally ill young girl in a New York Hospital.

    Have you ever watched kids
    On a merry-go-round?
    Or listened to the rain
    Slapping on the ground?
    Ever followed a butterfly's erratic flight?
    Or gazed at the sun into the fading night?
    You'd better slow down
    Don't dance so fast.
    Time is short.
    The music won't last.


    Do you run through each day
    On the fly?
    When you ask How are you?
    Do you hear the reply?
    When the day is done
    Do you lie in your bed
    With the next hundred chores
    Running through your head?
    You'd better slow down
    Don't dance so fast.
    Time is short.
    The music won't last.


    Ever told your child,
    We'll do it tomorrow?
    And in your haste,
    Not see his sorrow?
    Ever lost touch,
    Let a good friendship die
    Cause you never had time
    To call and say,"Hi"
    You'd better slow down
    Don't dance so fast.
    Time is short.
    The music won't last.


    When you run
    so fast to get somewhere
    You miss half the fun of getting there.
    When you worry and hurry through your day,
    It is like an unopened gift....
    Thrown away.
    Life is not a race.
    Do take it slower
    Hear the music
    Before the song is over.


    Update:
    Today I got to know that the author of this poem is Mr. David L. Weatherford. Thanks for such a nice poem.

    Extend Firefox Contest finalists

    The finalists of the firefox extension contest has been announced!!!

    There are many extensions that I am using very much. So here are some comments about some of the extensions that are selected for the final contest.



    Adblock by Ben Karel

    Block ads including Flash ads from their source. Right click on an ad and select Adblock to block ads. Hit the status-element and see what has or hasn't been blocked.

    Now there's another good enhancement for ad blocks named Adblock Plus.
    It provides the ability to get the ad list managed at Filterset.G. (For that you need Adblock Filterset.G Updater extension).

    Firefox Showcase by Josep del Rio

    View open Tabs and Windows with Showcase. You can use it in two ways: global mode (F12) or local mode (Shift + F12). In global mode, a new window will be opened with thumbnails of the pages you've opened in all windows. In local mode, only content in tabs of your current window will be shown. You can also right click in those thumbnails to perform the most usual operations on them. Mouse middle button can be used to zoom a thumbnail, although other actions can be assigned to it.

    This is a pretty useful extension which shows thumbnails of all the pages that you have loaded currently. I like this extension.

    What's missing?
    I think one of the greatest extension is missing in the finalist list. It is the Tab Mix Plus.

    Tab Mix Plus 0.3.0.4, by CPU

    Tab Mix Plus enhances Firefox's tab browsing capabilities. It includes such features as duplicating tabs, controlling tab focus, tab clicking options, undo closed tabs and windows, plus much more. It also includes a full-featured session manager with crash recovery that can save and restore combinations of opened tabs and windows.

    This is one of the greatest extensions I have ever used as it provide so many features to manage tabs.

    Related Topics:
    If you think Internet Explorer is great, read this


    [UNIX Tips] Learn tar utility in 5 minutes

    tar is a facility in Linux that creates archived file using a set of files. One file will be created that contains all the files in it. But do not get misunderstand, ".tar" file is not a compressed file. It is only a collection of files within a single uncompressed file.

    TAR
    1. Create tar archive
        $ tar -cf tarFileName.tar file1 file2 file3
    This will create an achive named tarFileName.tar and that will include the files specified there (ie: file1, file2, file3).
    2. View the list of files
        $ tar -tf tarFileName.tar
    This will list the details of the files inside the archive.
    3. Extract tar archive
        $ tar -xf tarFileName.tar
    This will extract the archive and create the files that were inside the archive.

    The above options have the meanings as:
    c - create an archive
    f - archive file
    t - list the content of the archive
    x - extract an archive

    GZIP
    If the file is a ".tar.gz" or ".tgz" file it is a collection of files that is compressed. To compress a file, first create the tar file then gzip the file. For using gzip the option -z has to be used with the above command.
    1. Create tar archive
        $ tar -czf tarFileName.tar file1 file2 file3
    Now the archive is created as a compressed file.

    z - compress using gzip utility

    Check out this stream