Works on My Machine


A common phrase we developers say when an application we develop breaks for someone else.

Found this image on DevExpress’s Code.Google.Com for plugin’s and found it amusing. Think I’ll add it to my QA releases. 

Stamped and Approved:


UML Design and Architecture Diagrams Tools for Visual Studio 2010


Here’s a good post on an Introduction to the different Architecture Diagrams in Visual Studio 2010.

To sum up..

Architecture Diagrams

  • Use Case
  • Activity
  • Sequence
  • Component
  • Class
  • Layer Diagrams


They should be use in this order, except for the Layer one. Which can be done whenever I believe. There’s another one, Dependency Graphs, see original post, page 2 for more info.

Use Case:

…a summary of who is using the application, and how they plan on using it…



…is used to show a software process or business activity as a workflow through a series of actions…


…used to show interactions between different objects in the software system…


…laying out the different components in your system, and how they interact…


…used to describe the different objects in the application being developed…


Layer Diagrams:

…allow you to describe the "logical" architecture of your application…

Control Your Windows Service from a Asp.NET Web App, Start, Stop, Run A Method


Maybe you find the need to; or you think of the possibilities of controlling a Windows Service from a Web App might be useful.  For me I like the idea of writing a Windows Service that does some server function but can be controlled or called by a user. This is a more detailed post on code examples from the previous post with some other considerations.

Examples Reasons?:

  1. Maybe a Administrator needs to start and stop services but doesn’t have access to the server by normal methods.
  2. A user that calls a Windows Service that performs some type of Emailing functionality such as a notifying users when they have a new Task.  Maybe this table is populated by many means. Win service would check the database every 30min and send off emails.  In your web app, your users are special, so every time they assign a task, you fire off the windows service right there and then. Or maybe sometimes you have the need to fire off a manual send and have written redundant code to do it.
  3. Windows service control center for developers? Or Support users?


Anyway, the process is quite easy.


Windows Service code, somewhere have a method like this…

Code Snippet
  1. Protected Overrides Sub OnCustomCommand(ByVal command As Integer)
  2.     MyBase.OnCustomCommand(command)
  3.     Select Case command
  4.         Case 130
  5.             'Call one of your other methods from here
  6.         Case 150
  7.             'Call some other method or command
  8.         Case Else
  9.             'Do Nothing
  10.     End Select
  11. End Sub

You can only call one CustomCommand, so you send in Command Integers and from there decided what you want to do.


In your ASP.Net app on a button click event..

Code Snippet
  1. Using sc As System.ServiceProcess.ServiceController = New System.ServiceProcess.ServiceController()
  2.     sc.MachineName = "Mastro-PC"
  3.     sc.ServiceName = "ComplyTrackMainTimer"
  4.     sc.ExecuteCommand(130)
  5.     'sc.Stop()
  6.     'sc.Start()
  7. End Using

This will work on a on a button click event. You have to set the MachineName and the ServiceName. You can also Stop() and Start() the Service or look up the Status.

You can get the MachineName of the server by opening a command prompt from the server and typing in “HostName”


You can get the ServiceName by opening up the server and looking at the name in Services. Don’t use the Display Name use the Service Name.


I have a previous post on this with more detailed information on valid Command Integers and Security.

Cyclomatic and Maintenance Complexity using CodeRush per Mark Miller


I’ve been using DevExpress’s Visual Studio Tool, CodeRush, for awhile now and I love it.

There’s been a feature though I was never familiar with, and that’s the little digits next to my methods. Choices of Cyclomatic Complexity, Maintenance Complexity and Line Count. Granted I figured out what Line Count was. 


So I did some research and found that Mike Miller from DevExpress has a Blog over there and goes over some CodeRush features that I found helpful.  I don’t know where his post on the Complexity count went but he did mention to another user on a forum post that there was this PDF which he describes the Complexity numbers.

Attachment Reference:


This has been helpful in alerting to me when I need to refractor my code and make changes, and break it out.

Here’s the charts from the PDF, which is the meat of it.

Cyclomatic Complexity

Probably the simplest measure of complexity. CC is the number of decision points for a method plus one. It also happens to represent the minimum number of test cases needed to travel through all branches of a method.



Maintenance Complexity

The purpose of Maintenance Complexity is to give you a picture of how much code you have in a given member.




Maintenance Complexity Points

Breakdown of how the Maintenance is counted




Configure TFS 2010 Email Server, Enable Email Alerts


If you get the error, “Sending email is not enabled”, its because you haven't configured this yet.

You can configure email settings using following command. 

TFSConfig ConfigureMail 


Or just do it via the TFS Administrator Tool which you can also Enable Email Alerts.



$35 laptop prototype or something from India coming soon! (Update)


India is about to put out a computer that’s only $35!! Crazy!  Then drop the price to $10 a unit as it sells. Don’t know what the stats are other then it’s a Linux based machine but I’d buy 10 of them.

From the picture it kind of looks like a wallet and flexible.  Who’s been smudging up my screen!

“India has unveiled a $35 computer prototype as part of its program to provide connectivity to its students and teachers at affordable prices.”

“The ministry said the price would gradually fall to $10 a piece.”

“The Linux-based computer is equipped with an Internet browser, a PDF reader and several other facilities…”



Indian government minister Kapil Sibal unveils a prototype of the $35 computer.



Looks like it’s still in progress and more legit then the original post.


  • OS: It was changed from Linux to Android.
  • Virtual Keyboard
  • Camera
  • Full Video Capability
  • Wi-Fi
  • 2GB Ram
  • Scheduled for Mid-2011

When Faced with the Facts, You’ll hold on to your misbelieves even more.


This interesting study, I wanted to post. As when I talk to someone about politics or religion, it’s interesting how when faced with factual information, someone’s views will not change.

"In a series of studies in 2005 and 2006, researchers at the University of Michigan found that misinformed people, particularly political partisans, rarely changed their minds when exposed to corrected facts in news stories. In fact, they often became even more strongly set in their beliefs. Facts, they found, were not curing misinformation. Like an underpowered antibiotic, facts could actually make misinformation even stronger."


“…we base our opinions on beliefs and when presented with contradictory facts, we adhere to our original belief even more strongly. “ Invite? Anyone?

Does anyone have an invite they can send me?  I don’t speak Hungarian, but I love BitTorrent sites.  Seems this one is invite only, and of course you have to know someone in the circle to get an invite, so no access for me.  Reminds me of in the old days before they were taken down, was invite only and a great site.  Demonoid is as well, but at least I was able to get in eventually.  Though lately I find myself using for everything. I do like RLSLog, I’m glad they are back online. 

Silverlight Timeout Issues from WCF… exceeded the allotted timeout.


So you’re getting error message…

The HTTP request to <URL To WCF Service> has exceeded the allotted timeout. The time allotted to this operation may have been a portion of a longer timeout.


Three places to set time values to fix this issue…


1) Web.Config

<httpRuntime executionTimeout="600" />

(this is seconds, so here it’s 10min).   More info on httpRuntime here.

2) On your Web.Config Binding Elements

<binding name="customBinding123" 
closeTimeout="00:10:00" />

3) On your ServerReferences.ClientConfig binding elements within the system.serviceModel

<binding name="CustomBinding" 
closeTimeout="00:10:00" />