Thursday, December 30, 2004

Hospital contact numbers in Srilanka

People who have lost contact with their relatives or friends because of the Tsunami disaster and want to check the hospitals can contact using the following telephone numbers:

Country Code 94
(If there is a `0' in front please exclude that in international dialing.Example Ampara hospital from overseas can be contacted by dialing 94 63 2222235 )

Ampara Hospital (063)2222235
Batticaloa Hospital (065)2222261
Colombo National Hospital (011)2694731 or (011)2691111
Galle Hospital (091)2232276
Gampaha Hospital (033)2222399
Jaffna Hospital (021)2222833
Kalmunai Hospital (067)2229222
Kalubowila Hospital (011)2822262
Kalutara Hospital (034)2222661
Matara Hospital (041)2222223
Negombo Hospital (031)2222261
Panadura Hospital (038)2232261-2
Trincomalee Hospital (026)2222261
Vavuniya Hospital (024)2222261

Call for more help

With the relief work going on, still there is much more needed to do. Food, Water and Medicine are the immediate needs right now. Lots of people abroad are trying to help which is very welcome. Even a small contribution will go a long way in helping out here.
Do visit the following blogs as they have information on the relief work as well as details on requesting and offering help.

Wednesday, December 29, 2004

The entire nation mourns

The effect of the tsunami was much more than imagined with our country having a death toll of more than 18,000 at the moment.The entire nation is in a state of shock as this kind of disaster was never experienced before.
The amount of relief work needed is very massive.There are lots of people from abroad as well trying to help.Any small contribution even at this time will be a huge support here at this situation.If they need more information please check these sites:
The entire nation is participating in providing relief for the people displaced and suffering by donating food, medicine and clothes.The unity of everyone in Srilanka was seen as all people got together through various means to help out in their capacity.This kind of togetherness gives us confidence that we will be able to see this through, but this will haunt our minds for a very long time.

Monday, December 27, 2004

Tragic end to 2004...

It's a very sad and devastating day in Srilanka and a very tragic end to the Year 2004.The aftermath of the Tsunami and the quake left Srilanka in a very tragic state leaving thousands dead.The relief works are going on and hope everyone will pitch in to do whatever they can to help out the people who are suffering...

Thursday, December 23, 2004

Merry X-Mas and a Happy New Year

I am not sure how many people do come to my blog but I wish everyone I know a Merry X-mas and a very prosperous 2005. May all wishes and dreams become reality

Friday, December 10, 2004

NHibernate your data...

NHibernate is a port of the ever popular Hibernate the coolest ORM mapping tool. Since i had played around quite a bit on Hibernate decided to get my hands dirty by trying out NHibernate.
The current version I am fiddling around is NHibernate Alpha the moment NHibernate Alpha is also available).Though NHibernate is still in its alpha stage dont let that put you off.Its quite stable and considering its a port of the 2.0.3 version of Hibernate which has gone through a fair bit of revisions you can confidently invest time in this.The only problem is there is a shortage of documentation and articles on how to do some of the advanced features.
So lets start off with some real basics on how to persist a class in .NET through NHibernate. These are the basic steps you need to do:
Create your .NET class you want to persist and have properties on the field you want to persist.
Create your table you want to persist your .NET class in.
Create your mapping file.
Create the configuration details about the database in the config file.
And you are ready to go.Check the link to the quick start tutorial on NHibernate. I'll keep posting on how to do some advanced features and problems faced on using NHibernate and if there are any others who have used or starting out NHibernate put your comments here on suggestions and problems you have. (The official NHibernate web site) (Quick start turtorial to NHibernate)

Thursday, December 09, 2004

Imagine cup: Moratuwa uni

Imagine cup 2005 is here and Srilanka is participating for the first time.This years theme is "Imagine a world where technology dissolves the boundaries between us".
Today Myself, Merill, Wela and Jinashri from Microsoft visited Moratuwa university and met some very enthusiast students.The prices are very attractive and hope Srilanka will make a huge impact worldwide.So come form your teams and visit for more information.

Monday, November 29, 2004

We are gonna Rock at ASOCIO

ASOCIO exhibiton is here and we at the .NET user group have planned out lots of stuff to do. Got some cool demos and presentations lined up and loads and loads of giveaways to give away ... So be there and you can catch further details at

Thursday, November 04, 2004

November .NET User group meeting

Yesterday the November UserGroup meeting was held at Gateway. Howard from Microsoft did some cool demos on Tablet PCs. Though ink enabled applications and Tablet PCs have not hit big time in Srilanka as yet, still it got everyone excited about the facilities available in Tablet PC applications.
Next I did a demo on Test driven development and NUnit using Microsoft.NET. I really do hope this methodology will catch up as well since it is very addictive and puts quality of the software first. So if anyone tried out NUnit or TDD and came up with problems or something interesting shoot a message in the dotnetforum (

Wednesday, November 03, 2004

The MVP Dinner...

Well it was a pleasant evening meeting Howard, Ed and Stan from Microsoft along with the MVPs(Shandy, Ruwan, Merill and Me) .Alanzo and Jinashri from the Micrsoft Partner in Srilankan and Wela one of our admins of dotnetforum also joined in. It was nice chatting to Howard and hearing about the MVP program. Ed and Stan explained about the Imagine cup competition and there were a few discussions on the dotnetforum as well. All in all it was a very pleasant evening and some good sea food and a great time.

Monday, November 01, 2004

J2EE-.NET Debate

One of the significant events in IT for this calendar was the recently completed OOPSLA conference.And a major attraction was the "The Great J2EE vs. Microsoft .Net Shootout" with the participation of some major names in the software development industry.Check it out at the following URL and post some comments on any interesting observations on this article.

Saturday, October 30, 2004

No Blogs...Lots of Work

Didn't blog for some time now as really held up on some last minute deadlines...Hoping to get started again the moment i get some teeny weeny bit of spare time.

Monday, October 04, 2004

Got the MVP award

Received the Microsofts Most Valuable Professional award for the Visual developer-Visual basic category.It does give a huge boost of confidence and hope i can impart whatever knowledge and experience i gain through this to the .NET community. Thx Microsoft for the recognition.

Thursday, September 23, 2004

Got 6 gmail invitations

Got an invitation to invite 6 more people to open gmail accounts.So if anyone needs a gmail account just post your name and e-mail address as comments to this post.

Tuesday, September 21, 2004

JBoss application server 4.0 released

The much awaited JBoss application server 4.0 is released on yesterday.This is the first open source application server to be certified J2ee 1.4 compliant.This also has the Tomcat web container and Hibernate for object relational mapping.
With the major re-work planned for EJB 3.0, the integration of hibernate provides an alternative in using plain java classes for persistence.
You can download the current version at:

Monday, September 20, 2004

Open source tools for .NET:the good and the evil

I am a fan of open source tools and i really have great admiration for people developing open source tools.I always believed one of the success factors for java is also the support provided by the open source community.
The other day i was reading a very active debate going on at on "Does the .NET community need open source?".I firmly believe a very vibrant open source community for .NET will be very good for both Microsoft as well as the developers.I truly believe it's a win win situation.And i really don't believe the arguments against open source and i don't see how an active community creating some great tools and releasing it under open source for the rest of the developer community can be bad for .NET.
Currently most of the java open source projects have their .NET counterparts developed or under development. For example:
junit - nunit (an unit testing framework)
hibernate - nhibernate (object relational mapping tool)
ant - nant (a build tool)
and a whole lot more...
So if you want to check out the open source tools available on .NET try the following links

Monday, September 13, 2004

Peek .NET 2005: Partial Classes...

One of the newest addition to the feature list of .NET 2005 is the concept of partial classes. Though it might not be a very exciting feature compared to the rest of the features .NET 2005 has to offer it sure does have its own list of benefits.So what is a partial class?A partial class is a partial definition of a class with the complete definition split across multiple files of class definitions. For example I can define a Customer class split across class definitions in VB.NET(2005) as:
Public Class Customer
Private CustName as String
End Class
Partial Public Class Customer
Private CustBalance as Double
End Class
So once i compile I'll have one single Customer class with two fields(CustName and CustBalance). But why would i want to do that?Why can't i just define both the fields in one Customer class definition?The actual benefit of partial class will be visible when you use code generation.Code generation usually involves your classes generated and your class definitions updated frequently.When you use VS.NET 2003 you might have noticed the Windows Forms Generated Code which is hidden by a region.So a Form in VS.NET 2003 has code that is generated as well as code written by the developer in the same file.With VS.NET 2005 the Form definition will be split using partial classes with one being generated and the other one being coded by the developer.This provides a clean seperation between the generated code and the code written by the developer.
As i said in my previous blog, code generation is a very important thing in current software development practice that shouldn't be ignored.And partial class complement code generation to integrate it into your development stream easily.

Friday, September 10, 2004

NAnt:More than just a build tool...

You have just done some change to your existing source or just started to write a few lines of code for a new project or u have done nearly 99% of the code for your project, your expectation of the build process differs by the stage you are in your project.Generally a build process does a compilation of your source and creates the output files or reports the compilation errors.But as your development work gets more complex you wish your build process can do more like checking out your source from VSS or e-mailing the build output to an admin or creating documentation or running your unit tests automatically.This is where NAnt comes in.
NAnt is very similar to Ant a Java build tool.You create build files with targets to be executed by NAnt.These targets will have tasks to do the work required such as compiling or checking out source etc...And if you want to perform a task thats not available(though NAnt and its associate projects have a big list of tasks) you can write your own task and include in in your build file.So if you want to try out NAnt check out the following links to download the necessary files: This project defines some additional tasks not available with NAnt
So Happy building ... and post your experiences as well

Wednesday, September 08, 2004

Got a gmail account

Atlast got a gmail account.1GB for e-mails is what i needed as my hotmail was going over the limit.
Thx Jinath( for sending the invitation.

Tuesday, September 07, 2004

Is AOP going to kill OOP?

I am pretty sure you have heard the buzz word about Aspect Oriented Programming...So what is AOP?Is it the next big thing in IT after OOP?So does that mean OOP is dead?
Actually AOP is in no means a competition to OOP.In fact it's a complement to OOP that adds value to your objects.Generally in OOP when we define classes, a principle we follow is that an object should have a clearly definable responsibility.For example if we take a Customer class it should contain functionalities of a Customer.But when we implement this in our program our domain classes (For example Customer) is cluttered with logging, security implementations etc...These are cross cutting concerns that shouldn't be part of our domain classes.So AOP provides you a way to extract these cross cutting concerns into Aspects and have them adorn our objects to get the required functionality.
So How do you do AOP?Well either you can implement your own AOP frameworks or try out the following: for a .NET AOP implementation for a Java AOP implementation

Monday, September 06, 2004

NUnit-Write test code and code???Thats a lot of work...

Well that was my first impression when i was introduced to JUnit a java unit testing tool.At the start when i started playing around with it, it seemed like lot of work writing test classes and test cases but as i got used to became a very important tool in my collection of development tools.Actually it saves you a lot of time when it comes to testing as your testing can be automated instead of running your entire project to figure out whether a portion of your source is doing what it's supposed to do.
And with NUnit I get the same facility in my .NET programming.It's really simple to incorperate NUnit to your development.
1.Add a test project to your solution(preferably a class library lets call
this Test project)
2.Add reference to NUnit.Framework and the projects in your solution that you want to test.
3.Write Test classes in your test project for the classes or functions you
want to test.
4.Invoke the NUnit-GUI and select the Test project.dll you created and click
on Run.
It's really that simple...So if you want to try out NUnit...go to and download the required assemblies.Go through the docs and if you have any trouble post a comment...will try to help out in my spare time.

Annual Book Exhibition

The Annual Book Exhibition is on today from the 6th to the 12th at BMICH.Got a huge book list to buy and hopefully will be able to get every single one i need...

Friday, September 03, 2004

Code Generation

I know there are lot of developers with mixed reactions about code generators.Ok,I'll speak for myself...I used to hate code generators and always looked at them with a doubt in my eye.But are code generators so bad? Well nowadays I am starting to trust them a little bit more than i usually do and use them in my day to day work a lot more...So recently came across an open source project in C# called Data Tier Generator available at Once your database is created in SQL server with all the relationships between tables, you can use the generator to generate stored procedures for accessing your tables and cSharp code for calling the generated stored procedures.The Data Tier Generator will generate stored procedures for common data access code such as insert,update,delete by primary key,select by primary key, delete by foreign key and select by foreign key.This is a very good example of how much work can be cut down by code generators.With the data tier generated you can quickly start coding the business classes and use the generated data tier to persist your business objects.
So if you are interested in writing your own code generators check out the book Code Generation in Microsoft.NET by Kathleen Dollard which uses a XSLT based approach for generating code.
And if you are not interested in code generators think again, there are a lot of areas in software development where you can cut out development time by automating repetitive tasks through code generation.This will allow you to focus more on tasks very specific for your business domain such as business rules.

Thursday, September 02, 2004

Book:Another Head First...

Wanna know the next big thing in the java community after the release java 5.0 code named tiger...It's the release of the book Head First Servlets and JSP. Planning to get hold of a copy as soon as its available in a nearby book store.If you are a previous reader of any Head First book, pretty sure you will be looking forward to as well.
Hope Kathy and Bert will knit a few more books filled with technology and laughter (Wonder how they mixed those two together)...Great work guys

Srilankan Dot Net Forum 3rd meeting

The third meeting of the Srilankan dot net forum ( was held yesterday(Unfortunately couldn't make it again...) The Srilankan forum is becoming a very vibrant community on .NET.Hats off to everyones contribution large and small

Atlast I am blogging

Decided to start a blog 2 months ago and finally started blogging... (Yipeeee)
So mostly i'll be blabbering(I mean blogging) about development in Sun and Microsoft related technologies...(Yes they will co-exist in my blog and the world of web services)