Follow Rinat Abdullin
Friday
05Mar2010

Mercurial Is Getting Better for .NET Projects

Recently I've started using Mercurial (distributed version control system, an analogue of Git) more and more for working on various projects. This applies even if the project itself lives in the Subversion for collaboration.

Icon overlays have got more stable in the latest versions of Windows 7, Jungle Disk, TortoiseHg (shell extension for the Mercurial) and TortoiseSvn. The last two, share same overlays, as a matter of fact, along with showing much smarter overlay management. There is no need to mess with the registry (works on my machine).

So it is a real pleasure to work with Mercurial these days. This also allows to perform solution-wide refactorings and cleanups featured by the ReSharper 5.0.

Here's the snippet of the .hgignore file that I use:

# Mercurial .hgignore file template by Abdullin.com
# For syntax see: http://linux.die.net/man/5/hgignore
# Source: http://bitbucket.org/abdullin/snippets/

# Visual Studio 
glob:*.user
glob:*.suo
glob:*.cache
glob:_ReSharper.*/
relre:/obj/
relre:/bin/

# Subversion
glob:.svn/
glob:_svn/

# Build structure
relre:^Build/

# Misc
glob:Thumbs.db
glob:*.bak
glob:*.log

The snippet itself is saved (link to the latest version) on the bitbucket, although Google Code already supports Mercuarial as well.

In order to use the snippet, simply paste it into the ".hgignore" file in the root of the working copy. Chances are, the file has already been created for you by Mercurial.

And here's a bit of PowerShell code for wiping clean a SVN working copy, in order to merge latest branch with it:

ls -r -force | 
where {!$_.Mode.StartsWith("d") }  | 
where {!$_.FullName.Contains(".svn")} | 
del -force

Basically, the command wipes clean all files (you can put it in a single line), leaving an empty folder tree with the Subversion files. Then you can copy another solution export over it (i.e. export of a Mercurial branch) and simply accept the changes. That's how we've been syncing some folders in SVN repositories in one of the projects a few years ago.

Fortunately copying snapshot from the SVN to Mercurial is more simple than that: just wipe the all files, except for the single hg folder in the root; export contents of a Subversion solution over to this folder and commit changes.

Tuesday
05Jan2010

Scalability and Concurrency Challenge

It is interesting, how concepts of separated features and messaging become more important as the distributed applications evolve. I keep encountering these again and again in the solutions at Lokad and in new reads showing up:

So for the last few weeks I’ve been discovering things like Advanced Message Queue Protocol (reading its specs is a pleasure of its own) and its implementations (Apache Qpid and RabbitMQ). There had also been a different approach to the REST services and concurrency handling as in the inspiring MindTouch Dream framework.

Obviously, the toolset is not your native Microsoft .NET toolset, but:

  • MindTouch Dream works natively on Mono and .NET;
  • Apache QPID and RabbitMQ have .NET clients;
  • It takes just a few lines of code to write .NET Dream Service to act as a gateway between AMQP and REST;
  • For some reason I like AMQP more than MSMQ;
  • In a current world it takes less than an hour to procure a cheap running server out in the cloud.

It is also interesting to see how REST services and AMQP middleware services have their parallels with the classical composite applications:

  • AMQP == EventBroker
  • Services == IoC Container environment (roughly)

So basically, there are quite a lot of concepts and technological approaches that suddenly start making a lot of sense to me.

At the moment I’m interested in giving a try to build some learning prototype application using these technologies, just for the sake of practicing and learning pros and cons better.

Does anybody know of a common or specific problems out in the field, that require potential scalability and async processing? Something, where scalability, concurrency and sync processing create a lot of challenges.

Update: Jonathan has really nice article about Getting Started with DDDD and CQS (there are a lot of references there as well).

Wednesday
16Dec2009

Windows Azure in Lokad

If you are interested in Cloud Computing, Windows Azure and some practical applications, then this short movie by Microsoft might interest you. It had been featured at PDC’09 and is partially based on the use case around Lokad (company I’m working in):

 

If YouTube player does play properly, then there is a separate link or downloadable movie files.

There’s also the original Cloud Computing Case Study on Windows Azure in Lokad made by Microsoft after a few interviews.

Given all the latest changes in the technology, and the possible trends, that start showing up, we can say that the cloud computing is going to be extremely important in the mid-term future.

Here’s another curious trend in the picture. It seems that stock markets might eventually add yet another commodity to their list – cloud computing instances. Amazon had recently announced EC2 Spot Instances as an ability to obtain computing capacity at a price matching proposed bit. Once there is some cost-effective and efficient platform for redistributing cloud computing resources, all these datacenters with idle server rack might follow in. Forces of Economics and expense optimization might bring forth interesting development solutions afterwards.

Thursday
10Dec2009

Microsoft Feedback 2010

There is usually a lot to learn from large companies like Microsoft, or less large ones.

However, it takes a bit of learning on your own before you could understand and appreciate details and partially hidden interactions behind what is revealed.

Fore example, that’s how Jetbrains ReSharper feedback looks like:

2009-12-10_JetBrains_Feedback

Here’s the one currently employed by us at Lokad.

2009-12-10_Lokad_Feedback

And that’s how Microsoft Office 2010 feedback looks like:

2009-12-10_Microsoft_feedback

Each of these three has it’s own benefits, including but not limited to:

  • UI simplicity;
  • Level of complexity of cliend-side and server-side infrastructure behind the feature;
  • Support for multiple software applications within the same product line (all the way through various versions, deployment options);
  • Ability to offer user to provide additional data, essential for the problem resolution;
  • Level and quality of sensible automation behind the interaction.

There is a lot to learn from large companies for Lokad.

Monday
26Oct2009

Fixing Icon Overlays for Dropbox + TortoiseSVN

If you are using Windows 7 (x64), Dropbox and TortoiseSVN, then you might eventually encounter that half of your icon overlays went missing.

Since TortoiseSVN seems to be sharing same overlays with TortoiseCVS, TortoiseHG and TortoiseGit, these programs could experience same glitches.

TortoiseXXX - windows shell integration for a given version control system.

Dropbox - SaaS backup solution that works like version control, but performs all the sharing automatically in the background.

Loosing overlay icons hurts badly, since both Tortoise and Dropbox are extremely good in what they are doing.

Problem

There is only a limited number of overlay slots available in Windows. That's the byte order limitation (probably around 15, with 4 reserved by the OS). Whenever the limit is breached, we've got problems.

Solution

So we've got to reduce the number of overlays. Since there are no settings in Dropbox or TSVN to disable certain overlays, we'll have to do this manually.

Step1: Start the registry editor (regedit) and navigate to the:

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\
  Explorer\ShellIconOverlayIdentifiers

Step2: Backup the entire branch. JIC.

Step3: Delete overlays that are rarely used and not essential for everyday work. I personally deleted these:

  • Offline Files
  • TortoiseLocked
  • TortoiseIgnored
  • TortoiseUnversionsed

Step4: Reboot.

As the result, Tortoise icons finally show up. Behavior of the Dropbox is more erratic, but this is not critical.

Caveat

There could be better solutions to the problem.

However, I didn't investigate the case a lot, for the lack of time - just checked that there are no proper solutions in the google, fired up the regedit, deleted a few entries and found out that it works for me.

NB: Copy of DropboxPath utility for x64.