Wednesday, June 2, 2010

 

This blog has moved


I had been using blogger FTP support to manage my custom blog for some time. Since they no longer support it, I had to temporary transfer my blog to a be blogger managed today. It seem many people have started using wordpress instead of blogger. Hmmm... I should find some time to search for a solution.

Saturday, January 23, 2010

 

Orange shops...


Today, on my way back home by car, I wanted to buy something for my son who is used to wait for me to see what I bring for him. It was little late; my watch showed me it was close to 9pm in the night. I was thinking of what I could bring for him at that time. Suddenly I remembered that there is an area where small shops like stalls located beside the road. The place was called 'Kalagedihena' in Colombo - Kandy road. The area is very famous for the fruit called 'Rambutan'.


It is not the season of 'Rambutan' now. But bags of oranges can be bought there. When I was reaching to one of the shops I saw from distance that the person who is in that particular shop was doing something with a large box which could be though of as the container of the bags of oranges. I thought he was going to close the shop and go home since it was night. So I hurried and asked for a bag of oranges. While listening to me he took a bag of oranges from big box and hanged in the shop. Then I realized he was not finished.


While doing the business I asked "Are you going to stay entire night here?". 
Then he replied "Yes, I would be staying for the entire night". 

I thought why would he stay whole night in that small shop where there is no proper shelter at least. 

Then I asked "Who are your targeted customers during this late night?". 
Then he replied "There are businessmen, container drivers etc. who are traveling late night. I would be staying here for entire night them as target of my business". 

I was bit surprised with that answer. Although for years, I  have been knowing that area for shops with various kinds of fruits, today only I got to know that shops are not usually closed. Shift basis working arrangement is available for those shops. First I felt pity for them but then I felt proud of them for the effort they put to survive.


If you are traveling on Colombo - Kandy road and want to have some refreshment, stop your vehicle at such a shop. They would be open for you anytime. Buying something from them would definitely bring refreshment while helping them  to have a better future.

Thursday, December 24, 2009

 

Merry Christmas & Happy New Year



Another exciting and joyful year has come to an end while a new year with a lot of hopes and challenges is just about to begin. I wish all of you a Merry Christmas & Happy New Year !!!

Friday, November 20, 2009

 

Visit to Melbourne



Recently, I flew to Australia for some official work with my family (my wife, 3 years old son and new born daughter who is just 2 1/2 months old). Our destination was Melbourne. We had transits on both ways traveling to and from Melbourne at Changi airport in Singapore.

On 13th November 2009 we took a flight of Sri Lankan airline. The cabin crew was friendly and the service was quite impressive. Meals were familiar to us and we enjoyed them. My son and daughter received gift packs from the cabin crew and they were happy about that; specially my son. Since it was a short journey from Colombo to Singapore, we did not feel tired. The only concern I had was the entertainment system was not up to my satisfaction.

The transit at Changi airport was nearly six hours since the flight from Singapore to Melbourne was late by 45 minutes. We spent some time at one of the family areas located in the airport. Everybody got refreshed having stayed couple of hours there. Family area is a comfortable place for a family to stay for hours. The main problem we faced was we were not able to get the stroller for my daughter at Singapore airport. The stroller had been put as a baggage so that it would be received at Melbourne airport. We had to carry our baby when we walked. The strollers available in the Changi airport did not match for our daughter since she was too young.

The trip from Singapore to Melbourne was more than 7 hours long. It was Quntas airline. The cabin crew was friendly and kind. The bassinet for my daughter was bigger than what we had in Sri Lankan airline. But we were not happy with the meal we received. I thought the meal would have a variety as of Singapore airline in which I have traveled to the USA last year. But in summary I am happy with the services we received in Qantas airline.

Mr. Ajith Senanayaka & Mrs. Kamala Senanayaka who are my relatives were waiting for us at Melbourne airport. It took about half an hour for us to reach their home located in Point Cook. The house is a two story building and was comfortable for us to stay for couple of days. The family was really friendly and we were able to get a lot of advices from them. The meals prepared by sister Kamala were delicious. We rested on the day we reached there. following day, we went to see the Melbourne City and spent few hours there. My son enjoyed the trip a lot. 10 years old younger son of Senanayaka family was the friend of my son in Melbourne. All of us enjoyed watching them playing together. We spent 3 days at Mr. Ajith's home and got ready to fly back to Sri Lanka on 17th Nov 2009.

On 17th we were dropped at Melbourne airport by Senanayaka family. They were with us helping to carry our baggage and other stuffs until we got our boarding passes. Ajith bought a toy for my son and he played with it during the entire trip from Melbourne to Colombo. It was sad to leave them because we felt like family even the stay at their home was of 4 days short.

The flight from Melbourne to Singapore was again a Quantas one and we did not see that much of difference the service, meals & entertainment system we had when we flew from Singapore to Melbourne in a Quantas flight. In summary we felt comfortable about that portion of hour journey. 

The transit at Singapore airport on our way back to Colombo was nearly 3 hours. We were relaxed and did not have that much of burden during the stay at Changi airport. This time we were able to get the stroller of my baby at Changi airport. 

It was Emirates airline we had in the last part of our journey. We were able to get a window seat with bassinet. My son was happy about that. For the first time in our journey we received child meal for my son with a gift pack. He was really happy about it. The food provided by Emirates was quite impressive to me. All of us were tired and slept for couple of hours before we reached Bandaranayaka International airport, Colombo. It was around 1:30 in the morning when we reached there. We came out of the airport within around 45 minutes and my father was waiting for us. We reached home around 4:00 am in the morning. My son was happy to see his grand mothers and grand father. All of us were tired and went to bed as soon as possible to unwind for getting ready for our usual day to day work.




Thank you brother Ajith and sister Kamala with their kids for making our short stay in Australia happy and comfortable. Hope to see you soon ....


Saturday, September 26, 2009

 

SCWCD for JEE5 Certified


Three days back, I cleared Sun Certified Web Component Developer for the Java Platform, Enterprise Edition 5 (CX-310-083) scoring 85%. As I have mentioned in my previous post this helps me formalizing the knowledge in web component development which I have gained during my career as an IT professional for the past few years. 

In my opinion, SCWCD exam requires you to memorize more syntax compared to SCBCD exam. For example there is plenty of syntax that you have to remember in areas like JSP, JSTL & Custom Tag Development. The knowledge I had in web development for the past few years eased me the process of preparing for the exam. It took me 2-3 months with the tight schedules with my work and family life.

The main source of preparing for the exam was the Head First Servlets and JSP by Bryan Basham, Kathy Sierra, and Bert Bates. Also I used few of mock exams shared by my colleagues. (Thanks guys for sharing). It was fun to revise the lessons on web component development which I had been using for past few years.

I hope to relax for couple of days spending more time with my family before preparing for another certification exam…

Labels: ,


Wednesday, July 1, 2009

 

My first website using Joomla


Content Management Systems (CMS) are widely used for various applications. Thank to the open source community, there are plenty of open source CMSs available today. Recently, I thought of playing with CMS systems in my spare time. Among other open source CMS systems available, I became interested in Joomla, an award winning open source CMS. While reading the documents, tutorials and after setting up the systems in my local environment (windows vista), I realized that Joomla is a good solution to create dynamic websites rapidly with minimal of knowledge of web related technologies.

Joomla requires PHP, MySQL and Apache web server. There are several ways you can get Joomla working in your local environment.

XAMPP, a cross platform web server package consists of Apache web server, MySQL database, PHP interpreter and few other supporting tools, is an easier way of getting Joomla up and running in your system.

Having XAMPP as an option, I thought of installing relevant software (Apache web server, MySQL and PHP) separately to have a better understanding and control over software and subsequently get Joomla working on my local environment.

Following are the steps I have followed to get Joomla up and running on my local machine.

1. Install Apache web server. A good article on installing Apache web
server on Windows Vista can be found here.


2. Install MySQL. This is straight forward.

3. Install PHP. A good article on how to install and configure PHP to
work with Apache web server can be found here

Make sure necessary configurations have been done so that
above components work together.

4. Extract downloaded latest Joomla 1.5.x to htdocs folder in Apache
web server.

5. Install & configure Joomla. This is a good article explaining the
installation process of Joomla.

Having set up Joomla up and running, I spent couple of hours playing with Joomla. I as a beginner to Joomla, was able to build a mock website for my school by modifying and adding components to existing templates which have been packaged with Joomla installation within couple of hours (Though the web site in not in production yet). This made me realize, for a person who is familiar with Joomla (not necessarily be familiar with other web related technologies) may be able to create a website from the scratch within very short time.

So, why don’t you give a try with Joomla!!!


Labels: , , , ,


Monday, June 22, 2009

 

SCBCD for Java EE 5 Certified


Yesterday, I gained the certification of Sun Certified Business Component Developer for the Java Platform, Enterprise Edition 5 (CX-310-091) scoring 88%. Although, only being certified does not help finding a job, there are quite important aspects of getting certified.

According to what I feel, an important aspect is gaining more confidence on technologies/frameworks that a person is working or supposed to work. Normally, a certification exam targets the fundamental knowledge and the usage of it. This would require a person to follow and understand the fundamental knowledge/rules of a technology and how those are applied in real life solutions. This is very important as I have seen some people with enough experience but with lack of fundamental knowledge.


Another important aspect is, strengthening your resume by formalizing your knowledge and experience in various areas. Sometimes employers would prefer formal proofs of knowledge of a candidate. Having certifications in certain technology/framework would help candidates IMO.


Sometimes, being certified would help an employee to step up on the ladder of his/her career. Also, it would help an employee to gain a better recognition among colleagues. Most of the employers encourage their employees to strengthen their knowledge and also sponsor them to achieve that goal.

Above are few aspects that I feel important of getting certified in frameworks/technologies etc. There should be plenty of important reasons why a person should get certified in technologies/frameworks etc.

Labels: ,


Tuesday, June 9, 2009

 

Editorial team rocks ...


Another busy days gone. Phew... :-) The company newsletter was compiled and released with superb support from editorial team. Thanks team. You people ROCK !!!

Tuesday, May 19, 2009

 

Peace...



Got up in the morning with a peaceful and relaxed mind. It was over yesterday. The virus, LTTE was defeated by our heroes. Today, President His Excellency Mahinda Rajapakse is to announce the victory against terrorism to the entire nation. If it were not our brave heroes, we would not have peace. Hats off to all of our heroes.


It's the Military, not the reporter who has given us the freedom of the Press.
It's the Military, not the poet, who has given us the freedom of Speech.
It's the Military, not the politicians that ensures our right to Life, Liberty and the Pursuit of Happiness.
It's the Military who salutes The flag, who serves beneath the flag, and whose coffin is draped by The flag.
~ Author Unknown ~

Thursday, May 7, 2009

 

Happy Vesak Festival

 
Tomorrow is Vesak Poya Day. Buddhists in the world celebrate Birth, Enlightenment and Passing away of Gauthama Budda. In Sri Lanka, Vesak can be considered as both a religious and cultural festival. Many religious activities are organized during this period. Apart from Sri Lanka, many Asian countries including India, Pakistan, Singapore, Taiwan, Indonesia and Nepal celebrate Vesak.


Making colorful lanterns called Vesak Koodu is part of celebration. I have planned to make a few when I go home today. Hmm... this time it will be more enjoyable making Vesak Koodu with my two and half years old son :-)


I wish you a happy and peaceful Vesak Festival

Tuesday, May 5, 2009

 

Lost Items


On my way to office today, I went to ICBT to collect some documents. Having done my task, I got in to a bus to go to my office. After few minutes standing in moving bus, I was lucky enough to find a place to be seated in crowded bus. A person who can be guessed to be in his 80s was sitting next to me.

Just after I sat, I pulled my wallet from the pocket of my trouser and put in my bag which is something I am used to do.

"Even the pocket is not safe here", the man asked me.

"Yep" I replied him with a smile. "I am used to put the wallet in my bag", I added.

"You know son, I have been robbed more than twenty times", he said.

"Really?", I replied with surprise.

"Yes, even my house was burgled", he replied.

He told me the story of his house been burgled in 2003 when he was in the UK. It had happened during day time when nobody was at home. He could remember the exact time duration when it could have happened, when the police came to the scene, when crime detectors came in to picture etc. According to him, the worth of lost items was about 12,000 pounds. Among the lost, jewelery of his wife, children and grand children were there. Although he had been able to recover money from insurance, I felt that he is still worrying about sentimental value of those items he lost.

Our conversations continued for about half and hour. That person has come back to Sri Lanka to beat the winter because, he could not bear the coldness of winter in the UK. He shared some of his interesting stories when he was in Sri Lanka.

A person who is in 80s still worrying about the sentimental value of items he lost due to uneducated, cruel and …. people.

Thursday, April 30, 2009

 

Eagerly waiting ...


Today morning, as usual, I connected to the Internet to read what is going on in the world. The very first news item I read which is about swine flu put me on thoughts...

I am worried about what is happening in the world currently. Most of countries have been directly or indirectly dealing with some kind of war which has become a headache to the entire world. Moreover, each and every country is suffering from the recession and struggling to recover. Climate changes happening are reported not to be for the betterment of the humanity too. Plenty of deceases have attacked the entire world and nations are trying to eradicate those. Everyday, news related with murders can be found in I would say, any of news media.

There are plenty of things world has to worry about. Adding another problem, swine flu has come to play putting world in fear and contributing to weakens world economy further.

I don't know when those problems be solved or vanished. But, I am quite happy about the fact that the No 1 problem in Sri Lanka which is the terrorism by LTTE is being destroyed with support from international community although, there is a strong support for terrorism from so called developed countries. I am eagerly waiting for a better future in my country with full of peace..

Tuesday, April 28, 2009

 

Handed over donations for the people rescued from LTTE


Today, I participated to the event of handing over donations we (team members of the organization I work for) have collected for the people rescued from LTTE terrorists in the north of Sri Lanka. The donations were handed over to the collection center at BMICH. By the time we reached BMICH, I saw several other vehicles were also in the queue waiting until their turn of handing over what they have collected. Some donations were personal donations while others were from different organizations. There was a crew to collect and arrange items handed over to BMICH. Having seen what have been collected and willingness of people for donating, I was pleased that children of mother Sri Lanka have got together to help their own relatives as we did when Tsunami hit Sri Lanka in year 2004. More information about donating can be found here.

Thursday, April 23, 2009

 

Few thoughts on Oracle's acquisition of Sun


"Oracle acquires Sun", a major news item being discussed in specially Oracle and Sun community. On April 20th 2009, Oracle has announced that an agreement was placed to acquire Sun Microsystems (Sun). They say that the acquisition would combine best-in-class enterprise software and mission-critical computing systems. According to what Oracle says, the plan is to deliver an integrated system which consists of all the pieces fit and work together so that customers do not have to do the integrations. This sounds good so far.

But, I am still curious about the future of Java Community Process (JCP). Among organizations like Apache Software Foundation, Elipse Foundation Inc., Google, IBM, Intel, Springsource etc., Oracle is also an executive member of JCP. With acquisition of Sun by Oracle, although, it is too early to predict the future of JCP, I assume that there would be a considerable impact on JCP. May be Oracle would take the control of JCP.

Another area as a Java fan, I am interested is the Java Open Source Community. With the acquisition, I am bit scared about open source products in IT industry. For example, It is predictable that GlassFish which is an open source application server would have a huge impact from Weblogic server which is owned by Oracle after the acquisition of BEA. How about Sun’s MySQL open source database customers? I assume there would be a huge impact on MySQL with this acquisition from industry leading commercial DBMS Oracle.

On the other hand, I would be happy to assume that improvements to OpenOffice could be seen in the future with this acquisition. A good competition will be there between OpenOffice and MS Office.

The deal has not been closed yet and it is too early to predict what would happen in each community due to Oracle's acquisition of Sun. It is obvious that acquisition has made Oracle more powerful than ever and it would be interesting to see the reaction from IBM.

Monday, March 9, 2009

 

Testing Framework with TestNG, EMMA & Maven


Any person who has been working in software industry for some time might have heard about the term 'Unit Testing'. Simply, Unit Testing is a methodology used by software programmers to test their own code before software is delivered to Quality Assurance department. Although, this was initiated as a practice, nowadays, it has become more or less a standard of software development. Code Coverage is also important in software programming. It can be considered as the measure of how well you have tested your own code. There are plenty of frameworks and tools available to write tests and perform code coverage. A simple testing framework could be developed with TestNG (test framework), EMMAMaven 1.x (Build tool).
Let's see how this is achieved step by step. (I have used java 5 for development. TestNG also supports java 1.4)
(code coverage tool) &

Step 1:
Download testng-5.8-jdk15.jar, emma.jar & emma_ant.jar. Copy jars to local repository and add it to your maven project.xml as a dependancy.(Java 1.4 users should download testng-5.8-jdk14.jar)


<dependency>
  <groupId>emma</groupId>
  <id>emma</id>
  <version>1.0</version>
</dependency>
<dependency>
  <groupId>emma_ant</groupId>
  <id>emma_ant</id>
  <version>1.0</version>
</dependency>
<dependency>
  <groupId>testng</groupId>
  <id>testng</id>
  <version>5.8-jdk15</version>
</dependency>
Step 2:
Write a simple test class. If you work on java 1.4, you will not be able to use java 5 annotations. But, TestNG supports XDoclet JavaDoc annotation syntax also.


package simple.test;

import org.testng.annotations.Test;
import org.testng.annotations.DataProvider;

public class SimpleTest {
@DataProvider(name = "numberAddProvider")
  public Object[][] getNumbersToAdd() {
    return new Object[][] {
{new Integer(1), new Integer(1), new Integer(2)},
{new Integer(2), new Integer(2), new Integer(4)},
{new Integer(3), new Integer(3), new Integer(6)}};
}

@Test(dataProvider = "numberAddProvider")
  public void testNumberAddition(Integer n1, Integer n2,
Integer result) {
assert n1.intValue()+n1.intValue()==result.intValue();
}
}
Step 3: Define test suite in testng.xml.

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="Simple suite" verbose="2">
<test name="Simple-Test1">
<classes>
<class name = "simple.test.SimpleTest"/>
</classes>
</test>
</suite>

Step 4:
Include a goal to run tests written using TestNG to your build.
you should have added 'emma.enabled=true' to your build.properties so that goals associated with code coverage would be executed when tests are run. I have used offline code coverage. (Instrumentation of classes and collecting run time coverage information are done in two phases. This is the ideal scenario for most of J2EE applications where code is built and deployed in different locations)


<goal name="testng-test" description="Runs testng tests">

<ant:delete dir="${maven.test.dest}"/>
<ant:delete dir="${maven.build.dir}/test-output"/>

<!-- Define classpath (for compilation)-->
<ant:path id="cpath">
<ant:path refid="maven.dependency.classpath"/>
</ant:path>

<!-- Create new output directories-->
<ant:mkdir dir="${maven.test.dest}" />
<ant:mkdir dir="${maven.build.dir}/test-output" />

<!-- Define classpath (for test running)-->
<ant:path id="runpath">
<ant:path refid="cpath"/>
<ant:path refid="maven.dependency.classpath"/>
<ant:pathelement location="${maven.test.dest}"/>
</ant:path>

<!-- Compile test classes (using java 5)-->
<ant:javac srcdir="${basedir}/simple/test"
destdir="${maven.test.dest}" debug="true"
classpathref="cpath" source="1.5"/>

<!-- Defind ant task for runnig TestNG tests-->
<ant:taskdef name="testng" classname="com.beust.
testng.TestNGAntTask" classpathref="cpath"/>

<!-- Run TestNG tests -->
<testng fork="yes" classpathref="runpath"
outputDir="${maven.build.dir}/test-output">
<xmlfileset includes="${maven.test.include.files}"
dir="${basedir}"/>
<jvmarg value="-ea" />
<jvmarg value="-Demma.coverage.out.file=
${maven.build.dir}/test-coverage/coverage.ec" />
</testng>

<!--Generate coverage reports if EMMA is enabled-->
<j:if test="${emma.enabled}">
<attainGoal name="emma-report"/>
</j:if>
</goal>
Following maven goals can be used to instrument classes at build time.

<goal name="emma-init" description="Initialize EMMA for
code coverage">
<ant:path id="emma.classpath">
<ant:path refid="maven.dependency.classpath"/>
</ant:path>
<ant:taskdef resource="emma_ant.properties"
classpathref="emma.classpath" onerror="fail"/>
</goal>

<goal name="emma-instrument" prereqs="emma-init"
description="Instrument the code which needs code
coverage once tests are run using EMMA">
<j:if test="${emma.enabled}">
<ant:mkdir dir="${maven.build.dir}/test-coverage"/>
<ant:emma enabled="${emma.enabled}">
<ant:instr mode="overwrite" metadatafile=
"${maven.build.dir}/test-coverage/coverage.em">
<instrpath>
<ant:path location="${maven.build.dest}"/>
</instrpath>
</ant:instr>
</ant:emma>
</j:if>
</goal>
The goal specified below generates the coverage report.

<goal name="emma-report" prereqs="emma-init"
description="Generage coverage reports using EMMA">

<j:if test="${emma.enabled}">
<ant:emma enabled="${emma.enabled}">
<report depth="method">
<ant:sourcepath>
<ant:pathelement location="${basedir}/src"/>
<ant:pathelement location="${basedir}/simple/
test"/>
</ant:sourcepath>

<infileset dir="${maven.build.dir}/test-coverage/"
includes="*.em, *.ec"/>
<html outfile="${maven.build.dir}/test-coverage/
coverage.html"/>
</report>
</ant:emma>
</j:if>
</goal>
In J2EE applications, you can instrument the classes at build time. The instrumentation metadata file would be created in your local machine. The instrumented version of classes can be packaged in an EAR which ends up deployed in an application server. When you connect to application server and execute functionality provided, coverage data is collected automatically. Once the JVM is closed you will be able to see the coverage data file. The coverage data file can be dowloaded to local folder where instrumentation metadata file resides. The goal defined above could be used to generate the coverage reports providing instrumentation metadata file and coverage information file as arguments.

Labels: , , , ,


This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]