AboutSQL Server, Analytics, .Net, Machine Learning, R, Python Archives
About Me
Mitch Wheat has been working as a professional programmer since 1984, graduating with a honours degree in Mathematics from Warwick University, UK in 1986. He moved to Perth in 1995, having worked in software houses in London and Rotterdam. He has worked in the areas of mining, electronics, research, defence, financial, GIS, telecommunications, engineering, and information management. Mitch has worked mainly with Microsoft technologies (since Windows version 3.0) but has also used UNIX. He holds the following Microsoft certifications: MCPD (Web and Windows) using C# and SQL Server MCITP (Admin and Developer). His preferred development environment is C#, .Net Framework and SQL Server. Mitch has worked as an independent consultant for the last 10 years, and is currently involved with helping teams improve their Software Development Life Cycle. His areas of special interest lie in performance tuning |
Thursday, August 31, 2006They Came, They Saw, They Installed...
The army of Scott Hanselman clones (!) have been very busy installing and evaluating just about every developer and power user tool available here on planet earth: Scott Hanselman's 2006 Ultimate Developer and Power Users Tool List for Windows (I suspect they may be busy on other worlds as well...)
I already use a fair few of these, but I've just noticed a couple I will be definitely checking out. Now, if only I was clever enough to know the Latin for this post's title... TechEd Webcast "Lessons Learned Shipping TFS"
I just finished listening to a TechEd Webcast "Lessons Learned Shipping TFS" by Jeff Beehler based on content recorded during Jeff Beehler's trip to Australia earlier this year and produced by Charles Sterling. The audio quality in the copy I downloaded was poor in places, but if you are currently in the process of designing new software there are several lessons learned on how you can go about improving the end application.
Jeff discusses development processes in the SDLC such as continuous integration and ‘dogfooding’ (and how it enabled them to realise they had made mistakes and fix them before they became show-stoppers). He also makes an important point about making shipping and deployment part of the build-cycle so that it’s not the first time you do it on release day! (I know there are plenty of people out there nodding to that one...) Wednesday, August 30, 2006LINQ, BLINQ and DLINQ: A New VB?
Or are we just in danger of running out of acronyms!?!
I just re-read this short article “Software Is Too Darn Hard” by Rockford Lhotka, which talks about software from the users perspective and how most changes in languages over the last 10 - 15 years have had very little impact on improved experience for end users. (Don’t be put off reading it by the comment about a ‘rant’ at the start…) “Expressing business requirements in software would be more efficiently The reason VB was so successful was that it enabled the people who work in the business, who understand the business, its language and culture, to cheaply and rapidly build software that actually meets the business needs. Problems are encountered in areas where the language no longer enables non-programmers to accomplish their goals, or does so in a way that is prone to misunderstanding and mistakes. This also applies to programmers and was borne out by framework usability studies done by the designers of the .Net framework (as described in the Framework Design Guidelines by Brad Abrams and Krzysztof Cwalina). That’s why I believe there is a real need for a ‘new’ VB, and that the LINQ ‘flavours’ are huge steps in this direction. Why should a domain expert have to be versed in the subtleties of writing an N-tier application, consisting of lengthy boilerplate code, when the tools should perform this task and generate it for them? If tools did what they were supposed to do (model the business needs, make us more productive by reducing the amount of code we have to write, and therefore create software faster) domain experts would be in a better position to create solid, useful software, and in the process bring the software closer to the users’ needs and expectations. In other words, helping to put the user back into software. Wednesday, August 23, 2006Zen and the Art of Code Design and Maintenance
Design Principles:
#1: Whenever you design anything, always do so from the user’s (consumer’s) viewpoint. If you are designing a framework, write examples of its intended usage; this will highlight any deficiencies. #2: Encapsulate what varies. It should be possible to alter or extend the parts that vary without affecting everything else #3: Program to an interface, rather than an implementation (i.e. exploit polymorphism). Use a factory. #4: Favor composition over inheritance. Do not overuse inheritance; a blend of the two often works best. #5: Don’t Repeat Yourself (DRY principle). Every fact must have a single, unambiguous, authoritative representation within a system. #6: Aim for loosely-coupled designs between objects that interact. Low coupling and high cohesion lead to designs that are more resiliant to change. #7: Classes should be open for extension, but closed to modification. Able to extend existing functionality without breaking existing code. #8: Depend on abstractions, rather than concrete classes. Use a factory. #9: Principle of least knowledge: talk only to your immediate friends. How? Only call methods on:
#10: Low level components should never call into a high-level component directly. #11: A class should have only a single reason to change (high cohesion)#12: Raise Exceptions only in exceptional circumstances. Do not use exceptions for normal program flow. (these are largely due to the excellent book ‘Head First Design Patterns’ by Freeman & Freeman, O’Reilly) Tuesday, August 22, 2006ASP.NET Video Tutorials: Another Free Resource
Came across this collection of ASP.NET videos ranging from beginner to stuff that's 'coming soon':
Updated: might be more useful if I actually posted the link! On this page you will find dozens of videos designed for all ASP.NET
Friday, August 18, 2006ASP.NET 2.0 Tips, Tricks, Recipes and Gotchas
Scott Guthrie has posted a really useful collection of links to his ASP.NET 2.0 articles: ASP.NET 2.0 Tips, Tricks, Recipes and Gotchas. Scott is a General Manager within the Microsoft Developer Division, so to say he knows his stuff is a bit of an under statement!
Greg Linwood visiting Perth - Sept 6th and 7th
September is shaping up to be a great month for the Perth developer community. Greg Linwood will be presenting two different sessions on SQL Server indexing on the 6th and 7th Sept.
The two sessions will be "Designing Indexes for Developers" (6th Sept) and "Managing Indexes for Database Administrators" (7th Sept). Although each session has a slightly different target audience, both have a common theme and will contain material that will be of interest to anyone who deals with SQL Server on a day-to-day basis. (I'll definitely be attending both) Both sessions will be held in the Colonial Ballroom - Melbourne Hotel, 942 Hay St (cnr Milligan St), starting at 5:30pm. Another 2 events not to miss! Wednesday, August 16, 2006Microsoft Visual Studio 2003 Service Pack 1 Released
You can download the english version here (approx. 156MB).
Tuesday, August 15, 2006Ron Jacobs visiting Perth - Sept 1st
If you're a developer in Perth, Australia then come along to hear Ron Jacobs talk about "Patterns and Anti-Patterns for Service Orientated Architecture (SOA)" at the Perth .NET user group meeting:
When: 12:00 PM, Friday, 1st September 2006 Where: QV1, level 2 Theatrette, 250 St. Georges Terrace, Perth Cost: FREE! Sunday, August 13, 2006A Few Tips on Becoming a Better ProgrammerAre you setting out on your programming career? Do you want to be a better programmer? Here is a very short, set of guidelines (there’s nothing really new here, and it is not comprehensive, but if you are already following the majority of these then you are on the right track):
Early last year (2005), I wrote a Powerpoint presentation that discusses steps you can take towards becoming a better programmer. I’ve delivered it at 2 companies, and it was well received. If anyone is interested, let me know and I’ll post it here. Thursday, August 10, 2006MSDN Online Magazine: Another Great Free Resource
I’ve been a subscriber to the printed version of MSDN magazine for a number of years, and lately I’ve been wondering if I should continue, as most (if not all) of the content is available online here at msdnmag. The printed version usually arrives sooner, but by the time I get to it in my reading pile, the online version is already out! Maybe they should give it away to MCSD’s!
September’s issue has a wide range of articles including guidance for building smart clients, enterprise library custom application blocks and integrating Virtual Earth into your applications. There are also links to past issue articles such as preventing SQL injection attacks, crucial security tips for developers and a selection of performance related information. Wednesday, August 09, 2006Architecting Modern Desktop Apps in .NET
MSDN and Microsoft.com are full of great learning resources, but it's not always obvious what's available. Here's a great series of webcasts Architecting Modern Desktop Apps in .NET by Dr. Joe Hummel (recorded third quarter 2005), describing the design and development of smart client applications.
There is also a series on Modern Software Development Using C#: Develop in .NET (with a equivalent series for VB.NET) at the same URL. You will need to sign in to MS Passport to download these webcasts (and the 2005 offline player) and go through what seems like a ridulous number of clicks to download a single webcast (Microsoft: when are you going to make this processs easier, say download a complete series???). Who said the road to continuous improvement was supposed to be easy! Always Use SCOPE_IDENTITY() in Stored ProceduresNow I’m sure most developers and DBAs are aware of this, but I mention it because it crops up every once in a while in production code. There are 3 ways to retrieve the last generated identity value for table: @@IDENTITY, IDENT_CURRENT(‘tablename’) and SCOPE_IDENTITY().
Tuesday, August 08, 2006ASP.NET 2.0 Internet Security Reference Implementation
Over on gotdotnet there's an article ASP.NET 2.0 Internet Security Reference Implementation detailing an internet facing ASP.NET 2.0 web site complete with code and guidance. If you're about to develop an internet facing site then this is a good starting point to see security best practices in a full blown sample application.
Power Toys for Visual Studio
I came across the Power Toys for Visual Studio site at Rob Caron's blog
Power Toys for Visual Studio are small tools that provide aid to developer It contains information about the various power toys under development, such as the Best Practice Analyzer for ASP.NET and the MSBuild Extras - Toolkit for .NET 1.1 "MSBee" and developer tools such as IronPython. There's an Announcements RSS feed you can subscribe to here to keep up date on what's new. Monday, August 07, 2006Debugging XSLT with Visual Studio 2005
I probably missed the fact that this new feature existed in Visual Studio 2005 due to not doing much XSLT lately. I was re-reading an article by Nick Weinholt which made reference to this feature. Several third party tools have had this ability since VS2003, so it is a welcome addition to Visual Studio 2005’s feature set.
If you are learning XSLT, then this can be a valuable tool for stepping through transforms and getting a feel for how they work. To show just how old this information is I’m linking to a MSDN article An Introduction to the XML Tools in Visual Studio 2005 from July 2004! Simply open the XSLT file with VS2005, set a breakpoint(s) as you would with .NET code, go to XML->Debug XSLT and you will prompted for a XML input file. Browse to your XML document to be transformed and away you go. MapReduce
I’ve been familiar with the concept of MapReduce for some time (a less generic form of MapReduce formed the basis of a paper I wrote circa 1988, ‘Sorting with near-linear speedup on tightly-coupled multi-processors”), although I’ve never used a functional programming language in anger. I’ve just finished reading an excellent research paper by Jeffrey Dean and Sanjay Ghemawat (both at Google) titled “Simplified Data Processing on Large Clusters”. MapReduce is a programming paradigm and an associated implementation for processing large datasets. The key point being that “Programs written in this functional style are automatically parallelized and executed on a large cluster of commodity machines.”
This is a very accessible paper regardless of your computing background. Well worth reading, if only to get a glimpse of how the Google distributed indexing engine performs its work. Why do you Blog?
A few of my colleagues, have asked me if anyone reads my blog and why do I bother.
I have to admit it’s mostly for selfish reasons! It’s a great way of keeping track of topics that interest me or subjects I’ve researched, in a single location, and in the process perhaps help someone else. If you find something useful here please feel free to leave a comment or email me. I’ve recently signed up to Technorati and FeedBurner to try to track usage (if you had previously used my direct blogger feed in your aggregator, please swap over to feedburner). Wise Words
Since I’m on the subject of great quotes, I came across this one some time ago. I think it contains advice that we should all take to heart:
Any society that would give up a little liberty to gain a little security willHave a guess who said this? I bet you're thinking it was some modern radical? It was non-other than that great and diverse American, Benjamin Franklin (1706 – 1790). Maybe we should display this on gigantic bill boards instead of promoting the ‘war’ on ‘terror’. He also said: If you would not be forgotten, as soon as you are dead and rotten, Sunday, August 06, 2006Erasmus
Certain quotes seem to resonate in the mind. One of my favorite is from a man who was born in the 15th century, but whom I feel would not be too out of place in the world as we know it today:
In the land of the blind, the one-eyed man is king.Desiderius Erasmus was a spiritual man, but loathed the corruption inherent in the organised religion of the time. Erasmus stands as the supreme type of cultivated common sense applied to human affairs. He is the author of a surprising number of well known quotes that have endured through 500 years of history: Prevention is better than cure.And rather surprisingly!:
Some Guidelines for Productive Teams when Dealing with Differential Pay Systems
(Taken from ‘Team Compensation’ by Mary Poppendieck, Aug 2004, reprinted in ‘The Best Software Writing I’, selected and introduced by Joel Spolsky) Saturday, August 05, 2006String Formatting in C#
Noticed this String Formatting in c# compendium via Mitch Denny's blog. A nice reference to bookmark. Most of this information can be found in MSDN, it's just that I have trouble finding it every time!
New FeedBurner Feed...
If you have already subscribed to this feed in an aggregator, could you redirect it to the new feedburner feed at the link on the left hand side. Thanks!
Another Squid Themed Friday Blog Post from Bruce Schneier
...So I'm having this nightmare about a marauding robotic giant Squid controlled over the internet by masterminds unknown...Bruce Schneier continues his squid themed Friday blog posts!
Friday, August 04, 2006Performance Console
Microsoft have recently released Performance Console (PerfConsole) 1.0 a tool that can be used to simplify and analyse Visual Studio profiler output:
“PerfConsole is a simple performance investigation tool which tries to adopt a Why Performance Measurement for Knowledge Workers is Always CounterproductiveThis is for those managers who believe they can promote team work by giving raises to just a few members of a team! If you are a manager that has recently experienced high staff turnover, I suggest you read this carefully:
(Taken from ‘Team Compensation’ by Mary Poppendieck, Aug 2004, reprinted in ‘The Best Software Writing I’, selected and introduced by Joel Spolsky) Guide to Better Presentations
I’ve been hearing a lot of good things about this book Beyond Bullet Points by Cliff Atkinson. I haven’t actually got my hands on a copy yet (one topic sure to get me on a rant, is how it is quicker to get a shipment of books from Amazon in the US to my doorstep, faster and cheaper than going to a technical bookseller in Perth), but I will presently.
I noticed that a recent talk by Brad Wilson on the topic of agile pair programming was written using these techniques, and several other high profile presenters seem to be taking Cliff’s advice on board. Definitely one to add to the reading list. Thursday, August 03, 2006How many books can you read in a lifetime?
Want to hear something really scary? On average, a programmer reads just one technical book a year (Code Complete: Steve McConnell). It got me thinking; let’s be optimistic and say that the average every programmer reads 2 technical books related to their work each year. Now assuming you have a productive working career from the age of 20 to 60. That means you will read just 80 technical books in your entire working life! As a consequence, it means you should be very discerning about which ones you read. You may not have realised it but you just don’t have time to read any poor or out of date technical books!
OK. Now you have decided to only read useful books, how will you pick which ones you should read? Jeff Atwood put up a list of recommended reading for developers, and I’ve previously posted a list of recommended computing books. One that is on Jeff’s list that I really should add to mine is The Pragmatic Programmer: From Journeyman to Master. You could probably read this book together with Code Complete and be well on the road to enlightenment! .NET Framework Deployment Questions
Brad Abrams has posted these useful answers to common .NET Framework deployment questions.
When Profits Crumble…
Microsoft profits fell to a paltry $2.8 billion this quarter, due largely to huge legal expenses.
Microsoft executives have known for some time that sales in the Operating System market will inevitiably fall off and that Microsoft’s period of explosive growth is at an end. Once that happens, if you want to continue to grow then you need to take market share away from others. Which means leveraging your dominant position into other areas, such as business document management, document workflow and CRM, to name a few. Just under 3 years ago, I was working alongside a team producing document management software for fairly large companies. I tried to warn the manager of this team that there was a strong likelihood that Microsoft would be moving into the area of document management and workflow (i.e. in addition to the existing SharePoint software) and that they should draw up a 3 – 5 year business risk/strategy plan in order to decide what could be done to mitigate this risk, and indeed how long a market would exist if Microsoft entered the arena. Instead, he choose to put on the blinkers and completely ignore this advice… Whilst I don’t have a crystal ball, it seemed inevitable that the outcome would be that in 1 – 2 years, Microsoft will have a product (something like ‘WorkPlace 2007’ or OfficeFlow or OfficeAdvance, you get the idea!) that it will compete with existing content management systems like Documentum, DocsOpen, HummingBird or OpenText. EMC, the owners of Documentum, already seem to be moving away from this area. Bruce Schneier's Security Blog
If you haven’t heard or read Bruce Schneier on Security I suggest you head over to his blog. He’s a leading expert on all things security and a voice of reason in a mad world. It makes you wonder to what extent the ‘war on terror’ is simply a replacement for the ‘reds under the bed’ of the cold war.
Tuesday, August 01, 2006Are C# and VB.NET in Danger of Becoming too Complex for the Average Programmer?
I’ve spoken with several experienced developers in recent weeks, discussing whether the .NET framework’s two main languages, C# and VB.NET, are in danger of becoming too complex for the ‘average’ programmer, or indeed for the average programming task (whatever that might be). While you could argue that complexity is necessary to model complex problems and domains, the continuing abstraction of programming languages does not provide much support for this view. A complex, general purpose programming language will rarely be a good substitute for a domain specific language (generalisation versus specialisation).
Maybe I’m just getting old and my shrinking brain can’t handle all this complexity, but deep down I feel that code should read like prose. I do not want to waste valuable time trying to figure out what a chunk of code is trying to do, it should be apparent almost immediately. Is this unrealistic? Possibly, but the driving force behind the evolution of computer languages has always been to simplify and increasingly shield programmers from the low level implementation details so that they can concentrate on solving higher level business problems. I have programmed in C/C++ for over 20 years. When I first encountered VB in 92-93, my first thought was that it was a ‘toy’ language designed for non-programmers to write quick and dirty GUI applications. I could not have been more wrong. I did not have the maturity at that time to realise what it represented and its possibilities. It has had a profound effect on the software industry not only in terms of what could be achieved quickly but it also raising the expectations of what could be achieved quickly! VB’s obvious attraction and strength was that it empowered less experienced programmers to achieve results that were previously only within the reach of ‘guru’ programmers. Of course, you still had to delve into the Win32 API to get at some of the more ‘advanced’ features (exemplified by Dan Appleman’s work in this area ). What made VB so attractive was that it was simpler and much more productive than coding in C/C++. If VB.NET and C# both increase in complexity, is there a reason for having two languages that serve the same purpose? As C# and VB.NET evolve further, will a single generic .NET framework language emerge, or will a ‘new VB’ diverge from C#? In this terse example on anonymous delegates from Developing for Developers “…, here's two lines of code that produce a list of all files larger than a given size in a given directory”, it is not immediately obvious what is being performed inside the method even with the previous description (BTW that post at Developing for Developers provides a good introduction to anonymous delegates): static List<string> GetBigFiles(string directory, int bigLength) { List<string> filePaths = new List<string>(Directory.GetFiles(directory)); return filePaths.ConvertAll<FileStream>(File.OpenRead) .FindAll( delegate(FileStream f){ return f.Length >= bigLength; } ) .ConvertAll<string>( delegate(FileStream f){ return f.Name; } ); } OK, this is a hand-picked, contrived example and not even the most efficient way to accomplish this. You could break this down into separate lines, but the point is the language is enabling, perhaps even encouraging us to write hard to understand (and therefore maintain) code. This reminds me a little of ‘dense’ C code! [In fact, this issue has recently been addressed in C# 3.0 using Lambda Expressions…] You could argue that less experienced programmers will simply not use the new, more complex features of the language(s), but experience would suggest otherwise. Please don’t misunderstand me: these powerful language features obviously have their uses. I’m just intrigued about the direction these two languages are taking. With power comes complexity, and with it also the possibility of subtle, hard to understand bugs. Is there a need for a ‘new VB’? Does .NET Rock?
I had to maintain some fairly straight forward pre-.NET C++ code today. It really made me appreciate the .Net Framework! I was experimenting with a few performance ideas and spent an hour researching why it wouldn’t compile (a conflict between STL library and MFC) which could only be fixed by moving an include into “stdafx.h” to precede all others, then another involved solving a linking problem caused by the common runtime library conflicting with the statically linked MFC library, which required an explicit library link order to be defined!
.NET really does rock! |
ContactMSN, Email: mitch døt wheat at gmail.com LinksFavorites
Blogs |