Showing posts with label windows 7. Show all posts
Showing posts with label windows 7. Show all posts

Monday, March 05, 2012

Organize your Code with Libraries (redux)

A while back, I mentioned how I was using the Document Library feature of Windows 7 to organize the different types of content on my machine. This approach has worked very well for me since I started, though I have made one small adjustment from the original post: I was keeping both my project documents and code files in the same folder and I’ve since deviated from that. At the time this made sense to keep the documents and source code as close together as possible, but it wasn’t very practical in terms of navigating the code from Visual Studio or when working with multiple TFS workspaces.

Here’s an updated snippet from the original post. My “Code” library is comprised of the following folders:

    • C:\Projects\Infusion\Code (my employer) 3
    • C:\Projects\lib (group of common libraries I reference a lot) now using Nuget for this.
    • C:\Projects\Experiments (small proof of concept projects)
    • C:\Projects\Personal (my pet projects)

The main difference is that I’ve added the “Code” folder as the primary container for all my work-related source. Each client that I work with gets their own folder below this root, which provides a convenient way to navigate all of my work projects.

I also now use a “Projects” library that contains an entry for each client. I like this approach because I can set a particular library entry as the default save location, so any time I create a document and click “Save” it will get dumped into a folder for my current client. Here’s a quick peek at my sanitized Project Library.

image_thumb[1]

My next post will show how I organize my Visual Studio workspaces within this structure.

submit to reddit

Friday, October 23, 2009

Vista: Will not be missed

Here be the final resting place of windows vista

Vista, born into the Windows family early 2007, was finally laid to rest earlier this week.

Wednesday, October 07, 2009

Use Windows 7 Libraries to organize your code

One of the new features that I’m really enjoying in Windows 7 is the ability to group common folders from different locations into a common organizational unit, known as a Library.  I work with a lot of different code bases and tend to generate a lot of mini-prototypes, and I’ve struggled with a good way to organize them.  The Library feature in Windows 7 offers a neat way to view and organize your files.  Here’s how I’ve organized mine.

Create your Library

  1. Open windows explorer
  2. Bring up the context-menu on the Libraries root folder and choose “New –> Library”
  3. Select folders to include in your library.

While your folders can be organized from anywhere, I’ve created a logical folder “C:\Projects” and four sub-folders:

  • C:\Projects\Infusion (my employer)
  • C:\Projects\lib (group of common libraries I reference a lot)
  • C:\Projects\Experiments (small proof of concept projects)
  • C:\Projects\Personal (my pet projects)

Note that you can easily add new folders to your library by clicking on the Includes: x locations hyperlink.  This dialog also lets you move folders up and down, which makes it easy to organize the folders based on your preference.

Here’s a screen capture of my library, arranged by folder with a List view.

CodeLibrary

By default, the included folders are arranged by “Folder” and behind the scenes they’re grouped by the “Folder Path” of the included folders, which gives us the headings above our included folders.  A word of caution: while you can change the “Arrange by” and “view” without issue, if you change the setting for Group-by (view-> group by) there doesn’t appear to be a way to easily revert the Group-by setting back to the default.  Thus, if your heading back you’ll have to manually add the “Folder Path” column and the set it to the group-by value, but the user-defined sort order of the Libraries won’t be used.

This dialog is available anywhere that uses a standard COM dialog.  From within Visual Studio, this view is really helpful when adding project references, opening files and creating projects.  Being able to search all of your code using in the top-right is awesome.

Add your Library to the Start Menu

There are a few hacks to put your library on to the start menu.  You can pin the item to the start menu, which puts it on the left-side of the start menu.  This technique requires a registry hack to allow Libraries to be pinned.

If you want to put your library into the right-hand side of the start menu, there is no native support for adding custom folders.  However, you can repurpose some of the existing folders.  I’ve added my library by repurposing the “Recorded TV” library, since my work PC doesn’t have any recorded TV.

Here’s how:

  1. Open the Control Panel
  2. Choose “Appearance and Personalization”
  3. Choose “Customize the Start Menu” under Taskbar and Start Menu.
  4. Turn on the “Recorded TV” option as “Display as a menu”

    Customize-StartMenu

  5. Next, on the Start Menu, right-click “Recorded-TV”, remove the default folder locations and then add your own.
  6. Rename the “Recorded TV” to whatever you want.

Here’s a screen capture of my start menu.

StartMenu

submit to reddit