
Back to Blog index.
The Gang of Four brought us design patterns which are those familiar, (to some of us, anyway) time-tested building blocks of software applications. However, not all patterns are simply good, in which they are called anti-patterns or, in common language, pitfalls.
I noticed that ever-expanding Wikipedia has a great link list to many project management, design, programming and organizational anti-patterns. Recommended reading.
I today noted on MSDN a nice verson control brancing/merging primer written with the Visual Studio 2005 Team Foundation Server in mind. Recommended reading if the version control concepts and/or Visual Studio Team System is new to you.
If you are using Visual Studio 2005, you might have noticed that many features are enhanced and improved compared to the previous versions. Once example is debugging and especially breakpoints. With VS 2005, breakpoints don't necessary need to break anymore, instead you can convert them to useful tracepoints, which can for example log information about current method, thread ID/name, variable values, etc. without stopping the execution of your C# application.
To enable tracepoints, first add a regular breakpoint, right-click the red round button on the code editor margin, and select When Hit:

When you add a message to be printed into the dialog box that opens and you have the "Continue exection" checkbox checked, you have effectively created a tracepoint (a "non-breaking breakpoint"). Note how the red round button now becomes a red diamond. Tracepoints can be very useful ad-hoc debugging aids, when you don't want to write code to do logging. Use them.
After Borland's announcement to spin-off IDE tools like Delphi and JBuilder (and InterBase) to a new company called CodeGear, some people have seen this a rather negative end result to the month-long struggle to find a buyer. Although I share the view to certain extent, it is sad to learn that The Delphi Magazine (TDM) has decided to stop monthly publishing. TDM was the only magazine available that was devoted to Delphi, and just like the declining user base of Delphi, TDM saw the same trend in subscriptions, too.
However, although sad news, all good things come to an end at some point. I want to thank TDM for the good years and excellent content, I've learned a lot about Delphi from the other authors. And those who are looking forward to my Vista article, yes, it is coming. The final issue of TDM will be the March, 2007 issue.
Sometimes, you need a way to see what's inside the resource section of a Windows EXE or DLL file. The problem is that there aren't good tools available for this job, or at least so I thought.
Previously, I had always used (since abandoning 16-bit development, that is) the ResXplor.exe utility, a sample application that comes with Borland/CodeGear Delphi. It is a nifty tool, but it's not very powerful and doesn't always get the job done. But so far, I've survived. However, I learned today that a better alternative is also available, and it is called Resource Hacker. Looks very good, so go and download your copy today. It is freeware also.
Now that I've had the chance to install Vista and Office 2007 onto several virtual machine instances (mostly under VMware Workstation), I can see that the virtual images truly take quite a lot of disk space.
A basic virtual image of a Windows Vista Ultimate installation takes about 6 gigabytes of disk space, and about 2.8 GB in zipped format. Install Office 2007 on top of that, and you end with about a 12 GB virtual image, which zips back to little less than 6 GB. Wow. A DVD isn't enough anymore, nor are any of my USB sticks. How much did a 20 GB USB stick cost, again?
Martin Fowler, the man behind important software development ideas such as patterns, refactoring, UML and Extreme Programming (XP), isn't slowing down. Instead, he's recently written an article about what he calls "Continuous Integration", or CI for short.
No, I'm not referring to a certain plug-in to Visual Studio Team Foundation Server, but instead of a software development methodology that helps development team communicate and integrate their code faster. Indeed, this a continuation to Fowler's agile development, and thus interesting reading if agile methods and for example XP are of interest to you.
Finally, the thing I've been waiting for: final Windows Vista bits are now available on MSDN. And, the SDK kit is also available here. And then there's Office 2007, too. The bits are flowing as I write. :-)
Finally news from Borland: they have decided to spin off the Developer Tools Group (DTG) as a separate company called CodeGear instead of selling the business unit. Of course, the non-technical Delphi newsgroup is full of discussion whether this is good or bad and whether there will be enough cash to do what the DTG has so loudly anticipated to do. As for myself, I think a totally new owner would have probably been a better bet if chosen right, but then again a spin off sounds to me a less risky venture.
Now, what CodeGear needs to do is get some real action going fast. I need support for Vista, .NET 2.0/3.0 and mobile platforms. I hope Highlander will live up to its promise. Time is CodeGear's worst enemy.
I'm happy to announce a new web forum for Finnish, professional IT people: ITpro.fi. There are dozens and dozens of web forums available on the Internet, and I'm generally somewhat skeptical when it comes to launching new ones. However, as I know the excellent team and other MVPs behind this new forum, I firmly believe there's lots of potential with the site. And, before this, there were no Finnish forums for professional IT people. Now there is one.
And for us developers, what's even better is that I've managed to introduce a forum specifically for software developers on ITpro.fi. So you you are a Finnish software developer, you are warmly welcome to discuss, learn and share your knowledge on ITpro.fi. I'm myself leading this new software development group ("Ohjelmistokehitys" as it goes in Finnish), so if you are interested in sharing your skills with the audience, do let me know. Thanks!
MSDN's Channel 9 has a great video (or, "screencast") that shows how to elevate privileges in your Vista applications. Note the Full Screen link on the web page, which allows you to actually see the video instead of a stamp-sized bitblt.
If you are developing Win32 applications for Windows Vista, you will quickly notice that even though your user account is part of the Administrators group, but default you are just a normal user. This is the workings of UAC.
I used to have code that was able to determine if the current user is an administrator, but now with Windows Vista this doesn't work anymore. This is because for example solutions given here depend on checking whether the current user belongs to the Administrators group. This used to work up to Windows XP, but not in Vista. Luckily, there's a Microsoft KB article 118626 that details a working solution in C/C++. If you are using Delphi, I'm currently working on an article that shares the Delphi code for this. Stay tuned.
When Microsoft bought Winternals/SysInternals (and, should I say, Mark Russinovich) I thought exciting thing could happen. Now, I've used FileMon and RegMon for years to track down difficult software installation, security and development problems, and now these two utilities have merged into one utility called Process Monitor. Currently, the version is 1.01, but I expect progress in the former pace. It's now time to upgrade FileMon and RegMon to Process Monitor.
It's official: Windows Vista is now ready (RTM). Congrats to Microsoft for the milestone! Next, we will see the 2007 Office System products roll out. I'm anxious to get my hands on the final bits on MSDN.
Microsoft has today announced the availability of the .NET Framework 3.0 libraries and the run-time. The free Redistributable Package is available from Microsoft's Download area. The .NET 3.0 framework (previously called WinFX) is an interesting set of new functionality for managed code developers, for example those using C#.
.NET 3.0 includes the Windows Presentation Foundation, Windows Communication Foundation, Windows Workflow Foundation, and Windows CardSpace technologies. Thank you Microsoft for taking the .NET platform forward!
I spent few hours today trying to install Borland Turbo Delphi Win32 into my Windows Vista RC 2 (build 5744), but I couldn't install the product because the installer runs into trouble with access rights to certain directories, which it however won't disclose. If you try to retry the operation, an internal error is raised. I give up; it's sloppy installation program authoring. But it just shows that developers need to pay attention to security.

If you are using Borland Developer Studio 2006 (aka Delphi 2006) and your want to quickly build a web service application in Win32 using the Web App Debugger (File/New/Other, then Delphi Projects/WebServices, SOAP Server Application), you might run into trouble if you installed your Delphi with the Indy 10 components. The reason for this trouble is that the library code that hosts your web service was written for Indy 9, and isn't fully compatible with Indy 10. So when you first try to compile your web service application, you might run into the following error message:
[Pascal Fatal Error] Project1.dpr(11): F2051 Unit SockApp was compiled with a different version of IdTCPServer.TIdTCPServer.
Although this can sound scary, this error is actually easy to fix: all you need to change is your Delphi's Library Path. This can be done by choosing Tools/Options, and then going to the Environment Options/Delphi Options/Library - Win32 tree. Here, you have the "Library path" setting which you need to edit so that it doesn't contain "$(BDS)\Lib\Indy9" but instead "$(BDS)\Lib\Indy10". That is, all you need to change is the nine to a ten. So the full, working default library path would be (all in one line, of course):
$(BDS)\lib;$(BDS)\Imports;$(BDS)\Lib\Indy9; C:\Program Files\Borland\BDS\4.0\RaveReports\Lib
For your information, the issue is already in QualityCentral, and is probably fixed in Delphi 2007 i.e. "Highlander".
The November 2006 issue of The Delphi Magazine has my latest article about the Windows Installer (MSI) technology. If you want to learn what Windows Installer is, how it works and how you can program for the MSI API with Delphi, grab your copy of the issue 135. The article is titled "Windows Installer Under The Hood."
As a professional IT/developer kind of guy, e-mail is my main communication method with many people and customers. Generally speaking, people tend to use e-mail properly and efficiently, but nonetheless there are certain irritating habits that repeat themselves all over again and make me see red. Here's my top three:
1. Improper subject line. I get way too many e-mails with the subject saying "Hi!", "Offer" or "Web App". The subject line is (surpise!) about the subject of your message. Instead of "Offer", try something more descriptive like "Offer about C# ASP.NET web application development". Works wonders!
2. People who sign all their mails with just "John" or "Joanna" or "Paul". That's fine if you're a friend of mine or a relative, but if we've never met and it's a business e-mail you are sending, I would expect at least your full name, company name, maybe your address and most importantly your phone number. E-mail doesn't always work, and I need an alternative communication method. Besides, some things are simply easier to discuss over the phone. Of course, you don't need to repeat your full contact details in each reply, but at least your initial message should contain the full contact details.
3. Excessive (HTML) formatting and (re)sending of attachments. Plain ASCII mail does the stuff just fine for me, takes less bandwith and is more secure. In 95% of the cases, there is no real need to decorate your messages will all those fancy colors and moving GIFs. And what even worse, mail filters just think those mails are probably spam. Also, when I send you an 800K attachment and you politely reply that you got it, please don't again include the attachment in your reply.
› Blog Archive