Out of Hanwell

November 28, 2005

New Features for Drip

Filed under: Uncategorized — Matthias Miller @ 5:38 pm

Drip 0.3 has officially been released.

Major enhancements include:

  • Drip now supports popup windows. (Note that the “Auto-Refresh” button does not apply to popup windows.)

Major fixes include:

  • Drip no longer incorrectly reports certain memory leaks involving createElement and cloneNode (thanks to Matthew Mastracci!).
  • Drip no longer crashes when navigating to a folder on the hard drive.
  • Drip no longer crashes when accessing properties for a leaked element that used filters.

Minor changes to the user interface include:

  • Drip now supports Windows XP themes.
  • Drip now displays real-time memory usage.
  • “Blow Memory” has been renamed to “Auto-Refresh”.
  • All windows are now resizeable.
  • The memory leak report can be copied to the clipboard.
  • The memory leak report and properties window include a “Properties” button.
  • The properties window shows the name of the parent object.
  • The properties window indicates which objects are null.

Let me know what you think!


November 25, 2005

Web 2.0 Validator

Filed under: Uncategorized — Matthias Miller @ 8:24 am

The Web 2.0 Validator takes a humorous jab at Web 2.0. To add to the fun, the requirements are constantly changing (sound familiar?). Anybody can add new rules by tagging the site on del.icio.us and putting a rule into the notes. Clever.

The site has the full story behind this.

November 23, 2005

The Web 2.0 Confusion

Filed under: Uncategorized — Matthias Miller @ 11:38 am

Web 2.0 has been a very confusing subject for me. Like every other developer, I’ve been reading about it on blogs and in articles, but I’ve never felt like I’ve really understood what it’s all about. “Web 2.0” is a very non-descript name and many people use it very loosely. Sometimes I almost imagine it’s something Dilbert’s pointy-haired boss invented.

More recently, I’ve come to conclude that Web 2.0 is the revolution caused by people who say, “The web could be improved upon, so let’s turn the world wide web upside-down. Let’s make some drastic changes that make it look and feel more natural. ” In this way, Web 2.0 focuses primarily on foggy end-results and fails to address the means by which these results are reaized.

If my analysis is true, there are two questions that must be answered for Web 2.0 to be meaningful:

  1. What kind of web applications are we looking for?
  2. What design models can we use to create such web applications?

The first question is a question for the business people and consumers. Are we looking for better communication tools? Are we looking for better content management, such as a better wiki or an office productivity suite that includes a word processor and spreadsheet? Are we looking for better multimedia networking? Before we march forward, we must have something towards which we march.

The answer to the first question is crucial, but it is the second question that I, as a developer, care the most apart. Just like we use Ajax to refer to a certain model for client/server communication, we need to use specific terms when we’re talking about the development of these revolutionized Web 2.0 applications. Let me offer some examples:

  • Ajax. As mentioned, this describes a JavaScript technique for accessing websites without opening a new page. This is core to the Web 2.0 idea.
  • Auto-completing edit boxes. This is used in a large number of websites and makes the interface more natural by letting the user see how the server will interpret the information he or she is entering.
  • Sortable tables. Almost every web application ties into a server-side datasource. Ajax applications can tap into this data source via SOAP, thus updating the data without refreshing the page.
  • Client- or server-side templating. When a user is tweaking the display of some information, it would be faster to do client-side templating instead of submitting the user’s preferences and downloading the newly styled page.
  • Drag and drop. This is a very common metaphor for interactive editing.
  • User-defined ranking and organization. Allow users to organize information based on their tastes and interests. Is this best done with tags? Outlines?
  • Collaboration. Users expect to be able to work together on the web. How do you control access to the same resource? How do you deal with collisions?
  • Disconnected data storage. If different Ajax applications require access to the same set of data, they could communicate with a centralized third-party data storage service designed for any interested Ajax applications.

Any of these questions and examples could trigger a meaningful discussion. If we are serious about revolutionizing the web, we must stop merely discussing “Web 2.0” and start discussing more specific ideas–something that’s tangible, something that can be visualized, something that’s real.

When we start offering practical advice for developers and when we help each other brainstorm about new kinds of applications and new ways of doing things, we can foster a community that will let the Internet be changed, even revolutionized.

Let me tell you: we won’t get it by talking about Web 2.0.

November 22, 2005

The Disservice of Beeps

Filed under: Uncategorized — Matthias Miller @ 9:48 am

When I installed Windows Services for Unix, I kept being annoyed whenever the shell beeped at me. I discovered that I can temporarily shut down the beep service by typing “net stop beep” into the Windows command prompt, or I can disable it completely by typing “sc config beep start= disabled” (see MSDN).

Too bad I can’t annoy my coworkers anymore when I use terminal services.

A New Ajax?

Filed under: Uncategorized — Matthias Miller @ 7:55 am

This morning Ajax Blog had a link to an article entitled Ajax & PHP without using the XmlHttpRequest Object. The article simply describes a means of downloading JavaScript code (generated by PHP) to modify your webpage. I have no problem with this approach, as long as it is used within a single domain, but I disagree that this is the right way to integrate with third-party websites.

Cross-site scripting should be no problem as long as you can validate what you’ve received from the other source. The approach discussed by the article, however, does not let you examine the object model of the downloaded HTML before it is attached the page’s DOM. Any website that you previously thought provided only web services could, either through a change in business ethics or through a hacked server, start serving ads or otherwise deface your website.

It all comes down to a philosophical difference: should Ajax return XML data or rendered HTML? As long as you can control the generated HTML, you can secure your borders, but as soon as you start accepting prerendered HTML from third parties, you’re opening yourself up to danger. Also, from an architectural standpoint, you don’t want to be locked into another party’s HTML rendering. You want to be able to take the data and format it it in whatever way best fits your website.

This technique doesn’t fit the traditional methodology of Ajax, so its arguably unfair to call it Ajax (I propose asynchronous JavaScript and HTTP GETs…Ajahgs!) but it does fulfill the Ajax intent. It uses easy-to-understand metaphors that any web developer can understand, and I can envision myself using this technique in certain web applications.

November 21, 2005


Filed under: Uncategorized — Matthias Miller @ 7:04 am

Last week, after having used Outlook for several years, I decided to switch to Thunderbird. Admittedly, I did not have a strong reason to migrate, but neither did I have a strong reason to keep using Outlook.

The migration wasn’t particularly difficult, but it wasn’t without its glitches–for example, I had to manually set up all my e-mail accounts. Later, I discovered that some of my e-mail headers had apparently been messed up during the import process. This could present a problem when I need to search for old e-mails.

What do I like?

  • Speed. Thunderbird loads much more quickly than Outlook and feels a lot more lightweight.
  • Uncluttered UI. The Thunderbird UI, except for several menus, is very clean, straightforward, and uncluttered. It is a focused e-mail application and does not have other extra features such as a calendar to clutter up the interface.
  • Multiple Accounts. Thunderbird allows multiple sets of Inbox/Sent Items folders, making it easier to manage multiple e-mail accounts. Also, Thunderbird shows a drop-list of accounts in the Compose E-mail folder; this is more intuitive than Outlook’s multiple “send using” options on the toolbar and menu because it models incoming messages.

What don’t I like?

  • Menus. Perhaps it’s just my unfamiliarity, but the File, Go, and Tools menus don’t seem to be thought out very well.
  • Multiple SMTP Servers. It’s nice to be able to re-use SMTP settings for multiple accounts, but it’s also confusing that you have to leave the settings for an account to set up a new SMTP server. Also, I use multiple authenticated accounts with the same host. The list of SMTP servers should include the user name, if applicable.

Thunderbird does not feel as polished as Firefox (it certainly has its share of rough edges), but I find its speed and UI a very compelling reason to keep on using it. I’d rather have that over all of Outlook’s extra features.

November 19, 2005

Wanted: Beta Testers for Drip

Filed under: Uncategorized — Matthias Miller @ 8:50 pm

I’ve recently been working on Drip, the memory leak finder for Internet Explorer. I started making some changes this afternoon that are turning out to be somewhat substantial. I know there are quite a few web developers who have used out this tool; if any of you would like a chance to try out these changes and offer suggestions before I unleash it on the world, let me know.

If not you can beta test when I release it.

November 16, 2005

Compile-Time Assertions

Filed under: Uncategorized — Matthias Miller @ 4:00 pm

The last edition of C/C++ Users Journal (December 2005) had an article about compile-time assertions. The article proposed using templates like this:

template <bool> class OnlyTrue;
template <> class OnlyTrue<true> {};

#define CTA(X) sizeof(OnlyTrue<(bool)(X)>)

If the expression is true, the sizeof expression will be optimized away by the compiler. If the expression is false, the compiler will give an error because OnlyTrue<false> is not defined. This technique, like the one used by Boost.StaticAssert, requires a class, function, or namespace scope. However, a small tweak allows compile-time assertions anywhere:

template <bool> class OnlyTrue;
template <> class OnlyTrue<true>
{ enum CompileTimeAssertion {}; };

#define CTA(X) \

Like the first assertion, the reference to the enum type will be optimized away if the expression is true and the compiler will give an error if the expression is false. But instead of referencing the size of the template class, this assertion merely references an enum type of the template class, which the compiler allows at the global scope.

The advantage may not be great, but it does make global compile-time assertions just a little easier.

Update: I really goofed here. (Thanks for pointing it out, tv.) Since I wrote this post, I came across the compile-time assertions in SpiderMonkey, which look like this:

#define JS_STATIC_ASSERT(condition)                                           \

#define JS_STATIC_ASSERT_IMPL(condition, line)                                \
JS_STATIC_ASSERT_IMPL2(condition, line)

#define JS_STATIC_ASSERT_IMPL2(condition, line)                               \
typedef int js_static_assert_line_##line[(condition) ? 1 : -1]

Same advantages that I mentioned, only it works.

November 9, 2005

Why Doesn’t _popen Work?

Filed under: Uncategorized — Matthias Miller @ 4:56 pm

To the reader who was wondering why _popen doesn’t work in C++, check out the comment in the MSDN documentation:

Note If used in a Windows program, the _popen function returns an invalid file pointer that will cause the program to hang indefinitely. _popen works properly in a Console application. To create a Windows application that redirects input and output, see Creating a Child Process with Redirected Input and Output in the Platform SDK.

Now you know.

iBook Memory Upgrade

Filed under: Uncategorized — Matthias Miller @ 4:20 pm

I upgraded the memory in my iBook to 640 MB. I was impressed how easy the upgrade was:

  1. I removed the keyboard by pulling the two tabs at the top of the keyboard.
  2. I pulled the wireless card out of the way.
  3. I loosened several screws to remove a metal plate.
  4. I inserted the memory into the slot.
  5. I put everything back together. (Next time I’ll know enough not to spend an hour digging around in the bottom of the notebook.)

The result? Programs run visibly faster, especially their startup. Most importantly, compilation of JavaScript Lint has sped up several times over and web browsing is now very snappy.

Older Posts »

Create a free website or blog at WordPress.com.