free html hit counter
Posted on: Friday, January 26, 2007 by Rajiv Popat

The When and Why of SVN Branches, Tags and Trunk

At work we use SVN for all our .NET Projects. Being a Microsoft Developer I’ve moved between multiple source control systems during my development life. Starting with Visual Source Safe, I moved to CVS, then to TFS (during its Beta stages) and finally fell in love and settled down with SVN. The love was strong enough to convert all .NET developers I work with, over to SVN! :)

Even today I highly encourage all Microsoft developers I meet outside the workplace to try-out SVN. With Tortoise and Ankh, the whole Visual Studio Integration and Explorer Integration is very easy to get and it (almost) feels as easy as VSS and as powerful as CVS. But this post is not about plugging-in SVN and related tools. It’s about starting a discussion on When-To-Branch and When-To-Work-On-The-Trunk (and When-To-Create-Tags).

Let me being by saying - It’s all about choices, opinions and which way works best your project. In the few years of using CVS (and then SVN) I’ve seen multiple ways in which the Trunk, Branches and Tags are used by multiple teams. Every team has its own “best practice” (the whole idea of a "best" practice is relative, because 'best' depends on so many factors :)) around when they should work on the trunk, when they tag their builds and when they create branches. Here are two most common approaches I’ve usually seen being used depending on the scenario and the project:

Approach 1 - Work on the Trunk, Tag on Each Release / Revision and Branch for Experiment

I’ve personally used this approach in projects where we have very frequent and agile releases. The approach basically involves:

  1. The team constantly working on the Trunk.
  2. The trunk is tagged at Every Revision as well as at Every Release so that a snap shot of any version can be obtained.
  3. The team continues to work on the trunk after the tagging. 
  4. If there’s anything the team wants to try out, they branch the code and merge back the changes to the trunk when done.

At any given day the Repository looks much like this:


What I love about this approach:

  1. The Simplicity and Speed at which team can work - Really helpful if you’re going to have weekly tags.
  2. Allows a “Branch-When-Needed approach” and leaves the branching-for-trying-out-complex-feature-implementations on Developers rather than imposing a strict policy on when to branch. They can freely do it as and when they want it.
  3. Easy to understand and work on, specially for VSS developers .
  4. Not having to change your Working Folder for each version change, since each developer is just concerned with the trunk and his own branches.


  1. The Trunk may not always be functionally tested or 100% stable.
  2. A colleague brought this up during a discussion and his point was completely valid – “You can’t create patches for Release 1.1.1 and check it in to 1.1.1, if your trunk is at Release 1.2.” – (He’s all for Approach 2, I describe later in the post). Point valid and taken :) but I’m still not fully convinced that you really want to do something like that in a project that’s moving ahead really fast and throwing out revisions every week and a release every month or so; or for that matter, I'm not really sure if you want to do that for any project. 

Personal Opinion: I don’t like the whole Idea of applying SVN patches to a branch of a version that has already been released and then checking-in the patch to that branch. If an immediate patch needs to be applied to an already released version e.g. 1.1.1, I can still checkout the tag, work on the checked out tag, create a patch and then ship the patch. It should be possible to apply the patch on both, the primary trunk (which is now at 1.1.2) and the checked out version of tagged build 1.1.1 (which needs immediate fixing). However what I don’t agree to is the idea of applying the patch to a 1.1.1 branch and then checking in the changes to 1.1.1 specially after 1.1.1 has been officially released. It just creates more confusion and makes things product versioning more complicated. Personally, I feel this is exactly what service packs are for.

Approach 2: Always work on the Branch Approach - I’ve seen a LOT of development teams take this approach. People claim this is really helpful when you just want to do milestone based branches and tags. The Idea is:

  1. For Every Milestone / Release create a New Branch.
  2. Everyone works on that branch.
  3. No-one works directly on the trunk, and because no-one works on the trunk, the trunk always represents the previous stable release.
  4. When the current release is tested, changes are merged to the trunk.

At any given point the repository looks like:

What's good about this approach:

  1. The Peace of mind that my trunk is always tested and stable.
  2. You can create patches for an older version and check-in the changes to the old version by checking in to the correct branch, even after the product has been released. (Personally, I don’t think this is a Plus, but a lot of development teams use this approach and I've been told by more than one very capable developer that this approach has worked for them in multiple projects).
  3. As a colleague / mentor recently pointed out - If you are doing development of two versions in parallel this approach can help. I would have to agree on that one. We've done the "continue to fix the trunk while we work on a new version in a branch" approach and when I look at this approach from that perspective it suddenly starts making a lot of sense.
  4. Honestly, I can’t think of other Plus-Points for never-work-on-the-trunk approach.


  1. The whole idea of never working on the trunk makes it complicated for developers to create their own branch especially when they are already working on a branch. E.g. I want to work on “Feature A” which I am not sure will work out. If I am already on a Branch for version 1.1.2, it makes it a little complicated for me to branch again and merge my sub-branch with the 1.1.2 branch before the 1.1.2 branch is merged with the trunk. (I hope I haven’t confused you already, the more sub-branches from branches that you created the more complicated things become :))

And then there are mix and match of the above two approaches that I’ve seen a lot of teams use. For example a team which creates tags when a build is released, even while following the Approach 2 I described above or the approach where you continue to fix the trunk which holds the first version while you work on a second version on a branch. I've also worked with a Team where every SVN ( / CVS) command was wrapped with a custom wrapper command using Unix shell scripts and use of clients like Tortoise wasn't permitted.

How you use the SVN Branches, Tags, the trunk and in fact, the source control system, is completely based on what works best for the project and the team. Feel free to Mix and Match approaches to control the chaos with predefined guidelines but make sure you leave room for flexibility and agility. 

There are no best practices! How to Manage code depends on the project, the team, how fast you want to go and multiple other scenarios. But it's always a good idea to have a set "SVN Working Practices" (notice the use of word 'working' instead of 'best' :)) for your Projects. Do you have a your SVN Working Practices Documented yet? If not, here's an excellent example you can use to get inspired. :)

Update [2/13/2007]: A colleague / mentor provided this link in a comment on my work blog. It's a practical repository of Branching Patterns for Parallel development. If you're interested in finding out about the various Branching Schemes out there and getting some guidelines on which scheme to use when, the article is a must-read!

posted on Friday, January 26, 2007 2:02:54 PM UTC by Rajiv Popat  #    Comments [0]
Posted on: Saturday, January 20, 2007 by Rajiv Popat

Protecting Intellectual Property Vs. Trusting Employees

If you run a company that owns a product, or have put your mind and soul into writing a product that you believe will make you or your organization big bucks and success in the long run, you’re probably worried about protecting your intellectual property.

Lately, I’ve been hearing a Lot about Intellectual Property and what Organizations should do to protect their intellectual property. Multiple discussions have taken place, with multiple people from different Organizations. Just to give an idea of the crowd I’ve been discussing this with, let me introduce an  acquaintance who works in a 400+ person, Indian solution provider as a developer.

Another individual is a Lawyer in a 100+ employee Organization having offices in US and multiple offshore countries including UK and Europe. Just to bring a slightly different perspective to discussion I’ve also included comments from a very old client that I worked with – who had a no-work-from-home policy. And then there are guys from IT / Administration world back from MCSE days, that I am still in touch with and who work with some really medium-to-small-sized development shops.

Before I go any further however, let me take of my ‘I-know-everything-about-this’ hat off and hide it somewhere. Because, this is my blog which runs on a server I pay for, it goes without saying that I will present my opinions. However, this is also a good time to bring to everyone’s notice that my opinions (by their very nature) here are highly opinionated and may be as far from correct as anything can be. But after hearing so much about this topic I really feel that I have to post about this. If nothing else, this post is an attempt to take a look at one problem from multiple perspectives, including mine. :)

"They are not allowed to carry USB drives to work. No Floppies, no CDs, they code on desktops with 512 Megs of RAM, unless of course, someone can justify that he needs a Gig of RAM for his project. 90% of Internet is blocked from them including Yahoo mail, Hotmail, Messengers or anything that can potentially be used as file transfers."

An acquaintance back from my IT Days describes. He works at an Indian IT consultancy firms which is small enough for every employee to know every other employee on a first name basis. By “They” he is referring to the developers. There’s a particular advantage of having worked in various departments in my early part of professional life. I associate with both IT and Development folks equally well, and completely “get-it” when the folks in one camp refer to the folks in other came as “They” :)

"In fact, our IT takes a Pessimistic approach to security. They start by blocking everything. Employees over years have requested specific site to be unblocked which has resulted in a fairly large database of safe sites which have been unblocked. Once a request is filed, it is analyzed to see if the site offers any mechanisms to transmit confidential data. Analysis is also done on why this site should be opened up. There are cases, where we’ve asked for a specific site to be opened up because we wanted to read an article and have received an email attachment in reply with the content on the article attached and our request to open-up the site denied, mainly because the site provided free mailing services. The concern is that we would email code to ourselves."

These are measures a 400+ employee consultancy firm takes to protect its Intellectual Property. This comes from a Developer and here “they” of course refers to the IT folks :). The third perspective is slightly Non-Technical coming from a lawyer who works for a relatively smaller development firm. 

"The key to this is Making employees sign Non-Disclosure-Agreements (NDA’s), Non-Compete agreements and copyrighting your code. Once these measures are in place, the real work needs to begin - the technical departments, like the IT needs to move in and enforce measures that code-theft cannot happen even if an employee wants to commit a theft e.g. disabling their USB drives, not giving them CD/DVD-Writers etc. Making the employees sign is the easy part. Setting up systems so that you don’t have to be at the mercy of mutual trust with your employees is the difficult part"

Another person at fairly small US based organization, sites an example of an employee running away with a laptop and some code and the team being worried for a couple of weeks till the employee was tracked down and they had confirmed that he hadn't released the source code to anyone.

After I listening to these discussions, some-thing deep down somewhere kept telling me that there’s something wrong, somewhere. As if one side of the story is being ignored. One thing that seems to resonate through all these comments and remarks is – "It's difficult to trust your Employees. Doing that will always mean big trouble". In an attempt to discover the other side I decided to cling on to Google and go on a search for other opinions.

My Ideas on this topic are very different from the ones that had been brought to the plate so far, and Google seemed like an excellent tool to figure out if there are others who had similar thoughts and to figure out if my thoughts are working out for them too.

The first result is an interesting instance of stealth and sleuthing – what’s most interesting about this article is that it sticks to the side of story that’s been presented by all other quotes in this post so far, but ends with lines that come very close to the other-side of the story, therefore striking a really nice balance. The article includes an interesting and (in my opinion) a very true remark:

"It is impossible to provide for a completely foolproof system... To devise a foolproof system, you would need a set of people working on it...This set could have a thief in its midst too. In the ultimate analysis, everything works on trust. After all, software employees are capable of anything."

Why I particularly like this remark is because it addresses the problem from a real perspective and considers the fact, that when dealing with developers companies are dealing with smart individuals who are capable of writing highly secured and scalable systems. It goes without saying that any developer worth his salt, who is capable of writing these systems, is also capable to stealing code or in fact, anything, if he really wanted to do it, specially if he's a little lucky. There is no such thing as a fully secured process or system! And that’s one thing we tend to forget when talking about Systems that we claim will replace (or enforce) human trust and dignity through security.

There are tons of articles out there which tell you that you cannot trust your employees, not even your administrators – but ones which tell you that it’s OK to place a little bit of trust in sensible programmers who you hired in the first place, are few and difficult to find!

After spending some time on Google searches I finally landed on some sound-advice that came close the kind of answer I was really looking for. A very wise comment on this forum states:

"It seems you've learned firsthand that you can't *really* protect your IP. That said, you could talk to a lawyer and get some more specific advice. Certainly requiring your hires to sign a non-disclosure agreement is nothing onerous. But I think the best thing to do is hire people with integrity and all. Be so successful that nobody in their right mind would think about splitting, and that none of your customers would think about switching"

These are not my words, but if I was to say something on this topic this is exactly what I would say and then I would add a few more numbered points (read on).

  1. You cannot prevent your employees stealing your code unless you’re planning on frisking people: In each of the remarks people made in their discussions with me, and as they were describing their security-measures to protect their Intellectual Property, I could instantly think of more than one ways by which a developer could easily steal code if he really wanted to. The comment in this forum, that you cannot prevent employees from stealing code unless you’re planning on frisking people, seems quite true and at-least I agree to it.
  2. What is your Intellectual Property, by the way? As a developer I spend countless hours, throwing away code that I’ve written in the past and writing better code. Those of us, who believe in TDD, refactor ruthlessly and make that a way of life. A lot of the projects I’ve been involved with are re-writes of existing systems. So, as developers, if throw away so much code, is code what you really want to protect? Is it even wise to consider just your code your real (and only) form of intellectual property?

    I for once want to, believe that an Organization's Real Intellectual Property is the knowledge that was gathered in writing that code and the individuals who retain that knowledge. That’s what I would be really interested in protecting.

    In a discussion one of my Managers once asked me how long my team would take if I was to scrap every single line of code I’ve written for a product and start fresh. My reply was that it would take half the time and I would come up with a product that would be faster and much more feature rich.

    As developers, we grow with each project, module and problem that we solve. I personally feel that it’s this growth that organizations and individuals should be striving to protect. Not just Code!
  3. A Lot of code isn’t complete or looses meaning out of context: some years ago; a part of Windows NT code base and a part of Windows 2000 code base was leaked out. Everyone in the community talked about it. People discussed it. Some of us even downloaded it and took a peek at it. People analyzed it, more out of curiosity than anything anything else. But that was it. People couldn’t build the code. Of-course they couldn’t compile Windows NT / Windows 2000 out of it. The code was incomplete and it was out of context.

    There was a particular client that I worked with at an early part of my life, who wouldn’t let any consultants work from home because the DBA was particularly concerned about a Table in the new system which sucked legacy data and had an Item-Id column containing millions of items Ids. While, I completely understood and respected the DBA’s passion to protect data from leaking out, the fact remains that 2 million random numbers (which happen to be a list of item ID) are utterly useless for me, because they are out of context. There is nothing I could have done with a huge list of their Item IDs even if I wanted to. It took quite a bit of convincing to get the permission to be  able to work from home so that I could fix bugs I was really concerned about during late nights and weekends and in the end it worked out really well. We delivered a couple of weeks before the planned date and there was no loss of any intellectual property. 
  4. Shouldn’t you focus on what’s coming in rather than focusing what’s going out? In all the arguments for strict systems to protect intellectual property the focus seems to be on “what is going out of the organization” - either an employee or code. Why not spend more time on focusing on employees that are coming in the organization and create processes for hiring people with Dignity and Maturity. Something makes me feel that if some of these Organizations, that spend huge amounts of time in building these extreme measures, spent as much time in thinking about the quality of employees they're hiring, they wouldn't have to worry about Protecting Intellectual Property.
  5. I respect NDA’s and honestly, I don't mind signing them: I don't think any developer does. As one of the quotes above mentions "Making the employees sign is the easy part". It really is. And Important too.  Thought I should clarify that before I start getting emails from people I know and don’t know telling me that I am a moron who doesn’t care about protecting intellectual property and respecting NDAs. I completely understand a client's concern to protect their Data and Intellectual Property. I also understand policies of not letting people carry parts of projects or Data on laptops in some cases or projects where the sensitivity is high.

    However,  I would find it a little awkward, if I ever had to work in an organization that implementing policies and had systems which constantly keep telling me every-day, that I am a potential threat to the business. In my personal opinion, some of the comments I heard during these conversations sounded a little extreme which is what got me thinking.

I find the measures, mentioned by some of my friends, in this post, a little extreme. It's probably because of the fact that I've changed very few organizations in my professional life and have been lucky to work at Organizations (including clients and project-teams) which have very difficult interview processes but provide tremendous amount trust, freedom and liberty in the hands of their employees once they are a part of the team.

A sarcastic answer to “extreme measures and systems to protect your intellectual property” posted at this forum seems like a good way to end this post. A person with a sense of humor comments –

"I want to work for you people! A boss who considers me a significant threat to his business and acts as if I'm a thief waiting for the opportunity to strike would make me feel like such an appreciated member of the team."

Do you feel that you work at a place that considers you a significant threat to their business? Wondering what you can do about it? If you answered "Yes" to these questions, remember - you can either change your company, or you can change your company. :)

posted on Saturday, January 20, 2007 7:53:30 PM UTC by Rajiv Popat  #    Comments [2]
Posted on: Monday, December 25, 2006 by Rajiv Popat

Have You Made Your New Year's Resolutions for 2007 Yet?

Here is wishing anyone who reads this a very Merry Christmas, Happy Holidays and a very Happy New Year! It’s that time of the year again! Time for celebrations, rest, holidays, fun and above all, a time to get inspired!

A whole new year is near, and that itself, is a good reason to take a pause, look back and spend some relaxing time to plan for the year ahead. Personally, these times feel so very similar to those during my long 10+ hour flights, when the plane is standing silently on the runway and we’re all waiting for the takeoff; The plane staff are checking the pre-flight checklists, assessing the weather conditions, checking the flight-plans and we’re all ready to fly and get to where-ever-it-is we want to get.

Of-course, having a flight-plan for life is a very difficult. But, this is the time when most of us make New Year’s Resolutions before we take off for the year. Wikipedia states:

"The new year resolution is one example of the rolling forecast-method of planning. According to this method, plans are established at regular short or medium-term time intervals, when only a rough long-term plan exists."

Looking back at the History of New Year Resolutions, it was the Babylonians who started this whole concept. They believed that what a person does on the first day of the year will have an effect on that individual, throughout the year. The most popular Babylonian resolution was to return something they borrowed from a friend (usually, farm equipment).

Today, lists like the List of Top 10 New Year Resolutions seems to cover and claims to provide help with most of the resolutions that a lot of us tend to make these days. Then there are sites out there that also provide help in the form of a paid-service which is supposed to help you meet your New Years Resolutions. Are they effective? Honestly, I haven't tried any and hopefully, don't intend on trying them anytime in the future. 

Personally, I don’t find the whole idea of New Year's Resolutions very appealing. Most of the resolutions we tend to make during this time are way too optimistic and un-real. Maybe, that’s why they fizz out within a couple of months. I’m more inclined towards introducing agility into my life using Professional and Personal TODO Lists for Life and striking off items from these lists whenever life permits. I’m also into doing small and agile sprints of myself. I call this the “Your-Next-Version” approach.

The idea of versioning myself and then working for Self-Version started out during a great vacation this year when I spent a lot of time thinking about my plans of self improvements in the next 6 months. I wrote a lot about the things that I wanted to change and made a lot of so-called-resolutions. Then I announced in this blog that I was done doing an elaboration of “Rajiv 0.2” and construction would being soon and that people would notice the difference.

I’ve always said that too much Analysis doesn't really help and after posting about the problems with analyzing too much, I soon realized that I had ended up doing the same thing with my own versions. My idea of versioning myself and keeping constant track of the self-versions, could work, but if it was to work, it needed to be light-weight and not too-optimistic-big-plan-up-front kind of an approach. The approach was quickly tweaked to support agility.

Each version of “Me” would include just one or two new features. The features included in each version would be both simple and incremental - As an example, a feature could say:  

"Just because you can, don’t code for others. You’re not really helping them. Let them find their own answers – even if you know them already. Be a mentor, not a human search-engine!"

A version, typically consisting of not more than a couple of features, can take anything between a month to a couple of months to roll out and my life would continue as normal, except of course I would be really careful and serious about committing to and making just one or two features a part of my life. Once this was a habit, I would call this version complete. For the next version, I would move to next one or two features, which may be an extension of the features in current version that was just completed or something completely disconnected. This approach seems to be pretty effective till now.

This New Year, I suggest the Your-Next-Version approach as an alternate option to New Year’s resolution. "What’s the difference?" - You might be thinking. The difference is exactly the difference between Waterfall and Agile. A New Year resolution is too generic, long and waterfall-like. E.g. for my friends and colleagues who smoke, A typical New Year's Resolution is often something as generic as “Quit smoking” – (way too optimistic and most likely to fizz out within the first couple of weeks or maybe a couple of months).

With the Your-Next-Version approach, we tweak this slightly and just say - My Next Version / Sprint smokes a cigarette less than my current version. Whenever this is achieved and is a comfortable part of your life, you move to the next version / sprint where the features could be an extension of existing features (a couple of cigarettes lesser) or something completely disconnected. We’ve worked with quick sprints, releases and versions in the software world; isn't it natural to extend the same knowledge and use it to tweak ourselves?

Do you version yourself too? If not, doesn't a whole New Year seem like a good time to try this out? Keep your own versions small and keep them agile. Here’s wishing everyone a very merry Christmas, great Holidays and a beautiful New Year full of lessons, love, family-time, work, excitement, growth and lots of new, exciting and stable versions of your current self! :)

posted on Monday, December 25, 2006 5:17:58 PM UTC by Rajiv Popat  #    Comments [0]
Posted on: Friday, December 15, 2006 by Rajiv Popat

Are you 'On the Bench'?

Shhh, don’t say those words! They’re like dark-dark-black-phase of a programmer’s life when his ego and self-respect have already fallen down to an all time low. Don’t make it worse for him. If you're in India, at around this time of the year, you can see so many young software engineers literally playing the change-your-job-musical-chair as they jump from one firm to another. Ask anyone of these young, talented engineers why they are looking for a change and chances are, the answer will be pretty similar this one I heard during a recent interview I was taking:

"I haven’t been assigned to any project for the past three months! Which is why I started thinking about moving on to a different company… you see, I want to work with the latest cutting edge technology and face bigger and better challenges, but in my current organization, I have been on the bench for the last three months!"

“And, what’s wrong with being on the bench?” – If you’re like me you will be tempted to ask, but don’t. Shhh, don’t say those words! They’re like dark-dark-black-phase of a programmer’s life when his ego and self-respect have already fallen down to an all time low. Don’t make it worse for him - You’ll insult an already insulted developer. You’ll hurt an already hurt engineer. Don’t you get it? The guy is on the bench! And he has nothing to learn or do because he’s not working in a project.

But wait, isn’t that just… stupid?

Ok, go ahead, say those words, and ask that question. This isn’t an interview where I can hurt someone’s feeling. This is my blog where I can speak my mind! So go ahead, ask that question – “What’s wrong with being on the bench?” – Seriously. I don’t know about everyone else, but I don’t get it. Honest.

I’ve heard the words “on the bench” being mentioned as if they are evil. When they're on the bench, I've seen a lot of developers translate that into some pretty conventional (and in my personal opinion: stupid) interpretations. Based on my conversations with a few programmers who are looking for a change because they are on the bench – being on the bench is equal or synonymous to a few things. The list of these interpretations is long, but some of these, I've heard are:

  1. You’re on the bench = you don’t have enough opportunity to learn new technologies, so you should move on.
  2. You’re on the bench = your company isn’t doing well and is going to shut down, so you should move on. 
  3. And last, but not the least, you’re on the bench = you’re not important and there’s nothing you have to offer to the company, so you should move on.

Long story short being a lot of Developers feel that being “On the Bench” means you’re literally “on-the-bench”. In other words, being on the bench is like:

(Only, not just as cute :))

In a recent conversation / discussion / friendly debate with a person who works in the HR department of a software development firm, I was told:

"You’re thinking from your perspective which is very different, maybe slightly more mature than a typical junior developer. You might be able to work on your own project, work on your company's intranet website, write your own blog, articles, conduct trainings and think of a thousand other things to do, but a normal developer comes to office to work on projects and code for clients. If he doesn’t get that opportunity he is going to leave and find a place where he gets exposed to a real life project."

Yet another person who heads the accounting department and participates in HR related decisions, of a solution provider explains in another healthy discussion:

"Yes, I understand when you talk about self development, personal initiative, training, blogging, articles, starting personal frameworks and everything else. It sounds nice and good for 1 month. 2 months, maybe - but tell developers to keep doing that for more than that and you’re sure to see their resumes floating around in other companies."

After all these conversations and discussions with people from different companies, different departments and different roles I still don’t get it. If you do, please explain it to me like I’m a six year old, will you? Maybe I am just dumb. If you’re on the bench, isn’t that a golden opportunity?

A chance to write what you always wanted to write, an opportunity to work on what you always wanted to work on, an opportunity to read, learn, teach, discuss, have fun and offer help to departments within your own organization and the community in general (if nothing else, answer a few questions in a technical forum)? Just so, that I don’t digress, let me think and write about each point:

> You’re on the bench = you don’t have enough opportunity to learn new technologies and it’s bad for your career.

So all projects that all developers work on use the latest cutting edge technology, right? Wrong! There are Non-IT companies out there who still haven’t got over Visual Basic 6.0 and many more that are still a little reluctant to move from .NET 1.1 to 2.0.

"We already have MySQL so it would be nice if we can just use that for the project instead of moving to SQL Server 2005. We already have .NET 1.1 and will not be upgrading to 2.0 until next year. We don’t want to use WPF since it’s still in Beta and RC stages."

Any of that sounds familiar? I’m not saying there’s anything wrong with these statements. It’s a part of the job to provide the best solutions to clients using the tools that are available at hand and keeping the project cost minimum. But being on the bench for a couple of months gives us an added opportunity to go wild, pick our favorite tools and develop what-ever-it-is that we want to develop!

It gives us an opportunity do more-than-just-code. It gives us time to read articles, read blogs, write articles, blog a little more actively, learn things we always wanted to learn and strike out items on both – our Professional and Personal TODO lists of life.

Given the choice, I’m curious what a developer (just for the sake of discussion, let's assume he's a DotNet developer) who makes a lot of noise about being on the bench, would prefer - working in a Visual Basic 6.0 project and billing a client or being on the bench and have fun working on .NET 3.0 pieces? Personally, I would prefer the later; but I haven’t had the pleasure of enjoying some On-the-bench time for the past few years – so, I have no right to pass judgements and we're using .NET 3.0 pieces in the project I'm involved with so I can't even complain! :)

> You’re on the bench = your company isn’t doing well and is going to shut down.

In one of my first jobs, I worked in a company that shut down a few months after I switched jobs. When a firm is about to shut down, it’s usually pretty easy to make out. The stock prices, the ambience, the announcements, the changes in policies, cuts in budgets and everything else that happens in a company about to shut down is very different than things that happen in the normal course of business. Based on what I know, It usually begins to suck and as an employee you can feel it, even if there are no formal announcements! Organizations with huge numbers of employees don't just shutdown one-fine-morning! Unless of-course, you can feel it that your company is about to close operations and pack up, isn't connecting your being on the bench with your company shutting down, being way too paranoid and a little dumb?

> You’re on the bench = you’re not important and there’s nothing you have to offer to the company so you should move on.

Personally, I find the most frustrating. Every client office I’ve visited, every firm I’ve worked at, (I haven’t worked at many - I’m not very good at the change-your-job-musical-chair game :)) there are always things to automate and problems that technology can solve. Walk up to people in different departments. Talk. Offer help. Some of the Excel COM EXEs in .NET, I’ve written for the finance department of our firm, in my free time and weekends have been the most logically challenging and rewarding pieces of code I've written. I continue to support them in my free time, because it’s a rewarding experience. If nothing else, go ahead and participate in an open source project. It’s a Win-Win situation because it helps others and gives you challenging problems you can solve!

Write re-usable components, frameworks, user-controls, web services or anything and post them on the company intranet, or maybe publish them out to the whole wide world. Lookup the Bug Tracking system of an on-going project in your organization and offer them SVN patches, conduct trainings, clear certifications, train others, blog, conduct presentations, participate in forums… seriously, how can you run out of things to do, just because you're not officially assigned to a project?

Coming back to where I started, what is wrong with being on the bench and not working on a real project for a few months? While I ask what’s wrong in not writing code for a client, for couple of months, Jeff Atwood goes one step further and questions: Does writing Code Matter? He advices:

"Try to spend some time talking to people instead of the compiler… Of course, this isn't a zero-sum game. You can have it both ways. Ideally, you'd write code, and then write or talk about the code in a way that inspires and illuminates other people. But we don't have an infinite amount of time, either."

Being On-The-Bench for a couple of months, gives us some time to do just that – it lets us stop talking to a compiler and do whatever it is that we want to do. Including perusing ideas and initiatives we always wanted to pursue. 

If you are someone who looks for a change everytime you're on bench for a couple of months - The next time you’re on the bench,  may I suggest not playing the change-your-job-like-you're-playing-musical-chair game.

Instead, why not strike out a few items from your Professional and Personal TODO lists of life and get them done, so that you can be a better professional and a better person? You do have Professional and Personal TODO lists for life, right? If not, now is a good time to start making them. :)

posted on Friday, December 15, 2006 10:53:12 AM UTC by Rajiv Popat  #    Comments [2]
Posted on: Saturday, December 2, 2006 by Rajiv Popat

Hello Atlas Article at Code Project

I Posted this Hello World Article on Atlas (of-course, now called "Microsoft ASP.NET Ajax") on Code Project a few months ago. Recently, I've been receiving multiple emails / comments telling me that the article was helpful but I should think about updating it since Atlas is undergoing a lot of changes (including the name:)).

I've spent some time during this weekend to update the article based on the Beta 2 of Atlas (Microsoft ASP.NET Ajax 1.0) and resubmitted it to CodeProject for updation. The article has been updated and is available at CodeProject.

However, if are looking for one single zip which allows you do download the latest copy of article, and source code, you can get it here. This post will be updated when further changes are made to the article.

Thanks to everyone who read the article and commented on it.

posted on Saturday, December 2, 2006 12:33:08 PM UTC by Rajiv Popat  #    Comments [0]
Posted on: Wednesday, November 29, 2006 by Rajiv Popat

Enabling ASP.NET 2.0 Debugging on Visual Studio 2005, IIS 7.0 and Vista

For the past couple of years my desktop ran on a Windows 2003 Server which was tweaked to make windows look like a Mac. I loved my desktop, but I also loved everything that had been going on the Windows Vista side and had been trying things out on VMWare instances and other non-work machines since the Beta 1 days. I had always stated that I would move to Vista as soon as Microsoft comes out with a Released version. Just wasn't adventurous enough to run a Beta version of an Operating System on my primary work machine. Yesterday, I finally made the move to Vista.

As a developer / geek, there were a few minor hiccups in 'getting up and working' and I'll probably post about all of those and their workarounds in other posts but this post is focused on getting Visual Studio 2005 to run with F5 / Play based Debugging on ASP.NET 2.0 Web-sites. I thought I would post about and document this, since this was the most tricky part and 'almost' kept me awake all night, trying to figure out what the heck was going on.

The Vista Install itself was a Smooth install. Minor hiccups here and there. Surprisingly, there were no drivers issues (things have come a long way since the Beta 1 days, when I had a bad time with the drivers). I didn't have to install a single driver manually. It detected everything on my Dell 700m and pretty much installed it, automatically. Sweet! Most hiccups were compatibility issues with 3rd Party tools, which is expected anyway, because of the enhanced security. Workarounds and alternate tools that work in Vista were pretty easy to find. Yes, there were some very minor issues with the default display drivers - which work fine with extended monitors but somehow, will not let me run on a external projector. I think I can live with that till Dell comes out with their own drivers. [This was resolved. If you googled to this page, in search of Intel-Adaptor-on-Dell Display Driver issues for Vista, see update at the end of the post.]

The real "Opps!" moment however, came when I was done with installing IIS 7.0 and started installing Visual Studio 2005. This is when I was warned that Visual Studio 2005 has known compatibility issues with Vista. I ignored the warning and the installation continued smoothly. Finally I decided to test my installation by making a simple ASP.NET 2.0 Hello-World website. Apparently, Studio would not let me open a website from the Local IIS.

The Warning Said: "You must be a member of the Administrator group on the local computer to access the IIS..."; This however, is a known issues and has to do with the Vista's On-Demand Administrator (i.e. UAC) feature. Installation of additional IIS components, A right click on Studio's Shortcut, followed by a "Run As Administrator" fixes this issue. There's a detailed post on this both as Scott Guthrie's Blog and MSDN. Both of these are pretty helpful and elaborate; So I won't repeat that information here.

After I did everything mentioned in the MSDN / Scott's Post, I could now open web sites from the local IIS. But wait, that was not the complete Fix. Once those steps were applied there were issues with Visual Studio which wanted me to have Integrated Windows Authentication in the Virtual Directory. Now this is something that is not installed by default with IIS 7.0. Which means that I had to explicitly go to "Turn Windows features on or off" and install Integrated Authentication for IIS. (I went ahead and installed all three since I am used-to and use all three - Integrated, Digest and Basic, in different projects. With this done I configured the virtual directory to use Integrated Windows Authentication using IIS Manager.)

So, was that it? Not Really. I still wasn't able to Debug my website. This time Visual Studio showed a security Dialog Box telling me that wasn't able to start debugging on the web server:

The workaround for this is to configure the site / virtual directory (depending on what you're trying to debug from Visual Studio) to run under the "Classic .NET Pool". To Do this just right-click the site on the new IIS Management console and click "Advanced Settings". In the Property Pane that opens up, change the Application Pool Setting to "Classic .NET AppPool" instead of "DefaultAppPool". 

With this done I opened my sample site in Visual Studio.NET 2005 and clicked the Play button (F5 key) and the Debugging worked, just like it should!

Yet another tricky Gotcha here is that changing the Application Pool for the website to Classic .NET pool doesn't seem to change the pool for all virtual directories under it. In other words, if you moved your entire site to DefaultAppPool but are trying to debug a specific virtual directory, you still need to go ahead and manually change the Advanced settings of that Virtual Directory to run Classic .NET AppPool, to enable debugging on it.

There were some 'really convincing' posts out there, that I came across, in a couple of Forums (I can't seem to find the link to those) where people suggested that F5 / Play and Debug is something you cannot do in Vista. I guess, that information is either old (from early beta builds) or just inaccurate. I would have liked to post a reply there and clear this up, but I can't seem to find the link again after reaching the right answer. So, I'm going to post this article here and hopefully Google will index it and help others who're trying to get this to work. 

Update [12/29/2006]: If you are looking for more details and other approaches, Mike has recently provided detailed step-by-step instructions on various approaches you can take and has described several tradeoffs associated with each approach. His detailed post is available here.

Update [02/07/2007]: Even though this post is not directly related to Dell 700m Intel Display Cards and Vista drivers for these cards a lot of people seem to be googling their way to this page in search of similar answers. This update might help. If you are running Intel(R) 82852/82855 Graphic Adaptor on Your Dell 700m and are having problems switching to clone mode with Dual Monitors or running on a Projector by pressing Fn-F8 key, start your Add New Hardware Wizard on Vista, select the manual driver installation process, choose Display Adaptor in the type of device and from the list of drivers Vita offers, choose Intel as Manufacturer, and "Intel(R) 82852 / 82855 GM/GME Graphics Controller (Microsoft Corporation - XDDM)" as your driver, even if Vista had detected your driver successfully during installation. Complete the Wizard and Reboot. Once the reboot is complete, you should be able to see two display adaptors with the same name installed in your Device Manager. Now disable Extended Desktop and should be able to switch to a projector or clone your desktop on your second monitor using the Fn-F8 key.

posted on Wednesday, November 29, 2006 10:52:23 AM UTC by Rajiv Popat  #    Comments [0]
Posted on: Tuesday, November 21, 2006 by Rajiv Popat

Skin PowerShell (Monad) to Customize it's Look and Feel

If you feel that typing "Start / Run / Notepad.exe" is faster than clicking on the Notepad icon or if you spend more than 15 minutes on the Command Prompt everyday you probably know a lot about Monad / Powershell by now. I fell in love with this one the day I saw it in it's Pre-Release versions. Of course I didn't see the light instantly, but it grew on me - slowly - over time.

I won't waste a lot of your time posting about the things that can make you fall in love with this tool - for example - the fact that it returns objects instead of strings, or the fact that it could change the world (No kidding!), or the fact that you can access .Net DLLs from within PowerShell. I won't even state the fact (ok, personal opinion :)) for example, that it's way cooler than any Linux console I've ever worked with.

I could write tons of posts on PowerShell because I've been hooked on to it, but then in all probabilities, if you're here (and are still reading this), you're hooked on to it too and you probably know all that stuff already. And if you aren't hooked and you're just the curious type, go ahead, click some of those links I mentioned above and read a little. The learning curve will be a little steep at first but I guarantee that you'll "see the light" soon. Honest!

I can go on and on about Powershell basics, for a very long time. But then, I've been busy, and now I realize that I'm a little late on posting about that. People everywhere have been doing an awesome job at writing about PowerShell and most of the basic stuff anyone wanted to find out about, is already out there.

People have been building Utility Scripts, Powershell Analyzers and some are even developing Sharepoint Providers for PowerShell (neat idea!). But being the stupid guy that I am, for the past couple of months that I've been playing around with PowerShell, there's just one thing that has been pinching me:

"Okay, All this is cool and I get-it, but on a slightly different note, How do I Skin this thing and make it look nice so that I can show-it-off to everyone else while I am working inside a Powerhsell window?"

And then there were others who were asking similar questions. On the Powershell team blog there are remarks like:

"Absolutely no improvement over the ugly looking command window. With the name change if someone in your group maybe can push for tabbed Power shell?"

And the reply is pretty much a shout to the 3rd Parties to build-this-thing that lets you Skin PowerShell:

"We share your pain. We Really do. This just fell into the 'to ship is to choose' category. We designed it so that 3rd parties could do this. (3rd parties - do you see how many people would be interested in a great PowerShell Host?)!"

That's how most of us are - aren't we? We just want to see the Dancing Banana in our Development IDEs! What the IDE or the Product does is just so irrelevant! If it can't show the dancing banana we just aren't happy! :)

And I've been looking for this thing, because this-thing-that-lets-me-customize-PowerShell-Look-and-Feel is something that "has to be developed" by someone! I mean, come on! People have written IDEs for this thing! Somebody must have written something that let's me skin Powershell!

Since Google started crawling this site I'm seeing a jump in visitor counts from around the world which is kind-of interesting and fun. So, If you've landed on this page from Google just because you were looking for a similar answer you're in luck! Yes, it's possible to skin PowerShell and make it look like the way you want it to look like.

Turns out, there is, in-fact an Uber-cool free and open source application that let's you do just that. It's called Console and even though I've used console before, for quite some time, I didn't quite figure out that Console is NOT just a Command Prompt replacement. Console works with Virtually anything - CMD.EXE, Cygwin and a host of other Shells. So basically, there's no reason what-so-ever why it shouldn't work with Monad / Powershell.

Since I like the Mac look so much - Let's make Powershell have some background-transparency so that we can see my Mac'ish wall-paper behind it. Long story short, Let's make Powershell look something like this:

The steps are pretty simple and straight-forward:

  1. Get Console.exe (Don't get the 2.0 "Demo" version because that's WIP and doesn't do much. Get the stable release instead.)
  2. Go to Control Panel / System / Advanced Tab / Environment Variables and create a new variable called "COMSPEC". Set it's Value to "Powershell.exe"  (Assuming you have PowerShell installed already. You can also do this from Console Configuration Files, but this is the easy way).

That's it. You're Done. Start Your Console and it starts up by skinning Powershell instead of the usual command prompt. You should now be able to skin it and theme it using all the rich options Console provides in it's configuration files. And if this isn't enough, go ahead, see if you can have The Dancing Banana in PowerShell! :)

posted on Tuesday, November 21, 2006 11:23:29 AM UTC by Rajiv Popat  #    Comments [2]
Posted on: Sunday, November 12, 2006 by Rajiv Popat

A Different Perspective to Programmer-Poetry

A few months ago, I was presenting in a New Employee Orientation Seminar. I was expected to speak about my professional experiences in past 7+ years of software development and 4+ years of work @ eFORCE. It was the last presentation in a three day program and everyone looked a little tired and bored so I decided to speak about my stupidities in the past 7+ years of software development and 4+ years at eFORCE instead. It was all about all the stupid mistakes I had made in the past 4+ years and what I had learnt from them. It was fun giving that presentation and the audience was great.

During the presentation I asked a few fundamental questions to the audience:

  1. What do you do?
  2. Why do you do it?

Answers like - "I'm a Tester", "I am an Engineer" or "Because it's what my job requires me to do" were not allowed. It's always interesting to hear some other answers. Some of the other answers I've heard are quite interesting. Once you remove the standard answers out, the question becomes as interesting as "Why do people write open source software?" (ok, that post is for some other day :)).

Michael Hunter seems to answer the first question right on his blog title. What does he do? He has been Making Developers Cry since 1995. That's the kind of answer that makes my day! :) Seriously!

People writing / testing / coding / designing and analyzing software today, are here for different reasons. I've discussed this with friends, strangers, colleagues, acquaintances and pretty much anyone who has anything to do with Software, that I've had a chance talk to. What do you do? And Why do you do what you do?

Most answers are interesting. Not all sound as interesting as Hunter's blog line, but I "get them". They make sense. I've been lucky. I have never met a programmer, tester, technical architect, project manager or business analyst who is really sorry that he is, what he is. Most of the ones I've met or talked to, like what they are doing.

Some haven't really thought about it. That's ok. But I've not yet met a software-person who's sorry or apologetic about being a programmer or what-ever he / she is. Maybe it's just because of the place I work at. Maybe it's because our interview process kind-of makes sure you like what you're doing before you get in!

So, long story short - I don't know any programmer who's pathetically sorry about being a programmer and I don't know what it would be like to meet one.

A couple of days ago however, I received this email forward which had been sent by a Senior Engineer I know. This was just a casual forward of a random poem he had found somewhere on the web. It was sent to a dozen other good developers, good testers, good business analysts and other people who were pretty good at what they do. You know, the kind of forwards that you get, and then you forward them to others because you find something in it interesting, funny or casually amusing. Yes I did find it a bit funny which is why I guess it was sent to all of us so that we could get some kick out of it! Here is the poem from the email which was signed by the name of "Author Unkown":

If I could meet the guy who wrote this poem, I would have a lot to say to this "Author Unknown". Here's how it would go:

"Wow! You sound so pathetically helpless, you're almost funny!! Dude! You joined Software Development for all the wrong reasons! Actually, you would have written similar poems for anything else that you might have done in life.

Let's Analyze the above lines a bit, shall we? On one hand you claim that the software world has made you wealthy and on the other you 'need' the money this profession pays you! Even you poem lacks logic, I'm sure your code is no better.

You need to stop everything else and start learning how to code. Now! But I don't think you'll do that, because you don't seem to like anything that requires any form of hard-work anyways. Which kind-of explains why you can't get away and find something else to do.

You're just a good for nothing, confused little cry-baby. But don't worry, if you keep composing contradicting poems like these, which we all find funny, and can forward to each other, we'll all have a charity fund for you so that you can go out and have fun with your honey and not have to work too hard!

On a side-note: I think there are plenty guys in India who could genuinely use that charity fund. So cancel that idea. You don't deserve it, you depressing insect who doesn't even have a name!!" :)

Jokes apart, that just sounds like a mean and controversial thing to say and I'm not a mean person. And of course, there was no way I could meet this "author unknown" guy and fix him like a major bug resulting out of bad design should be fixed. So I decided to pack my objectivism in a box and not even try to think about what I would say to this guy if I could meet him. It was nearing Friday and I had builds to push and work to do!

It was within a few hours, yet another email dropped from in my inbox. Apparently, I was not the only person who had problems with this poem. This was from a mentor, who also happened to be in that list of all people who just happened to have received that email. He had seen the poem, and had hit the reply-to-all button.

His email was a really motivating poem he had composed in a short span of time (I'm not sure if he would be ok, with me posting his poem on my blog. So, I'll just wait till he says it's ok to post it here or till he posts it on his blog or something and then I'll update this post with the text / link or something more about it.)

Okay, now that we had a discussion going, and my build had been pushed, it was time to hit a reply-to-all and post my very own personal version of this poem, which would have otherwise remained in my personal journal. Here's how my poem / email went:

After seeing the poems, this one was mostly composed for my personal journal. But since we have 2 versions of the same poem already – here’s mine. It’s a little long though… I get carried away when I write for myself :)

I start my mornings
Thinking about last night's error-codes and warnings

It's an hour's trip to the workplace.
The streets are like a mad rat race.
But I am happy, a smile on my face
Because last's night bug...
Oh, that was just the database!!

I figured it out!!
I'm a better coder now.
When I see the same bug again,
I'll know the “why” and the “how”.

With 32 new emails, my laptop is finally on.
Good! I say. 32 new battles that can be won.
Time is short; I must pick the wars I fight,
And just like my life, keep my code,
Processes and philosophies light :)

I must manage, I must learn,
Make mistakes, and definitely earn,
No, not money! The money will come!
Let me chase something that's chased by none.

The crazy day moves on, I take a pause.
To look back at the day that "was".
Teachers, Friends and strangers say,
That I should follow their way.

But I took a turn I wanted to take
For No-one else, but my own sake.
I think It was the monitor's light,
Or maybe the curly brackets and the semi-colon’s might :)
But it felt, and still feels like, love at first sight.

With no big degrees and no big college names to write,
I knew it would be a difficult fight,
But why do easy crap, I thought...
I'll simplify and get the difficult stuff right!

Then I snap out of reflections and stop thinking about the past.
It's time to get up and move ahead. Steady, yet fast.
Mustn't think way too much,
Just solve anything, that’s thrown my way, as such!

Give Presentations, Contribute, Argue, Write Blogs, Articles, Code, Document,
Design stuff and be an Analyzer.
The day moves on and I'm just a little wiser.

Its late at night and the street-dogs bark at my car.
As it speeds towards my home that's far,
I wake my family up at midnight,
And on their faces, I see a smiling light.

We laugh, we joke, we eat and talk.
The weekend's near, we’re planning a long walk.

The day finally ends…
With a tired body, a heavy head,
I go to sleep and sleep like the dead.

But the sleep brings me bliss.
Because doing my karma, is what I didn’t forget or miss.
Tomorrow is going to be another day,
And if you've got a thousand new battles for tomorrow…
well, bring them on, my way!

The way the divine and me choose together,
And at times, it’s a little bumpy just like bad weather.
But fighting the bad weather is just a part of the game.
If I did anything else I would go insane.
Little, but Quality time, spent with the ones I Love,
tell me that my efforts aren’t in vain.

(Ok, that was the philosophy part – now, just like life, let’s have some raw objectivism… :))

And then there are guys that say –
“But you work for money and fame”
“Yes”, I say – I bloody well do!
Money, fame and a big fat name,
And I wish anyone, who loves what he does,
just the same! :)

It’s not “just a profession”! It’s who I AM!

And It goes on and on for many more lines… but I think I’ll stop here! At the end of the day it’s all about the perspective :)


P.S. – I think I’ll blog this! :)

And then I received more than one emails telling me that I should in fact, seriously, blog this.  I’ve seen other poems in the past that are a little depressing, (some of them are even cute or funny in their own way and they mean no harm) but this one was just way too depressing to not criticize blatantly. So, here it is. Officially blogged. My poetic reply, thoughts, views and stand on the so called, Programmer-Poetry from Mr. "Author Unknown" who is nowhere close to being a programmer. Something that would otherwise go to my personal journal, published live.

This poem, which started as a fun-email-forward, helped. Becuase it gave a chance to everyone in the mail trail, to take a pause, and ask themselves the two important questions, which I'm going to ask again, to everyone reading this post.

So, what do you do? Why do you do it? Have an interesting answer? Drop me a comment poem! :)

posted on Sunday, November 12, 2006 5:21:40 PM UTC by Rajiv Popat  #    Comments [4]