| Ian Cooper 的个人资料Staccato Signals日志列表 | 帮助 |
|
1月31日 Windows Vista SwagThe Microsoft boys and girls are giving away some decent swag, enough in fact to make those swagmiesters at the NextGen User group Richard and Dave cry.
Hop on over to the UK Vista launch page and click on the prize draw button.
I want the trip to Tokyo, so I would be grateful if no one else in the world applied for the gaming prize draw please. I know that cuts you out of one of the prizes but go the Ultimate offer of the cruise to New York and trip to Vegas instead or the Transformers premiere. You would be doing me and the wife a big favour. Thanks world. Vista and Office Launch catch upI have fallen behind on this one. So now might be a good time to catch up.
I attended the Office and Vista launch on 19-20 January at Microsoft's office in Reading. The first day was a classic passive learning approach. It was Office track for me as opposed to Vista. I have never been a huge Office developers but Office 2007 is shifting towards a business intelligence platform as well as productivity applications and looks to provide a significant set of services to build on, particularly around Sharepoint Server 2007 and Excel Services. While I was working for Misys on Eagleye we had to come up with something very similar to the Business Data Catalog so that we could integrate at client sites. There are some very powerful features being released there.
The second day was a chance for folks to try out Office and .NET 3.0 development. MS UK set up over 90 PCs in the refectory for folks to play with and a couple of exercises to try. I went along as a helper on the 2nd day. It was a lot of fun. Hopefully we can do a lot more hands on events in the future.
You can still download the exercises and see videos of the day here
Straight afterwards the Office and Vista launch tour came to my company Beazley on the Monday. It was great to see the guys and confirmed my opinion that the grok talk approach, 10 min overview of topics, are a great format for events. We will be doing more at the London .NET User Group including for our own Vista and Office launch event on 22 February. 1月29日 log4net, ADONetAppender, TransactionScope, Distributed transaction completedIt seems that if you have an log4net ADONetAppender configured and you try and log within the scope of a distributed transaction, the ADONetAppender is included in the transaction, and remembers it because the ADONetAppender caches the connection. This means that the next attempt to log after the transaction completes will fail because the transaction the connection refers to has already completed.
The result usually looks like this:
System.Data.SqlClient.SqlException: Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.
On your connection string within your ADONetAppender config section set "Enlist=false". You do not want to participate in a DTS transaction (after all if it fails you probably still want to log that failure).
1月21日 Vista, MSI installs and error 2869You may find, as I have, that some MSI files do not seem to run under Vista giving a cryptic 2869 error in a dialog box when you try. You can solve this problem by running the MSI as an admin, but the usual Run As Administrator is not available when you right-click on the MSI file. The solution is to launch a command window as an administrator, so as to elevate your priviledges, and then use msiexec /i [program].msi to run the install. Of course you can set up a batch file to do this if you will need to do it repeatedly. You seem to need to use the full path of the msi file as the argument to msiexec to get this to work otherwise msiexec tells you that it cannot find the file. 1月17日 Try..Catch, Warning Level 4, and Warnings as ErrorsLance worries about people declaring a variable in their catch statement when it is not used in the catch block.
There is already a solution to this: compile as warning level 4, and treat warnings as errors. That will pick up this error for you.
I would recommend always building at level 4 and treating warnings as errors. This will let you lean on the compiler to help you create clean code.
In addition beware the other two evils of exception handling: using throw ex; instead of throw; which means the call stack will now be from this throw point, not the point the exception was raised, and swallowing exceptions (in other words catching something you do not know how to resolve). Always prefer fail-fast to catching an exception. You want to know about your errors, not hide them. Only software that needs to remain up in the presence of errors should have a swallowing exception block and even then you need to at least log that the exception happened and understand the exception guarantees enough to be sure of how to proceed.
1月11日 London .NET user groupThe email forwarding for dnug.org.uk is working once again, so you can sign up via the site if you want to. Those of you who have already tried to sign up via the site, could you please re-try? Sorry for the hassle. Hopefully that is the last of the suprises on this one. London .NET user group 25th January - sign up issuesIt looks like I have lost mail forwarding in the troubles of the last few days, so while I sort that out you MUST use the mailing list to sign up.
1月10日 Vista and Office Launch Geek DinnerZi Makki is organizing a geek dinner at the Vista and Office Launch for those of you staying overnight. I'll be there, and if you fancy a pizza and a chat come along. I'll be going. London .NET User Group website back upHi guys, The site is back up and you can sign up for Oliver and Chris's presentations now. The Apple IPhone. Who cares?So Apple have finally gone and released their iPhone. And the hype seems to be everything Apple could have dreamed off. While the phone looks sexy and the spirit of the Newton seems to live on I can't help but feel there is nothing here that we have not had for a while. I already have a phone that accesses the internet, plays music, has office apps on it, runs games, has a 2MB pixel camera. But mine has a better battery life, built in keyboard (which Apple must realize is an advantage because they plan to ship an external keyboard accessory), ActiveSnyc to my PC, 3G internet access, etc. I cannot help but feel that Apple is playing catch up here, for fear that the phone companies may otherwise erode market share for the iPod. I'm underwhelmed. 1月9日 London .NET user group next meeting and WebDD registrationLondon .NET user Group 25 January Validity checking? Business Rules? - Oliver Sturm Not all data is equal, as everybody will tell you who's been developing business applications. There are rules for the validity of information, and these have to be checked and the end user must be provided with helpful information through the UI. But exactly when do you do this? And how? And what about the next customer who wants everything to work just a little bit differently? This presentation introduces a framework for validity checking and answers all these questions. What can WS-Security do that IPSec or SSL can't? - Chris Seary Why use it at all? Chris will give a high level view of when, how and why it should be used, and what advantages it can offer. He will then dive into code samples demonstrating message level security using both WSE and WCF. There'll be lots of boiler plate code made available that you can add to your projects. WebDD February 3rd Registration is now open and I would sign up now. "Standards. Design. Future. Three topics that are on everyone's wish list, but that often get left by the wayside as time rolls by. If you're interested in all three, then WebDD is for you. WebDD is a new conference covering both design and development, with a focus on design standards, best practices, and emerging and future technologies. There will be a variety of talks covering topics such as Accessibility, CSS, Standards, ASP.NET, and Ruby, with the aim of bringing developers and designers together to share ideas." 1月8日 Microsoft giving Vista and Office away to UK developersI blogged a while ago about the UK Office and Vista launch. While that is now sold out (I'm really looking forward to it, particularly the hands on second day) the on-line event is still open. I just checked Daniel's blog and there is a reminder that as a sweetener MS are going to give away a 1000 copies of Vista and Office as part of the event. Check out Ian Moulster's blog for more. Seems to me that this is a pretty big message from MS UK that they are committed to getting UK developers up to speed on the new platform. Kudos to MS for putting their money where their mouth is. 1月7日 One of those days...What did we do before Google. Having upgraded to Vista a while back (hey, I like shiny new things) I decided to get my VS 2005 up to date on the box so that I could do some development. For any of you thinking of pushing down this route there are two key steps: 1) Install Visual Studio 2005 SP1 2) Install Visual Studio 2005 SP1 Update for for Windows Vista If you do not want to have to be reminded to run VS 2005 as an administrator every time, you can check the box to avoid being reminded ever again. In that case right-click the shortcut you use to launch VS 2005, select properties, and on the compatibility tab select the option to run as administrator. If you are doing web development you probably want to read Mike Volodarksy's articles on debugging on Vista and working with IIS7 For some reason CodeRush gave me grief as well today. It just stopped appearing on the add-in list on Vista. Fortunately Rick Strahl's fix seemed to correct that problem for me. Good job, I feel hamstrung without CodeRush nowadays. WebDDPhil Winstanley, one of the DDD committee, is organizing a cousin in WebDD. Registration is still not open yet, but Phil has opened up the WebDD back network so that you can grab all the blogshpere traffic from one place. 1月5日 Watch your code coverageBil Simser posts about his team's mottos which he hopes will keep them on track writing tests. I agree with Bil that the only way you can refactor with confidence is if your team has confidence in its tests. But, even doing TDD I have bee on teams where we had tests but not really enough tests to be confidant that everything that could break was tested. As a result we never had the confidence in refactoring that we should have had. I have found three things important in keeping your tests up to scratch: 1: Follow the deliver frequently mantra and write small tests that take you estimate to be no more than 10-15 minutes to get finished and potentially even shorter. This seems to make sure that you test at the right level of granularity and get enough tests, because you have to break the problem up in digestable chunks. 2: You should keep a test list either scratched on paper, or on notepad it does not matter, but have a place to record tests that occur to you while you are writing your current test. This helps you focus on the now, but it also helps reduce the amount of speculative code you write, because you know that you have a test coming up that will push the need for that code later, so if you do not need it now you will not feel compelled to write it in case you forget. The trouble with the latter is it easy to forget the associated test. There is nothing new here. Kent Beck covered all of these in Test Driven Development By Example 3: Use an integrated code coverage tool (VS 2005 and Test Driven.NET have these) so that you know whether there are parts of your code that are not tested. Aim for 100% code coverage. You will not hit it, some things are hard to get under test, but if you aim for a lower figure you are stating that you only want that percentage of confidence in your code. Where you have code that is hard to get under test I would recommend abstracting that dependency out into its own assembly and replacing it with a mock that you can test. That isolates the 'hard to test' code from the testable code. Usually it gives you a better architecture because things that are hard to test are often things we should not depend on. Get in the habit of having one code fixture per class under test, so that you can run just that fixture and see if you have 100% code coverage for it. If not figure out why (sometimes the code coverage tool may give anomolous results - record this in the file). If you have code that you think you do not need to test ask yourself why it is there. If it does something it can break, if it does nothing why keep it. We published our guidelines here. |
|
|