VS 2010 Disabling script debugging

March 1st, 2011

This is an update to my previous post about disabling script debugging in VS 2008. To disable script debugging in VS 2010 add the following registry key using the command prompt (note your just updating the VS version number);

reg add HKLM\SOFTWARE\Microsoft\VisualStudio\10.0\AD7Metrics\Engine\{F200A7E7-DEA5-11D0-B854-00A0244A1DE2} /v ProgramProvider /d {4FF9DEF4-8922-4D02-9379-3FFA64D1D639} /f

see http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/19f91aa2-fb1b-40e9-bfb3-e2ee4fcfe7b8/

Default config of IIS 7 does not include ASP or ASP.Net?

September 17th, 2010

When installing IIS onto vista or windows 7 in “Turn Windows features on or off” dialogue you might for example click on the root tree “Internet Information Servcies” to indicate your wish to install all sub components and features, however clicking on the root of the tree is not enough as you actually have to drill down to find the web development sub tree open that and then select the leaf nodes for ASP.net (and ASP if you need it).

Really non intuitive tree control, i understand that it is giving me a recommended configuration rather than installing everything which very few users will need, but i think the design of the control is not obvious.

Visual Studio - multiple instances of development web server

September 17th, 2010

In Visual Studio (2005, 2008 & 2010), if you have multiple web projects in a solution a separate instance of the development web server “Cassini” is launched for each web project when debugging. If you are only debugging a single web project all these instances are probably unnecessary. Setting a single startup project in the solution properties menu does not solve this issue, instead you have to explicitly stop each web project from launching a server instance. This is done through the properties grid in the properties window (View -> Properties Window) for the web project not through the Properties menu (right click on web project -> properties) (someone please give me  a good reason why there are 2 properties menus).

Untitled-1.png
In the properties grid for the project you want to exclude, simply change the “Always Start When Debugging” property to False. This prevents a server instance being created for that web project, rinse and repeat for other projects you don’t care about.

VS 2008 debug Script Documents

May 13th, 2010

A really annoying issue that can arise in VS 2008 if your attempting to debug a site with a lot of javascript (which comes for free with the AJAX toolkit ;) is you get a new node in the solution explorer detailing each little piece of javascript that is loaded just in case you need to debug it. This is great and all but it looks like nobody tested this with a production size site because anything more than a small amount of JS and it slows to a crawl.

There does not appear to be a solution in VS 2008 for this, you are basically back to hacking the registry to disable script debugging.

Open a command prompt and type;

reg add HKLM\SOFTWARE\Microsoft\VisualStudio\9.0\AD7Metrics\Engine\{F200A7E7-DEA5-11D0-B854-00A0244A1DE2} /v ProgramProvider /d {4FF9DEF4-8922-4D02-9379-3FFA64D1D639} /f

See here for more;

http://blogs.msdn.com/greggm/archive/2009/04/06/disabling-script-debugging-in-vs-2008-ie8.aspx
http://pagebrooks.com/archive/2008/04/23/easily-disable-javascript-debugging-in-visual-studio-2008.aspx

IPhone Dev Error: Program received signal: “EXC_BAD_ACCESS”. or “Failed to call designated initaializer on NSManagedObject class”

May 7th, 2010

Symptoms: cryptic error message with a massive stack trace (65k+ stack frames)
This could be a memory leak, however, the cause in my case was i had named a property of a NSManagedObject object “description” in my Core Data data model. While “description” is a not technically a reserved keyword it is a method in NSObject which when used with Core Data causes problems.
Solution; rename the property to something else like desc.

see http://stackoverflow.com/questions/2222155/core-data-crashes-with-exc-bad-access-on-one-of-my-entities for more

IPhone Dev Error: “The model used to open the store is incompatible with the one used to create the store”;

May 7th, 2010

You have probably changed the Core Data data model and are now trying to run your app in the simulator, however,, if you have already run it on the sim before then there will be data stored according to the old version of the data model. Quick solution: reset the simulator “IPhone Simulator > Reset Content and Settings” and try running your app again. Correct solution: look at versioning your data models.

Route traffic (smtp) through specific network interface

March 5th, 2010

The problem; need to force connections to the gmail smtp servers through a mobile broadband modem rather than the main system NIC. The solution; use the route command to add a new persistent route to the IP routing tables for your machine;

route -p add 216.239.59.109 mask 255.255.255.255 XXX.XXX.XXX.XXX metric 1 if 14

where;

  • 216.239.59.109 is the gmail smtp server
  • XXX.XXX.XXX.XXX is the default gatway for the connection you want to route the traffic through
  • if 14 is the id of the NIC you want to use

See this article for more details  http://www.windowsnetworking.com/articles_tutorials/Making-Sense-Windows-Routing-Tables.html

Sony MDR-NC500D Digital Noise Cancelling Headphones - Review

July 10th, 2009

I have been in the market for a pair of noise cancelling headphones for a while but didn’t make the jump and buy a pair until about a month ago. I had been looking for a while at the Bose QuietComfort 2 and 3 and had tried them out briefly several times (I preferred the Over the ear QuiteComfort 2 to the on ear QuiteComfort 3) but each time while I was impressed by the noise cancelling and sound quality I just couldn’t justify the price. Then Sony released the MDR-NC500Ds which I got to try out while waiting for a flight in JFK, I liked the over the ear design, was impressed by the passive and active noise cancelling and the build quality but these were even less likely to attract my attention seen as they were initially priced at about 400 euro.

A couple of weeks back from the states I had another trip coming up and I decided to have another look on the web to see if anything got my fancy, initially I was only looking at the Bose but by accident I looked on Amazon to find that they were selling the Sony for 200 euro. http://www.amazon.co.uk/Sony-MDR-NC500-Digital-Cancelling-Headphones/dp/B00165TAVS/ref=sr_1_9?ie=UTF8&s=electronics&qid=1247251154&sr=1-9 Shall we just say my credit card didn’t stand much of a chance.

A month after receiving my shiny new Sony noise cancelling headphones and I have to tell you they are probably one of the best gadget purchases I have ever made. On flights they work as you would think filtering out all the background low level noise (Sony claim 99% but I would put it closer to 90%) you can still hear someone if they are talking directly to you and you will know when the captain is making an announcement but everything else becomes much quieter. It only becomes obvious how loud air travel is when you take the headphones off after wearing them for a while, all that low level noise comes back instantly and just makes you want to put the headphones on again.

While the use of the headphones on flights is what finally prompted me to buy, it’s their utility in the office that has prompted me to write a review. My job as a programmer requires me to be able to concentrate on difficult problems for considerable lengths of time, unfortunately I like many others work in a pretty noisy office environment surrounding by ringing phones, talking colleagues and noise servers which kind of hampers any kind of serious concentration. Maybe someday the programmers of the world will unite and demand personal offices as a prerequisite on all contracts thus consigning Dilbert land to the wastebasket of software history; however, until that day I have found a solution in the MDR-NC500Ds.

I am not overstating the case when I say that these headphones have changed the way I work utterly, my productivity has gone up by about 20%, I can cut out most of the rest of the world and I can concentrate for much longer periods allowing me to get into a state of flow which I could really only achieve previously by working from home. I used to say that dual monitors were an absolute must have for any programmer, I must now amended that to say that dual monitors and a pair of these headphones are the most valuable tools you can have in your toolbox. A quick summary of the good and the bad;

Good Points;

  • Cost has come down significantly
  • Excellent noise cancellation (both active and passive)
  • You don’t need to listen to music to enjoy the noise cancelling so reading etc is much improved
  • They are a perfect fit for me (see below)
  • I can wear them all day without a problem
  • The built quality and look is I think much better than the Bose
  • The sound quality is I think excellent (you will find some audiophile reviews that have some things to say about it but given where you will be usually using these headphones you won’t notice)
  • You get a raft of accessories
  • It’s got a large internal rechargeable battery I get several days use out of a single charge.

 

Bad Points;

  • Cost has come down but they are still not cheap
  • You need power so that you can listen to music, if the headphones run out then you can’t listen to music
  • The headphones are not small, and the case that comes with is very large (telephone book thick and about half the size)
  • They might not fit everybody, if you have a small head they might fall off.
  • Some people don’t like the over the ear headphones (I prefer them)
  • Some people don’t like the sensation produced by the active noise cancelling

 

In summary if you work in a noisy office environment these will help you get work done, but try and get a demo before you buy I found that about 50% of my friends either couldn’t wear them because they were too large or didn’t like the sensation produced by the noise cancelling.

SQL server management studio “locate backup” default path – when an unfinished feature becomes a bug

July 10th, 2009

Any of you that use SQL server management studio will probably, at one time or another, have had reason to attempt to restore a database from a backup file. This relatively simple operation is made irritatingly difficult by the management studio user interface. While there are many things wrong about the UI for this particular task (principally too many clicks before you do anything useful) the biggest problem is that it does not save the path of the backup file you choose. When you open the locate backup dialogue it defaults to a directory within the SQL server install dir, to select the file you want to restore you have to navigate to wherever in your file system that file resides, you can’t type in the path you have to scroll and click your way there. This is just painful but the pain is compounded by the fact that (if you don’t just give up and go home but actually find the file that you want to restore) the next time you wish to restore a backup you are forced to navigate through the directory structure again. I think this is due to an unfinished feature in the management studio, the UI of the specify backup dialogue looks as if it should save the locations of backup files you have previously restored, unfortunately it does not so instead this unfinished feature results in a usability bug in the locate backup dialogue.

The solution (or a kind of solution I should say) is to edit the registry entry that records the path the locate backup file dialogue defaults to;

My Computer\HKEY_LOCAL-MACHINE\SOFTWARE\Microsoft\\Microsoft SQL Server\MSSQL.1\MSSQLServer\BackupDirectory

Done.

Dell Latitude On Reader Password Problem

October 29th, 2008

Just a few quick notes on the Dell Latitude On Reader program that Dell is now shipping with its Latitude range. First there is a significant difference between “Latitude On Reader” and “Latitude On”. Latitude On Reader is a software download you can get from the dell support site. Install it and, run the setup program that is installed (note this these are separate steps for some reason) and then if you have the Latitude On button in your laptop when you press the button you will be booted into the Latitude On Reader mini OS. Latitude On, however, appears to be a hardware component (a system on a chip) which when released by Dell will allow access to not just the email, calendar and contacts that you get with the Reader but also web browsing and some other goodies. Anyway enough about poor naming of Dells products and more about the title of the post. When you setup Latitude On Reader (and presumably Latitude On) you are asked to enter a password. Unfortunately you do this in the setup program which you run from windows using the keyboard configuration of the windows install. Can anybody see where this is going ;) The Latitude On Reader when asking for the password appears to ignore the keyboard layout of the main windows install and instead offers only the US keyboard layout which is a slight problem if you used another keyboard layout to enter the password and used (as everybody should) some special characters to make the password more secure. There may be some way to configure the correct keyboard layout in the Latitude On Reader however my limited searches have not turned up anything yet.