Monthly Archives: April 2009

Antique Mahogany Finish – Viewer Question

This Viewer Question come from Rob. He writes:

Hey Marc, thought I’d take advantage of my Guild membership “red phone” for the first time. I’m building a wine cabinet out of Honduran mahogany, and would like the finish to mimic the antique mahogany pieces in the same room. I am testing out a bunch of different finishing layers right now, and was wondering if you have any special recipe you’ve used. I have a whole assortment of water-based dyes, stains, shellac, oil, pore filler, and even asphaltum at my disposal for this experiment, so give me your best shot. Thanks in advance.

Hey Rob. Oddly enough, every time I have tried a finish that’s in the ballpark of that sort of “classic mahogany” look, I have tried something different. And each time the results were acceptable. So I don’t really have a favorite. But some of the techniques I used involved toners and lacquers, and it doesn’t sound like you have those on hand so I will skip them for now.

I would start the process with a dye or stain that gets your color at least 90% there. A good mahogany gel stain would be my choice (like General Finishes). Test on scraps until you determine which product gives you the best color. As an alternative, you can play with different dye ratios and make your own water-based dye stain. Once you apply your color, seal it in with some dewaxed shellac. That will lock the color in and protect the color from the next step, which is pore-filling. I would use an oil-based pore filler that has some color added to it. Something in the dark dark brown/red arena. Use Transtint or even a mix of UTC pigments (if you have them on hand), to achieve the dark intense color you need. Its also a good idea to let a small sample of the pore filler dry so you can see what color it takes on. In general, I like to match the wood color and possibly go slightly darker. I don’t like bringing too much attention to the pores.

When you apply the pore-filler, do like you normally would for any other piece. Apply it across the grain and wipe off the excess, let it set for a couple minutes, then buff it out using burlap if you can find it. Get as much of the excess up as possible. Then let it sit over night. Come back with a very light 320 sanding to clean up any remaining filler that might still be on the surface (but be careful not to cut through the shellac).

Now you can seal in the filler using another good coat of shellac. By this time, the color should be pretty much where you want it to be. You can always add some dye to your shellac sealer coat to tone the color one way or the other.

At this point, some people will even take things a step further an use a mahogany glaze to further deepen to intensity of the color. But if you got the right amount of color in step 1, this won’t be necessary. So just throw down several coats of your favorite finish and you should be good to go. I suppose you could also skip the pore-filling step but then I would recommend going with a matte finish. Maybe its just me but I hate the way a gloss finish looks on un-filled open pore wood. Good luck!

Smart Installer Pack Automatically Installs Your Favorite Software to a New PC [Downloads]

Windows only: Hunting down application after application to fill a new computer with your favorite software can be a pain. Free application Smart Installer Pack makes it easy.

Just download the (rather hefty) 227MB application, run it, and choose à la carte from the many popular applications contained within, from Firefox or Chrome to Picasa or GIMP to more obscure favorites like Daemon Tools (image mounter). We've seen similar tools in the past, like previously mentioned InstallPad and AppSnap, and while SIP doesn't offer as wide a feature set as either of those options, it's still a decent alternative to a long Google hunt for each app. The SIP installers don't run silently, so you'll still have to hassle through all the clicking (another drawback that puts the previously mentioned apps a step ahead of SIP), but it's got an attractive, simple interface that anyone—computer savvy or not—can handle.

Smart Installer Pack is a free download, Windows only.





Gutter Gardens Grow Produce Without Taking Up Space [DIY]

If you’d love to do a little at-home gardening but don’t have much space to do your planting, a simple gutter garden might be the perfect option.

Alaskan news site Juneau Empire features a smart, simple idea for planting a small vegetable garden with very little space: A windowbox garden built from gutters. In Alaska, this idea solves a few problems for the author:

We live near the glacier, so the soil is cold and has very little organic matter, there are lots of big trees shading it, and we have all the slugs and root maggots anyone could want, with porcupines, cats, bears and ravens meandering to boot.

There is only one side of our house that gets much sunshine, and, of course, that side of the house has the smallest yard.

Even if your garden doesn’t face the same problems, the idea behind the gutter garden could be perfect if you’re low on space but would kill for some homegrown veggies.

How does your garden grow? [Juneau Empire via Make]





How I handle JSON dates returned by ASP.NET AJAX

A calendar

The problem of how to handle dates in JSON is one of the more troublesome issues that may arise when directly calling ASP.NET AJAX web services and page methods.

Unlike every other data type in the language, JavaScript offers no declarative method for expressing a Date. Consequently, embedding them within JSON requires a bit of fancy footwork. Since the question of how I handle this problem is something asked often in emails and in comments on other posts here, I want to address the topic with its own post.

To that end, I will attempt to explain what exactly the problem is with dates in JSON, how ASP.NET AJAX solves it, and my alternative solution that I believe is easier and works just as well in most cases.

What’s the problem?

The fundamental problem is that JavaScript does not provide a way to declaratively express Date objects. You may previously have seen this described as (the lack of) a Date literal.

What are literals? To illustrate, these are literals for several other data types:

// String
'foo';
 
// Number
3.14;
 
// Boolean
true;
 
// Array
[1, 2, 3, 5, 7];
 
// Object
{ pi: 3.14, phi: 1.62 };

Unfortunately, when it comes to dates, the lack of a literal means that the only way to create one is by explicitly initializing a Date object:

// Correct.
new Date('4/26/09');
 
// Correct (the month is 0 indexed, hence the 3).
new Date(2009, 3, 26);
 
// Incorrect. This is a string, not a Date.
'4/26/09';

While this limitation is fine when writing client-side JavaScript code, it leaves us without a good way to transmit dates within JSON objects.

How ASP.NET AJAX handles it

While the lack of a date literal is a problem, it’s certainly not without solution.

In fact, ASP.NET AJAX already handles this if you’re using MicrosoftAjax.js to call your services. You may not have even noticed as server-side DateTime values are transparently converted into JavaScript Date objects on the client-side.

For example, consider this web service:

[System.Web.Script.Services.ScriptService]
public class DateService : System.Web.Services.WebService
{
  [WebMethod]
  public DateTime GetDate()
  {
    return new DateTime(2009, 4, 26);
  }
}

If you consume that web service with jQuery (or any method that circumvents the ScriptManager), you’ll find that ASP.NET AJAX serializes the DateTime as an escaped JavaScript Date initializer:

{"d":"/Date(1240718400000)/"}

Note: If you’re unsure about why the “d” is there, be sure to see my recent post about this security feature which was added in ASP.NET 3.5.

On the client-side, MicrosoftAjax.js uses a regular expression to isolate any Date constructors and then eval() to initialize Date objects. The end result is that proper JavaScript Date objects are instantiated for every DateTime value returned.

However, if you’re not using MicrosoftAjax.js (i.e. the ScriptManager) to call your services, you’ve got a bit of a mess to decode. You can use regex machinations to work around the problem, but is that really necessary?

How I handle it

Consider why you want to send a DateTime to the client-side to begin with. Most often, you’re displaying a string representation of it and have no need for the proper JavaScript Date object.

What’s more, if you end up with a JavaScript Date object, you’ll probably use additional code or a JavaScript library to display it in a user-friendly format.

As much as I appreciate a clever workaround, I’d much rather avoid the problem completely. Rather than jump through all of these hoops to instantiate a JavaScript Date object on the client-side and then format it, I suggest simply returning a formatted string.

For example, we might modify the previous example like so:

[System.Web.Script.Services.ScriptService]
public class DateService : System.Web.Services.WebService
{
  [WebMethod]
  public string GetDate()
  {
    return new DateTime(2009, 4, 26).ToLongDateString();
  }
}

Now, calling the service will return this JSON:

{"d":"Sunday, April 26, 2009"}

No more regular expressions. No more JavaScript Date objects. No more worrying about formatting the data on the client-side.

Even better, no functionality is lost. If we need to instantiate Dates, we still can.

Still want Dates?

Even if you do end up needing JavaScript Date objects, DateTime strings are sufficient for instantiating them. JavaScript’s Date constructor is very flexible:

// ASP.NET AJAX form
var foo = new Date(1240718400000);
 
// DateTime.ToLongDateString() form
var bar = new Date('Sunday, April 26, 2009');
 
// DateTime.ToShortDateString() form
var baz = new Date('4/26/2009');
 
// true!
foo === bar === baz;

By delaying string-to-Date conversions until truly necessary, we save effort on the server- and client-side. Not only that, but we have the option of retaining both the formatted string and the JavaScript Date to use as desired.

The best of both worlds.

###

Originally posted at Encosia. If you’re reading this elsewhere, come on over and see the original.

How I handle JSON dates returned by ASP.NET AJAX

OverDisk Displays Your Disk Usage as a Radial Map [Downloads]

Windows: If you’re looking for a fast way to visualize and drill down through what’s taking up space on your disk drives, OverDisk generates a radial map of your folder structures for quick navigation.

If you were jealous of the radial map disk view found in the previously posted, Linux-only toolsFilelight and Baobab, OverDisk brings that same circular goodness to your Windows machine. Point it at any disk or directory and it analyzes the contents and returns a radial map of the folders and files found within. Analysis was surprisingly snappy in a test run, as OverDisk crunched the numbers on 800GB worth of files in under 15 seconds.

Once the results are back, you can mouse over the wedges on the radial map to see which folders and files are chewing up your disk space. If the wedges are too small to select with ease, clicking on any given directory in the radial map will re-render the map with the sub-directories and files for that specific location. The graphics might be primitive by modern standards, but the response time is lightening fast and the interface is easy to use. According to the author’s site, he’s working out a bug where multiple refreshes can lead to a crash, but during our testing, zooming around multiple disks and terabytes worth of data, there wasn’t a glitch to be found. OverDisk is freeware, Windows only.





NetVideoHunter Downloads Videos From Popular Video Sharing Sites [Downloads]

Firefox: If you’d like to save a video you’ve found on a popular streaming video site, NetVideoHunter is a handy Firefox extension that makes that download a snap.

Most extensions and add-ons enabling video downloading usually place a single link by the Flash video box on certain sites, letting you download the file you’re currently watching. NetVideoHunter places a small icon in the lower right corner of your browser, tracking the videos you’ve watched.

Clicking on that icon will bring up a list of videos, including the current one you’re watching. From that list you can download or play the files. The ability to grab previously viewed videos is rather handy if you’ve decided, after tunneling through a YouTube chain, that you’d like a copy of that video three clicks back. It works on nearly any video sharing site including YouTube, Google Video, Metacafe and Dailymotion.

NetVideoHunter is free and works wherever Firefox does.





Top 10 Ubuntu Downloads [Lifehacker Top 10]

The reviews are in, and the just-released Ubuntu 9.04, i.e. “Jaunty Jackalope,” rates as a slick, fully-formed Linux desktop. Looking to get started or upgrade your system? We’re recommending 10 downloads for everyone to try.

Graphic by Andrew Mason.

A quick note about this compilation—it’s a little different than a list of Windows or Mac utilities. We link to each application’s home page, but most of them (with exceptions noted) can be installed from Ubuntu’s repositories, the default collection of software any user can access by heading to their System menu, then Administration, then choosing Synaptic Package Manager. Search out the app’s name there to install it (or, for terminal fans, type something like sudo apt-get install conky). Many of the applications also have Windows or Mac versions that work well for dual-booting users.

10. Ubuntu Tweak

If you’re fine with all the default settings on your shiny-fresh Ubuntu system, you have no need for Ubuntu Tweak. For newcomers, or anyone who feels confined by having their Computer icon stuck with the name “Computer,” Ubuntu Tweak is an OCD multi-tool. Besides allowing you to change all the little bits and ends of Ubuntu in a manner far easier than editing a text file or using the gconf-editor tool, Ubuntu Tweak also turns installing (and keeping up-to-date) third-party upgrades like the Avant Window Navigator dock or the latest Firefox beta into a simple check-the-box job. Short version for Windows geeks: It’s like TweakUI for Linux. (Head to the program site to download).

9. Screenlets

Look, we get it—not everyone’s a fan of widgets/gadgets/whathaveyou, and we totally understand; turning off Vista’s sidebar was one of the first things we did on a new install. But the Screenlets application gives you access to any of the hundreds upon hundreds of Google Gadgets and other open widgets, some of them hardnessing actual productivity tools like Google Calendar or Remember the Milk. With Ubuntu’s now built-in Compiz powers, you can even set the Screenlets to be hidden away until you press a key (like, say, the Mac’s F9 default). To do that, you’ll need to install the compizconfig-settings-manager package, where you’ll find all kinds of other goodies.

8. Handbrake

We’ve always liked Handbrake, our readers like it, too, and it works just fine in Linux (as it does on Windows and for Macs). With its latest version, Handbrake works hand-in-hand with our favorite media player, VLC, to make ripping any DVD into a video file for any device. (Head to the program site to grab a pre-compiled Ubuntu version; the 8.10 version should work fine in 9.04).

7. Yakuake

It’s come a long way, but no Ubuntu user can get by without a little command line work now and then. Yakuake takes the drop-down terminal from gaming touchstone Quake, makes it seriously speedy and easy to tab, and customized coloring and transparency shading for a terminal that looks how you want it, pops up in the same place each time, and feels a lot more integrated into your overall experience. Technically, it’s built for KDE-based systems (like Ubuntu’s KDE version, Kubuntu), but GNOME-based systems like Ubuntu can run it with very few dependencies or problems. You’ll want to make this one start up with your system.

6. UNetbootin

Trying out new Linux distributions is fun, even if you’re a long-term relationship with an Ubuntu desktop. Because, hey, maybe CrunchBang would make a good quick-boot alternative, right? And isn’t the Fedora 11 beta looking mighty nice? UNetbootin makes it dead simple to turn pretty much any Linux distribution into one that boots from a USB stick. It can automatically download and install the majority of popular distributions (Ubuntu, Fedora, openSUSE, etc.), or adapt any bootable ISO file you’ve got. You can even get crazy and custom-roll your own system from a chosen kernel, but UNetbootin doesn’t require much more than one download and one click.

5. Songbird

Songbird’s available on all three platforms, but if you’re one of the vast many iPod or iPhone owners out there on a Windows or Mac machine, there’s a good chance you’re okay with having iTunes run your music and manage your device (not that there aren’t alternative iPod wranglers). Linux has its fair share of innovative music managers, but Songbird is the most adaptable, attractive, and streamlined music app around. It too can manage your iPod (except for the standard iPhone/iPod touch conundrum), grab album art from the web, play the streaming tracks from any web site with its built-in browser, and offers a whole host of neat add-ons that mash up web data, customize how Songbird looks and feels, and basically change up anything the way that extensions can for Firefox. It’s not perfect, but it’s very usable on almost any Linux desktop. (Head to the program site to download).

4. Conky

This one’s an old-school app, controlled entirely by text files, but the results can be brilliant, as evidenced by one hacker’s mutli-colored, iconic desktop, or a setup for fans of to-dos and Twitter replies. Best of all, you can mix and match the features and data you want displayed in any setup, as we showed you in our Conky guide. Basically, Conky can put any data you want, from your desktop or the web, on your desktop, and keep it updated, and that’s a great thing.

3. VirtualBox

VMWare is better if you’re serious about running multiple, uber-efficient virtual machines in a development environment. For the average home user who just needs access to a Windows application now and then, it’s hard to beat a trimmed-down XP running in VirtualBox. It’s easy enough for a beginner to get into, but customizable enough to run as a seamless taskbar on your Linux desktop. In other words, it’s a free semi-equivalent of what Mac users have been using (Boot Camp or Parallels) to run the necessary Windows app now and again. (Ubuntu’s repositories carry the “Open Source Edition” of VirtualBox, which is much the same, but lacks certain features, including USB support; head to the program site to download standard packages for 9.04).

2. DropBox

Most Linux desktop users are loathe to admit it, but any app that Just Works is worthy of praise. Whether you’re installing from source or a pre-rolled package, Dropbox integrates itself smoothly into the Ubuntu desktop, creating a Dropbox folder in your home directory, keeping whatever’s in it synchronized (up to 2GB with a free account), and offering quick access and notifications from the system tray. When you’re away from your system, you can grab whatever you’ve got in the ‘box from Dropbox’s web interface. Simple, streamlined, helpful. (Head to the program site to download pre-compiled Ubuntu packages).

1. GNOME Do

Adam never fails to remind me of GNOME Do’s similarity to Quicksilver, the uber-essential application launcher and productivity tool for Macs. But that’s a good thing. With Do installed, a quick keyboard smack could open up a super-quick way to open an application, fire off a one-shot terminal command, start a VirtualBox machine, add a Google Calendar or Remember the Milk obligation, update Twitter, restart your system, start an email to a Gmail contact … this list goes on. As a two-for-one, GNOME Do now includes a smart and intuitive desktop dock for clocks, trash, and those moments when you’ve already go the mouse in hand.

What apps and add-ons make your Ubuntu desktop productive and comfortable? What alternatives do you prefer to our list items? Give us your open-source offerings in the comments.

SpaceSniffer Does Eye Candy Drive Space Analysis [Downloads]

Windows only: Drive space visualizer utility SpaceSniffer takes the mundane task of cleaning up your drive and makes it more pleasant with some impressive graphics.

SpaceSniffer works similarly to previously mentioned SpaceMonger—it provides a drill-down treemap view of your drive so you can quickly identify where your drive space has gone. The difference is that SpaceSniffer does it with style—drilling down into a directory with an animated zoom effect that makes it a lot more pleasant to use.

SpaceSniffer joins a very large group of similar utilities—you can take your pick between: DriveSpacio, Windirstat, Free Disk Analyzer, Primitive File Size Chart, Xinorbis, Simple Directory Analyzer, Treesize Free, and FosiX Lite—all of which do the exact same thing with different graphical interfaces: they help visualize your hard drive usage. There’s no right answer between the different utilities, you should use the one that works for you.

SpaceSniffer is a free download for Windows only—but instead of visualizing your drive usage all the time, you should learn how to use Belvedere to automate your own self-cleaning PC.





Business Card Star Makes At-Home Card Printing a Snap [Free]

Think about the per-card cost of most commercial business card printers, and you’ll likely feel a bit taken. Business Card Star makes designing and printing a professional, eye-catching card at home a viable alternative.

The site's main function is a step-by-step design and print flow, giving you a choice of dozens of templates—"Elegant," "Geometric," and the like—that don't look cheesy or scream "I just graduated from Print Shop Pro!" After moving through the Flash-based design app that has only the buttons you need, you're asked if you want to send your design off to the site's commercial printing partners, or—since you came this far—print them yourself. The output PDF file you'll download is compatible with a whole host of Avery-brand card stock packages, both 8 and 10 cards per sheet. And that's it, assuming your printer can turn out decent material on its high-quality setting.

Business Card Star is free to use, requires a sign up to save your finished cards on the site.Thanks Susy!





Save and Share Google Maps Directions with My Maps [UltraNewb]

The My Maps feature of Google Maps has been around for quite sometime, but if you are a regular Google Map user and you’re not using it to share common directions, it’s worth it.

The Google LatLong blog (Google's official blog for all things Google Earth and Maps) has a simple beginner's tutorial for using the My Maps feature to customize and save directions—complete with notes—so you've got a repository of common directions with helpful annotation.

As I said, this isn’t a new feature by any means, but it’s something that I’ve used several times here at Lifehacker (see the embedded map) and to share directions with friends and family. If you’ve used My Maps, let’s hear what you’re using it for in the comments.





WP Like Button Plugin by Free WordPress Templates