Wednesday, April 15, 2009

Resharper 4.5 Released

I use the following tool for finetuning my code: Resharper

There is a new version released: "ReSharper 4.5 is more agile and robust than ever, with improved performance, memory usage and solution-wide analysis, as well as VB9 support"

I will report my experiences soon...

Update 22 april: I am using Resharper 4.5 a few days and it is really faster in VB.NET:) Further it is nice that the intellissence gives some suggestions for usage of fields-, variables names and so on. The rules for these name can defined by your own.

Tuesday, April 14, 2009

Always comment your code...

I was reading the
book about debugging and there was a very important part about commenting... I have summarized the following points:

Always document:
- your assumptions
- your approach
- the reasons why you have choosen for this approach

For each function or method:
- what does the routine?
- which assumptions have you made?
- what does every in- and output param contains?
- what are all the posssible return values or the routine?
- document every exception which is directly thrown in this routine

Always document bugfixes which you have made during development. (when available write down the bug number or reference where more information can be found about the bug/solution)

Always throw commented code away, because it is not clear what the meaning is of this in five years...

Always improve your code when you think "This is a hack"

Xml Comments
copied from winnershtriangle

exception: The exception tag allows a method's exception handling to be documented. The cref attribute allows the namespace of the exception handler to be included. Example: Throws an exception if the customer is not found.

permission: The permission tag can be used to describe any special permissions a specific object needs. The object to which the permission refers is included as the cref attribute. Example: Class needs to write to the file system, ensure user has appropriate access.

Run Kiss Llama on port 8000

Since a couple of years I own a Kiss DP 558 and when I had upgraded my OS to Vista64 the PC-Link doesnot work anymore.

But with LlamaKiss I still can watch movies from my KISS on TV.

But the programm doesn't start because there was already some other programm running on port 8000. The program starts with the following message "Error 10048: Only one usage of each socket address (protocol/network address/port) is normally permitted". You can analyse this with the command "netstat -a -b" from the command prompt.

Saturday, April 4, 2009

Tips for debugging in Visual Studio

Some tips when you are debugging in Visual Studio

I have not yet read them all... so I have no my best tips:)

UML associations

During my course on my job the topic UML associations was a short discussion. What is the difference between Composition, Aggregation and Assocation. In Dutch, read here for more details

Association: The object which have a relation with eachother are equal. For example a person drives a car.

Aggregation: One object is owner of the other object. For example a department and a person which is 'chief of the deparment'

Composition: One object is owner of the other object. But when the owner is deleted to other object is useless. For example a Room belongs to a house. When the house is destroyed the room doesnot exists anymore.

See for more details Wikipedia

ResolveUrl vs. ResolveClientUrl

The article which I have found, when I was "googling" for the difference between ResolveUrl and ResolveClientUrl

The difference between them is clear to me, but I do not yet really understand when to use the ResolveUrl instead of the ResolveCleintUrl...