Clean Code or Working Code?

21 בדצמבר 2010

I was working on a legacy project with a friend and I sorely bemoaned the messiness of the code. Later, the friend sent me this link and warmly recommended I keep the balance in life. If you cant be bother to read the article, the short of it is that we developers should have more respect for legacy code that works. I acknowledge the underlying truth presented in the article, but I don’t think it gives the whole picture. Just because you can make catastrophic mistakes while disrespectfully accusing code of being a mess, that...
אין תגובות

Visual Studio 2010 and Eclipse

12 בדצמבר 2010

From time to time I do some work in C++ for Linux using Eclipse. Many developers say that Eclipse is the state of the art IDE for C++ development on Linux. From my experience, I can say that Eclipse simply pales in comparison with Visual Studio 2010 when it comes to an integrated, streamlined development experience out of the box. Rather than compare the pros and cons of both IDEs I would like to share with you a VS 2010 experience that I enjoy that is often taken for granted by Windows developers and should leave Eclipse...
תגובה אחת

MVVM : Injecting INotifyPropertyChanged Into an Existing Class

10 בדצמבר 2010

Download the source code for this post here. Using MVVM in Silverlight and WPF I often encounter the following problem. I have a business class that needs to be exposed through the ViewModel. For this, it needs to implement INotifyPropertyChanged or expose Dependency properties. I take the side of those who prefer to keep WPF dependencies out of the ViewModel, so I usually take the path of writing a proxy that delegates properties to the business object and implementing INotifyPropertyChanged. I am not comfortable with this duplication, and I usually pay a price for it when I refactor the business class, but I...
תגיות: , , , ,
2 תגובות

How to Bind to the Index of a Collection in WPF

17 באפריל 2010

Let's say you have a customer class and you are binding a DataGrid to a collection of customers. You would like the index of the customer in the collection to appear in the first column, like so: One way to do this might be to add an Index property to the Customer class and bind to that. I prefer not to go that way because it would pollute our business layer with presentation layer constraints. Solution Here is a different approach using a MultiBinding. You can download the source...
תגיות: , ,
3 תגובות

Hierarchical Grid with WPF

A TreeView handles hierarchical data well, and a DataGrid handles tabular data. But what about hierarchical tabular data? A simple example of such a source is a System.IO.DirectoryInfo. Each item can have zero or more children of the same type, enumerated by EnumerateDirectories. I would like to have it displayed like this: Solution You can download the source code for this solution here. The inspiration for this solution came from Delay's Blog by David Anson. I think David's idea of measuring the indentation at each level and compensating for it in...
תגיות: , , ,
8 תגובות

Project Packager Add-In for Visual Studio 2010

12 באפריל 2010

This Add-In for Visual Studio 2010 will package up your solution (actually, any folder you choose) into a zip file excluding any files with extensions you specify and any folders whose names you specify.I cant upload msi files to this blog, so in order to install you will need to build the project. I packaged up the Add-In solution using the Add-In itself and uploaded it here. Download the solution, open with Visual Studio 2010 and Build All. Right click the setup project and select Install. ...

John Bryce Lab Zone at Developer Academy 4

22 במרץ 2010

Today, John Bryce hosted a very successful Lab Zone at Developer Academy 4. This year's zone was larger than ever before with 40 computers installed with 11 labs on the latest and greatest Microsoft technologies! Over 1600 people attended the conference, and many of them came to the Lab Zone to get invaluable hands on experience with Windows Azure, SharePoint 2010, Windows 7, WCF 4, WPF 4 and Silverlight 4. For further study, I recommend you take a look at John Bryce's site for a list of courses that cover these and...
תגיות: ,
אין תגובות

Windows 7 and WPF 4 at Developer Academy 4

Today at Developer Academy I gave a demonstration session called Capture the Windows 7 User Experience with Windows Presentation Foundation 4. In the demo I showed how to integrate the following Windows 7 taskbar features into Windows applications using WPF 4: Specifying the area of the application visible in the Thumbnail Preview Controlling the Progress Bar overlay in the Task Bar Adding Taskbar Buttons to an application on the Task Bar Adding Icon Overlays Adding Jump List items to the context menu...
אין תגובות

Top Tips for Rapid Application Development

2 באוקטובר 2009

In recent weeks I have been busy on a number of projects with very tight, almost impossible schedules. When schedules are tight, there is simply not enough time to implement all the steps of a formal development procedure. But I have found that some good practices shine through as time savers every time. Not only do they save time, but they also help produce exensible, maintainable code – which also saves time in the long run. So here are my top tips for Rapid Application Development. Document the requirements succintly. Avoid using document...
תגובה אחת

Received my MCT Credentials Today

3 בספטמבר 2009

Earlier this year I completed the MCPD certification - today I earned my MCT ! Over the year I have trained classes on C++, .Net 2.0, WPF, WF, WCF, Silverlight and Design Patterns. This has just got to be the fastest and most effective way to learn : )
אין תגובות