Tuesday, December 28, 2004

Google used to spread Virus!!!

I was amazed when I read the article "Santy worm makes unwelcome visit" in BBC News site that speaks about the Virus SANTY that used Google to search for website bulletin boards and defaced them and spread itself across the net. According to this article Santy is not the first such Virus, but atleast for me this was a News. Anyhow once Google started blocking these search queries the rate of infection tailed off sharply.

Thursday, December 16, 2004

Booch on Software Factories Vs MDA/UML

A Software Factory is a development environment configured to support the rapid development of a specific type of application. While Software Factories are really just the logical next step in the continuing evolution of software development methods and practices, they promise to change the character of the software industry by introducing patterns of industrialization. This is a methodology developed at Microsoft called Software Factories.

More on Software Factories at:

Grady Booch fires back on Software Factories in an article on IBM's developerWorks, responding to many of the claims put forth over Microsoft's software factories advantages compared to MDA using UML. Citing factual innacuracies and a confusion of the use of tools versus language definition, he points out several statements that he considers false. Read the complete article here.

Information Via: ServerSide.NET

Asia Blog Awards 2004

There is happening a Best Asia Blog Award Poll hosted by Simon for which Anand's blog has been nominated for the Indian Blog category. I just voted and thought of blogging this info. More information on the poll can be read at Asia Blog Awards 2004: Introduction and Rules. There are many categories and your vote can be cast at Asia Blog Awards 2004.

Friday, December 10, 2004

The Battle of the DVD

Further to my post on BluRay-The next Generation Optical Disk I got updates from Sudhakar on the HD-DVD/DVD Combo Disc released by Toshiba. Seems like there a tough competition between the two technologies Blu-Ray and HD-DVD, a battle between the two rather. Read the complete story here...

Thanks to Sudhakar for the links.

Monday, December 06, 2004

Meeting the VB.NET Team

I got the opportunity of meeting Steven Lees and Alan Griver of Microsoft in a session that was arranged for the VB developers of our organization. Though I am a C# developer I got this chance because I am a .NET professional. To be right I generally don't appreciate VB much, but after today's session on VB to VB.NET migration and a session on VB.NET 2005, I think I have started to think something positive about VB. :-))

Great good RAD features demonstrated again. But one thing that I greatly appreciate about VB.NET 2005 is the "My" class that is not there for C# developers. That is really a good thing that reduces much coding on File operations, app config access etc. C# developers are surely missing it.

Wednesday, November 24, 2004

Avalon Community Technology Preview Released

Microsoft released a Community Technology Preview of "Avalon," the new presentation subsystem for Windows.

The following are the highlights of this new release though there are a couple of caveates to this release:

  • Support for today's operating systems.
  • Layout and control features.
  • 3D drawing enhancements.
  • Continued refinement.

To read more on this release visit Avalon November 2004 Community Technical Preview.

Tuesday, November 23, 2004

Evolution of Computer Languages

I happened to read this interesting article that explores the way Computer Languages have evolved and how the layering of the computer users has happened. Thanks to Anand for the link.

Friday, November 19, 2004

Google launches Google Scholar

Google has launched a new search service aimed at scientists and academic researchers. Google Scholar is a free beta service that allows users to search for scholarly literature like peer-reviewed papers, theses, books, preprints, abstracts and technical reports. The new service accesses information from resources such as academic publishers, universities, professional societies and preprint repositories. because the service automatically analyzes and extracts citations and presents them as separate results, users can find references to older works that may only exist offline in books or other publications.

I am now working on a project that involves a lot of reading and documentation work. Today, I tried using this new search tool and found the result very useful in locating whitepapers and other document resources. This tool proves to be a better option than google search for people who do research oriented development and documentation.

Read the news article here...

Access Google Scholar Search Service here...

Tuesday, November 16, 2004

Interesting thread on Array Vs ArrayList

Here is an interesting thread on the Array and ArrayList data structures in the Microsoft newsgroup. Have a good read... :-)

Monday, November 08, 2004

Inside the Guts of CLR!!!

"Inside the Guts of CLR" - this was the topic of the MSDN session held on November 3rd Chennai, India. M Anand, MVP presented this Level 400 session and these days he is becoming the regular presenter for the MSDN sessions in Chennai. the session was quite informative and interesting. The crux of the presentation was CLR hosting and GC. A short listing of the things discussed:
  1. CLR Hosting - CLR hosting basics and advanced concepts like manually hosting CLR through COM. Actually it was interesting to learn that the infrastructure of the CLR is completely COM based.
  2. Garbage Collection - Basics of Memory handling, .NET GC algorithm, Object Finalization, Strong and Weak references etc. A demo on GC process using a simple string concatenating application was really informative. Infact I/we were amazed to see the GC differences when building strings with usual string concatenation and StringBuilder. This demo also helped to understand the best practice for string building.
  3. CLR enhancements in Whidbey - EnC and Generics.

Tuesday, November 02, 2004

Interesting Power Wattage Calculator!!!

With the new components of today, everyone wanting to upgrade to the latest and greatest, it goes unrealized that we might be overloading the power supply in our computer.

With all the high end mainboards, super fast processors, extra hard drives for storage, and case mod items such as LED fans, cathode lights (not to mention all the USB devices hanging off today's PC), people don't stop to think about all the wattage being used. However, the power supply is a very important and often overlooked component.

Check here to see if your power supply is large enough to take care of your power-hungry computer!

Monday, November 01, 2004

FxCop 1.312 Released

The FxCop team has released FxCop 1.312. Major features of this release:

  • Simplification of report xml.
  • New Fix Categories: Each message is marked to indicate if the suggested fix will constitute a breaking change for previously shipped code.
  • User Interface Improvements: windowing behavior has been made more consistent
  • Auto Update: Sign up to get notified when a new version of FxCop is available.

New rules in the areas of Design, Interoperability, Mobility, Naming, Performance, Portability, Security and Usage has been introduced. To read more on this release visit What's New in FxCop and download the tool here.

For people who ask what is FxCop, it is a code analysis tool that checks .NET managed code assemblies for conformance to the Microsoft .NET Framework Design Guidelines. It uses reflection, MSIL parsing, and callgraph analysis to inspect assemblies for more than 200 defects in the following areas:

  • Library design
  • Localization
  • Naming conventions
  • Performance
  • Security
FxCop includes both GUI and command line versions of the tool, as well as an SDK to create custom rules.

Blu-ray : The next-generation optical disc format

Blu-ray, also known as Blu-ray Disc (BD) is the name of a next-generation optical disc format. The format was developed to enable recording, rewriting and playback of high-definition television (HDTV). The name Blu-ray is derived from the underlying technology, which utilizes a blue-violet laser to read and write data. The name is a combination of "Blue" and optical ray "Ray".

The format was developed by the Blu-ray Disc Founders (BDF), a group of eleven leading consumer electronics companies:
  • Hitachi, Ltd.
  • LG Electronics Inc.
  • Matsushita Electric Industrial Co., Ltd.
  • Mitsubishi Electric Corporation
  • Pioneer Corporation
  • Royal Philips Electronics
  • Samsung Electronics Co., Ltd.
  • Sharp Corporation
  • Sony Corporation
  • TDK Corporation
  • Thomson Multimedia

To read more on this visit Blu-Ray.

Thursday, October 28, 2004

Smart Client Architecture and Design Guide Released

MSDN has just released a new architecture and design guide for Smart Clients which provides information on several topics for those creating smart client applications. Issues addressed include data handling, connection state management, security, and threading.

The definition of "smart client" is dependent on requirements and implementation details but all share the following characteristics:
  • Make use of local resources
  • Make use of network resources
  • Support occasionally connected users
  • Provide intelligent installation and update
  • Provide client device flexibility

To understand more on Smart Clients this article by David Hill would be helpful.

Access the Design Guide here...

Wednesday, October 27, 2004

Free Components!!!

People at Compona have given some really good free components.

SyntaxBox
ExplorerBar - FREE
Layout Containers - FREE
Common Controls - FREE
Compona Editors - FREE
Compona Grid
Math Lib - FREE

Thanks to dredge for this piece of info.

Wednesday, October 20, 2004

Templates and Generics

Generics is a feature that has been added to .NET2.0. I have been recently attending lectures on Generics where I heard people saying it is a .NET version of C++ Templates. But these articles contrast on this. From the explanation given I am now in sync with the fact that Templaets and Generics have a very minimal overlapping in their functionality else are different from each other. Read the articles at Are Generics in .NET like Templates in C++?, Comparing .NET Generics and C++ Templates and Templates & Generics.

Enums and Performance

Enumerations provide a convenient way to work with sets of related constants and to associate constant values with names. It is a is a special form of value type, which inherits from System.Enum and supplies alternate names for the values of an underlying primitive type.

While doing some study on this area I came across this interesting post that speaks about Enums and its performance implications by Wesner Moise. Until I read the article I didn't have the least idea that an enum would have performance implications.


Saturday, October 16, 2004

Edit & Continue for C#!!!

At last Microsoft has decided to extend the Edit & Continue feature for C# also. Many C# developers including me have been looking for this option that is available in Whidbey for VB.NET and C++, but not for C#. Thanks to Micrososft for this decision.

For people who ask what is Edit & Continue, it is a debugger feature that allows you to pause an application being debugged, make changes to the code, and then continue without a full project recompile.

Read more on this and other VS .NET 2005 features here...

Wednesday, October 13, 2004

HTTP module to check for canonicalization issues with ASP.NET

Few days ago a Security vulnerability in ASP.NET was discovered. Canonicalization issue as it is known, is that an attacker could send specially crafted requests to a Web server running ASP.NET applications and bypass forms based authentication or Windows authorization configurations, and potentially view secured content without providing the proper credentials. Initial investigation has revealed that all versions of ASP.NET could be affected, independent of the installed IIS version or IIS components. Read more on this issue at What You Should Know About a Reported Vulnerability in Microsoft ASP.NET.

Microsoft has now released a HTTP module that implements Best Practices for Canonicalization to check the vulnerability. More details on the HTTP module here...

Directly download the MSI package here...

It is recommended that all ASP.NET users invariable of the platform or ASP.NET version, apply this Validation Path module.

Wednesday, October 06, 2004

Method Overloading in WebServices

Web services are also classes just like any other .NET classes. Nevertheless they have methods marked as WebMethods that can be exposed by the WebServices to be consumed by the outside world. Apart from these WebMethods they can also have normal methods like any other classes have.
Since a web service is a class it can utilize all the OO features like method overloading. However to use this feature on WebMethods we need to do something more that is explained in this article.

Creating WebMethods:

Let us create a simple WebService that has the following overloaded methods:

public string GetGreeting()
public string GetGreeting(string p_Name)
public string GetGreeting(string p_Name, string p_Message)


All these three methods return variants of a Greeting message to the WebClient. Let us now mark the methods as Web Methods. To acheive this apply the [WebMethod] attribute to the public methods.

[WebMethod]
public string GetGreeting()
{

return "Hi Guest";
}

[WebMethod]
public string GetGreeting(string p_Name)
{

return "Hi " + p_Name + "!";
}

[WebMethod]

public string GetGreeting(string p_Name, string p_Message)
{

return "Hi " + p_Name + "!" + p_Message;
}

This would compile fine. Run the WebService in the browser. That should give an error saying that the GetGreeting() mthods use the same message name 'GetGreeting' and asking to use the MessageName property of the WebMethod.

Adding the MessageName property:

Add the MessageName property to the WebMethod attribute as shown below:

[WebMethod]
public string GetGreeting()
{
return "Hi Guest";
}

[WebMethod (MessageName="WithOneString")]
public string GetGreeting(string p_Name)
{
return "Hi " + p_Name + "!";
}

[WebMethod (MessageName="WithTwoStrings")]
public string GetGreeting(string p_Name, string p_Message)
{
return "Hi " + p_Name + "!" + p_Message;
}

Now compile the WebService and run in the browser. You can see that the first method is displayed as GetGreeting wherein for the second and third method the alias we set using the MessageName property is displayed.

Friday, October 01, 2004

4 Essential C# Tips

1. Program to Interfaces Whenever Possible

The .NET Framework contains both classes and interfaces. When you write routines, you will find that you probably know which .NET class you're using. However, your code will be more robust and more reusable if you program using any supported interfaces instead of the class you happen to be working with at the time

2. Use Properties Instead of Raw Data

With the addition of properties as language elements, there is absolutely no reason to declare data elements with any access level greater than private. Because client code will view properties as data elements, you don't even lose the convenience of working with simple data elements in classes. In addition, using properties gives you more flexibility and more capabilities. Properties provide better encapsulation of your data elements. Properties let you make use of lazy evaluation to return data. Finally, properties can be virtual. They can even be abstract. You can also declare properties in interfaces.

3. Use Delegates for Producer/Consumer Idiom

When you create a class that implements the producer idiom, use a delegate to notify consumers. This will be a more flexible way to implement this idiom than interfaces. Delegates are multicast, so you can support multiple consumers without creating extra code. Also, you lower the coupling between classes by using the delegate model rather than a full interface model

4. Pay Attention to Initialization Order

The C# language adds the concept of initializers on member variable declarations. These initializers get executed before the body of the constructor gets executed. In fact, variable initializers get executed before the base class's constructor gets executed

Read the complete article here...


Microsoft announces new MVPs!!!

Microsoft has announced new MVPs and here is the list from India.
  1. Hari K. Prasad, Trivandrum
  2. Dhamayanthi N, Chennai
  3. Sanjay Vyas, Mumbai
  4. KS Naveen, Bangalore
  5. Sarang Datye, Pune
  6. Tarun Anand, Delhi

Hearty Congratulations to them...

Thanks to Vishal and Arun for the info.

Thursday, September 30, 2004

Find Memory Leaks and Optimize Memory Usage in Programs Written in C#, VB.NET or Any Other .NET Language

This post is an update to my previous post on Circular References / Memory Leaks /other baddies.

Having a garbage collected runtime removes one of the biggest sources of program errors, memory allocation errors. Unfortunately, memory leaks are still a reality. A memory leak can occur if an instance is unintentionally being referenced from some other long-living instance, or from a static field. In this case the instance cannot be garbage collected. A very common unintentional reference is an event handler that is never removed.

Here is a .NET Memory Profiler as claimed by the vendors, that helps locate instances that are being referenced unintentionally, and it will tell why the instance has not been garbage collected.

Circular References / Memory Leaks /other baddies

In a garbage collected environment such as .NET, it is possible to unwittingly leave objects in a state where the garbage man will be "on vacation". A good article at EggHeadcafe by Peter Bromberg. Also a related article in Ian Griffith's blog. Both these articles give a good insight to the GC and strongly referenced objects.

Wednesday, September 29, 2004

THE TECHWEB SPIN: The Best Technology Blogs

Weblogs are in such profusion that it would be impossible for one person to do a survey, unless that person drank massive amounts of coffee and devoted many months to the project, full-time.
An interesting article on blogs by Mitch Wagner at TechWeb.

Monday, September 27, 2004

CNUG Celebrations Experiences

This post is an update to my post on CNUG's Anniversary celebrations in my other blog. The event was a great success with 300+ students and developers attanding the Technical Sessions and other events. Though the number dwindled in the afternoon sessions, the reponse was quite good.

Vadivel, a .NET MVP speaks his observations about the event in his blog - CNUG 2nd year celebrations ...

I would like to share the credits he gives with JD Arun, without whom I would have not been able to work for the event's success. Thanks to Anand, for giving me an opportunity to be a part of the event.

.NET 1.1 SP1 breaking existing apps reported

.NET v1.1 SP1 is reported to break existing apps.

Check the details out at .NET 1.1 SP1 breaking existing apps reported

Thursday, September 23, 2004

How do I become an Architect

This is one of the basic questions that has been pinching me for a long time, 'What do I need to become an Architect?' Many I times I have wondered to whom I can pose this question and get answered. After I read this post I understood that there are people who are baffled just like me and yes, I got answered.

Plethora of Information on XP SP2

Came across this page on the net while surfing. A good collection of links and info on XP SP2, JMF's XP Service Pack 2 Page

This post in my other blog gives a hint on an Undocumented XP SP2 issue - XP SP2 vs. Intel Prescott.

Wednesday, September 22, 2004

Efficient paging of recordsets with T-SQL

One of the challenges the Developers face is implementing efficient paging mechanism in case of large data. Jeff gives an efficient solution to Efficient paging of recordsets with T-SQL.

Adding to this, Richard is giving a code-based solution here.... Both have their own advantages and disadvantages as listed by Richard in his blog.

Tuesday, September 21, 2004

Top 10 Reasons .NET is better than COM

Why is .NET better than COM? A Serverside presentation gives top ten reasons as an answer for this question. Top 10 Reasons .NET is better than COM

Microsoft to share Office code with govts

Today's Times Of India NEws reads like this.... "Microsoft Corp has said it would share source code of its MS Office desktop software with more than 60 governments, including China and Russia."

Read the full story here...

Thursday, September 16, 2004

DSML Services for Windows

Directory Service Markup Language combines directory services technology (LDAP) with XML syntax to provide an easy way to share and use personalized data across company and technology boundaries.

DSML Services for Windows (DSfW) extends the power of the Active Directory® service. Because DSML Services for Windows uses open standards such as HTTP, XML, and SOAP, a greater level of interoperability is possible. For example, in addition to the already standard Lightweight Directory Access Protocol (LDAP), many devices and other platforms have other alternatives to communicate with Active Directory. This provides a number of key benefits for IT administrators and independent software vendors (ISVs), who can now have even more open-standard choices to access Active Directory.

Blogging with DotNetJunkies

I have started my second WebLog Mahalakshmi Natarajan with DotNetJunkies.

I am actually planning to post regularly in both these blogs with interesting and useful information as I have been doing in this blog all these days.

Tuesday, September 14, 2004

Model Driven Architecture(MDA)

This post intends to give info on MDA, further to my post on Formal Methods, UML & OCL.

MDA stands for Model Driven Architecture. It is framework defined by OMG for software development. It is an approach to creating designs that can cope with multiple technology deployments of a software system and is based on widely used standards like the Unified Modeling Language (UML). The intention of the MDA is to create machine-readable models that can be understood by automatic tools that generate schemas, code skeletons, testing models, test packs, and integration code for multiple platforms and technologies.

The central idea of the MDA is to develop and maintain an abstract design of a system that can be automatically transformed into multiple platform designs and finally transformed into the code that will realize those deployments. The core of the MDA depends on the three models that are created as part of the software development process, namely,
  1. Platform Independent Model - The PIM is a highly abstracted model that is independent of any implementation technology. It describes a software system that supports a part, or the whole, of business. The PIM may include generic functions, scenarios and class descriptions.
  2. Platform Specific Model - Using the PIM as a foundation it is then transformed into one or more platform specific models, which describes in detail how the PIM is implemented on a specific platform, or technology. Depending on the platforms across which the software system is going to be deployed PSM's will be created - one per platform, or technology. It is common to have many PSM's per PIM.
  3. Code - The detailed designs defined in the PSM's are then transformed into code in the final step of the MDA software development process.
The whole basis is MDA is a tools-based approach. While one or two hardy pioneers have implemented MDA using only a UML modelling tool, a text editor and a steely determination to keep their code and models synchronised, most of the benefits of MDA actually come from having generators to create code, test scripts, database schemas and other development artifacts directly from models. Some researchers and consultants have built their own model transformation tools, and there are some interesting work from a couple of people on using XSLT to transform models expressed in OMG's XMI (XML Metadata Interchange) exchange format. However, for most people, implementing MDA involves buying a vendor's MDA tool. However, because MDA is based on standards like UML, XMI and MOF (Meta Object Facility), buying a tool doesn't mean that you're permanently locked into using only one vendor's product.
When the visions of the MDA are realized there is a number of benefits it would bring to the software development community. The two main benefits are:
  1. Productivity - The developer will focus on the development of a PIM. From the PIM the PSM's and Code will be automatically created via transformations. Because the focus is on the PIM, quite a lot of the technical details of the underlying technologies and platforms do not need to be considered. The Majority of the code will be created through the automated transformation process and as such relatively small parts of code will need to be written (Yes! Coding will still happen). With less focus on the coding and detail design for specific platforms, the developers can spend more time in accommodating business problems. This will ensure better business fit and hopefully a happier user community.
  2. Portability - Portability is achieved via the PIM that is transformed into PSM's for the multiple platforms on which deployment will take place. With the transformation between PIM and PSM automated the PIM becomes totally portable.

There are a number of downsides to the MDA as it exists currently. They are:

  1. Current tools (if they exist?) for automatic transformation from PIM to PSM are not yet sophisticated enough. These automated transformation tools will rely heavily on transformation definitions and rules.
  2. The PIM's, if defined loosely, might not deliver the systems required. To ensure that the PIM's and subsequent PSM's and Code align with business requirements, the PIM's need to be defined precisely. Imprecise definitions will lead to faulty and incomplete systems that may create a huge maintenance overhead.
  3. Portability (in the future), trough transformation from PIM to PSM will probably be cater for the popular platforms, but for the less popular platforms may still remain an issue. Emerging technologies may also be plagued by not having automated transformation tools available in early stages of release
Early-adopters are already using MDA very effectively on real applications, and this will increase over the next few years as major suppliers like Sun, IBM and Microsoft ship MDA tools to their customers. Sun and IBM already provide some MDA support via Netbeans and Eclipse, and there are strong hints that Microsoft will soon ship model-driven tools, including this speech by Bill Gates.

MS Releases Authentication & Access Control tool for ASP.NET

Microsoft has released a new tool to help identify authentication and access control issues in ASP.NET for Web sites, FTP sites, virtual directories, Web directories, and files. This tool not only will help to identify current issues but can be used to monitor authentication failures as they happen.

Read More Here...

Download the different versions here...
X86
IA64
AMD64

Monday, September 13, 2004

Object Spaces and NHibernate

Database interaction via the FCL centers around retrieving a static snapshot of some portion of the database and manipulating it via the dataset, which mimics the RDBMS in almost every way. The problem with the dataset is that it doesn’t fit particularly well with modern object-oriented application design. Whereas datasets have tabular data, we tend to code using objects. Datasets have foreign key relationships, our domain objects use references. Where we want to use only methods, datasets require a certain amount of SQL code. Of course, some of these problems can be solved through the use of “strongly typed” datasets, but the fact remains that you are changing modes as you move from your domain model to your data access and back again. Depending on how you choose to layer that data access code into the application, changes to the data store can have enormous ripple-effects on your codebase.

The key to any enterprise application today is the domain model that needs to be transparent. It is in these classes that your customers’ problems are addressed; everything else is just a service to support the domain, things like data storage, message transport, transactional control, etc. Transparency means that your model benefits from those services without being modified by them. It shouldn’t require special code in your domain to utilize those services, it shouldn’t require specific containers, or interfaces to implement. Which means that your domain architecture can be 100% focused on the business problem at hand, not technical problems outside the business. A side effect of achieving transparency is that you can replace services with alternate providers or add new services without changing your domain. Coding directly against the dataset breaks the transparency. It is obvious inside of your code what storage mechanism you use, and it affects the way your code is written. Another approach to storage is the use of an object-relational mapping tool. Microsoft is in the process of building such a framework, called ObjectSpaces, but recently announced it would be delayed until as far as 2006.

NHibernate, an open source solution, is available today and solves the same set of problems. With NHibernate, your code and your data schema remain decoupled, and the only visible indicator of the existence of the O/R layer are the mapping files. With HNibernate, you’ll see that these consist of configuration settings for the O/R framework itself (connecting to a data source, identifying the data language, etc.) and mapping your domain objects to the data tables.

NHibernate Article on TheServerSide.NET

Read more on Object Spaces here...
Download the Source from SourceForge.NET

Friday, September 10, 2004

A Quick Scripting Tip

I have been trying some WMI scripting recently and thought could post the scripts that I found useful and the ones that I succeeded executing. Here is one. This script helps the Administrator to find out which scripting technologies have been installed in the PC.

On Error Resume Next
WScript.Echo "WSH Version: " & WScript.Version
Wscript.Echo "VBScript Version: " & ScriptEngineMajorVersion & "." & ScriptEngineMinorVersion
compName = "."
Set wmiServcObject = GetObject("winmgmts:" &"{impersonationLevel=impersonate}!\\" & compName & "\root\cimv2")

Set colWMISettings = wmiServcObject.ExecQuery & ("Select * from Win32_WMISetting")
For Each objWMISetting in colWMISettings
Wscript.Echo "WMI Version: " & objWMISetting.BuildVersion
Next
Set shellObject = CreateObject("WScript.Shell")
adsiVersionIns = shellObject.RegRead("HKLM\SOFTWARE\Microsoft\Active Setup\
Installed Components\{E92B03AB-B707-11d2-9CBD-0000F87A369E}\Version")
If adsiVersionIns = vbEmpty Then
adsiVersionIns = shellObject.RegRead("HKLM\SOFTWARE\Microsoft\ADs\Providers\LDAP\")
If adsiVersionIns = vbEmpty Then
adsiVersionIns = "ADSI is not installed."
Else
adsiVersionIns = "2.0"
End If
End If
WScript.Echo "ADSI Version: " & adsiVersionIns

If you want to have the latest versions of the Scripting Technologies:

ADSI:http://www.microsoft.com/windows2000/server/evaluation/news/bulletins/adextension.asp WMI:http://www.microsoft.com/downloads/release.asp?ReleaseID=18490
WSH/VBScript:http://msdn.microsoft.com/downloads/list/webdev.asp

Thursday, September 09, 2004

An Introduction to WMI

I have been involved with CNUG's IT chapter for quite sometime. Recently we had a session on Windows Scripting, since then I got interested in exploring it. I was browsing the net for some script help, I came across this link. A good article for An Introduction to WMI.

SQL2K Record Concurrency Control

When many people attempt to modify data in a database at the same time, a system of controls must be implemented so that modifications made by one person do not adversely affect those of another person. This is called concurrency control.

Concurrency control is usually implemented in two ways:

Pessimistic concurrency control
A system of locks prevents users from modifying data in a way that affects other users. After a user performs an action that causes a lock to be applied, other users cannot perform actions that would conflict with the lock until the owner releases it. This is called pessimistic control because it is mainly used in environments where there is high contention for data, where the cost of protecting data with locks is less than the cost of rolling back transactions if concurrency conflicts occur.

Optimistic concurrency control
In optimistic concurrency control, users do not lock data when they read it. When an update is performed, the system checks to see if another user changed the data after it was read. If another user updated the data, an error is raised. Typically, the user receiving the error rolls back the transaction and starts over. This is called optimistic because it is mainly used in environments where there is low contention for data, and where the cost of occasionally rolling back a transaction outweighs the costs of locking data when read.

In real world application Optimistic Concurrency Control is preferred than Pessimistic Concurrency control, except for situations stated.

I happened to read a solution based on timestamps for optimistic concurrency control implementation at Vadivel's blog. Read it here...

Wednesday, September 08, 2004

Throwing Exceptions

A quick tip on catching and throwing exceptions.

General way of throwing exceptions:

try
{
-----------------------

your code
-----------------------
}
catch(Exception ex)
{
----any clean up activities-----

throw ex;
}

Recommended way of throwing exceptions:

1. If you want to just do some cleanup when an exception occurs, you should re-throw the caught exception using this code instead:

catch(Exception)
{
---- clean up activities -----;
throw;
}


This preserves the original calling stack. Nobody knows you were involved, and they can trace back to the exception from its true origin without being diverted into your cleanup code. the above examle belongs to this category.

2. If you want to be part of the exception chain, then you should re-package the exception with your own, and assign the old one as the inner exception:

catch(Exception exception)
{
---clean up activities -----;
throw new MyException(exception);
}


You turn the general exception into a specific one, while preserving the original inner exception so that it can continue to be traced back to the origin.

Convert Java ByteCode to .NET IL

IKVM.NET is an implementation of Java for .NET. It has the following components:
  • A Java Virtual Machine implemented in .NET
  • A .NET implementation of the Java class libraries
  • Tools that enable Java and .NET interoperability

IKVM.NET includes ikvmc, a Java bytecode to .NET IL translator. If you have a Java library that you would like to use in a .NET application, run ikvmc -target:library mylib.jar to create mylib.dll.
For example, the Apache FOP project is an open source XSL-FO processor written in Java that is widely used to generate PDF documents from XML source. With IKVM.NET technology, Apache FOP can be used by any .NET application.

Read more here.....

Microsoft's Biggest Competitor

This is an entry in Sriram's blog today all about computerization. A good read and thought provoking...!!!
Read it here...

Tuesday, September 07, 2004

WebSites and Programs you can't live without!!!

Cool entries in Scott's Blog

Web Sites Can't You Live Without
Programs You Can't Live Without

Why the name Whidbey for Visual Studio 2005

Happened to visit Arun's MVP blog where I found this interesting post including the answer to the question Why the name Whidbey for VS 2005.
Blog from ArunGanesh_ MVP: Session - Whidbey - Visual Studio 2005

Also more Microsoft codenames from here...

Deepak talks on Localization support in WinXP

Deepak Gulati a localization freak talks about its support in WinXP here. The first time I listened to him speaking on this topic is at the CNUG's first year anniversary celebrations last year and after that a couple of time at Microsoft events. Here is a video in which he demonstrates his favorite topic.
Deepak Gulati - Working with ISV's in India

Chasing the hash code

An interesting and useful entry at Sriram's Weblog.

Madurai Usergroup in THE HINDU

India's leading Newspaper has spoke about Kaushik, a Microsoft Student Ambassador from Madurai and the USergroup he moderates. Read this at http://www.hindu.com/lf/2004/09/02/stories/2004090200560200.htm

Thanks to Sriram for this info.

Upgrade to SQL Server 7.0 from Yukon!!

I was going through Anand's Blog where I found this... funny indeed!!!

.NET From India: Upgrade to SQL Server 7.0 from Yukon!!

Friday, September 03, 2004

XML style guidelines for leveraging schema validators

Used correctly, XML Schema validation can dramatically reduce the effort necessary to perform basic data validation tasks. Additionally, validation rules that are centrally located in an XML schema can help users to better understand your system. It takes the right XML structure, however, to leverage a schema validator. This article discusses proper XML structure as well as best and worst practices for defining data validation rules in XML Schema.

How do you keep invalid data from getting into your system? Should you hand-code validation routines that perform bounds checking? With the XML entry points into your system, XML Schema validators can save you an incredible amount of time in this area. This goes for DTD validators as well as those for XML Schema.

Read more here...

Formal Methods, UML and OCL

I am now studying formal methods wherein I have come across something interesting I thought I could share with people.

Formal Methods is the application of logic to the development of "correct" systems. They are mathematical foundations for many technologies and practices that software engineers use. Joseph Goguen says that formal methods are “syntactic in essence but semantic in purpose.” A more narrower definition could be "A formal method in software development is a method that provides a formal language for describing a software artifact (e.g. specifications, designs, source code) such that formal proofs are possible, in principle, about properties of the artifact so expressed."

UML is one of the tools Engineers use to design more formal systems. This language fits Goguen’s description of a formal method. It is syntactic in essence, offering a well-defined way to construct a model. It is also semantic in purpose — that is, it is designed to convey meaning. Much information can be encoded in a UML model. But it is not always easy to construct syntactically correct and semantically rich models of software using just UML diagrams. The rules for which type of arrowhead and which type of connector to use for which purpose can be just as confusing as the syntax for a programming language such as Java. And then, even if you can construct a correct UML diagram, there is much information that it will not convey.
However, OCL, a formal specification language that is part of the UML specification, enables you to annotate models with expressions that clarify meaning. In UML 1.1, the main purpose of OCL was to identify the constraints on model elements. More on this...

Helping the Small Blogs...

There are by some estimates more than a million weblogs. But most of them get no visibility in search engines. Only a few “A-List” blogs get into the top search engine results for a given topic, while the majority of blogs just don’t get noticed. The reason is that the smaller blogs don’t have enough links pointing to them. But this posting could solve that. Let’s help the smaller blogs get more visibility!

This posting is GoMeme 4.0. It is part of an experiment to see if we can create a blog posting that helps 1000’s of blogs get higher rankings in Google. So far we have tried 3 earlier variations. Our first test, GoMeme 1.0, spread to nearly 740 blogs in 2.5 days. This new version 4.0 is shorter, simpler, and fits more easily into your blog.

Why are we doing this? We want to help thousands of blogs get more visibility in Google and other search engines. How does it work? Just follow the instructions below to re-post this meme in your blog and add your URL to the end of the Path List below. As the meme spreads onwards from your blog, so will your URL. Later, when your blog is indexed by search engines, they will see the links pointing to your blog from all the downstream blogs that got this via you, which will cause them to rank your blog higher in search results. Everyone in the Path List below benefits in a similar way as this meme spreads. Try it!

Instructions: Just copy this entire post and paste it into your blog. Then add your URL to the end of the path list below, and pass it on! (Make sure you add your URLs as live links or HTML code to the Path List below.)

Path List

Minding the Planet
Luke Hutteman’s public virtual MemoryStream
Mohammad.Abdulfatah, Chronicles Of
Anand M, DotNet From India
Mahalakshmi N, Mahalax's Blog
(your URL goes here! But first, please copy this line and move it down to the next line for the next person).
(NOTE: Be sure you paste live links for the Path List or use HTML code.)

Thursday, September 02, 2004

Sun, Microsoft Take Different Tracks on File Systems

Sun has come out with a File system what they call DFS(Dynamic File System).

At a release event on Tuesday, Sun Microsystems made a number of announcements about its latest operating system, Sun Solaris 10, including the official announcement of its new DFS (Dynamic File System). Solaris 10 is still in beta, and is available to customers via the Sun Software Express program. I am yet to read about this DFS and its way of resource management, compatibility and performance.

You could have more info here...

Windows XP SP2 affects SQL/MSDE access

Windows XP SP2 is the most recent service pack for the Windows XP operating system. Windows XP SP2 includes fixes and updates that include a set of security technologies designed to help reduce the risk of malicious attacks against computer systems. Windows XP SP2 includes Windows Firewall, an enhanced version of the component previously known as Internet Connection Firewall (ICF). Windows Firewall is a host-based, stateful, filtering firewall that discards unsolicited incoming traffic through TCP/IP version 4 (IPv4) and TCP/IP version 6 (IPv6) connections. Windows XP SP2 enables Windows Firewall on all network connections by default.

All above these Windows XP SP2 security features affects SQL Server and MSDE.

http://www.microsoft.com/sql/techinfo/administration/2000/security/winxpsp2faq.asp


Wednesday, September 01, 2004

Microsoft strips Longhorn of WinFS

Just came across this news today

http://www.newratings.com/new2/beta/article_462483.html

The most awaited LongHorn release for its WinFS, Avalon and Indigo... Now that Microsoft has said that Avalon and Indigo will be available with XP and Win2K3 and is stripping of WinFS from LongHorn, then what is going to so special of LongHorn.

Tuesday, August 31, 2004

Locality of Reference & Performance ??

Was just surfing the net and came across this blog entry of Rico

http://blogs.gotdotnet.com/ricom/permalink.aspx/c5e117b6-8f8c-4e07-b941-c6fa4d3413d8

That was a good article to understand Locality of Reference and Performance...!!

GMail Goodness

Last week I got an invitation for GMail. I clicked the link to create my account and to my surprise it gave me an alert when I tried creating a GMail account about the enabled Popup blocker(It opens a new window for singning a new account). Whenever there is an error in sending a mail or performing some action on my mailbox fails, it immediately gives a message alert.

I had this experience with MSN WebMessenger too. It has popup blocker detector that detected my enabled Popup Swatter and informed me about that.

CNUG Meeting last week

There was a session from Chennai .NET User Group last week on Polymorphism by Dhamayanthi N. That was quite a good session.
CNUG also started off a Infrastructure Chapter for IT Professionals called CNUG IT. The inaugaral meet of this chapter happened on the same day at the Chennai Microsoft Regional Office. I spent lot of time on the CNUGIT inaugural session work.
Shu Fen Cally Ko, Regional Director, APACGC, Unmanaged Communities, Microsoft, had come as a special guest for the evening. She talked on Microsoft's communities intiatives and how that will help CNUG & CNUGIT grow.
Abhishek gave us some good info on Community Star and MVP programs.