Real Desktop

Since probably Windows 95 or even earlier (I’m not that old) Desktop did not change. There was Windows 98 and it’s active content, Linux with its 4 desktops and more recently Compiz, but they all were just  variations around basic idea: 2D space where you put some icons, some background and that would be the end of it.

Until… I saw this:

And then I installed this. It seems to be some  variation of the same idea (much limited compared to what is presented on this YouTube video) but it has one simple advantage: it’s available right now. And it’s fun.

desktop

I installed the free version, that seems to have almost all options grayed out, but it’s fun. I only miss ability to pile stuff up, and fish-eye browse (or I just didn’t discover it yet). Anyway, go check it out.

 

 

 

 

 

 

Technorati Tags: , ,

Linkz: Continuous Integration – how to…

Carel Lotz has published updated version of his great “Continuous Integration: From Theory to Practice” guide. Updates include:

  1. Updated to use VS 2008, .NET 3.5 and MSBuild 3.5 (including new MSBuild features like parallel builds and multi-targeting).
  2. All tools (NUnit, NDepend, NCover etc.) are now stored in a separate Tools folder and kept under source control. The only development tools a developer needs to install are VS 2008, SQL Server 2005 and Subversion. The rest of the tools are retrieved form the mainline along with the latest version of the source code.
  3. Added the CruiseControl.NET configuration (custom style sheets, server setup etc.) to source control and created a single step setup process for the build server. This greatly simplifies the process of setting up a new build server.
  4. Changed from using InstallShield to Windows Installer XML (WiX) for creating a Windows installer (msi).
  5. Added support for running MbUnit tests in addition to the NUnit tests.
  6. Added support for running standalone FxCop in addition to running VS 2008 Managed Code Analysis.
  7. Added targets to test the install and uninstall of the Windows installer created.
  8. Consolidated the CodeDocumentationBuild to become part of the DeploymentBuild.
  9. Removed the QTP integration as this was not a requirement for the new project. If you want to integrate QTP, please refer to the QtpBuild of the first edition of the guide.
  10. Used the latest version of all the tools available.  The tools used in the guide are VS 2008, Subversion, CruiseControl.NET, MSBuild, MSBuild.Community.Tasks, NUnit/MbUnit, FxCop, TypeMock/Rhino.Mocks, WiX, Sandcastle, NCover, NCoverExplorer and NDepend.

 

Get PDF here, and code here.

 

Regionerate your life

After much waiting (two and a half months!). Rauchy released the new version of his great tool Regionerate. New version brings many changes and bugfixes:

  • You can now choose how you want custom (created by Regionerate) regions to differentiate from other regions, by specifying custom prefix, wrapper, or usage of high ASCII character looking like space (read more here).
  • Older versions of Regionerate were leaving fragments of source code embedded within regions not created by Regionerate (not having Regionerate’ prefix to be exact) intact. Now you can make it also look into those regions (and remove them, putting their content into its own regions). No more manually removing VS-created regions for Interface implementations. You can also use this option to quickly strip all regions from a given source file. (read more here)
  • Regionerate now will regionerate your nested classes as well 🙂
  • And the most annoying issue for me: when you had string literals containing curly braces, Regionerate treated them as if they were not part of a string, which could break your code in a nasty way. It’s not the case any more, as you can read here.

There’s more, as you can read in official announcement.

Go and get it while it’s still hot.

Technorati Tags:

Desktop

Jeff Atwood in one of his recent posts stated:

If you’re really using your computer, your desktop should almost never be visible.

I think this is an overstatement. If you’re really using your computer, your desktop should be your command center. I agree with Jeff, that stuffing your desktop with lots of icons, shortcuts, documents etc is not basically a good idea. It makes your desktop a mess, and its hard to command if you have a mess in your command center.

myDesktopSmallI try, as a rule of thumb, to not exceed the number of 10 files on my desktop. Thanks to this I always have just the most important files slash documents, I currently work on. On the one hand, it helps me quickly see what I have going on, what reports I have to write etc. On the other hand, having more files, is a good indicator, that I probably try to do too many things at a time, and that I should do something about it.

Second thing (where I agree with Jeff) is using minimalistic, non-distracting wallpaper. It’s more a matter of personal preference than general rule, but I just want my desktop to be clean, and not to draw my attention while I want to focus on other things. Some (like Jeff) go that far, that they use plain desktop instead of some graphics, I on the other hand have this really cute, peaceful tree found somewhere on deviantART, which matches very well my custom Windows theme. I’ve been using both (wallpaper and theme) for years, which is also a non-distracting factor, since I got so used to them that I barely even notice them.

I also could not live without two small utilities called Rainlendar and Rainmeter. You can see them both in enclosed screenshot (click it to see it full-size). Rainlendar is on-desktop calendar with list of forthcoming events and to do list. Rainmeter can provide you with weather information, system info (CPU/memory utilization network traffic/disk information and more, all depending on the skin you’re using.

Thanks to them I can check my schedule straight from the desktop, check the weather without running any website, open any of my drives in Total Commander in one click, straight from my desktop, see the time without bringing taskbar on and even when I’m not close enough to read those small letters in tray. It makes me much more productive.

One more utility visible in the screenshot, is Launchy application launcher. That’s not basically a part of my desktop, but thanks to it, I don’t have to search through menu start to run an application.

Getting back the the main topic – desktop is the starting point of your work, so make it work for you as good as it can. There is no one-size-fits-all-solution for this, but try to find something that fits your needs. Not only those aesthetical, but functional as well.

Technorati Tags: , ,

How do You regionerate your code?

I’ve been using Regionerate for some time, and I’m addicted to it. Literally when I have to write some code on a computer that doesn’t have Regionerate installed I feel odd. This tool is simply pure honey and nuts. Only thing I would change is it’s default keyboard mapping (ctrl+R for running it), because it collides with Visual Studio/ReSharpers “Refactor” shortcut. So every time I install it I have to go to VS settings and change it to something else (alt+3 at the moment).

Main reason for this post however is not to praise Rauchy and his tool, but to talk a little bit about it’s customization capabilities. Regionerate is Xml driven, that is, its regioneration (strange word, huh?) settings are kept in a xml file. It comes with xsd so when you edit it in VS you’ll get intellisence, which is pretty sweat and will save you a lot of time.

The simplest possible  Regionerate settings file would look like this:

<CodeLayout xmlns="http://regionerate.net/schemas/0.6.3.8/CodeLayout.xsd">
    <ForEachClass>
        <CreateRegion>
            <PutFields>
            </PutFields>
        </CreateRegion>
    </ForEachClass>
</CodeLayout>

It creates a region and puts all fields into it, like below:

namespace Xtoff.Tmx.Helpers
{
    public class TmxLanguage
    {
        
        #region [rgn] Unnamed Region (1)
 
        private readonly string _value;
 
        #endregion [rgn]
 
        public TmxLanguage(string value)
        {
            _value = value;
        }
        public string Value
        {
            get { return _value; }
        }
    }
}

All fields were put in a single region, and all other members were left below. Hooray!. However I guess very few would be satisfied at this point.

Before we move on, however, there are a few facts to note.

First of all, regions name: [rgn] Unnamed Region (1)

[rgn] is a standard prefix for regionerate to mark it’s regions. It was introduced because without some kind of differentiator regionerate would break your manually created regions when regionerating your file. Thanks to this, it will only look into parts of your class that are not inside any region, or are inside a Regionerate-created region. You can change this prefix, or remove it. Keep in mind however, that then every region will be treated as a Regionerate-created region.

Next thing is region’s name. We didn’t set it, so Regionerate set it to default. I don’t have to tell you that you DO want to name your regions :).

And finally (1) indication how many elements is in a region. VERY useful when dealing with large files.

Next step would then probably be setting a name, and looking at other options we have.

If you go back to CreateRegion, hit space and wait for intellisence to come up you’ll be presented with 4 options:

Separating lines: Allows you to specify how many free lines you want Regionerate to leave between members in a regions.

ShowCount: Flag allowing you to turn of showing count of members inside of a region, defaults to true, and I don’t recommend changing it.

 

Style: this is one of the best and little known features.

Three valid options are Visible, Comment and Invisible. Visible is the default option, and it will wrap your code with a region like seen above

Comment will clean up your code but instead of enclosing it within a region it will only put a comment on top of all fields, like this:

        // [rgn] Unnamed Region (1)
 
        private readonly string _value;

Invisible, will clean up your code, but it woun’t put any regions not comments.

Title: sets the title for region 🙂

Going down the Xml tree, we can define what we want to put in out region. In our example we chose fields, but you can put basically every class member (field, property, method, event and so on), or inner region. You can do multiple Put* into a region.

Now we’re getting into really interesting stuff, that is defining filters for specific elements we want to put in a region. In the example above we chose to keep all fields in this region, but we could have come up with something much more sophisticated, like region for non serialized public fields with names meetings certain regular expression.

I won’t explain every single option in detail because there are so many that it would take too long. There are also diferences between types of elements (for example for Properties you can filter by accessors). In 9 cases out of 10 you will be able to create rules you want. You can’t create rules like “Region for methods that subscribed to some events” unles you have a naming convention for those, because it would require analysis on a higher level of abstraction, but nonetheless it’s pretty sweat.

And for those interested, I attach my Regionerate settings file.

Technorati Tags: , ,

Regionerate – very cool plugin for VS and #Develop

Today I found (via Roy’s post) very nice plugin that works with both Visual Studio and SharpDevelop. It’s called Regionerate, is free and is developed by Omer Rauchwerger. As Omer wrote:

Regionerate (pronounced ri-jeh-neh-rate) is a new open-source tool for developers and team leaders that allows you to automatically apply layout rules on C# code.

regBefore I feel very happy to find it, since it does exactly this, what I wanted for a long time, and it’s something that neither Refactor! Pro, nor ReSharper allows you to do. At the moment it’s in its infancy (current version is 0.6beta) but even now it’s very handy, works quite fast, has integration with NAnt, and enables you to customize it’s behavior by editing xml file. It has even xml schema attached, so you’ll get intellisence and description of elements as you type.

Ok but, what exactly means ‘automatically apply layout rules’? Basically if you have a class like on the 1st screenshot that is messy it helps you do cleaning. Look at the code, it starts with private member declaration, then one method, then some property, next another field, then constructor and so on. This class is short and simple but imagine complicated class with many fields, methods, constructors, properties, events and so on. It’s very easy to make class a nightmare to find some member without ctrl+f.

Regionerate helps you keep your classes clean. If you have code like this you can right click, select Regionerate this, and let the magic happen. regMenu

rgnAfter With two clicks you can go from code like in 1st screenshot, to code like this, with elements gathered together, sorted by type or alphabetically and optionally embedded in a #region (with count of elements inside. And you can have your own, custom regions, for example if you want to keep read only properties separated from other, you can, if you have many methods (or any other elements) you can separate them by accessibility (private public, protected) you can keep static methods separately of methods overriding or hiding (with ‘new’ keyword) base class implementations – you can totally do that. Future releases will give you even more options and flexibility, so it’s definitely project worth keeping an eye on. Oh, and if you want to see it in action before you download it, here is very short screencast showing its capabilities.

Why not support SharpDevelop?

In his great post about ORMs, EF, eSQL and data access in general, Sahil Malik wrote something about Visual Studio 2005, that I would like to comment on.

  • The VS2005 IDE is stuck in a rather unfortunate monopolistic situation.
    • There is no incentive for any other company to create a better IDE because the IDE costs some serious $$$ to create, and MSFT gives it away for peanuts. It is impossible to compete with such a model, so I don’t expect google or adobe to come out with a Visual Studio.NET that is better. 
    • And I don’t expect the community to do it either, because when people who have tried to improve certain SKUs of the IDE get sued, it serves as a very big discouragement for the community. While I am terribly disappointed to see lawyers involved in suing someone who is really a developer/member of the community/one of us, I don’t want MSFT lawyers on my ass either, so I’ll just stay quiet on the whole “who is right” portion of that incident. I just wish nobody gets hurt in the process, and I wish both parties settle on a mutually amicable solution.

    Well, Sahil – unfortunately you’re right, no other company is going to develop IDE that would compete with VS. That’s a sad thing, because no competition means stagnation. There is however one thing that amazes me. There are commercial IDEs in Java world, in PHP world, but despite of this they have free, open-source IDEs like NetBeans, Eclipse, Aptana (that works also as Eclipse’s plugin), with big, active community developing plugins and main products. As a result, those free IDEs are not worse, and often better, than commercial ones (to make things clear: it’s my hardcore Java friend’s opinion – not mine).

    If Java people can contribute to community and support development of the most basic tool every developer uses, why all .NET world seems to be happy with VS? It strikes me why very good open-source IDE we have – SharpDevelop, gets so little attention, both in support, and in creating buzz.

    Come on – it has most of the tools you need, out of the box support for other OSS tools (nDoc, nUNIT, nAnt and more), so why not use it? Almost no refactorings you say? Did I mention that it’s open-source? Why then not support it and add something from you? SharpDevelop is MUCH underrated, and if it was other way around, I think it would be a win-win situation. People using it, would get yet better product, with more capabilities, and people staying with VS would benefit too, since if VS had real competitor, it would put pressure on Microsoft to really improve it.

    And one more thing: if you’re a developer (I guess, most people coming here are Wink) you can contribute to the project, either by writing some code for the IDE itself, or by writing a plugin, without fear that you will be sued for it.

    Visual Studio 2008 Shell and Sharp Develop for Applications

    The think that drew attention in last couple of days is the new Visual Studio 2008 Shell. What it is, is basically bare bones core of Visual Studio that Microsoft is going do release (for free I believe) , so that you could build your own VS-like Apps on top of that. Nice idea isn’t it? That’s something that Eclipse has been allowing for some time now, and as I just learned, Sharp Develop too. I found this, almost one year old post from Sharp Develop dev team, announcing Sharp Develop for Applications, that utilizes the same idea.

    Get ready for Acropolis!

    I’ve been concerned that CAB since its 1.0 release seemed to be a dead project, although there certainly was a lot to do. P&P team focused on other things like software factories, leaving CAB as it was. I guess we now have the answer why. Microsoft announced (and released 1st CTP of) project Acropolis. It looks like CAB for WPF on steroids, and may be the-hot-thing in desktop development. There’s a crappy quality screencast up on this site. Basically project is announced but still I couldn’t find many information about it. Is it going to be integrated with Orcas, or a separate download, when it will be released, what are it’s capabilities…

    I guess I’ll download Orcas beta once again to play with it.