A Virtual Day with Virtual PC 2004

Today was a day dedicated to Virtual PC 2004.

My colleague (infact classmate) Ankur was the first one to have installed Virtual PC 2004 and have it up and running. His setup was quite surprising. He was able to install Virtual PC 2004 on a Windows XP Home edition. His one and only GUEST machine was Windows Server 2003. Infact, Virtual PC 2004 does not officially support this setup. Ankur’s need was quite different than mine. Since he had a laptop and a desktop computer he could afford for that kind of setup wherein he would be using the Windows Server 2003 for SQL Server 2000 and Source Control.

Since I don’t have the comfort of having a separate physical server, I wanted to install Windows Server 2003 as my GUEST machine with the HOST being a Windows XP Professional. The idea was to create a Virtual Network with the HOST and GUEST being the only nodes in the network. The excellent help provided by Virtual PC 2004 was useful only to get started.

I had to first install the new network adapter(Microsoft Loopback Adapter) using Add Hardware Wizard on my HOST machine and provide the HOST with a static IP address (192.168.1.1) for the connection associated with LoopBack Adapter. The similar proceedure was followed in my GUEST machine with the IP address being 192.168.1.2. I also changed the number of network adapters for the GUEST machine in the Virtual PC Console to include the Microsoft Loopback Adapter.

I restarted my GUEST machine and expected my HOST to detect the GUEST.

That looked like a distant future for me. Basically I could not get it to work. On googling, I found a link to a Virtual PC guy’s blog which explains a subtle problem. A chicken and egg kind of problem is what he says. Oh…and here is the actual Virtual PC guy’s blog. Now then I had to realize it will take quite more strain to make this thing work or conclude that it will NOT work. At this point I give up for the day and go to reality by taking a nap and iterating on this stuff tomorrow……..

LINKS:

  1. A-Z on Virtual PC
  2. Virtual Server
  3. TechNet Virtual Server Technical Briefing in Edinburgh

My first experiments with NUnit and NAnt!

Finally I got a chance to use these tools (NAnt and NUnit)

The first to be used was NUnit 2.2 and had problems using it because I don’t have permissions to install any assemblies into the .NET 1.1 Global Assembly Cache. So, I had to obtain the source and did the manual installation of copying all the required assemblies into a single folder. Then I set up the Path Environment variable to include path where these assemblies were put.

After doing this I went cruising my way creating cool unit tests for my own library under construction. It all worked fine and I used the NUnit-GUI to test my applications.

Finish Reading →

Back to formal education

Oh…it is a awesome feeling to go back to school to study.

I am now enjoying what I had been waiting for nearly 1 year. I am devoting my full time to books and that too on .NET books which makes me feel good.

But, it is not easy to go back to full time study after working in the industry. The contrast is in the case of university, we tend to be very consious about what we are learning. In the industry the learning process is overall and not in depth. So, learning during working is remembered more than the learning at university. I could realize this during my first week of my classes in The University of Hull where I am in the .NET MSc in Distributed Systems Development course. I came to know about this course through a blog post which i am not managing to trace back. And now, I am just doing the kind of stuff I’ve wanting to do in the past. Some cool low level compiler stuff upto using xml web services.

Finish Reading →

Why not read a book for your collegues!

I have now originally copied an idea from Rick. The idea is on how to make myself read a book. Rick started by writing out snippets (in his own words) from a book he was reading. Not just writing it for himself, he was sending them as mails to the collegues.

It so happened that for sometime such mails stopped which prompted me to mail him to ask about the proceedings. He said he shall continue doing it. Which makes him read the book.

I have also started to do something like that now. I am reading the “Essential .NET - The CLR” by Don Box. And not just that. In our internal forum, a new forum has been dedicated to this purpose. (email becomes cumbersome due to maintainance problems).

Advantages:

  • I get to read the book as collegues expect something every day.
  • I also get to summarize what I have read (best method to retain knowledge is to share it).
  • Collegues also get to read the book at a glance.
got to code now.....

A different advantage of multi-language support in .NET

Today, I had to create the skeleton VS.NET solution along with the different .NET projects that would go into the solution for a new project at my workplace.

The reason I chose today as the day for this is that I could see someone starting to go ahead with the project development like some student hacking his way around. I have lost the patience to even look at such kind of coding. Worst is the case when there are files named “WebForm1.aspx” and “WebApplication1.sln”. If not today then never it will be. If substantial amount of coding goes into the project then the natural tendency to resist change occurs and the result is spaghetti code. ( ”Denial is the most predictable of all human responses” - from Matrix - http://www.neoandtrinity.net/)

Finish Reading →

Training the non-techies on .NET!

“How to train the non-techies on .NET?“

“What should you start with and where to stop?”

These were just a couple of challenges I had to face this week at the training program organized at my workplace for the freshmen who joined our team a couple of weeks back.

The challenge becomes more interesting when the group consists of few computer science graduates and few non-computer science graduates.

Finish Reading →

My First Ever Talk for the Academia

On 19th June 2004, gave a talk at the Christ College, Bangalore on the occasion of Corporate Connexion. The topic I chose to talk was “.NET-An Overview”.

I had never expected such an event to happen at Christ College. Always wanted to be part of this beautiful campus as a student. Great college with great people around.

Initially, did not know what to talk on. Had no idea about how much the academia is updated with .NET. So, decided to present a very basic talk. The intension was to instill the basics. Clarify all the jargons surrounding .NET technology. Also to give a clear picture on how the various components of .NET fit into the development infrastructure.

Finish Reading →

Height of .NETing! (1892 meters Above Mean Sea Level)

It’s been week and the memories of trekking to a height of 1892m AMSL are still hovering in my mind.

It was just 3 months since the escape to the jungles, the nature invited another visit to the peaks, valleys, jungles, water falls, wild. The timing was not very perfect as my presence would have really helped the team to go ahead with the product release smoothly. Despite the tight schedule, made myself way out of this noisy Bangalore to the bliss of the Western Ghats.

This trek was to the KudreMukh (The peak that looks like the Face of a Horse) in the Western Ghats of Karnataka.

Finish Reading →

The arrival of Microsoft VS Team System

It makes me awe at the pace with which Microsoft is introducing new products. Added to that list is Microsoft VS Team System. Just the kind of product we wanted.

Got to appreciate the way this product was released. No clue about it till the last minute of announcement. Being a avid reader of the blogs, not many gave any clue about such a product. (or, have there been news about it? Not to my knowledge!)

While the attention was diverted in the blogs about new features in existing products (Office and Whidbey) or about features in some distant product (Longhorn), a silent product was under development with tight lips.

Now, is Microsoft creating a pattern for the usage of blogs. “Use blogs mostly for gaining/providing insights into distant/existing products”

This becomes evident as a blog being created immediately for VS Team System!
Any case, good going!

Lots of stuff ahead in 2005.

Finally, A Good Bye to Visual SourceSafe!

In my previous post on “Using CVS with VS.NET”, I’ve discussed the need to switch to CVS and also the problems faced in doing so.

After long time (nearly 2 months) my team has finally become very comfortable with using CVS and VS.NET. Looking back 2 months from today, I get reminded of those days when a whole day would be spent by me wondering who did what and what went wrong. With good push from my team-mate, Jimson, CVS was finally chosen as our Source Control. We did find a good plug-in called “Push-Ok” for VS.NET 2003. An excellent plug-in I should say. But, it came for a price.
We chose to stick on to Tortoise CVS and take the hard way around. We found that apart from files being edited by us, the VS.NET IDE also changed some files (like .csproj). Then with the help of Jimson, found out the right files to got into the CVS repository. Thus, after a half day session for the team on how to use “CVS with VS.NET” things got settled and now everyone seems to be comfortable with the “Copy-Modify-Merge” way of doing things.

A great feeling and a great relief….

Good going team…..

Working with ASP.NET UI Designer!

I had a requirement to develop a quick partially functional demo application. I chose to do the application using ASP.NET. Oh! It was a nightmare to create a web page with nearly 30 controls. The culprit was the requirement to place the controls aligned within tables. I thought it would be easy to do that once I had the controls on the page. It turned out to be a mess later when tables came into existence.

First, the controls could not be compacted within each cell of the table.

Second, confused whether to use the HTML view of Design view to create the pages.

Finish Reading →

Basic Integrated App using UIPAB and Forms Authentication

Just yesterday afternoon, when I thought of having a difficult weekend to crack the problem with UIPAB, lightning struck. I got a reply to my question posted to news.microsoft.public.dotnet.distributed_apps redirecting me to GotDotNET workspace where a fix to the Back button problem with UIPAB was posted. God, that was timing. Had the reply come at sometime evening, I would have been spending my entire day today searching for alternatives for UIPAB (specifically Maverick) and working on it. ( I think i’ll take some time off and try Maverick some time before UIPAB v 2.0 release).

As such, the Fix for Back button problem ( http://groups.msn.com/BDotNet/general.msnw?action=get_message&mview=0&ID_Message=12337&LastModified=4675459353602606026 for a description on the problem) did infact work out very well. I guess, the fix has been taken care in UIPAB v2.0.

With this fix, I managed to complete a Demo application integrating UIPAB and Forms Authentication yesterday evening.

The demo application will be used in my presentation on Monday to share my knowledge on UIPAB and Forms Authentication to my collegues.

Currently trying to use Data Access Applicaton Block in my demo application.

Also listening to DonBox’s .NET Rocks Internet Audio Show (talking about Indigo,SOAP…..)

My Kata - Forms Authentication

Today’s task of the day was to enjoy. So, the Kata was to experiment with Forms Authentication.

It has taken nearly a week to understand the Security Issues related with the ASP.NET application. Finally got a hang on Roles, Users,IPrinciple,Encryption and all other simple matters related to security.

The best part of today’s Kata was that it got over is just 60 minutes (The last 60 minutes of the day).

Two more kata’s are pending. One is to integrate the previous kata on Storing Encrypted passwords in Database with today’s kata. The second is to integrate the resulting kata with User Interface Process Application Block.

Off to meet a friend and discuss C# Types.

The No-Linker concept in .NET

Yesterday night while returning to my home, dropped in to my friends startup company. It so happened that I had to talk about “Gettting started with C#”.

I thought it would be great to write the HelloWorld program and start disecting it. It so happened that, we went on to discuss on topics like:

  • Whats the difference b/w compiler and interpreter?
  • What happens from the time of double click of an windows application till some output is got? We had gone as far as to see what is an OS loader, how processor executes instructions, where are instructions stored and all those stuff which should have been discussed at the college days.
  • Defination of Object.
  • Seing the anology of an object and me.
  • Seing the anology of a class and human class.
  • Class methods and Instance methods.
  • Whats the difference b/w an *.exe and *.dll file
  • About PE file format.

The most important point of the talk was when I understood that .NET does not have the concept of a Linker .

There is no linker because there is no such thing like statements in C/C++.

I could not resist to go deep further into the Metadata Tables and related basic stuff. Realized as to why Jeff Richter has given priority to Metadata and Assemblies in his excellent book “Advanced .NET programming”.

I am out to see whats the scenario in Java Technology case. (Recently lots of comparison is happening b/w Java Technologies and .NET) The best link of all is http://www.dwheeler.com/java-imp.html

C# Types

While having discussion with my friend yesterday, I realized that “There’s plenty of room in C# Types”.

Some of the questions i faced were:

Why did they go for Value Types?

What is actually a Stack and Heap?

Many more fundamental doubts arised. I am now in quest for answering those fundamental questions.

The First, among the plethora of doubts would be to clear “How much memory is allocated in Stack and in Heap for a simple program like the one below?”

//simple.cs
namespace ManiSoft.Practice
{
   internal class Simple
   {
       public static void Main()
      {
           int x;
           x = 7;
      }
   }
}


Also wondering at

Is x a Value Type? (B'cause it is within a Reference Type)

Ok. Out to read some basic stuff from Jeff Richter.

ASP.NET Application Hosting

Yesterday, I was successful in hosting my sample ASP.NET web application over the free ASP.NET web hosting facility available at http://europe.webmatrixhosting.net/

The best part was the usage of the System.Web.Mail namespace’s MailMessage Type.

Pretty cool stuff I thought.

Just set the properties of the email message to be sent; choose the smtp server and lo, message is sent.

since my company’s smtp server was temporarily not receiving mails, learnt about Relay server and other SMTP related stuff. (Thanks to my SysAdmin, Mr. Sudeesh)

Currently using hotmail’s smtp server.

The smtp server was OK today and hence i can now use the Web.config to store the smtp server address.

All it took to put up two pages of functional ASP.NET site was 2 hours.

My sample application stands at http://ideamani.europe.webmatrixhosting.net/

GTG Treking….

Back on Monday!

CLI and .NET

After a long delay, today got the chance to present the Common Language Infrastructure (CLI) presentation to my colleagues.

A very short, 20 minutes presentation. The shortest presentation of mine till now.

The Microsoft Powerpoint Slides can be downloaded from here(zip-290KB)

Related sites of interest would be:
ECMA –
www.ecma-international.org
ISO –
www.iso.ch
ROTOR –
www.sscli.net
MONO –
www.go-mono.com
DotGNU –
www.gnu.org/projects/dotgnu/
.NET –
www.microsoft.com/net

2003 has been the most eventfull year for me (Stepped into .NET). Hoping to get more surprises and changes in the coming year.

Using CVS for SourceControl

“An alternative to VSS” was the requirement. Decided to plunge into CVS. SA had the CVS server installed on a Linux machine. My task was to find and explore the various CVS clients for Windows.

First, tried WinCVS. Then went on to look for CVS plugins for VS.NET. Found Jalindi Igloo. Igloo was a major failure inspite of a detailed article on the CodeProject.

Then looked into the TortoiseCVS. Inspiring integration with the windows shell. The ease of use was spell bounding. The help accompanying installation gave a detailed look into the two different methodologies for SourceControl namely, Lock-Modify-Unlock and Copy-Modify-Merge. TortoiseCVS uses C-M-M model.

A VS.NET plugin for TortoiseCVS was under development. I tried it but failed to Check out a module.

Then looked into the
SubVersion alternative for CVS. Even this follows C-M-M model. But, the VS.NET plugin developed for SubVersion, ankhsvn looks good by seing the Screen Shots. Got to install svn soon and try it. The free book on subversion is excellent.

Then went on to read the Microsoft’s “Team Development Guide” from
Patterns&Practices. This guide is indispensible for VSS and VS.NET users.

Another Microsoft Article from MSDN was very good. This is related to SourceControl and build control for Web Projects.

For now, using WinCVS and TortoiseCVS together.

Waiting for something to happen………

Attended MSDN Yatra! Bangalore

Yesterday, attended the MSDN Yatra’s ‘ASP.NET Application Security’ session by MVP Srinivas Sampath.

Was a very well balanced session.

Started with the Theory of Planning an ASP.NET application for good security.

The different stages at which the security can be provided was explained with a neat diagram.


Usage of SSL was the highlight of the presentation.

Also usage of Stored Procedures instead of writing SQL in code was emphasized upon.

There were around 4 good demos.

One was how to configure IIS to enable SSL security.

The best was the Login Demo. It demonstrated a good template for authentication. Usage of Salt(Random Number), FormsAuthentication methods to store passwords safely in database.

It was followed by Authorization demo; identifying of User Roles etc.

I am going to implement these in my Application.

That’s it for now.