Wednesday, May 14, 2008

Monday, May 05, 2008

How to Choose a Data Synchronization Technology – Offline & Collaboration

To quote from Microsoft's article:

Here at Microsoft there are a number of synchronization technologies that support offline and collaboration data solutions. The key technologies include:

  • Microsoft Sync Framework Core Runtime
  • Sync Services for ADO.NET
  • Merge Replication

Why does Microsoft offer multiple sync solutions? Well, we believe it is virtually impossible to create a single solution that will fit everyone's needs. For example, IT administrators may look for more of a packaged solution that is easy to install and administer. ISVs and developers may be interested in a more embeddable and customizable solution. Ultimately, multiple synchronization solutions give you more choices at the cost of adding increased confusion. Hopefully this summary will help narrow down the choice for you.

The synchronization technologies can be broken down by flexibility and the amount of code required. In general, more code is required to get a greater level of synchronization flexibility.

Thursday, April 24, 2008

Perfecting OO's Small Classes and Short Methods

"In The ThoughtWorks Anthology, a new book from the Pragmatic Programmers, there is a fascinating essay called “Object Calisthenics” by Jeff Bay. It’s a detailed exercise for perfecting the writing of the small routines that demonstrate characterize good OO implementations. If you have developers who need to improve their ability to write OO routines, I suggest you have a look-see at this essay. I will try to summarize Bay’s approach here.

He suggests writing a 1000-line program with the constraints listed below. These constraints are intended to be excessively restrictive, so as to force developers out of the procedural groove. I guarantee if you apply this technique, their code will move markedly towards object orientation. The restrictions (which should be mercilessly enforced in this exercise) are:"

Git and SourceSafe

Procedure for merging from POS-safe. (I documented elsewhere how to do the daily merge.)
  1. Diff-tree from master to the desired merge point.
  2. Check out the files marked as "M" or "D"
  3. Merge desired merge point into master.
  4. Check in the files marked as "M" or "D"
  5. Add the files marked as "A".
Specific commands are here:
  1. git diff-tree master POS-safe --name-status -r | tee files.txt
  2. ./Python/VSSHelper.py -o -d files.txt
  3. git merge POS-safe
  4. ./Python/VSSHelper.py -i -d files.txt -c "VSS check-in comment."
  5. Manually add files to SourceSafe. This should be easy in Visual Studio. If not, use the VSS client.

Thursday, April 17, 2008

MSAGL: Microsoft Automatic Graph Layout (formerly known as GLEE)

"MSAGL: Microsoft Automatic Graph Layout

MSAGL is a .NET tool for graph layout and viewing. It was developed in Microsoft Research by Lev Nachmanson. MSAGL is built on the principle of the Sugiyama scheme; it produces so called layered, or hierarchical layouts. This kind of a layout naturally applies to graphs with some flow of information. The graph could represent a control flow graph of a program, a state machine, a C++ class hierarchy, etc."

This was formerly known as GLEE:

"GLEE: Graph Layout Engine
GLEE: Graph Layout Execution Engine Tool purpose GLEE is a .NET tool for graph layout and viewing. It has been developed in Microsoft Research by Lev Nachmanson
http://research.microsoft.com/users/levnach/GLEEWebPage.htm"

Wednesday, April 16, 2008

Terminal Services Group Policy (how to set timeouts for remote sessions)

How to configure remote desktop (terminal services) to prevent idle users from using up the precious connections.

It's so freaking NON-obvious how to get to the Group Policy Object Editor.

Run this:
C:\WINDOWS\system32\mmc.exe C:\WINDOWS\system32\gpedit.msc

Wednesday, March 26, 2008

Sorting for Humans : Natural Sort Order

How to solve the following problem when comparing or sorting strings:
1.1
1.10
1.11
1.2
etc.

1.2 should come *before* 1.10, etc., but in a naive sort it does not.

See also the C# code he cites: http://www.interact-sw.co.uk/iangblog/2007/12/13/natural-sorting

Subversion Authentication With a Windows Domain

Really quite easy, according to a colleague.

Monday, March 17, 2008

Technology Review: Blogs: Ed Boyden's blog: How to Think

Technology Review: Blogs: Ed Boyden's blog: How to Think: "When I applied for my faculty job at the MIT Media Lab, I had to write a teaching statement. One of the things I proposed was to teach a class called 'How to Think,' which would focus on how to be creative, thoughtful, and powerful in a world where problems are extremely complex, targets are continuously moving, and our brains often seem like nodes of enormous networks that constantly reconfigure. In the process of thinking about this, I composed 10 rules, which I sometimes share with students. I've listed them here, followed by some practical advice on implementation."

Wednesday, March 05, 2008

Tactics for Reducing the Subjective Experience of Down Time

"Time indicators

The formulae below all depend on use of a time indicator. The following choices of time indicators are listed from most to least desirable.

1. Estimated and remaining-time indicator. Place this either in a modal dialog or in the status bar at the bottom of the window.
2. "The system is alive" indicator. When it is impractical to offer the actual times, show an animated object that will let users know the system has not frozen. For longer waits, choose the rolling barber pole often found in status bars or other large animated object. For shorter waits (less than 10 seconds), you may use, instead, an animated "wait" mouse pointer, such as a spinning ball or animated hour glass.
3. "I hear and understand" indicator. When the expected wait is of short enough duration (less than 2 seconds) that displaying elapsed time, etc., is meaningless, display the hour glass."

Wednesday, February 20, 2008

How-To: vmware-tools hgfs module on Ubuntu Gutsy Gibbon (7.10)

Arg. Doesn't work out of the box, disallowing you to use shared directories. Luckily this guy provided a way to fix it!

Tuesday, February 19, 2008

Intercepting method calls in C#, an approach to Aspect-Oriented Software Development

Cool! Roy Osherove used this to develop XtUnit, an NUnit addin which implements database rollbacks, described here. He uses System.Transactions.TransactionScope, which is a .NET facility for creating transactable components. Tres cool, no?

Monday, February 04, 2008