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/ -o -d files.txt
  3. git merge POS-safe
  4. ./Python/ -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"

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