Debugging "Just My Code"

Within EVEMon we have started making heavy use of LINQBridge which uses Visual Studio 2008’s Multi-Targeting capabilities to allow a .NET 2.0 applications to use the compiler functionality of C# 3.0. This reduces our need to push EVEMon towards .NET 3.5, and simplifies our dependency stack for the end user (.NET 2.0 is pre-installed on Vista and above, .NET 3.5 is pre-installed in Windows 7 and above). One of the annoyances I have run into is every time there is a problem with a LINQ statement the debugger will stop in the LINQBridge project rather than EVEMon’s code; this usually tells you nothing useful forcing you to dig into the exception to find the stack trace to find out which line caused the exception. ...

December 5, 2009 · 1 min

Controling Code Outlining with the Keyboard

Code outlining is a feature of supported by Visual Studio and many other editors, MSDN has some good documentation for VS2005, VS2008 and VS2010. If I were asked to explain this as briefly as possible, I would probably say: Code Outlining is the logical partitioning of code in such a way that the user interface, or editor, is able to selectively hide the body of the content (such as a class, struct, enum or method) whilst leaving the signature or some identifying comment visible. ...

November 3, 2009 · 2 min

Card Reader on Acer Aspire 5100 Series Under Windows 7

Update (15/11/2010): the drivers listed in this post are out of date and may cause a BSOD, several alternatives are listed in the comments; however Microsoft appear to have approved 64-bit drivers on Windows Update. I am typing this on my Acer Aspire 5102WLMi which is one of the popular (if flawed) Acer Aspire 5100 series; I rescued this one from the Balconi Test by putting a bit of rubber (it was a cut down rubber foot) on top of the South Bridge chip set, that however is not the story I am telling today. I never bothered to install the Card Reader driver on this laptop while I was running the Windows 7 Beta, mainly because I am lazy, but also I didn’t have a need for it so it never came up. With the release of Windows 7 I wanted to get the system perfect, seeing as hopefully it will last a good year in it’s present state, and I wanted to be able to re-arrange the SD card from my Acer PDA. Windows 7 x64 was unable to identify a driver for this particular card reader, this left me with three unknown devices in Device Manager: The Acer website was a bust, as far as Acer are concerned this laptop won’t even run Vista x64, so I had to dig deeper. From past experience of looking for drivers without using Windows Update I knew that I could probably identify the manufacturer from the Hardware and Device ID’s available through Device Manager. If you want to follow along here are the steps: ...

October 26, 2009 · 3 min

Change your MTU under Vista, Windows 7 or Windows 8

I have been updating this blog post over the years since I first discovered the issue with my computer in Windows Vista, now I am on Windows 8 and also on |FTTC broadband; |Path MTU Discovery seems to just work. I have tested the process so the approach and the commands still work in Windows 8, I however no longer need to use this process personally. For some reason that has escaped me |Path MTU Discovery (PMTUD) in Windows just doesn’t seem to figure out the MTU for a given path (something to do with routers being poorly configured to not respond to ICMP requests). So Windows uses the default. For the most part this doesn’t affect anyone, however if it does affect you, it really annoys you. Failure of PMTUD will result in some websites not loading correctly, having trouble connecting to normally reliable online services and general Internet weirdness. The resolution is to set your default MTU to one lower than the Ethernet default of 1500. Here is how: ...

October 23, 2009 · 3 min

Music to Install Windows By

Windows 7 turned up in the post today. The red box is Visual Studio 2008 which is there to show that the boxes have a similar profile to the old style hard cases. I have been running the Beta since it was first available to the general public, and I have had Windows 7 Business at work for a couple of weeks now. Bought Windows 7 Home Premium for about £45 from Tesco. One copy for the main PC which I will probably re-build at Christmas and one copy for the laptop which is re-built now. ...

October 22, 2009 · 2 min

Adjusting Selections in CodeRush Xpress

I found this function totally accidentally when I knocked my mouse into a key when something interesting popped up on Twitter. I happened to have a variable selected like so: The key that I knocked was the Number Pad “+” key, and it expanded the selection like this: As any self respecting Systems Administrator would do I wondered if doing exactly the same thing repeatedly would have equal or compound effects. Strangely enough it worked, the selection will continue to expand selecting increasingly larger sections of code. The reverse works as well if you press the Number Pad “-” key the selection will be reduced. ...

October 16, 2009 · 2 min

Find Files in CodeRush Xpress

As I mentioned in my previous entry I have started using DevExpress’s CodeRush Xpress. It is a free cut down version of CodeRush that I heard about in an episode of .NET Rocks. I have wanted add something to my Visual Studio development experience and I can’t justify the cost of either Resharper or CodeRush at the moment. There has been quite a bit of discussion about Resharper vs. CodeRush and in my experience most people I have spoken to love one and hate the other. I hope to be able to write a series of posts about some of the features found in CodeRush Xpress which I hope will clarify their purpose and use in my mind and maybe help someone find the function they are looking for. First off “Quick File Navigation”, this is a search function for locating a file by file name, I am finding it increasingly useful when looking through patches as it allows me to very quickly jump to a file name. Particularly as I am trying to move my projects to a one class per file so if I can remember the class name I can find the code file very quickly. The “Quick File Navigation” dialog is accessible through the keyboard short cut Ctrl+Alt+F. Typing will filter the list box by the name of the file matching anywhere in the filename including the extension. An additional feature for those who like me use CamelCase in their file names; if you enter your filter terms in capital letters it will search for capitalized words, in order within file names. Thus entering “AW” into the search box will also bring up the AboutWindow.cs in the above solution. Combining the above with the Ctrl-G keyboard shortcut in Visual Studio 2008 to go to a specific line we can do the following to go to line 162 in ShipLoadoutSelectWindow.cs: ...

October 12, 2009 · 2 min

Long time no blog

I had been intending to post up all sorts of bits of news about life, driving, programming and cats but it didn’t happen. I have been busy which is good, however it doesn’t leave very much room for blogging. This post is going to be one really quick catch up entry to try and get me back into the swing of it. I finally passed my driving test at the beginning of the summer, it was my fourth try and I passed with three minors which was a great feeling… since then I have driven once, as part of PassPlus, which didn’t really feel vastly different, although it was more enjoyable knowing that I didn’t have a test coming up. ...

October 10, 2009 · 2 min

Running through the rain

I don’t send on these Internet “chain letters”, as in general I don’t think people want to get generic forwarded and forwarded e-mails from me, they would probably prefer me just to e-mail them to ask them a question, favor or just to say hello. I do like this one though, it has a fair point and it makes it well. I have removed what I suppose would be described as the postamble from the bottom, as it doesn’t work for blog posts. ...

May 5, 2009 · 4 min

New Webhost

I have transfered to a new web-host, if you are seeing this message it has worked. That is all I have to say about it.

May 3, 2009 · 1 min