Thursday, December 22, 2005
But the journey back home was a very tiering one with 3 transits and 2 delayed flights and 2 missed baggages. I had to stay close to 18 hours at Tokyo due to flight delays and at the time of writing this entry my baggages are yet to arrive. Hence i was travelling for the past 3 days and it feels so good to be home finally.
Friday, December 09, 2005
This article looks into the features of the generic List
Monday, December 05, 2005
I would post some pictures after a few days and i might not blog regularly since i would be busy.
Friday, November 25, 2005
I guess this is the height of obsessions with design patterns. Very hilarious http://odetocode.com/Blogs/scott/archive/2005/11/22/2499.aspx
Wednesday, November 09, 2005
Hope everyone enjoys the new forum.
I prefer using Eclipse for java development and have never tried the Java Studio. It looks good and should try it out when i get some time
Tuesday, November 08, 2005
Friday, October 28, 2005
Wednesday, October 26, 2005
Tuesday, October 25, 2005
If there are any questions or comments let me know.
Wednesday, October 19, 2005
Also check out some supporting projects available at http://www.ayende.com/projects/projects.aspx including support for Generics
Apart from that I got to attend the session by Gaurav Khanna on Developing high performance applications which was also very informative.
The MVP and .NET user pavillion was good and allowed us to pass the information on the Colombo .NET User group and information on Microsoft communities. Got to meet lots of .NET enthusiasts and was very enjoyable talking to them. Our MVP lead Lilian also joined us from Singapore for a short visit.
You can check the blogs of the other MVPs for some detailed review and some pictures. Mahasen also has a good review on the sessions he attended on Day 1 and Day 2
Sunday, October 09, 2005
And as for this year, got a few things planned out that i want to do and i will keep them posted on this blog as and when it happens.
Tuesday, October 04, 2005
Filtering and selecting objects and saving the generated images are a few features that will make it more useful but nevertheless it is a good tool to have and it is free. Check it out at the following URL
Tuesday, September 27, 2005
This article shows various options of handling events in VB.NET and introduces the new custom event construct available part of VB.NET 8.0
I was looking forward to attend my first MVP global summit but unfortunately will be missing out this year. The US embassy refused to provide visa and was under the conclusion that going to the MVP global summit was not a valid enough reason to visit USA.<Sigh>
On the bright side i will be here for the first ever Tech-Ed to be held in Srilanka. So if anyone do attend it, feel free to pop in and say hello at the dot net community stall. I would be very much interested to discuss anything under the sun especially topics related to dot net.
Tuesday, September 20, 2005
If you thought .NET 2.0 had a lot of new features wait till you see what's in store on C# 3.0 and VB.NET 9.0 (.NET 3.0). Some of the hottest stuff coming in are:
Get more information at http://msdn.microsoft.com/netframework/future/
Tuesday, September 13, 2005
Monday, September 05, 2005
This article looks into the concept of debugger visualizers and shows you how to create your own debugger visualizers. The sample code on creating an image debugger visualizer is included with the article. Let me know if there are any suggestions
This usually leads to a whole lot of problems when someone tries to change something. The biggest principle i like about OO code is when it is done in a "closed for modification and open for extension" principle. The need to test code that is already tested can be avoided greatly. Is there any justification to using an object oriented language such as C# or Java and not use proper object oriented practices or coding patterns?
Saturday, September 03, 2005
Friday, September 02, 2005
Tuesday, August 30, 2005
Wednesday, August 24, 2005
Google has entered the world of IM as well with their Google Talk software. Check it out at
And on a related note MSN messenger 7.5 is also released and you can download it from
Wednesday, August 17, 2005
Friday, August 05, 2005
Thursday, August 04, 2005
Download 101 code samples for Visual Studio.NET 2005 in VB.NET and C# at the following URL http://lab.msdn.microsoft.com/vs2005/downloads/101samples/default.aspx
Refactoring:Improving the design of existing code (Book)
And on a related note here are some tools to do unit testing:
Tuesday, August 02, 2005
This article looks into getting schema and metadata information using ADO.NET 2.0 with examples using SQL Server 2000 and Microsoft Excel. Let me know if you have any comments or suggestions.
Thursday, July 28, 2005
You need to do this process only once and after the first time a key will be stored in your machine for subsequent downloads.
You can also find a FAQ on Windows genuine advantage at http://www.microsoft.com/genuine/downloads/FAQ.aspx?displaylang=en
Wednesday, July 27, 2005
ASP.NET conversion issues and solutions
Also check the upgrade centre at MSDN http://msdn.microsoft.com/asp.net/migration/upgrade/default.aspx
Monday, July 25, 2005
I know there are good communities providing lot of info on development on Java but i do feel more blogging on Java by the people implementing new features and version will give it a big boost. Sun you need to take a note on this from Microsoft.
Well personally i still like Longhorn and it will take quite some time to get used to using Windows Vista instead of Longhorn
Monday, July 18, 2005
There are quite a few changes in the MCP program with more specialisation in various areas. You can read more about it at:
So the upgrade for me is to target the “Microsoft Certified Professional Developer – Enterprise Developer” from my current MCSD. So thats two Microsoft exams to be done end of this year.
Wednesday, July 13, 2005
My article titled “ADO.NET DataSets: Using partial classes to make intelligent datasets” is published on the simple-talk journal at the following URL
This looks into one usage of partial classes to include business logic without getting in the way of the generated code of the typed dataset.
Tuesday, July 12, 2005
The names of the java editions have been changed to be more uniform. The “2” is dropped from the names J2SE, J2EE and J2ME. The standard, enterprise and mobile editions will be known as:
Java Standard Edition (JSE)
Java Enterprise Edition (JEE)
Java Micro Edition (JME)
Friday, July 08, 2005
Thursday, June 30, 2005
And according to the post at MSDN forum this seems like the only solution for now
Sunday, June 26, 2005
I did the SCJA beta exam today. It was relatively easy but i still feel it’s quite different from SCJP. SCJP tests very deep in your core java skills. But SCJA tests the overall understanding on the entire java platform (standard, enterprise and mobile) as well as other related technologies often used along with java such as UML, XML and HTML. But the important factor is the exam doesn’t go very deep into these technologies and just tests your understanding of these technologies.
If you want to certify that you have a good understanding of the overall java platform and the kind of applications you can develop using various editions of java and you understand how other technologies such as XML and HTML etc works along with java and to show you can interpret basic UML diagrams the SCJA certification is ideal. But if you want to show your expertise on core java then go for SCJP.
Thursday, June 23, 2005
Just had a situation where there was a need for a global error handler method for windows applications in .NET. This handler should be invoked whenever there is an unhandled error raised in the windows application.
A way to do this is handling the ThreadException event of the Application object.
/// The main entry point for the application.
static void Main()
private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
Maybe there are other methods of doing this as well. But for a single threaded application this seemed ok.
Wednesday, June 22, 2005
On the publishing side two of my poems are available at http://www.poetry.com/ titled "The Mask" and "From My Hearts Core". And the poem titled "From My Hearts Core" was published in a couple of poetry editions. But it has been a very long time since I did write anything else after that (a good 2 to 3 years)
Check it out at the following URL:
So at the moment i have two feeds exposed in my blog which i dont think its a very good idea. So until i find a way to redirect anyone subscribed to my atom feed to my rss smart feed i will be sticking with both feeds in my blog.
Tuesday, June 07, 2005
Monday, June 06, 2005
So quoting from the blog entry for anyone who was confused as me:
Beta 1 RC is available - "It's a feature complete version for Beta 1"
Beta 1 for Indigo (the real Beta 1, not the RC of Beta 1) is coming in
Monday, May 30, 2005
More details here
Since this exam is just being introduced interested people can take the beta exam for free and the registration opens on the 1st of June. The exam is for 3 hours with 122 questions(This is because it's a beta exam)
Check the following URL for more details http://www.sun.com/training/certification/java/associate_beta.xml
Thursday, May 26, 2005
Wednesday, May 25, 2005
Well i really want to get my hands dirty on this but i am packed with things need to be done for the next few weeks. So i guess i have to put it down on my "Try it later" list...
Monday, May 09, 2005
As for the presentation it went ok i guess. It was more on an introductory level and most of the students were not exposed to the .NET platform much. I hope they gathered enough background to start exploring the .NET platform further.
Thursday, May 05, 2005
Wednesday, May 04, 2005
SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(); builder.ConnectionString = "workstation id=PRASANNA;packet size=4096;integrated security=SSPI;data source=PRASANNA;persist security info=True;initial catalog=SampleDB";
This will display the initial catalog("SampleDB") extracted from the connection string using the SQL Server specific connection builder object. Now that looks much cleaner that writing code by splitting the connection string and so on. There are different connection builders available for different supported RDBMS as well as a generic connection string builder.
Sunday, May 01, 2005
Just to summarize on things it was really great getting to meet a few of the people behind the products from Microsoft and the fellow MVPs from various countries in the asia pacific region. I am pretty sure the MVP global summit will be even bigger and i hope i will be able to spare some time to attend it in september
Later We had a beer party in the evening at the river front in singapore. It was fun and had a few beers. Got to have a good conversation with Justin (Triplez) and though it may sound weird but we were talking abt generics and C# over beer (thats what i really loved about the summit. It was something common and not something strange to talk about geeky stuff). And
Triplez is really into any programming languages with the curly braces and thinks the curly braces has more curves than a woman.
And then only i got to know Howard our dear MVP lead is on a reality show called eye for a guy. He is trying to win over the gorgeous VJ Denise Keller. So i gathered with a few MVPs and we were watching the show in the night.
Later we were taken to a big shopping mall where we just roamed around and did a bit of shopping. It was a bit of a boring day comparatively with the other summit days.
Later after the first day sessions we went on a night safari to the Singapore zoo. There were a few entertainment shows as well including performances from belly dancers and a fire eating show. I took some pictures with a big live snake around my neck. Though it didn't feel weird while i was holding it, felt really weird whenever i think of it later
During the cocktail party met up with a few Singaporean MVPs including Justin (Triplez) and Serena Yeoh (Firedancer) a Malaysian MVP. Also met William Tay a Singaporean MVP specialising in web services ( He wrote a real good article on the MSDN site titled “Routing Secured SOAP Messages Through Multiple SOAP Intermediaries Using WSE 2.0” ).
Later got to see an unofficial demonstration of the Paladin framework from Firedancer, along with a few singaporean MVPs over a cup of coffee . For those who dont know what Paladin is, it is a framework developed by Firedancer, enabling you to rapidly create applications in a more OO manner and without SQL statements. So anyone interested on this framework can download it from the gotdotnet web site. Though it is in alpha it has a great potential to be a very successful framework.
I'll follow this post with the event summaries of each day i wrote while i was there and probably update them with a few pictures as well later. I am not sure i am allowed to blog about the sessions because of the NDA with Microsoft though...
Saturday, April 23, 2005
Thursday, April 21, 2005
Wednesday, April 20, 2005
For me doing a certification is motivating myself to prepare for something. For example when .NET came into the scenario i started to prepare for my MCSD on .NET since it was a very good way to make myself aware of all the nitty gritty details on .NET. I always viewed certifications as something that provides me the confidence and proves i have the minimum knowledge on using a particular technology or a product. But it isn't or never will be a replacement for experience. You have to view both as different aspects and view certifications as adding value to your experience.
So was certifications helpful to me. Yes a lot and it has motivated me enough to continue to keep myself upto date in the IT industry and technologies i am interested in.
Just my 2 cents...
Monday, April 18, 2005
For full information go to the following URL
For example the following link displays all the blogs close to me with blogmaps
Blogs close to me
Check it out at http://lab.msdn.microsoft.com/vs2005/get/
And if you are planning to create and deploy applications based on the .NET framework 2.0 / Visual Studio.NET 2005 beta 2 read the details about the go live license at the following URL
Thursday, April 14, 2005
Monday, April 11, 2005
Commenting on blogs is as powerful as blogging itself.
If you dont have a blog and are not planning to have one (I'd strongly encourage to create one though) but if you are a frequent reader of blogs then you can make a huge presense on the blogosphere as an ardent reader. So leaving comments is similar to blogging in making your presense felt on the blogosphere.
If you do have a blog and you make it a practice on reading a lot of blogs then your comments will help you and your blog get notified in the blogosphere. Those are the traces to people who still have no idea about your blog. This is pretty much like linking to a blog and ends up creating a very powerful huge network of blogs.
Then again the voucher expires next year so i have ample time to think over it
Thursday, April 07, 2005
One approach that is useful is to use test driven development as part of your learning process( test driven learning) cos it has the attributes "start small and slowly increment" fitted in naturally. For example if you expect the library you are experimenting to do something, then write a test for what you expect and then implement your code to see if what you assumed is correct. So in learning new .NET libraries you can use NUnit for your test driven learning purpose. This is much better and easier to manage than doing a sample application to understand a new library.
You can try out TreeSurgeon from ThoughtWorks (the same guys who bring you Cruise Control) to set the directory structure for your projects.
This project is based on the article on "How to setup a .NET Development Tree"
As i promised I am uploading the presentation as well as the sample code for anyone interested to download and try out. The sample application is just a small demo just to show the basics on NHibernate with all parts of the application inside one project. In a real project you should seperate the business logic the data access layer and the user interface. If you have any questions or comments on getting started with NHibernate just post a message on the dot net forum.
These are just a few of the links i mentioned about:
NHibernate query analyzer
NHibernate quick start guide
NHibernate forum posted questions in chm format
[Update] There is a review at Merill's Blog
Wednesday, April 06, 2005
Monday, April 04, 2005
Discover how Microsoft SQL Server 2005 offers database developers the optimal combination of a tightly integrated development and data management platform. The rich and flexible programming environment in SQL Server 2005 allows you to leverage your existing skills and utilize familiar tools to build robust, secure, scalable applications.
Register today to learn how the integration of the ..NET Framework in SQL Server 2005 provides several major benefits, such as an enhanced programming model, enhanced safety and security, user defined types and aggregates, and a common development environment that integrates database development into the Microsoft Visual Studio 2005 development environment. In this series, we cover:
.NET Framework Integration: Learn how you can now take full advantage of the Microsoft .NET Framework class library and modern programming languages to implement functionality within the server.
Transact-SQL and Managed Code: Find out how to decide between using traditional Transact-SQL or a programming language that is compatible with the .NET Framework, such as Visual Basic .NET or C#. Understand where each method provides benefits and how to design for this in the beginning.
Web Services: See how to develop XML Web services in the database tier, making SQL Server an HTTP listener.
XML: SQL Server 2005 contains deep native support for XML. Learn how this can significantly help as you develop applications that make use of XML.
Data Access: Discover how ADO.NET 2.0 not only supports all of the new SQL Server 2005 features but also enables productivity and performance gains for all developers.
Register for the SQL Server 2005 webcast series to learn more.
Bonus: Attend a webcast in this MSDN series and complete an evaluation to receive the most current version of SQL Server 2005 Beta software on CD. Attend at least three MSDN webcasts in this SQL Server 2005 webcast series and submit evaluations and you will receive a SQL Server 2005 T-shirt*. And by attending a live webcast in this series and submitting an evaluation, you will qualify to win a Portable Media Center (official rules) pre-loaded with our best webcasts!
All this time i was attaching the debugger to the NUnit GUI process when i wanted to debug my test code but setting up the project configuration to invoke NUnit GUI seems like a better approach.
Friday, April 01, 2005
Wednesday, March 30, 2005
And you can make it access java libraries and vice versa. It produces byte codes and hence requires just the jvm to execute the programs.
Check it out at http://nice.sourceforge.net/
It should be noted that no ethically-trained software engineer would ever consent to write a DestroyBaghdad procedure. Basic professional ethics would instead require him to write a DestroyCity procedure, to which Baghdad could be given as a parameter. (Nathaniel S Borenstein)
It's such a thin line between being ethical and unethical
Tuesday, March 29, 2005
I especially like the RSS blog reader plugin. This enables to have a nice rss reader integrated into your Visual Studio.NET developer environment.
Spent the whole night watching TV and today apart from feeling a little tired due to lack of sleep things are back to normal again.
Monday, March 28, 2005
Friday, March 25, 2005
So if anyone wants a good book on design patterns i'll strongly recommend this. It's good as an introduction material as well as a good refresher to make those design patterns really stick in your brains.
Tuesday, March 22, 2005
Friday, March 18, 2005
Thursday, March 17, 2005
Well personally i dont think there is a need for this. It's true that a lot of systems have been developed in the past in classic VB and they are still up and running but the fact that the language has matured with good features is something we have to accept. I dont think there is any point in supporting VB6 for future developments. I am not sure It's such a good thing to do.
Microsoft has made an investment on the .NET platform and it's a great platform to work with. If a company has made significant investment on software products developed using VB6 it should just run as it is. But still that does not justify a reason for the support for VB6 to go on and there will be more problems if VB6 and VB.NET do co-exist.
The right way of approaching this is to start migrating the VB6 applications slowly. The major problem will be if the VB6 applications were not architectured properly into business objects and data objects and so on. In that case i do accept the fact the migration process of the application will be a pain, but we got to understand that is a fundamental flaw.
Still there are clipper or cobol systems running and if it is serving the business process perfectly let it run. But lot of companies started revamping their system knowing they will come to a point where the system might not be able to adapt to their changing business process. So the number of systems running on clipper or cobol or similar languages started to diminish. I feel that should be the same thing that should happen here as well.
Then again this is my personal opinion on this issue and maybe i am not seeing it from the point of view of someone who feels Microsoft should continue support on VB6. But one of the first thing you do learn in this industry is the fact that the only thing constant here is change. Requirements, business processes and technologies all change with time, so the key here is software applications, developers and users all need to change as well.
But if any do have supporting or opposite views on this i'd be glad to know.
You can find more information about it on the thread going on at javaranch.
Wednesday, March 16, 2005
Cheers for all the participants and wish them all the luck for the global arena which i am sure Srilanka will make a big impact
Tuesday, March 15, 2005
Thursday, March 10, 2005
Now the MSF for Agile Software Development Workbench is online with articles and presentations on the MSF agile process. You can download the MSF for Agile Software Development, Beta containing the guidelines and details about the process.
Now i really cannot wait till the VS Team system is released...
Tuesday, March 08, 2005
Sunday, March 06, 2005
Friday, March 04, 2005
Tuesday, March 01, 2005
This is exciting in the java development arena since it also contains preview for the JBoss EJB 3.0. Just looking at the enhancements i feel this will be a great library to use for persistence.
I really can't wait for NHibernate to mature to the level of Hibernate. But with already the work being done on NHibernate i think it wont be long before this happens.
Friday, February 25, 2005
Thursday, February 24, 2005
Tuesday, February 22, 2005
The download is available at http://www.communityserver.org/forums/473043/ShowPost.aspx
Sunday, February 20, 2005
Since my return date is on the 4th of March i guess i'll be missing out on the .NET user group meeting on the 2nd of March :-(
Wednesday, February 16, 2005
Well the biggest consolation was the fact Bill gates was also born in the year of sheep. So ok double the efforts and take the intiative is the way to go this year (thats for both Microsoft and Me) ;-)
Any other Sheeps i know out there? (Ps: If you are born in 1919, 1931, 1943, 1955, 1979, 1991 then you belong to the family of Sheep)
You have to keep your promises: When you make a promise and you really want to make sure you keep it, the best thing to do is blog about it. Cos now you have made an open statement and you will be thinking twice before breaking it.
More people listen (read rather): Don't u love it when people really read about your thoughts and your work and your ideas. Well thats exactly what you get with a blog and u have the widest audience you ever could get.
You are not alone: Just imagine you rambling about some problem you faced and someone commenting saying "Hey guess what, i faced the same issue. And i ended up doing this..." and suddenly it gives you a feeling you are not the only one who went through this.
So guys seriously start blogging
I guess i seriously need to start
Questioning more on what others say if i feel it's stupid or wrong
And spend more time on things that i really want to do
And say what i feel more often...even if it is going to get me into trouble
Actually all these thoughts came up while reading a blog entry in kathys blog about the donkey kicking incident... BTW Did u start getting those inspirational ideas after this kathy ;-)
Tuesday, February 15, 2005
I have a managed heap of memories regarding you - none of which are IDisposable. Therefore I am compiling my references, and persisting them to you in this file, which is ISerializable and will last for generations (at most 3)
Check out the full extract at
So finally handed over the documents for clearing and waiting for the shipment to come home. Hopefully there won't be any other problems in clearing my package from customs.
Sunday, February 13, 2005
Friday, February 11, 2005
And if you want to check out on a good book on agile software development check out the following book from Alistair Cockburn
Agile Software Development
Thursday, February 10, 2005
Tuesday, February 08, 2005
Monday, February 07, 2005
You can read the article at http://www.devx.com/DevX/Article/26776/0/page/1
Any comments on this?
Unfortunately didn't get enough time to study. I used the Java 5.0 developers notebook and javaranch to prepare. The exam was a bit tough and i was sitting and doing it for 5 hours (I took 4 hours and 45 mins). But i love to keep myself upto date on both java and .NET technologies which motivated me to do the beta.
As for passing the exam i am not very sure though... I did very well on design related issues on OO (I love OO) but didn't do so well on threads (I hate threads). Have to wait and see how it went.
Thursday, February 03, 2005
Dim frm as New MyForm
can be done in VB.NET 2005 simply as
This will show the default instance of MyForm. Personally I don't like this feature much as this might lead to some bad practices. I guess implementing a Singleton pattern is much more cleaner and makes more sense. But since it is there in VB.NET 2005 maybe some developers do prefer this method...
Wednesday, February 02, 2005
The purpose of the workshop was to show how easy it is to develop these types of applications even for a newbie to the Microsoft.NET platform. Most of the participants were new to the .NET platform. We did a few demonstrations as well as some informal QA sessions.
You can check it out at the link below:
Enterprise application library
Monday, January 31, 2005
It also gives me a reason to get my MCT soon since i was postponing it for a long time now.
PS :Thx Merill for getting me started on this
Friday, January 28, 2005
If i want to make sure a reference variable does not have a null reference the general syntax in VB.NET is to use the keyword 'Is' and 'Not' as in:
If Not x is Nothing Then
With the new IsNot keyword this becomes:
If x IsNot Nothing Then
So what are the advantages of the latter over the former? As far as i know nothing much except it looks more readable and more simple and keeps to the spirit of the VB language.
Wednesday, January 26, 2005
There were a few students very interested about the competition but were a bit reluctant since they were new to web services and mobile applications using the Microsoft.NET platform.
We planned to have a small workshop organized to give the students an idea on how easy it is to get started on using VS.NET to create web services and mobile applications.
Tuesday, January 25, 2005
With Srilanka currently having 7 MVPs and with most of us being veterans it will be an exciting opportunity to learn more about the MVP program as well.
There is also news about an asian summit to be held in april, but no concrete news on it yet.
Thursday, January 20, 2005
Assume that the Manager class inherits from the Employee class. So the following code is perfectly fine:
Dim mngr as new Manager
Dim emp as Employee=mngr
I can assign a Manager object to the Employee variable since all Managers are Employees.So let's apply a bit of Generics:
dim colMngr as new Collection(Of Manager)
dim colEmp as Collection(Of Employee)=mngr
I am just storing a collection of Managers in a collection of Employees variable. Looks fine? Well it's not...Generics does not work that way.
If the above code is fine then if i have an Executive class inheriting from Employee then colEmp.add(new Executive())
will be legal. But then what if i want to access the collection through the colMngr variable which is supposed to hold only a Collection of Manager objects...but now i have an Executive object inside it.
So the compiler will prevent this from happening. But remember this, as it may seem strange when doing Generics initially
Tuesday, January 18, 2005
private col as new Collection
So if i am going to use this collection to add and retrieve Customers i have to use the syntax:
Dim cust As Customer = CType(col.Item(0), Customer)
But if i already know i am going to use this collection only for to store Customers this casting is a real pain. And the compiler will do nothing to prevent me from storing a String or some other object type in this collection(A run time error will be throw when i try to cast it to Customer)
With .NET 2005 you have a special set of collection classes under the Collections.Generic namespace. With this i can define a collection as:
private col as new Collection(Of Customer)
Notice the new keyword 'Of', this indicates this collection will be used to store only Customer objects.
Dim cust As Customer = col.Item(0)
No more unnecessary casting since the return types are of the Customer type and not the Object type. The compiler will detect if you are trying to store some other types other than what is defined. And what more you can also define and use Generics in your own classes and constructs but i'll save that for another blog
Monday, January 17, 2005
For example a lot of constructs in object oriented programming languages use the object type when the data type a programmer will use is not known. If i am defining my own version of a queue as a library, i will not know the data type of the objects the end user of my queue will store. So when adding and retrieving elements i'll be resorted to using the object type since it can store any type of objects. The real problem here is typically the user of my queue will already know what type of objects he is going to store. But still since i am using the object type each time an element is retrieved it has to be type casted into the proper data type. This is very time consuming and a real pain. And if an invalid type is added to the queue a run time exception will be thrown...
So what is the solution? Ideally when i define the queue i should be able to use a placeholder for the type without specifying a concrete type. The user of my queue should be able to replace the placeholder with a specific type when creating an instance of my queue. So since the specific data type the queue is going to use is defined, the compiler can take care of not allowing objects of other data types to be added. This is exactly what generics are.I'll post a few samples on this for the new VS.NET 2005(alias Whidbey) as well as the new Java 5.0(alias Tiger) in my upcoming blogs...
Thursday, January 06, 2005
It was also great to know a few more additions to the MVPs in Srilanka with the inclusion of Jinath, Wela and Manzi. Congrats guys...
Monday, January 03, 2005