Ideas and Coffee at 3.47 AM

Some half baked beans... Tao, Zen and the art of converting coffee into ideas...

  • Microsoft Here I come...

    Hmm… where should I start… I don’t quite know. I have always wanted to join Microsoft and finally after clearing so many rounds of interviews, I am through. It has been an amazing experience, even going through the interview process.

  • The architect shall be thy savior...!!!

    “I don’t want to write code to test my code”. Most of the outsourced projects are based on the fixed bid system and the only way to maintain margins is to deliver as early as possible. This means the estimates are extremely tight. Simple best practices like writing automated test cases, re-factoring, etc are ignored and the quality of the deliverables suffers. The margins are kept and then later on when the client has issues with the product, a new maintenance project is initiated.

  • Overview of WSE 3.0

    I haven't been writing much lately... And I just can't find a decent excuse... I was just plain lazy last couple of days... But I am back and I do intend to continue with what I was doing...

  • Microsoft VSS: Create Database Problem...

    This is going to be a little boring for the Non Microsoft source control product users (CVS et al)
    Operating System: Windows XP Professional

    Microsoft Product: Visual Studio 6.0c

    Objective: Create a new Source code repository database, add users, change password.

    Process: Open Visual Source Safe Admin, it will ask you for an already existing database. It creates a dummy database during installation. Choose that which should usually be in the "C:\Program Files\Microsoft Visual Studio\Common\VSS" directory. Or choose any other existing database and  Log in using proper credentials open VSS Admin.
    Now Click on tools and create database. It should ask you for a location. Choose desired location by clicking on browse and geeks may type in the memorized location. keep the (New 6.0 database) option checked if you have VSS 6.0 installed on your machine. Click Ok.
    Problem: It should look like it created some database. But nothing really happens. The dialog box just closes. I thought after creation it would open up the database. So what I did was Clicked on Users menu and clicked on Open Source Safe Database and pointed to the newly created database and clicked open. Gives me an error saying "Invalid DOS Path: C:\Temp\users\admin\ss.ini". Temp is the directory I was creating the database in.
    So I opened Explorer and browsed to the mentioned location. What I saw was that the entry for the default users guest and admin were there in the users.txt. but the folders that should have been created for guest and admin were not created. So I copied the folders from an existing VSS database and tried to open the VSS. surely it opened. but when I tried to add a user, same error message.
    I googled for it and searched for a solution pretty long and then found out that if you create a file template.ini and add the following text into it, and store it into the users directory, it would work. I tried it and it did work... I thought I should blog this. So next time I or someone else falls into the same pit, It could be found on my blog itself.
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Text in the template.ini stored into the users directory
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
     ; ss.ini
       ;
       ; This file contains all the variables that "customize" Visual
       ; SourceSafe to your particular needs. The ss.ini variables are
       ; documented in the Visual SourceSafe User's Manual. Only a few of them
       ; are placed in this file by default.
       ; Visual C++ programmers should remove the semicolon from the following
       ; line, to uncomment it.  Other programmers REPLACE the line with
       ; different masks.
       ; Relevant_Masks = *.c, *.h, *., *.asm
       ; The following line prevents you from being asked for a checkout
       ; comment.
       Checkout_Comment = -
       ; The following lines force Visual SourceSafe not to execute certain
       ; file types.
       .reg (Win) = notepad.exe
       .vbp (Win) = notepad.exe
       .vcp (Win) = notepad.exe
       .mak (Win) = notepad.exe
       .bat (Win) = notepad.exe
       ; Your current Visual SourceSafe project.
       Project = $/
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  • Some geeky and useless stuff...

    Today I have some really geeky stuff... most of the information on this one... I am not sure where I would be using them... But we have been working with Microsoft technologies and windows operating systems for long... and I thought we ought to look into some of this stuff and at least know about them...
    These are just compilations of stuff that I have come up over the years mostly during those frantic surfing sessions... they were lying somewhere in the corner of my machine... I was cleaning up my machine... looking for disk space in my 120 gig machine (can you believe it...!!!) and found them...
    Too many software installed... and I still have that collection of games that Binoy gave me... I am working on it dude... working real hard... I wish I worked on my design patterns that hard.. anyways...
    If you have .Net framework installed on your machine and if you go to C:\WINDOWS\assembly, what you see there is a lie. That directory isn't really a directory. look at the headings you have version, culture and public key token. Yeah it shows what's inside the GAC. its a shell extension. But it doesn't show you everything that's inside the GAC. If you really want to see what's inside the GAC in the explorer environment, fire up the command line and type in Subst G: C:\Windows\Assembly. This creates a new drive that maps to the mentioned directory path. Then instead of visiting the C:\Windows\Assembly, if you visit the G:\ you will see what's really in the GAC. The system doesn't really know that you enough to hide the real stuff that's inside the gac... stuff that's usually concealed... Talk about cheating the system... Har har...!!!
    Now I don't really know how you can use this knowledge... But I am sure someone will find a way to use it... and let me know about it...!
    There are some windows hot keys that we all know like the Windows + E keyboard button fires up the windows explorer and Windows + F fires up Search files and folders and so on. But there is more. There is a whole list here at http://www.codinghorror.com/blog/archives/000378.html check it out guys. Not only that if you go to http://www.softpedia.com/progDownload/WinKey-Download-887.html using winkey you might even be able to customize a couple of windows hot keys.
    if you press Windows + R and type in wmic and hit enter you will see the windows management and instrumentation shell. it looks like the command line utility. WMIC is based on aliases. Aliases make the primary data provided by WMI available without having to understand WMI-specific concepts. For example, the processes running on the current system are available from the PROCESS alias. To view all of the processes that are currently running on the computer, type PROCESS in the WMIC utility. To list a specific process, type a command such as PROCESS WHERE (Description="explorer.exe"). To receive specific properties for the processes, type a command such as PROCESS GET Name, Handle, PageFaults. More information at http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/wmic.mspx?mfr=true
    if you press Windows + R and type in netsh and hit enter you see the Netsh. This is a command-line scripting utility that allows you to, either locally or remotely, display or modify the network configuration of a computer that is currently running. Details at http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/netsh.mspx?mfr=true and some fun stuff at http://www.hanselman.com/blog/UninstallingIPv6SupportOnWindowXP.aspx also for networking geeks. Didn't make much sense to me though... I was just on one of those surfing sprees...
    Some more crazy commands in the windows command line environment that I didn't know about. Not giving much details... Everybody should definitely check it out once though...
    click Windows + R and type in the following commands and hit enter.
    "fsutil" - file system manager
    "eudcedit" - font building tool
    "sfc" - scans system files and can repair or install the proper microsoft versions if corrupt
    "driverquery" - list of all the device drivers running on your machine with their properties
    "diskpart" - disk partitioning utility. Should be used extremely carefully
    "openfiles" - lists all open files
    "sc" - lets you manage services from the command line
    "getmac" - gets the mac addresses
    More commands at http://www.networkclue.com/os/Windows/commands/ this is real interesting stuff...

  • Smart clients to browser based...

    Microsoft has been web centric since the beginning of Studio .Net. It decided that there would be validation controls on the web forms. Controls that can be dropped on the web page, a few properties set and they would magically work...

    Now this should be an easier task to implement on windows forms... with no restrictions such as statelessness. Windows forms is a desktop environment. You can do whatever you want to. And it would have taken a much lesser effort for Microsoft to provide such smart controls on windows forms. Then Why didn't Microsoft do so.

    To add a column that has combo boxes, why do we have to go through a long process of creating a control that inherits from the textBoxColumn populate it with a populated combo box, then add it to tablestyles and then add the tableStyles to the grid. While there is a nice cool feature of a template column in web forms.

    Microsoft has no way of knowing what you are going to put in the template column and yet it has given a model so simple that you can put whatever you want to into any of the columns of the datagrid. Hell I have seen Datagrids inside a column of a datagrid. And trust me the simplicity freaks you out.

    I wonder why...!

  • Do you understand code better than people...?

    One day before I was returning from the US, I met Binoy... we were discussing something about whether I should take the technical path (architecture) or should I take the path where I am more involved with people (management)... and Binoy asked me... Do you think you understand code better than you understand people?
     
    Binoy was perhaps implying that I have to understand code better than people to become an architect... basically be a geek first... As much as I would like to be one... I am not... But again... the question is... Do I really have to be a geek to be an architect...
     
    Read on...