Thoughtful, detailed coverage of the Mac, iPhone, and iPad, plus the best-selling Take Control ebooks.



Pick an apple! 
Untrash the Trash

Feeling trasher's remorse? On Snow Leopard, you can open the Trash (click the Trash icon in the Dock) and "untrash" individual items there. Select one or more trashed items (files and folders) and choose File > Put Back. This returns the items to where they were when you originally put them in the trash. The keyboard shortcut is Command-Delete - the same as the shortcut for trashing an item in the first place, since in deleting something from the trash you are untrashing it.

Submitted by
Matt Neuburg



Related Articles



Hand Coding HTML Is Still in Vogue

Send Article to a Friend

Back in 1994, when I first learned to write HTML code for display in NCSA Mosaic, I thought, "There's got to be a better way." After all, I was coming off nearly a decade of typesetting and working with desktop publishing, starting with a Mac Plus and PageMaker 1.0 at my high school's newspaper. The code never bothered me; I had also learned in high school how to code on a Compugraphic typesetting system that used a similar method of embedded tags for formatting. But this was 1994! Surely, a graphical editor existed that would put a nice wrapper around HTML's intricacies.

It's therefore rather amusing to recognize that after 14 years of such editors - FrontPage, PageMill, GoLive, Dreamweaver, and many others, with few surviving the hecatomb - hand coding still rises to the top as the preferred method of building pages. Khoi Vinh, design director at The New York Times, noted in a recent reader Q&A segment on the Web site, "It's our preference to use a text editor, like HomeSite, TextPad or TextMate, to 'hand code' everything, rather than to use a wysiwyg (what you see is what you get) HTML and CSS authoring program, like Dreamweaver. We just find it yields better and faster results." (GoLive, by the way, bit the dust today.)

Vinh isn't really dissing Dreamweaver here; rather he's pointing out something that I've seen develop organically over the last 14 years: graphical tools don't work well with the template-based systems that drive most Web sites of any scale, including TidBITS and The New York Times.

Most Web sites aren't built from static pages, but are collections of widgets, server-side scripts, IFrames (for embedded content drawn from other servers), and placeholders that insert information built in a content management system (CMS). These tend to be highly idiosyncratic. Even when purchased as a commercial system, the customization often makes it impossible for a graphical Web tool to provide proper editing and previewing.

In these systems, a template defines how a page is built when a particular request comes in. When you ask for "/article/9569," for instance, that's not a static page in an article directory. Our system breaks that request down into a query for an article with a GetBITS number of 9569. The system pulls in data from several tables in a database, and plops the results into a template that also references a variety of dynamic elements that need to be inserted, such as ads and links to TidBITS Talk discussions. That's what's fed out to you as a Web page.

This kind of hand coding isn't precisely the same as writing each page of HTML by hand; rather, it's more like handcrafting a prototype, such as a sculpture or machine part, which is the reference used to create mass-produced objects. A small imperfection in the prototype mars all the copies.

We built a CMS behind TidBITS to help manage the flow of content, and to make ourselves at least a little more agile. If you're a long-time reader, you'll note that we produce more content on a regular basis than we used to because the CMS streamlines a hunk of the process we had before. (We're still working to further streamline and extend our TidBITS Publishing System so we can have a better blog posting system, more translated articles, a way to display short items more effectively, and other improvements; see "Designing a Modern Web Site for TidBITS," 2007-09-10.)

In the late 1990s, I was building pages using scripts to dump thousands of static pages with some homebrew templates. But I was also working with designers on sites of hundreds of pages where GoLive, FrontPage, or Dreamweaver managed recurring components. The move to templates coincided with the rise of content management systems that actually worked. Content could be centrally stored and fielded, so you could rapidly update a story and publish it in different ways in many places. A headline might be updated on the home page, the story's main page could change, and a blurb from the story could appear elsewhere, all while bringing the RSS feed into sync.

As designers of larger sites have grown accustomed to hand coding, the graphical tools have improved so that even inexperienced users can design and deploy good-looking sites with relatively little effort. I'm fairly impressed with Apple's latest release of iWeb, which ditched a lot of bad code and bad ideas from its previous version, and seems to produce more than passable cross-platform HTML and JavaScript. Likewise, I've tested an online-only editor called Easy WebContent that has remarkably powerful tools for a Web-based editor. (I reviewed Easy WebContent for PC World, although it's platform agnostic.)

And Dreamweaver, as I say, doesn't need to be dissed. Its CS3 release is the easiest version I've ever used. I manage my personal site,, in Dreamweaver and am perfectly happy with its range of control.

It's somewhat ironic that a display language like HTML, which initially had a high bar of entry, requiring people with some understanding of structured text or programming to figure out how to write code that appeared properly, now has a different but similar bar. To build rich, complex sites with ever-changing and expanding content, you almost certainly need to get under the hood and get your fingers dirty with some sort of templating system.


Updated! PDFpen for iPad 1.7: Designed for iOS 7, faster, and
better-looking. Edit your PDFs anywhere. Sign contracts, make
changes, fill forms, and more. All while you’re on the move.
Syncs via iCloud and Dropbox. <>