Get highlights about the Windows API Code Pack, the problem in Ruby’s BigDecimal library, the preview of Mono Tools for Visual Studio, tidbits about Expression Web 3, the Titanium RIA system, and more.

————————————————————————————–

Windows API Code Pack released

Microsoft has released the Windows API Code Pack. This library (which requires .NET 3.5 or .NET 4.0) gives developers access to some of the items in the Windows Vista and Windows 7 APIs that are not available in the .NET Framework. It looks like all of the items are Windows Vista and Windows 7 specific, so you’ll want to skip this if Windows XP or Windows 2003 compatibility is important to you.

Time to upgrade Ruby

A problem has been found in Ruby’s BigDecimal library, which is activated by very large numbers. The problem causes the Ruby interpreter to crash, and since Rails uses ActiveRecord, this means that just about everyone will need to upgrade their Ruby interpreter. The issue is fixed after Ruby 1.8.6-p368, 1.8.7-p160, and all versions of 1.9.1 are fine.

Mono Tools for Visual Studio in a limited preview

The Mono Project is previewing its new Mono Tools for Visual Studio project, which allows developers using Visual Studio to work with Mono from Visual Studio. For now, you need to be invited to the preview, but it is easy to sign up for an invitation. I believe that this will be a very good step for the Mono project, and developers looking to expand the potential reach of their products.

Details on Expression Web 3

I think that Expression Web is an excellent tool, so I was excited to read S. Somasegar’s details about the upcoming version 3 of Expression Web. It includes a SuperPreview function, which not only allows you to see how different browsers render the page side-by-side, it also includes rulers, DOM inspection, and code highlighting to allow you to precisely identify the causes of differences in rendering. Photoshop PSD import is improved; TFS version control is supported; and publishing options are improved as well.

Titanium now works on iPhone and Android

Appcelerator’s Titanium RIA system is now functioning on the iPhone and Android mobile systems. This gives developers an open-source alternative for mobile development in an environment that doesn’t require them to learn the underlying OS. In addition, Web developers do not need to learn new skills, since Titanium uses HTML, JavaScript, and CSS for development.

Good lesson on “out of memory” errors

On MSDN, Eric Lippert has written a good piece about “out of memory” errors. If your application works with a lot of data, I suggest you give it a read; even if you never see that particular error, it’s a good primer on how Windows handles memory.

Keeping the page position after ASP.NET postback

The ASP.NET team has a useful tip on their blog about how to maintain the vertical position of an ASP.NET page after the postback. This is quite a useful tip!

J.Ja

Disclosure of Justin’s industry affiliations: Justin James has a working arrangement with Microsoft to write an article for MSDN Magazine. He also has a contract with Spiceworks to write product buying guides.

—————————————————————————————

Get weekly development tips in your inbox
Keep your developer skills sharp by signing up for TechRepublic’s free Web Developer newsletter, delivered each Tuesday. Automatically subscribe today!

Justin James is an employee of Levit & James, Inc. in a multi-disciplinary role that combines programming, network management, and systems administration. He has been blogging at TechRepublic since 2005. Read his full bio and profile.

The world of programming has changed quite a bit since computers were first developed. One relative constant is the way in which programs are created; specifically, the idea of source code represented as standard ASCII text. It has been decades since we evolved from using hex editors or punch cards to using text editors. I think it’s time to look at how we work with the source code (presuming that the idea behind source code does not evolve anytime soon).

Most of the programming that I’ve done required me to come in behind someone else to make changes. It is fairly rare that I do “clean slate” programming. I suspect that most programmers are primarily doing maintenance at this point. For the maintenance programmer, the number one challenge is to find out enough about the code so you can strive to be as effective as the original programmer. This is just some of the information maintenance programmers have to pick up in short order:

  • Learn naming conventions well enough to be followed so that the new code mixes well with the original code.
  • Find out where the documentation is and how to update it (and what kinds of information belong in it).
  • Learn where and how to make common presentation-layer changes, such as error message text, font sizing, or the images used in the application.
  • Discover where input validation occurs and what the validation rules are.
  • Learn how to produce output in a way that is as similar as possible to the original code; in other words, if the original code combines an external resource file with a presentation template, your code should not contain hardcoded output.
  • Uncover “gotchas” such as long-running loops that block the main thread, making the application appear to be hung when it is actually operating normally.

This is why it often takes two days to make a 10 minute change — or even longer if the maintainer has never worked with that codebase.

If you believe that most programmers maintain code much of (or even most of) the time, the cost of programming can be dramatically reduced by making maintenance more efficient. If you study the above list carefully, you will see that having a clear conception or model of the code in your mind is the key to being able to perform maintenance efficiently. Many of the tools from Microsoft Research’s Human Interactions in Programming (HIP) group are designed for efficient code maintenance; in particular, Backstory, Code Thumbnails, and Software Terrain Maps.

It is unfortunate that none of these items are shipping products or even in a public beta state yet. Backstory is quickly making progress; I am told that it should be available in some condition in a few months, and I am hoping to catch up with its creator then. I am looking forward to using Backstory, particularly since my current project is 95% maintenance (much of my learning about the code is to learn where in the configuration to change things).

I learn a piece of code by reading through it once or twice and then stepping through the execution in a debugger (I really like Visual Studio’s auto watches for this task). The IntelliSense in Visual Studio is a huge help because it lets you quickly see the available methods and properties of a class; the Go to Definition command is a lifesaver as well.

How do you become familiar and comfortable with a new piece of code?