Thursday, May 22, 2008

MRSD how to change default port for host projects

[MRSD(Microsoft Robotics Developer Studio) installation folder]\tools\Templates\CSharp\ contains a zip file named that contains a template for a c# host project. Change the program.cs in that archive to use the new ports instead of defaults 50000 and 50001.

A critic over your shoulder

Pex could be the critic you need for your code. If you don't have a friend to criticize when you make a mistake or to laugh his ass off, then you should find one. Pex is a testing engine, that make code analysis and generate unit tests accordingly. The final scope is to increase the quality of your unit tests by raising your test code coverage.

Wednesday, May 21, 2008

Smat tags in runtime Windows.Forms

A very interesting topic aboutSmart tags in runtime on Windows.Forms. I just made a copy:

You have to create a DesignerOptions with UseSmartTags property set to true, add the DesignerOptions to DesignerOptionService, after which add this service to the DesignerSurface, I write the following sample which host a TextBox and a DataGridView control on the designer surface.

Code Snippet

namespace Sample25


public partial class Form2 : Form


public Form2()




private void Form2_Load(object sender, EventArgs e)


myDesignSurface surface = new myDesignSurface();

IDesignerHost host = surface.GetService(typeof(IDesignerHost)) as IDesignerHost;

UserControl root = host.CreateComponent(typeof(UserControl)) as UserControl;

root.Width = this.panel1.Width - 30;

root.Height = this.panel1.Height - 30;

TextBox textbox = host.CreateComponent(typeof(TextBox)) as TextBox;

textbox.Location = new Point(100, 90);

textbox.Text = "textbox";


DataGridView dgv = host.CreateComponent(typeof(DataGridView)) as DataGridView;

dgv.Location = new Point(100, 130);

dgv.Text = "DataGridView";


Control c = surface.View as Control;

c.Dock = DockStyle.Fill;

c.BackColor = Color.White;

c.Parent = this.panel1;



class myDesignSurface : DesignSurface


public myDesignSurface()


MyDesignerOptionService optionService = new MyDesignerOptionService();

this.ServiceContainer.AddService(typeof(DesignerOptionService), optionService);



class MyDesignerOptionService : DesignerOptionService


protected override void PopulateOptionCollection(DesignerOptionCollection options)


if (options.Parent == null)


DesignerOptionCollection doc =
this.CreateOptionCollection(options, "WindowsFormsDesigner", null);

DesignerOptions doptions = new DesignerOptions();

doptions.UseSmartTags = true;

this.CreateOptionCollection(doc, "General", doptions);





Changing learning curve ... is developer's learning effort

How easy is to change the learning curve for the users of your programs? The answer lays on your response to What is ergonomics?

Example of not to do: to name Arbiter.Choise<>() (is suggesting a decision to make by using a predicate ) instead of Arbiter.TakeFirstArrivingFrom<>() (more clear for the reader) or Arbiter.FirstReceivedFrom() or even Arbiter.Any<>() sounds better.

I polluted my mind with Implementing a Simple 2D Object Tracker. I'm sorry right now, because i want to make my own system of recognition, or at least to take the time to think the best approach. After that to see other programmer's solutions.

Tuesday, May 20, 2008

Nature is fighting back - the suicide ants

NASA moves to save computers from swarming ants.
I'm remember Ants a great animation movie and the Ants and The Day of the ants by Webber great sci-fi books all in category must see and read

Falling in the pit of success

First service that control a robot. Is very simple in his nature, but is the first little big step.

Prepare yourself for staring at amazing movie - great work Boston Dynamics

At this time I'm a PHSC

SpamAssasin with the Traffic control tool a good news.

Some steganography (let the user to hide data in plain view) tools Hide in Picture, PDF's, HTML files or bitmaps, mp3stego
To hide a folder, just rename it to Alt+255, change the icon representation to a blank icon.

Mouse gesture in C#, to think of some usage in the future solutions.

Sunday, May 18, 2008

Starting is hard sometimes

I just watched the architecture getting started video for Microsoft Robotics Studio (MSRS) and decided to play with Visual Programming Language for MSRS. Is very intuitive and I made a hello world application in 30 seconds. But when tried to run I got:
A valid transport port was not specified.
This setback is easy to resolve by using
netstat -a -o
and see if the ports are used already by your system and make a decision if you want to terminate the program that is using the ports or to use other ports. To change what ports to use is fairly simple. From the Run menu choose Port Settings and enter the desired unused port numbers (let say 55004 and 55504).
Running again I got other error:
DsspForwarder:CreateRequestFrowarder. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: Transport not found in local ServiceEnvironment instance, for scheme:http
ouch. Error that is hiding other error in other service:
Cannot create a TCP Listener.
Error was raised because my operating system was Vista, and UAC (User Account Control) is on. The right solution for this is to use httpreserve, not to disable the UAC. I run DSS Command Prompt from the menu group Microsoft Robotics Developer Studio as administrator and executed the command httpreserve /port:55004 /user:me ( 55004 is the http port and me is current vista user logged in). After this application run smoothly and a hello appear.

Friday, May 16, 2008

Social integration

Google now allow me to translate text from English in Romanian. Is not perfect, but what is?

A very funny toy to learn physics. is a very nice site, it makes me to want to live forever.

Thursday, May 15, 2008

Future is now

Microsoft TouchWall is very impressive and is more practical then Surface table.

Sharping the axe before cutting the tree

LinqPad from is a nice learning tool. It comes with a challenge. I will subscribe to it.

It seems that saving(inserting) bulk in SQL Server is much more efficient. So our framework will gain a new functionality. There are scenarios when allot of calculated records will get home by this new bus.

I'm disappointed by Entities Framework I hope that will evolve in a real tool in the near future.

It seems that the day is getting smaller for me, even the light period is increasing.