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

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

Fixing EVEMon's Crashy C++ DLLs

I have been working on EVEMon for about two months now, taking on the responsibility of committing changes to the trunk, fixing bugs and adding new features. As a project I have been involved for several years submitting bug fixes and little features, it was down to my experiences with EVEMon that I decided to implement Subversion and Trac at work. Unfortunately the first time it came to me to be responsible for a release, it seemed to go terribly wrong. The updated installer worked fine, and it seemed initially there were no problems with the updated code base. However BattleClinic shortly went a little mad with bug reports similar to this one: ...

April 18, 2009 · 4 min

Strange SPQuery Behaviour

I have been working on a very simple web part for a long time, the actual code for the web part takes less than an hour to write and merely displays a colour coded letter based on a query from a SharePoint list taking the date as a parameter. It has taken a long time because of some strange behaviour with the SPQuery object, initially there was a problem with every row in the table being returned irrespective of the query, the odd thing was that if you ran the query in U2U CAML Query Builder it worked and the SPListItemCollection.count method would return 1 suggesting the query was working. ...

February 13, 2009 · 3 min

Adding VSeWSS 1.3 Solutions to Source Control

Having done a little experimenting with Visual Studio Extensions for WSS (VSeWSS), I wanted to start actually developing features for our intranet site. I try and add everything that is even slightly important into source control (Subversion). VSeWSS creates normal looking solutions, however when you deploy your project to a SharePoint site it created an additional directory alongside “bin” and “obj” called “pkg”. This “pkg” folder contains the manifest.xml, soloution.xml and feature.xml files that are used to create the feature to be deployed into SharePoint. Initially I was including this folder in my commits however, I noticed that any tweaks made to feature.xml were overwritten when you deployed the package again. After some searching around I came across an article that suggests deleting the “pkg” folder under certain circumstances. From this I assume that the contents of the “pkg” folder is generated each and every time you package and deploy your solution (or indeed project), thus it does not need to be added to source control. ...

February 5, 2009 · 1 min

Learn a Little More About Richard Slater

Graeme Arthur tagged me, normally I hate these things but this is kind of a reverse chain letter… sort of… maybe if i re-write the rules slightly. Rules Link to the original tagger(s), and list these rules on my blog. Share 7 facts about myself in the post - some random, some weird. Tag 7 people at the end of your post by leaving their names and the links to their blogs. Let them know they’ve been tagged by leaving a comment on their blogs and/or Twitter. 7 Facts About Me At the time of writing I have been alive for approximately 871 million seconds. I first started programming (in Spectrum BASIC) at about the age of 8 since then I have coded projects in Visual Basic, Pascal, C, C++, Java, Ada, PHP and C#. I have played EVE Online for almost five years now, have been playing less often of late however I still get to enjoy the time I do spend in EVE, although it is getting increasingly more and more lonely in space. I have been learning about Sharepoint over the past few weeks, I have already completed most of the Microsoft e-Learning on the topic and read several blogs, I recently signed up to the Sharepoint User Group UK. I wrote my dissertation on the future of MMOGs, I disagree with a good proportion of what I wrote, however it was one of the most enjoyable parts of my Degree. I type at between 40 and 60 words per minute, it has taken me 5 minutes to get to 300 words in this blog post, some of them however were copied and pasted from Graeme’s post. Like Graeme I also play bass (albeit I play badly) and dabble in live PA, although I don’t really enjoy the later any more. 7 people to tag: ...

December 13, 2008 · 2 min

Credit where credit is due Mythic!

Apparently this was released sometime last week however I had missed it completely, Mythic and its Electronic Arts overlords have decided that they will not be crediting former staff members in Warhammer Online. I really don’t understand it, Ryan Shwayder put it across better than I can. Everyone who contributes to a project puts something in, even if their product is not explicitly included in the final complete product they are part of the process. Not including someone’s name in the credits of anything be it a game, a film or a TV show is a giant slap in the face. As a programmer I would be gutted to think that I had been excluded from the credits having put years of work into and then moved on to better things a few months before launch. ...

August 26, 2008 · 1 min