<?xml version="1.0" encoding="UTF-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB"><title type="html">Martin Parry</title><subtitle type="html">It's Only Code</subtitle><id>http://martinparry.com/cs/blogs/mparry_software/atom.aspx</id><link rel="alternate" type="text/html" href="http://martinparry.com/cs/blogs/mparry_software/default.aspx" /><link rel="self" type="application/atom+xml" href="http://martinparry.com/cs/blogs/mparry_software/atom.aspx" /><generator uri="http://communityserver.org" version="2.0.60526.2668">Community Server</generator><updated>2008-05-28T05:38:00Z</updated><entry><title>Microsoft Azure as a driver for efficient programming</title><link rel="alternate" type="text/html" href="http://martinparry.com/cs/blogs/mparry_software/archive/2008/10/28/1329.aspx" /><id>http://martinparry.com/cs/blogs/mparry_software/archive/2008/10/28/1329.aspx</id><published>2008-10-28T11:58:00Z</published><updated>2008-10-28T11:58:00Z</updated><content type="html">&lt;FONT size=2&gt;
&lt;P&gt;Microsoft announced &lt;A href="http://www.azure.com"&gt;Azure&lt;/A&gt; at the &lt;A href="http://www.microsoftpdc.com"&gt;PDC&lt;/A&gt; yesterday, and it's got me thinking in all kinds of directions.&lt;/P&gt;
&lt;P&gt;I've been an occasional visitor to &lt;A href="http://www.stackoverflow.com"&gt;StackOverflow.com&lt;/A&gt; since it launched a while ago. I can't say I've been an active participant - my reputation is only 271 at the time of writing, but even with my occasional visits I've noticed a theme that comes up in quite a few questions: does it matter whether I write efficient code? This manifests itself as people asking whether those "pure" computer-science topics like algorithmic complexity and computability are worth learning, and also in answers to many questions that were not obviously about performance or efficiency.&lt;/P&gt;
&lt;P&gt;Right now, Microsoft seems not to have decided exactly how it will charge for host applications on Azure, or how it will charge for use of its hosted services, but it seems likely that the cost will be some function of resource usage: CPU time and storage space used, for example.&lt;/P&gt;
&lt;P&gt;So, for people targeting that environment with their applications, there could be whole new reason to design efficient applications: it'll be cheaper to run. Ok, I guess that's always been true but it's often been somewhat hidden among the other costs of maintaining an application. If/when the business starts receiving bills from Microsoft quoting amounts of CPU, storage, and other resources consumed by your application, you could make yourself very popular by shaving a few percent off those bills :-)&lt;/P&gt;&lt;/FONT&gt;&lt;img src="http://martinparry.com/cs/aggbug.aspx?PostID=1329" width="1" height="1"&gt;</content><author><name>martin</name><uri>http://martinparry.com/cs/members/martin.aspx</uri></author></entry><entry><title>Some Thoughts on Software Performance</title><link rel="alternate" type="text/html" href="http://martinparry.com/cs/blogs/mparry_software/archive/2008/10/27/1328.aspx" /><id>http://martinparry.com/cs/blogs/mparry_software/archive/2008/10/27/1328.aspx</id><published>2008-10-27T19:17:00Z</published><updated>2008-10-27T19:17:00Z</updated><content type="html">&lt;p&gt;In recent years I've done quite a bit of performance and scalability testing of apps on the Microsoft platform.&amp;nbsp; I know plenty of people who are more knowledgeable about software performance than I am, but at the same time a little knowledge about how to measure and affect performance in software is a surprisingly rare commodity.&amp;nbsp; I guess it's a skill-set that not many people have the time and/or inclination to obtain.&amp;nbsp; Certainly, I only learned what I know because employers have put me in positions where I've had to learn that stuff. &lt;p&gt;I'm glad they did, because it's a fascinating area.&amp;nbsp; One of the things I like about this area is that so much of it appears counter-intuitive at first glance.&amp;nbsp; I'll give you some examples... &lt;p&gt;1.&amp;nbsp; Low CPU usage - good or bad? &lt;p&gt;Let's say we have some code running on an application server.&amp;nbsp; We test it by submitting a certain workload, and it takes a few minutes to work through it.&amp;nbsp; We observe the total CPU usage to be around 50%.&amp;nbsp; I've been in this situation countless times, and more often than not, people look at the CPU usage and say "great, our code is efficient, we have CPU to spare".&amp;nbsp; But let's look at that again: CPU 50%, and it takes a few minutes to work though the workload.&amp;nbsp; The right observation would be "why isn't my CPU running at (or near) 100%, and getting through the workload quicker?" &lt;p&gt;Perhaps because people are used to things slowing down when their desktop CPU creeps towards 100%, they assume that high CPU is bad.&amp;nbsp; On a dedicated application server, low CPU is bad, because it means that something is preventing that server CPU from working as hard as we'd like.&amp;nbsp; That is, we want the CPU to be working harder&lt;i&gt; doing useful work&lt;/i&gt;.&amp;nbsp; Obviously there's no point increasing CPU work if our workload isn't processed any quicker. &lt;p&gt;So in our scenario, we can say that either (a) we're not generating the workload quickly enough to keep the CPU busy, or (b) the app is constrained by access to other resources, such as I/O on network or disk, or maybe contention around locking constructs.&amp;nbsp; Either way, we need to do some work to relieve that constraint and get the CPU working harder. &lt;p&gt;2. Asymmetric CPU usage &lt;p&gt;I'm sure I don't need to say why parallelism is important.&amp;nbsp; We in the software industry need to get much better at concurrent programming I think.&amp;nbsp; Most of us now have multiple CPU cores in our development machines.&amp;nbsp; That means, if we don't look in the right places, we might get a misleading view of the CPU usage in our applications. &lt;p&gt;It's surprisingly easy to build a .NET application that does most of its work on one specific thread.&amp;nbsp; This is particularly true of a Windows Forms desktop application.&amp;nbsp; I've seen apps that, although written in C#, were essentially VB6 apps because only the UI thread was used for doing any work.&amp;nbsp; On a dual-core machine, you might see something like this in task manager… &lt;p&gt;&lt;a href="http://www.martinparry.com/cs/BlogPics/SomeThoughtsonSoftwarePerformance_10F20/asymmetric.png"&gt;&lt;img height="94" alt="asymmetric" src="http://www.martinparry.com/cs/BlogPics/SomeThoughtsonSoftwarePerformance_10F20/asymmetric_thumb.png" width="244" border="0"&gt;&lt;/a&gt;  &lt;p&gt;If you only ever look at an aggregated CPU usage value, you might be proud of the fact that your CPU usage never goes above 50% (although as I said in point 1 this is not necessarily something to be proud of).&amp;nbsp; In fact, this is showing a real problem in the design of your app, because no matter how you upgrade your hardware you're unlikely to make this app go any faster. &lt;p&gt;I guess I should admit that, right now, the app I'm working on looks a little bit like this.&amp;nbsp; Physician heal thyself, etc. &lt;p&gt;If you're using perfmon to analyse your app's CPU usage, you'll want to use the Process object so that you can view CPU usage just for your app's process(es).&amp;nbsp; It's worth pointing out that the CPU counters in the Process object go up to more than 100%.&amp;nbsp; If you have two CPU cores in the machine, it goes to 200%, or 400% for four cores, etc. &lt;p&gt;3. Extrapolation &lt;p&gt;One of the most interesting human factors around software performance is the common belief that software performance behaves linearly as variables change.&amp;nbsp; You most often see this as people trying to extrapolate performance figures to assume how software will perform on bigger hardware, with greater data volumes, or with more concurrent users, etc.&amp;nbsp; In general, it's safest to assume that you simply&lt;i&gt; &lt;/i&gt;&lt;i&gt;cannot&lt;/i&gt; extrapolate. &lt;p&gt;When you're working to improve the performance of an application, you find the first problem; let's say your app slows down to the point of being unusable when you're loading a large quantity of data into it.&amp;nbsp; Someone might say "ok, we'll work on getting that data loading problem fixed.&amp;nbsp; In the meantime, you find the next slowest part of the app and work on that".&amp;nbsp; The problem with this is that "the next slowest part of the app" might well be different when you manage to get that larger quantity of data loaded.&amp;nbsp; The slowest routine to operate on 100 items may not be the slowest routine to operate on 10000 items. &lt;p&gt;In many ways, improving the performance of an application is like mending a leaky garden hose.&amp;nbsp; You find the first problem and fix it, then you see the next problem and fix that, then the next, etc. &lt;img src="http://martinparry.com/cs/aggbug.aspx?PostID=1328" width="1" height="1"&gt;</content><author><name>martin</name><uri>http://martinparry.com/cs/members/martin.aspx</uri></author></entry><entry><title>Mac vs. PC</title><link rel="alternate" type="text/html" href="http://martinparry.com/cs/blogs/mparry_software/archive/2008/10/14/1326.aspx" /><id>http://martinparry.com/cs/blogs/mparry_software/archive/2008/10/14/1326.aspx</id><published>2008-10-14T21:04:01Z</published><updated>2008-10-14T21:04:01Z</updated><content type="html">&lt;p&gt;I have a Mac.&amp;nbsp; Nothing fancy, just a small MacBook.&amp;nbsp; I don't think it was a reaction to leaving Microsoft.&amp;nbsp; In fact, I dual-boot it with Windows Vista.&amp;nbsp; I need Vista because I am a Windows developer, after all.&amp;nbsp; Having said that, I have grown to like the Mac.&amp;nbsp; These days I'm doing most of my admin in the Mac partition, although I do use Microsoft Office:mac 2008.&lt;/p&gt; &lt;p&gt;Curiosity got the better of me, and I decided to try my hand at development on the Mac.&amp;nbsp; I should say that I was a C and C++ developer earlier in my career, which makes it easier for me to adapt to Objective-C Cocoa development than would be the case if I had only done .NET development.&lt;/p&gt; &lt;p&gt;There's a lot I could say by way of comparison between Mac Cocoa dev and .NET development for Windows.&amp;nbsp; Maybe I will say more about it at some point.&amp;nbsp; For now, let me just say that .NET developers have a &lt;em&gt;much&lt;/em&gt; easier time of things than our Mac brethren.&lt;/p&gt; &lt;p&gt;Some of my time at Microsoft was spent in a marketing group, and one of the facts of life there is that, among all Microsoft's customers, developers are some of the harshest critics of the company.&amp;nbsp; All I can say is, some of those developers should try building apps for the Mac.&amp;nbsp; I think they might have a bit more love for Microsoft afterwards :-)&lt;/p&gt; &lt;p&gt;For a long time Microsoft has courted developers.&amp;nbsp; I think their focus on maintaining a productive development platform has helped their success in no small part.&amp;nbsp; Apple on the other hand seems to do almost nothing for developers.&amp;nbsp; Their online documentation is extremely dry compared with MSDN, and their development tools are idiosyncratic, to say the least.&lt;/p&gt; &lt;p&gt;So, .NET developers, consider those worse off than yourself :-)&amp;nbsp; And if Apple ever gets its act together and produces an online developer marketing channel* to rival MSDN then Microsoft will really have something to worry about.&lt;/p&gt; &lt;p&gt;I haven't given up on Mac development.&amp;nbsp; It's harder, but that's not necessarily bad.&amp;nbsp; It's always useful to have more strings to your bow.&lt;/p&gt; &lt;p&gt;*yes, MSDN is a marketing channel.&amp;nbsp; You knew that, didn't you?&lt;/p&gt;&lt;img src="http://martinparry.com/cs/aggbug.aspx?PostID=1326" width="1" height="1"&gt;</content><author><name>martin</name><uri>http://martinparry.com/cs/members/martin.aspx</uri></author></entry><entry><title>Microsoft's Bad TV Advertising</title><link rel="alternate" type="text/html" href="http://martinparry.com/cs/blogs/mparry_software/archive/2008/10/14/1325.aspx" /><id>http://martinparry.com/cs/blogs/mparry_software/archive/2008/10/14/1325.aspx</id><published>2008-10-14T20:59:26Z</published><updated>2008-10-14T20:59:26Z</updated><content type="html">&lt;p&gt;I just saw one of the latest batch of Microsoft TV adverts (I'm in the UK by the way).&amp;nbsp; As usual, it's banal, and leaves me wondering what the heck it was trying to say.&amp;nbsp; For such a wealthy company, Microsoft has some shockingly-bad TV commercials.&amp;nbsp; When I worked there, I seem to remember that most of my colleagues agreed.&lt;/p&gt; &lt;p&gt;Look at the Mac vs. PC campaign run by Apple (which I guess this new Microsoft ad is playing on).&amp;nbsp; They were fun.&amp;nbsp; Enjoyable to watch.&amp;nbsp; They made a point.&amp;nbsp; People remembered them.&amp;nbsp; All this Microsoft ad ("I'm a PC") did is remind me of the Apple campaign and help cement Apple's message in my mind.&lt;/p&gt;&lt;img src="http://martinparry.com/cs/aggbug.aspx?PostID=1325" width="1" height="1"&gt;</content><author><name>martin</name><uri>http://martinparry.com/cs/members/martin.aspx</uri></author></entry><entry><title>Source Code Management Changes</title><link rel="alternate" type="text/html" href="http://martinparry.com/cs/blogs/mparry_software/archive/2008/09/25/1323.aspx" /><id>http://martinparry.com/cs/blogs/mparry_software/archive/2008/09/25/1323.aspx</id><published>2008-09-25T12:24:00Z</published><updated>2008-09-25T12:24:00Z</updated><content type="html">&lt;P&gt;I currently spend a lot of time working on a development project with a client, and on that project we recently changed our source control system.&amp;nbsp; We were originally using ClearCase, and it's hard to be too critical of ClearCase.&amp;nbsp; I mean, it's been around for a long time, and it's still in use on some of the largest and most complex software projects.&amp;nbsp; It can be quite hard to get your head around the first time you use it, but if you're working on one of those large, complex software projects, I suppose you'd better be up to understanding ClearCase.&lt;/P&gt;
&lt;P&gt;Anyway, for various reasons our project recently changed from ClearCase to Perforce.&amp;nbsp; From where I stand, these two products couldn't be more different : -&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;ClearCase costs a lot of money (although I'm sure it's worth every penny) whereas Perforce has a sliding tariff starting from "free".&lt;/LI&gt;
&lt;LI&gt;In ClearCase the default working paradigm is that everyone has a private branch.&amp;nbsp; They can check in/out on that branch without affecting anyone else, and when happy they integrate back onto a shared branch.&amp;nbsp; Perforce supports the idea of branching but it's a less-frequently-used option.&amp;nbsp; The normal model is one of multiple concurrent checkouts; an idea which I've found a bit daunting in the past, but which seems to work very well in practice.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Both products have been totally reliable for me, in the sense that we haven't lost any work because of them.&amp;nbsp; I also feel like I'm being more productive with Perforce, mainly because in our environment a ClearCase integration operation could take quite a few minutes, whereas everything I do with Perforce is more-or-less instantaneous.&lt;/P&gt;
&lt;P&gt;Because you can download and use (with some limitations) Perforce for free, I have it installed on my personal development systems as well.&amp;nbsp; I really like using the same tools everywhere.&amp;nbsp; Even my Mac OSX system has Perforce installed, and the client app looks/behaves the same everywhere.&lt;/P&gt;
&lt;P&gt;Congratulations to Perforce.&amp;nbsp; I like your product, and I like your business model.&amp;nbsp; And they didn't even pay me to write this :-)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://martinparry.com/cs/aggbug.aspx?PostID=1323" width="1" height="1"&gt;</content><author><name>martin</name><uri>http://martinparry.com/cs/members/martin.aspx</uri></author></entry><entry><title>Debugging FileNotFoundException</title><link rel="alternate" type="text/html" href="http://martinparry.com/cs/blogs/mparry_software/archive/2008/08/15/1322.aspx" /><id>http://martinparry.com/cs/blogs/mparry_software/archive/2008/08/15/1322.aspx</id><published>2008-08-15T15:54:03Z</published><updated>2008-08-15T15:54:03Z</updated><content type="html">&lt;p&gt;Recently in our app we were getting a System.IO.FileNotFoundException.&amp;nbsp; The trouble was, the exception detail didn't tell us what particular file was missing.&amp;nbsp; Our .NET app has a dependency on a COM DLL, which in turn has good, old-fashioned, dynamic-linkage dependencies on other DLLs.&lt;/p&gt; &lt;p&gt;Initially, I tried Process Monitor from sysinternals to log all filesystem access, but no joy there.&amp;nbsp; This clearly wasn't normal File I/O, it was a module load that was failing.&amp;nbsp; By the way, you can run those sysinternals utilities directly from &lt;a href="http://live.sysinternals.com"&gt;http://live.sysinternals.com&lt;/a&gt; now, which is handy.&lt;/p&gt; &lt;p&gt;There might be a simple way to resolve this problem, but I couldn't think of it, so I resorted to a fairly obscure method, involving WinDbg.&amp;nbsp; When I was at Microsoft we used to joke that Microsoft really has only one tool, and WinDbg is it.&amp;nbsp; You can do everything in there.&amp;nbsp; It's not easy to get started with it, but I do recommend persevering.&amp;nbsp; It's best if you work near someone that already knows it, and get them to show you.&lt;/p&gt; &lt;p&gt;I guessed that the failure was occurring in a call to LoadLibrary or LoadLibraryEx, so I wanted to put a breakpoint on those functions and look at the string that was passed in - the name of the module to load.&amp;nbsp; Here are the commands I entered into WinDbg...&lt;/p&gt; &lt;p&gt;&lt;font face="Consolas" size="2"&gt;bp kernel32!LoadLibraryW "r $t0 = ebp+8; r $t1 = @@c++( *((long *)@$t0 )); dc $t1 L64; g"&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="Consolas" size="2"&gt;bp kernel32!LoadLibraryExW "r $t0 = ebp+8; r $t1 = @@c++( *((long *)@$t0 )); dc $t1 L64; g"&lt;/font&gt;&lt;/p&gt; &lt;p&gt;Each command sets a breakpoint in the relevant function, and defines a command to run when the debugger hits that breakpoint.&amp;nbsp; In each case I find a pointer to the first parameter (which is at ebp+8), then I dereference this pointer and dump out 64 characters found at that address.&amp;nbsp; The final "g" is to make the debugger automatically continue from the breakpoint.&lt;/p&gt; &lt;p&gt;What did this achieve?&amp;nbsp; Well, running the app in the debugger dumped out all the names of the modules that were loaded by these two functions.&amp;nbsp; When the FileNotFoundException was thrown, I just had to look at the most recent filename dumped out and that was the module that failed to load.&lt;/p&gt; &lt;p&gt;Almost done, but not quite.&amp;nbsp; The name I just found is of the module that couldn't be loaded, but it could be found alright.&amp;nbsp; Let's call it "banana.dll".&amp;nbsp; It couldn't be loaded because it had a dependency on another DLL that couldn't be found.&amp;nbsp; To find out what that might be, I did a "dumpbin /imports banana.dll".&amp;nbsp; That told me what DLLs are imported by banana.dll.&amp;nbsp; I just had to look through that list to find the one that was missing from my filesystem.&lt;/p&gt; &lt;p&gt;This is a case of "blogging for posterity" in case I ever need to do this again.&amp;nbsp; Hopefully others can benefit from it too, though :-)&lt;/p&gt; &lt;p&gt;Finally, I have to question the wisdom of using FileNotFoundException to represent module load failures.&amp;nbsp; No wonder the exception detail couldn't tell me which file was missing.&amp;nbsp; Perhaps there should be a separate exception class for this?&lt;/p&gt;&lt;img src="http://martinparry.com/cs/aggbug.aspx?PostID=1322" width="1" height="1"&gt;</content><author><name>martin</name><uri>http://martinparry.com/cs/members/martin.aspx</uri></author></entry><entry><title>On the Nature of Blogging</title><link rel="alternate" type="text/html" href="http://martinparry.com/cs/blogs/mparry_software/archive/2008/08/08/1321.aspx" /><id>http://martinparry.com/cs/blogs/mparry_software/archive/2008/08/08/1321.aspx</id><published>2008-08-08T13:55:48Z</published><updated>2008-08-08T13:55:48Z</updated><content type="html">&lt;p&gt;When I look at the viewing statistics for my blog I see that last month was the biggest month ever, in spite of the fact that I didn't post much, and that I was on holiday for half of the month.&amp;nbsp; Actually, there was quite a big increase compared with the previous month.&amp;nbsp; This leads me to suppose that blog stats can only ever go up.&lt;/p&gt; &lt;p&gt;When I worked at Microsoft, "the management" collected bloggers' stats each month.&amp;nbsp; In fact, it was a key metric that our performance was measured on, and one that I never excelled in.&amp;nbsp; I don't think I'm giving away any secrets there.&amp;nbsp; Sure, when you read a blog that's from a Microsoft employee you can probably expect that blogging is a part of his/her job that they're measured on, but that doesn't make the blog less valuable.&amp;nbsp; Although there are a few worthless ones :-)&lt;/p&gt; &lt;p&gt;In general I think bloggers are seen as people donating their knowledge out of a spirit of generosity, and for a great many that is so, but you should always keep in mind that quite a few blogs are created and maintained just because the boss says so.&lt;/p&gt; &lt;p&gt;I'm sure other technology companies encourage blogging among their staff too.&amp;nbsp; This is not a "Microsoft is evil" post. Blogging has become a very important marketing channel for technology companies.&lt;/p&gt; &lt;p&gt;The good news is that most bloggers who do well at achieving high stats do so because their content is high quality and they keep it coming at a prodigious rate, whether or not their boss is keeping score.&amp;nbsp; But I must say I have known a couple of blogs that managed to achieve high numbers without seeming (to me) very worthwhile.&amp;nbsp; There are all kinds of tricks a wise blogger can carry out that will hugely inflate their stats, more quickly than generating a lot of useful content that a lot of people want.&amp;nbsp; Unfortunately, many employers can't see beyond the raw numbers.&amp;nbsp; Quantity beats quality every time.&lt;/p&gt; &lt;p&gt;When you're reading blogs, why not see if you can tell whether the blogger is playing a numbers game...?&lt;/p&gt;&lt;img src="http://martinparry.com/cs/aggbug.aspx?PostID=1321" width="1" height="1"&gt;</content><author><name>martin</name><uri>http://martinparry.com/cs/members/martin.aspx</uri></author></entry><entry><title>Visual Studio and Stability</title><link rel="alternate" type="text/html" href="http://martinparry.com/cs/blogs/mparry_software/archive/2008/07/09/1318.aspx" /><id>http://martinparry.com/cs/blogs/mparry_software/archive/2008/07/09/1318.aspx</id><published>2008-07-09T11:33:00Z</published><updated>2008-07-09T11:33:00Z</updated><content type="html">&lt;P&gt;I was just reading the lastest &lt;A href="http://msdn.microsoft.com/en-gb/flash/default.aspx"&gt;MSDN UK Flash&lt;/A&gt; newsletter, and was very interested in the survey results.&amp;nbsp; For the uninitiated, each issue of the Flash contains a survey that readers can respond to.&amp;nbsp; In the next issue, they show the results of that survey.&amp;nbsp; The most recent survey question was "What would interest you most around new versions of Visual Studio?" and the largest response (34%) was for "Stability, Reliability, Performance".&amp;nbsp; I find this quite surprising.&lt;/P&gt;
&lt;P&gt;In the 8 years I worked at Microsoft, I went through several versions of Visual Studio, including pre-release builds a lot of the time, and I must say I always found its stability and reliability pretty good.&amp;nbsp; Performance was never a problem for me either.&amp;nbsp; This was also true in my life before Microsoft.&lt;/P&gt;
&lt;P&gt;But in all those roles I actually installed Visual Studio myself, from a disc or from the network using Microsoft's supplied setup.exe.&amp;nbsp; In addition, I never had cause to install any non-Microsoft add-in for Visual Studio.&lt;/P&gt;
&lt;P&gt;Recently I've been using Visual Studio on a machine managed by a customer of mine.&amp;nbsp; They use a 3rd-party packaging system to deploy everything to their managed desktops.&amp;nbsp; I don't know the details of how this works, but I'm guessing that it's some kind of registry/filesystem snapshot.&lt;/P&gt;
&lt;P&gt;It's clear to anyone that's installed Visual Studio from a disc that the process is considerably more complex that dumping stuff straight into the registry and the filesystem.&amp;nbsp; Maybe it shouldn't be - I could happily support that view - but it's clear that it is more complex than that.&amp;nbsp; Otherwise why on earth would it take so long, and why would it display messages like "generating scripts"...?&lt;/P&gt;
&lt;P&gt;So if we accept that VS is somehow "hard to install" we should probably believe that any 3rd-party packaging tool is unlikely to deduce all the correct logic to use when installing VS.&amp;nbsp; In fact, I find VS decidedly less stable on this managed desktop than I've ever found it to be in the past, on systems where I used Microsoft's setup.exe.&lt;/P&gt;
&lt;P&gt;Also, this managed desktop has several add-ins for VS installed.&amp;nbsp; Occasionally VS has crashed and I've caught it in WinDbg, so I know it was at least one of the add-ins that caused the problem.&amp;nbsp; I guess that VS has become a platform in its own right and people are blaming it for faults in components that they've installed&amp;nbsp;on top.&lt;/P&gt;
&lt;P&gt;Microsoft used to get the blame for all blue screens in Windows&amp;nbsp;but I think these days most users realise that it's more likely to be a 3rd-party device driver at fault.&amp;nbsp; Microsoft had to educate its customers by capturing data about their software failures and publishing data about the results.&amp;nbsp; Kind of like "naming and shaming" except I don't think they ever published the names of the culprits.&lt;/P&gt;
&lt;P&gt;I wonder how many of the survey respondents were using some "odd" deployment tool, or some 3rd-party add-in.&amp;nbsp; Did they think about whose code was running when they experienced those stability issues?&lt;/P&gt;
&lt;P&gt;So this survey result makes me think that perhaps the most useful features in future versions of VS would be to capture and publish data about which add-ins are crashing it, and to simplify the setup to the extent that a simple registry/filesystem snapshot is all you need to deploy it reliably.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://martinparry.com/cs/aggbug.aspx?PostID=1318" width="1" height="1"&gt;</content><author><name>martin</name><uri>http://martinparry.com/cs/members/martin.aspx</uri></author></entry><entry><title>Herding Sheep</title><link rel="alternate" type="text/html" href="http://martinparry.com/cs/blogs/mparry_software/archive/2008/06/24/1316.aspx" /><id>http://martinparry.com/cs/blogs/mparry_software/archive/2008/06/24/1316.aspx</id><published>2008-06-24T17:32:33Z</published><updated>2008-06-24T17:32:33Z</updated><content type="html">&lt;p&gt;One of the things I find most interesting about software development is the people who do it.&amp;nbsp; I think you can spot personality traits by reading people's code :-)&amp;nbsp; A few years ago, I was introduced to the &lt;a href="http://www.myersbriggs.org/"&gt;Myers-Briggs Type Indicator&lt;/a&gt;, and I was interested that it seems to categorize people according to 4 axes.&amp;nbsp; I was a little dismissive of it at the time because, of course, a personality is more than 4-dimensional.&amp;nbsp; But as time has passed, and I've met more software developers, and read more of their code, I've started to realize that there are common traits, and there probably are ways to categorize developers.&lt;/p&gt; &lt;p&gt;I should say, this is just idle chat.&amp;nbsp; I am not suggesting that there's anything useful to be gained from this sort of analysis.&amp;nbsp; I just find it interesting.&amp;nbsp; In particular, I don't much care for the idea that an employer might try to assemble a team based on different &lt;em&gt;types&lt;/em&gt;.&amp;nbsp; But some days, a difference between types of developer hits me right between the eyes, and today is one such day.&lt;/p&gt; &lt;p&gt;Have you ever read some code and found a comment like "was getting unexpected exceptions here, but with this Sleep(500) it works ok".&amp;nbsp; To my mind, the person who wrote this didn't feel &lt;em&gt;in control&lt;/em&gt; of the machine.&amp;nbsp; It's like "&lt;em&gt;&lt;a href="http://en.wikipedia.org/wiki/One_man_and_his_dog"&gt;one man and his dog&lt;/a&gt;&lt;/em&gt;".&amp;nbsp; I mean, the shepherd and his dog might consider themselves to be in control, but in reality the sheep have brains too.&amp;nbsp; Ultimately it's their decision whether they walk into the little pen.&amp;nbsp; I guess their thought process is something like "I might as well go where he wants, otherwise it's another 15 mins of being chased around the hillside".&lt;/p&gt; &lt;p&gt;But computers are even more stupid than sheep.&amp;nbsp; You can try to coax it into doing what you want with little things like Sleep(500), but it has no concept of "you've been debugging me for hours now, I'll just give in".&amp;nbsp; So coaxing and goading a computer into doing what you want is not an effective approach.&amp;nbsp; You need to grab hold of it and make it do your bidding.&amp;nbsp; Instead of the Sleep(500), when the exception happens, debug it.&amp;nbsp; Find out exactly what's happening and then stop it happening.&amp;nbsp; Master the machine.&lt;/p&gt; &lt;p&gt;So some developers are masters of the machine, while some are shepherds.&amp;nbsp; In truth, I don't think it's a binary choice, it's more like a spectrum; master at one end, shepherd at the other.&amp;nbsp; So...&lt;/p&gt; &lt;p&gt;M &amp;lt;------|------&amp;gt; S&lt;/p&gt; &lt;p&gt;...whereabouts would you put yourself on that spectrum?&lt;/p&gt;&lt;img src="http://martinparry.com/cs/aggbug.aspx?PostID=1316" width="1" height="1"&gt;</content><author><name>martin</name><uri>http://martinparry.com/cs/members/martin.aspx</uri></author></entry><entry><title>SQL 2008 and SQL Compact 3.5</title><link rel="alternate" type="text/html" href="http://martinparry.com/cs/blogs/mparry_software/archive/2008/06/20/1315.aspx" /><id>http://martinparry.com/cs/blogs/mparry_software/archive/2008/06/20/1315.aspx</id><published>2008-06-20T12:33:17Z</published><updated>2008-06-20T12:33:17Z</updated><content type="html">&lt;p&gt;I've been using &lt;a href="http://www.microsoft.com/sqlserver/2008/en/us/compact.aspx"&gt;SQL Server Compact Edition v3.5&lt;/a&gt; for a little while now, and while the database engine has performed faultlessly so far, the same cannot be said of the management tool that's built into VS2008.&amp;nbsp; Perhaps that has improved with SP1 of VS2008, I haven't checked yet.&lt;/p&gt; &lt;p&gt;Today, I downloaded the &lt;a href="http://www.microsoft.com/sqlserver/2008/en/us/trial-software.aspx"&gt;release candidate of SQL Server 2008&lt;/a&gt;, just to get the management tools and see if I can connect to my SQLCE3.5 database from there.&amp;nbsp; I can, and it seems to work well.&amp;nbsp; I must say that I haven't spent long working with it yet, but it's great to have access to some of the features I'm familiar with from "normal" SQL Server, such as a graphical view of the execution plan.&lt;/p&gt; &lt;p&gt;Of course, it's still a release candidate.&amp;nbsp; My early optimism might soon wear off :-)&lt;/p&gt;&lt;img src="http://martinparry.com/cs/aggbug.aspx?PostID=1315" width="1" height="1"&gt;</content><author><name>martin</name><uri>http://martinparry.com/cs/members/martin.aspx</uri></author></entry><entry><title>DesignMode in Windows Forms control development</title><link rel="alternate" type="text/html" href="http://martinparry.com/cs/blogs/mparry_software/archive/2008/06/17/1314.aspx" /><id>http://martinparry.com/cs/blogs/mparry_software/archive/2008/06/17/1314.aspx</id><published>2008-06-17T13:21:00Z</published><updated>2008-06-17T13:21:00Z</updated><content type="html">&lt;P&gt;I'm currently working on an app that has to run on v2.0 of the .NET platform (with no SP applied).&amp;nbsp; The particular behaviour I'm talking about may have changed in more recent versions - I haven't had time to check - but I was struck by something and just had to write about it.&lt;/P&gt;
&lt;P&gt;When you're working on a UserControl, Visual Studio sets the value of a property &lt;EM&gt;DesignMode&lt;/EM&gt; to true whenever it loads your control into the visual designer.&amp;nbsp; This allows you to ensure that any code that depends on runtime artifacts doesn't run in the designer.&amp;nbsp; But if you search, you'll find lots of folks bemoaning the fact that &lt;EM&gt;DesignMode&lt;/EM&gt; isn't set before&amp;nbsp;the constructor of your control runs.&amp;nbsp; Again, maybe this has changed, I should check...&lt;/P&gt;
&lt;P&gt;That means you have a problem if code in your constructor depends on constructs that are only available at runtime.&amp;nbsp; There are a number of workarounds posted on the web, but none of them struck me as very nice, and some just didn't work for me.&amp;nbsp; So I did the "obvious" workaround.&amp;nbsp; I took the code that couldn't run in the designer, moved it out of my constructor and into a separate function, and did a check for &lt;EM&gt;DesignMode&lt;/EM&gt; there.&amp;nbsp; It works fine.&lt;/P&gt;
&lt;P&gt;Now my control has a simpler constructor.&amp;nbsp; It just initialises fields with values that are always the same.&amp;nbsp; All the logic that calls into other parts of the app has been moved into my new function.&amp;nbsp; I feel that my control is somehow "less-coupled" to other parts of the app now that I can construct it without those things being there.&amp;nbsp; It feels more correct.&lt;/P&gt;
&lt;P&gt;What's the catch?&amp;nbsp; Well, something has to call my new function.&amp;nbsp; That could be the code that instantiates my control, or I could call it from my own control's Load event handler, or from some other event handler inside my control.&amp;nbsp; In my case, I chose to let the calling code do it.&amp;nbsp; it worked fine but I still walked away thinking I'd made my codebase more complex to workaround an "issue" in VS2005.&lt;/P&gt;
&lt;P&gt;But today I was doing further development against my control.&amp;nbsp; It struck me that the additional function I introduced has actually allowed me greater freedom in the way I initialize the control and has actually &lt;EM&gt;simplified&lt;/EM&gt; my codebase in the end.&amp;nbsp; The feeling of correctness I got from refactoring the constructor was borne out in my ability to reuse this control in ways I didn't anticipate.&lt;/P&gt;
&lt;P&gt;There's a lesson in that.&amp;nbsp;&amp;nbsp;You might feel coerced into writing code a certain way, just to workaround a quirk in your tools or platform, but that doesn't mean the workaround is actually worse than what you originally intended.&amp;nbsp; It could be better.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://martinparry.com/cs/aggbug.aspx?PostID=1314" width="1" height="1"&gt;</content><author><name>martin</name><uri>http://martinparry.com/cs/members/martin.aspx</uri></author></entry><entry><title>The Campaign Against .NET Obfuscation</title><link rel="alternate" type="text/html" href="http://martinparry.com/cs/blogs/mparry_software/archive/2008/06/13/1313.aspx" /><id>http://martinparry.com/cs/blogs/mparry_software/archive/2008/06/13/1313.aspx</id><published>2008-06-13T12:27:53Z</published><updated>2008-06-13T12:27:53Z</updated><content type="html">&lt;p&gt;I've started a one-man campaign. In fact I started it years ago when .NET obfuscation first appeared. I don't like any of the .NET obfuscation technologies. I don't think obfuscation is worth bothering with, and it makes the developer's life just a little bit harder. So don't do it.  &lt;p&gt;Think about it...  &lt;p&gt;1. Obfuscation is not encryption. That's really important.  &lt;p&gt;2. People being able to see your code is not a bad thing most of the time.  &lt;p&gt;3. If you have a case where it's really necessary to hide your code then, by definition, obfuscation isn't good enough. You need to encrypt that really sensitive piece of code, perhaps using something like Microsoft's &lt;a href="http://www.microsoft.com/slps/default.aspx"&gt;SLPS&lt;/a&gt;.&amp;nbsp; Even then, only encrypt the sensitive stuff, not the whole app.  &lt;p&gt;4. .NET didn't change anything. Native code is not encrypted either. If someone can benefit from reverse-engineering your code, they are just as likely to do that to a native-code app as for a .NET app.  &lt;p&gt;5. Obfuscation might deter the very casual observer, but how many casual observers fire up ildasm or Reflector? Honestly? And how much harm do you think casual observers will do to your business?  &lt;p&gt;6. The ability to run ildasm and Reflector over my code is very useful to me, and makes me more productive.  &lt;p&gt;7. Obfuscation might give your company a feeling of protection that it really doesn't offer.  &lt;p&gt;8. No matter what the obfuscation-tool vendors do, the debug process is always slightly more complicated for an obfuscated app. If there was some value in obfuscating, this might be ok. But there just isn't.&lt;/p&gt;&lt;img src="http://martinparry.com/cs/aggbug.aspx?PostID=1313" width="1" height="1"&gt;</content><author><name>martin</name><uri>http://martinparry.com/cs/members/martin.aspx</uri></author></entry><entry><title>Why I Don't Use Windows Forms DataBinding</title><link rel="alternate" type="text/html" href="http://martinparry.com/cs/blogs/mparry_software/archive/2008/06/13/1312.aspx" /><id>http://martinparry.com/cs/blogs/mparry_software/archive/2008/06/13/1312.aspx</id><published>2008-06-13T12:25:20Z</published><updated>2008-06-13T12:25:20Z</updated><content type="html">&lt;p&gt;I have two reasons to eschew Windows Forms databinding. Complexity and Performance. As is usually the case, these two are related. You see, Microsoft designed databinding to accommodate a wide variety of controls, and an equally wide variety of datastructures. Because they couldn't predict exactly what we'd build, they designed a very flexible framework. But flexible often means complex, and slow, and in my opinion both are true here.  &lt;p&gt;Controls and datastructures that are built into the .NET Framework typically "just work" when you bind them to each other. At least, that's been my experience. I think the same is true when you use controls that are supplied by any competent vendor. But if you try to create your own controls and datastructures and bind them together using Windows Forms databinding, you might find things get rather difficult.  &lt;p&gt;As I've said before, &lt;a href="http://martinparry.com/cs/blogs/mparry_software/archive/2008/05/15/1308.aspx"&gt;don't use a tool if you don't understand what it does&lt;/a&gt;, and to fully understand Windows Forms databinding takes quite a bit of work.  &lt;p&gt;Let's say you build a form and bind that to some complex datastructure of your own. First you have to understand databinding well enough to make it work as expected. Remember, you'll create the associations between controls on your form and data items in your datastructure, but the exact moment that values get copied backwards and forwards is not under your control. That single fact makes your code hard to maintain, in my opinion. Anyone trying to modify your form or your datastructure needs to fully understand databinding in order to know that it will continue to work as expected. And if at some point the binding isn't working as expected, someone will have to fully understand databinding in order to figure out where it's going wrong. Before you know it, everyone in the team has to understand databinding.  &lt;p&gt;What's wrong with that? Well, surely to goodness the whole point of abstracting relationships between controls and data is to simplify. If everyone has to go and learn a somewhat complicated body of code in order to maintain your app, that simplification goal has gone awry.  &lt;p&gt;Remember, Microsoft built databinding because they didn't know what types of controls, and what types of datastructure, we were going to create. To bind our controls to their data, or their controls to our data, we can use databinding. When we own the controls and the datastructures, we just don't need a flexible binding framework that can bind anything-to-anything. We can actually write obvious code that works intuitively to copy values from A to B. That might mean more lines of source code in our app, but it's a lot fewer lines of code being executed at runtime, and it's a lot more straightforward to maintain.  &lt;p&gt;Ok, that's the complexity issue dealt with. I just want to say a little about performance. I accept that for most desktop apps Windows Forms databinding performs perfectly adequately. I happen to work on an app that's unusual in that, at times, it needs to update a lot of data on the screen very rapidly. I mean, much quicker than a human being can actually absorb. But we can't predict which value the user will want to look at, and when they look at it, it's got to be a very recent value. I mean, certainly no more than 100ms stale. If you know how Windows Forms databinding works, you'll know it doesn't lend itself to updating a lot of data that rapidly. This isn't a criticism of databinding, but it's worth knowing. I guess it wasn't designed to do this.  &lt;p&gt;Because databinding towards the control is triggered from a property change in the underlying datastructure, any such change has to happen on the UI thread. You know you can't modify controls from some background thread. But when you're getting a lot of updates, you really need to minimize the work being done on your UI thread. I mean, it should really just be painting the screen and nothing else. I don't want to be managing my datastructure on the UI thread, rebuilding indexes and so forth. I want that to happen on another thread, then my UI thread can simply ask 10 times per second "what value should I draw here?". . And I certainly don't want to be creating objects to describe the property that just changed, simply to communicate that change to my control in a totally extensible and flexible way. I know what my datatypes are and I don't want to see source code that passes around property names as strings. That stuff just gives me the colliwobbles.  &lt;p&gt;So there are two reasons why I'd rather not use Windows Forms databinding in my current project. The performance reason probably doesn't matter for most apps, and perhaps not for certain parts of my own app. The complexity reason on the other hand, well, that's the big one.&lt;/p&gt;&lt;img src="http://martinparry.com/cs/aggbug.aspx?PostID=1312" width="1" height="1"&gt;</content><author><name>martin</name><uri>http://martinparry.com/cs/members/martin.aspx</uri></author></entry><entry><title>Simplicity in Software</title><link rel="alternate" type="text/html" href="http://martinparry.com/cs/blogs/mparry_software/archive/2008/06/13/1311.aspx" /><id>http://martinparry.com/cs/blogs/mparry_software/archive/2008/06/13/1311.aspx</id><published>2008-06-13T12:21:20Z</published><updated>2008-06-13T12:21:20Z</updated><content type="html">&lt;p&gt;I think most of us developers would agree that keeping our software as simple as possible is a noble aim. I guess there are some developers who like to make things unnecessarily complex, but I for one hope not to spend too much of my life maintaining their code. I'm sure that no reader of my blog would fall into that category. No, we're talking about "other people" now.  &lt;p&gt;Anyway, simplicity. What does that actually mean? I can think of a few definitions; I'm sure there are others...  &lt;p&gt;1. Fewest possible lines in your source code.  &lt;p&gt;I'm sure we've all seen those pathological examples where a whole lot of meaning is crammed into a few characters. Normally these examples are in C although I've seen good ones in Ruby and Perl too.&amp;nbsp; So clearly simplest != fewest characters.  &lt;p&gt;No, these things are clearly not "simple" in any practical sense. But, to some extent at least, trying to minimize lines of source code is a good idea. If you can make things clearer by removing code, do so. If removing code makes things less clear, don't do it.  &lt;p&gt;2. Smallest amount of code overall.  &lt;p&gt;I'm not talking about highly-optimized code necessarily. You could write few lines of source code yourself, but behind those few lines could be millions of lines of library or API code. People maintaining your code are probably affected by the complexity of code that yours calls, so it might be a good idea to give some thought to the particular calls you make and just how complex those implementations are. Of course, that has other benefits too.  &lt;p&gt;3. Simplest logic.  &lt;p&gt;Trying not to have too many nested levels of if/else with complicated, inter-related condition clauses. That's probably a good idea.  &lt;p&gt;4. Most "obvious" code.  &lt;p&gt;Is it better to have more lines of code that clearly copies values from A to B, or is it better to use some data-binding API that allows you to set up relationships between A and B, without knowing exactly when the values get copied? Me, I prefer to be in control and I'd rather suffer a few more lines of code if their meaning is explicit. Actually, Windows Forms data-binding is currently out-of-favour with me. I'll write about why in a separate post I think.  &lt;p&gt;All my comments above assume that creating "simple" code is your top priority. In some cases other priorities come first and that's quite natural. Performance, security, or customisability could all lead to more complex code for example. But the goal of creating complex code for its own sake comes nowhere in the top-100 priorities of a software developer. If it's not already clear in your team, why not ask the person in charge to prioritize the various aspects that your system could exhibit...  &lt;p&gt;1. Performance&lt;br&gt;2. Correctness&lt;br&gt;3. Maintainability&lt;br&gt;4. Security&lt;br&gt;5. Scalability&lt;br&gt;6. etc. etc.  &lt;p&gt;...and assuming that Maintainability appears in their list, drill into that a bit further.&amp;nbsp; Do they want the code to be "simple"?&amp;nbsp; What do they mean by "simple"?&lt;/p&gt;&lt;img src="http://martinparry.com/cs/aggbug.aspx?PostID=1311" width="1" height="1"&gt;</content><author><name>martin</name><uri>http://martinparry.com/cs/members/martin.aspx</uri></author></entry><entry><title>Rant about &amp;quot;Quiet Carriages&amp;quot;</title><link rel="alternate" type="text/html" href="http://martinparry.com/cs/blogs/mparry_software/archive/2008/05/28/1310.aspx" /><id>http://martinparry.com/cs/blogs/mparry_software/archive/2008/05/28/1310.aspx</id><published>2008-05-28T12:38:00Z</published><updated>2008-05-28T12:38:00Z</updated><content type="html">&lt;P&gt;Moving away from my normal topic of software development, I just wanted to vent some annoyance about "Quiet Carriages".&amp;nbsp; On the rail service I use, the operator designates 2 of the 8 carriages in the train as "quiet".&amp;nbsp; They request that you don't use mobile phones or personal audio equipment in those carriages.&lt;/P&gt;
&lt;P&gt;Now, here's a non-exhaustive list of the things that other people can do to annoy you while on public transport, in no particular order...&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Hum or whistle a tune&lt;/LI&gt;
&lt;LI&gt;Sniff loudly and incessantly&lt;/LI&gt;
&lt;LI&gt;Clear the throat loudly and incessantly&lt;/LI&gt;
&lt;LI&gt;Laugh out loud for no apparent reason&lt;/LI&gt;
&lt;LI&gt;Rustle their newspaper&lt;/LI&gt;
&lt;LI&gt;Get up and walk around for no apparent reason&lt;/LI&gt;
&lt;LI&gt;Converse&amp;nbsp;on a mobile phone&lt;/LI&gt;
&lt;LI&gt;Converse with fellow passengers&lt;/LI&gt;
&lt;LI&gt;Make lots of beeps from their laptop computer&lt;/LI&gt;
&lt;LI&gt;Type loudly on their laptop computer&lt;/LI&gt;
&lt;LI&gt;Eat smelly food&lt;/LI&gt;
&lt;LI&gt;Suffer from unpleasant body-odour&lt;/LI&gt;
&lt;LI&gt;Sit next to you and take up too much room&lt;/LI&gt;
&lt;LI&gt;Listen to music through earphones that emit that "tickety-tick" noise&lt;/LI&gt;
&lt;LI&gt;Spread their things all over your table&lt;/LI&gt;
&lt;LI&gt;Tap hands or feet in time with some unheard music&lt;/LI&gt;
&lt;LI&gt;etc. etc.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;I've certainly experienced all of these things on British trains, and it didn't take me long to produce that list.&lt;/P&gt;
&lt;P&gt;Why then would a train operator pick on just two of those &lt;EM&gt;potentially anti-social&lt;/EM&gt; activities and forbid them in 25% of every train?&amp;nbsp; I say &lt;EM&gt;potentially&lt;/EM&gt; because I've certainly seen people use mobile phones responsibly - in silent mode, keeping their voice down, keeping calls short - and I've sat next to people using personal audio equipment that emitted no external noise detectable to me.&lt;/P&gt;
&lt;P&gt;I've also seen a respectable-looking man run the length of a carriage to berate some unfortunate whose mobile phone rang &lt;EM&gt;in a quiet carriage&lt;/EM&gt;.&amp;nbsp; The poor guy didn't even answer his phone, he was just unlucky enough for it to ring, and he silenced it as quickly as he could.&amp;nbsp; The elder vigilante wore a maniacal expression as he leapt into action and exclaimed loudly "this is supposed to be a &lt;EM&gt;quiet&lt;/EM&gt; carriage".&amp;nbsp; Now, whose action was the more distracting for his fellow passengers?&amp;nbsp; In case you're wondering, the phone user wasn't me, but it might have been.&lt;/P&gt;
&lt;P&gt;I use these trains during peak times, and frankly you're lucky to get a seat at all.&amp;nbsp; For the train operator to suggest you have a choice of sitting in a quiet carriage or not is ridiculous.&amp;nbsp; They just make no sense to me at all.&amp;nbsp; I suppose most people of ticket-buying age can remember a time before mobiles, and before the walkman, so maybe this is an attempt to outlaw the new-fangled tools of distraction.&amp;nbsp; I think when our children are grown up the quiet carriage will be a thing of the past, remembered as a quaint curiosity like when all cars had to be preceded by a man waving a red flag.&lt;/P&gt;
&lt;P&gt;A lot of people either want or need to work while on a train, but surely most of those people work in open-plan offices?&amp;nbsp; I can't believe a train carriage is a more distracting environment than your average office.&amp;nbsp; Perhaps I'm lucky in that I'm able to switch-off from my environment, and so other people's phone calls don't distract me at all.&amp;nbsp; Even if they did I'd have to accept that my distraction was at least as much my fault as theirs.&lt;/P&gt;
&lt;P&gt;In the end, it's a sad commentary on our society that a train operator has to publish rules of politeness.&amp;nbsp; I would be happier though if the rules were about courtesy and respectfulness in general rather than singling-out specific devices, and if we're instructing people on courtesy we should give equal effort to encouraging tolerance.&amp;nbsp; It's a two-way street.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://martinparry.com/cs/aggbug.aspx?PostID=1310" width="1" height="1"&gt;</content><author><name>martin</name><uri>http://martinparry.com/cs/members/martin.aspx</uri></author></entry></feed>