Monthly Archives: May 2009

Project Dragonfly Helps You Build and Furnish Your Home [Home Improvement]

We recently offered some tips for hacking your home office, but if you’re looking for a way to map out and furniture your entire home, Project Dragonfly’s web application can help.
Dragonfly lets…

DTXTR Deciphers SMS Shorthand [Translation]

Ever get an SMS and have absolutely no idea what the acronym soup is supposed to impart? Web app DTXTR (read: de-texter) translates txt speak into human-friendly words.

The application is a novelty app made by the folks at LG to help us oldies understand “teen speak.” The translation tool actually operates in both directions, so you can enter your plain English and it’ll spit out teen speak if you need a little help with SMS brevity. Apart from the translater, you can also browse the DTXTR glossary and study up on some new textin’ terminology. This isn’t the first app of it’s kind that we’ve covered, but with SMS more popular than ever, it’s actually a useful tool.





Getting Started With Canning, aka Home Food Preservation [Saving Money]

Canning is one of those home kitchen skills that seemed to be lost in the last few generational shifts. That’s a shame, because it’s an economical, menu-boosting skill, and pretty easy to pick up.

Photo by thebittenword.com.

In a supplement to a New York Times piece on the glories of canning—a phrase that includes putting food in jars, making preserves, pickling, and other preservation methods—you'll find a whole bunch of resources for indulging your inner Italian grandmother. The Times supplement itself provides an overview of what to know before getting started, but a step-by-step slideshow and a sidebar video on “Checking the seal” provide visual help. If that’s not enough, there are links (included below) to U.S. Department of Agriculture guides, free online courses in canning (seriously), and instructional videos from Jarden, the maker of the gold standard Ball/Kerry jars.

So, wait, why would you want to get down with canning, exactly? Besides the glory of making your own homebrew pickles, you can get ahead on better-than-Prego tomato sauces, salsas, and other pantry staples. You also waste less food by turning that whole bushel of apricots your friends brought over into delicious cereal toppings for this winter, when your fruit options are going to be far more limited.

Hit the links below for some preservation primers, and drop your own canning/preserving tips and tales in the comments.





Google Reader Gadget Brings Feeds to the Desktop [Downloads]

Windows/Linux: Google Desktop users can keep an eye on important feeds with the Google Reader Gadget, a clever but not quite perfect desktop implementation of Google’s RSS reader.

We say “clever” because when you’ve got a subscription or folder selected in the gadget, new posts will pop in automatically, letting you presumably watch any collection of feeds in semi-real time. And we say “not quite perfect” because, as with other Google Desktop gadgets, Google Reader’s box can’t load full HTML feeds, so posts with substantial text, pictures, or videos need to be clicked open in a browser for viewing. And some of the major shortcuts that power Reader users love, like Shift+A for marking all as read, aren’t present here either.

Still, if you're a feed fiend or just want to keep the news in sight or just behind a gadget wall, you'll probably dig this gadget. If you can get it to load and install, that is—myself and a few of the gadget's commenters saw a perpetual "Loading" notice on the gadget, without getting through to the actual feeds (hence the Google-official screenshot), while others had seemingly no trouble at all. The Reader gadget is a free download, requires Google Desktop for Windows or Google Gadgets for Linux.





Pivots to the Rescue – Providing Flexible SQL Server Queries

image One of the projects my company is currently working on has a requirement to be able to store timesheet data in a more flexible manner.  The existing Access forms application is being converted to Silverlight 3 and has a fairly rigid (albeit standard) database structure for timesheets.  Hours and quantities are associated directly with days using columns such as MonHours, MonQuant, etc.  (see the table image to the right).  The catch is that the company needs to be able to store several other pieces of data in the future.  Of course, if they need a new column that tracks overtime, they’d have to modify the database table and add in 7 new columns if the existing table structure is used which definitely isn’t optimal.

After thinking through a few options we decided to go with a more complex yet flexible solution.  It’s only useful (in my opinion anyway) when the data that will be collected can change in the future.  I’m not a big fan of architecting for “what if” type scenarios since in my experience most of those scenarios are never realized, but in this situation it was a requirement to be able to handle different types of timesheet data without having to re-work the table structure and add new columns.  We ended up going with the following table structure to store timesheet values:

image

Here’s a quick overview of what the different tables store:

  • TimeSheet – Associates a job, employee and week ending date together
  • TimeSheet_WorkCode – Associates work codes with a timesheet
  • TimeSheetDayValue – This is where the values are actually stored.  It can store hours, overtime, quantity or anything else really.  The DayValue column stores the actual value and the type of value being stored (hours, quantity, etc.)  is tracked by the TimeSheetDayValueTypeID which links to the TimeSheetDayValueType table.
  • TimeSheetDayValueType – This table tracks the type of data being stored in TimeSheetDayValue (currently just hours and quantity of materials installed).  The type of data is tracked in the ValueType column which is a simple varchar data type.
  • Day – This is a simple lookup table that contains all of the day names (Monday, Tuesday, Wednesday, etc.)

While the table structure provides a flexible way to store different types of timesheet data, it doesn’t store the data in a format that’s compatible with timesheets.  Normally, an employee will select a work code and then enter data for the hours worked on each day.  With the initial table structure that we inherited from the original database (image to the right) that was easy since the existing columns match up perfectly with grid header columns.  With the new table structure we gain flexibility but add complexity since we have to reshape the data to fit into a timesheet grid.

Fortunately, SQL Server 2005 or higher supports pivots which allow data to be “pivoted”.  In other words, row data can be turned into columns.  If I run the following query against the tables shown earlier I’ll get back rows but they won’t match up with Monday, Tuesday, Wednesday timesheet header columns as you can see next:

SELECT TS.TimeSheetID, TS.WeekEnding, TS.EmployeeID, TS.JobID, TSWC.WorkCodeID,
TSDV.DayValue, D.Day + TSDVT.ValueType as RotateColumn
FROM TimeSheet TS
INNER JOIN Timesheet_WorkCode TSWC on TS.TimeSheetID = TSWC.TimeSheetID
INNER JOIN TimeSheetDayValue TSDV on TSWC.TimeSheetWorkCodeID = TSDV.TimeSheetWorkCodeID
INNER JOIN TimeSheetDayValueType TSDVT on TSDV.TimeSheetDayValueTypeID = TSDVT.TimeSheetDayValueTypeID
INNER JOIN Day D on TSDV.DayID = D.DayID
WHERE TS.JobID = 1 AND EmployeeID = 1 AND WeekEnding = '5/10/2009'

image

However, by using a pivot I can make it so that the values shown above for RotateColumn are “pivoted” to be columns in the resultset so that everything fits into a single row on a timesheet grid.  There are a few tricks that have to be leveraged to make it all work such as leveraging some of the SQL Server 2005+ XML functionality but we felt it was a good tradeoff to get the data storage flexibility required by the client.  Here’s the pivot query we’re currently using and the resultset that it returns.  We’ll likely change things as the application is optimized more, but you’ll get the idea.  The query is in a stored procedure which accepts jobID, employeeID and week ending date and returns timesheet data for different work codes.

DECLARE @Cols varchar(500)
SELECT @Cols = STUFF((SELECT ',' + QUOTENAME(D.Day + TSDVT.ValueType) AS [text()]
FROM Day D
CROSS JOIN TimeSheetDayValueType TSDVT
FOR XML PATH('')), 1, 1, '')

DECLARE @Query nvarchar(MAX)
SELECT @Query = '
SELECT * FROM
(
    SELECT TS.TimeSheetID, TS.WeekEnding, TS.EmployeeID, TS.JobID, TSWC.WorkCodeID,
    TSDV.DayValue, D.Day + TSDVT.ValueType as RotateColumn
    FROM TimeSheet TS
    INNER JOIN Timesheet_WorkCode TSWC on TS.TimeSheetID = TSWC.TimeSheetID
    INNER JOIN TimeSheetDayValue TSDV on TSWC.TimeSheetWorkCodeID = TSDV.TimeSheetWorkCodeID
    INNER JOIN TimeSheetDayValueType TSDVT on TSDV.TimeSheetDayValueTypeID = TSDVT.TimeSheetDayValueTypeID
    INNER JOIN Day D on TSDV.DayID = D.DayID
    WHERE TS.JobID = ' + CONVERT(NVARCHAR,@JobID) +
    ' AND EmployeeID = ' + CONVERT(NVARCHAR,@EmployeeID) + ' AND WeekEnding = ''' + @WeekEnding + '''
) AS SourceTable
PIVOT (SUM(DayValue) FOR RotateColumn IN (' + @Cols + ')) AS TimeSheetRow'
-- FOR XML AUTO, ELEMENTS XSINIL
EXEC sp_executesql @Query

 

image


You can see that the RotateColumn values shown earlier have been changed to be columns using SQL Server’s pivot functionality which is exactly what we needed for the Silverlight 3 application that displays the data.  We had to resort to some dynamic SQL to make it work, but the end result is that we’re able to shape the data as needed yet still retain the flexibility provided by the table structure.  As new types of timesheet values are required the table structure and query can be left intact.  Pivots to the rescue…pretty nice when you need them.

Cupcake Adds Camcorder, Touchscreen Keyboard, and More to Android

Cupcake keyboard tutorial My personal patron of all-things-Android Viss had the latest firmware update codenamed Cupcake on his G1’s memory card when we met up last night, so now I’m rocking it 1.5-style on my phone. After only a day of usage I’m pleased to say Cupcake’s a sweet update to the mobile OS that really fills in some holes.

The two marquee Cupcake features are the touchscreen keyboard and video camera, but I’m most excited about the Gmail client upgrades that catch it up to the recent mobile webapp update. A subtle overhaul of Android’s entire look and feel, performance increases, and quite a few other niceties put the icing on Cupcake. (Sorry, couldn’t resist.)

Screenshots ahead cover Cupcakes updates to the Gmail client, text messaging capabilities, and browser.

Cupcake touchscreen keyboard First things first: the “soft” touchscreen keyboard won’t be a big deal to G1 owners who are used to the flip-out full keyboard, but it does come in handy when you want to text message quickly in portrait mode. Just tap a text area to enable the keyboard, which suggests words as you type. You can enable a satisfying old-school typing sound as you tap, and like the iPhone, tapping and holding keys like e and a offer other options (like the letters with various accents).

Cupcake video camera The second biggie is the ability to take video with the phone’s camera. Just hit the menu button to switch to video mode. Another nice camera update is the on-screen shutter button, and image thumbnails on screen while you shoot. You can upload video you take with Android directly to YouTube, too. The Cupcake changelog says that the camera also got performance upgrades but it’s still pretty sluggish for me (especially rendering photo gallery thumbnails.)

My favorite part of Android, the native Gmail client, also got an update that catches it up to the recent mobile webapp makeover.

Cupcake Gmail batch actions Most usefully, you can now check off multiple messages in list view and perform batch actions, like label, archive, or delete them. There’s the mobile webapp “floaty bar” which stays docked at the bottom of the screen as you scroll. Nice.

Cupcake Gmail Mute conversation Another Gmail-specific feature now available in the native client which I was happy to see because I use it all the time: the ability to mute a conversation.

The labeling interface also updated from less intuitive + and – signs to regular old checkboxes. The Cupcake version is on the left; compare to the 1.1 firmware label UI on the right.

Cupcake Gmail labels compared

Cupcake emoticons SMS (and MMS) got a subtle redesign, faster scrolling, the ability to detach files from MMS messages, and adorable robotic emoticons shown here.

Cupcake browser Most Visited and History list Android’s web browser also got quite a bit of TLC in Cupcake. It got a faster JavaScript engine, and few useful interface additions, like a “Most Visited” and History options in the Bookmarks area.

Cupcake browser Find on Page and Select text The browser also got a Find on page option and the ability to select and copy text from a web page. The bad news: You’ve got to hold down the Shift key while using the trackball to select text on page and click the trackball again to copy it to clipboard, which is a pretty clumsy interface.

The Settings area of Android also got a few more options, menu items, and filters.

Cupcake list of running processes Finally, you can now see a list of running processes on your Android device. It’s kind of buried–and you still can’t force close a running process, but–to get there, go into Settings, Manage Applications, and from the menu filter by “Running.”

Update: Reader Aaron points out that you can indeed quit a running process by clicking on it, scrolling down, and hitting the “Force stop” button. Thanks Aaron!

Cupcake orientation and animation My fellow Android user Kevin points out that there are two new interesting settings under “Sound & display” which are disabled by default. Orientation switches the phone from portrait to landscape depending on how you’re holding it (not just if the keyboard is flipped out). Animation makes windows slide across the screen when you switch between them.

I’m still a happy Android user after switching from the iPhone to it a few months back. Cupcake is a solid update to the mobile OS, and should get pushed out to all phones in the coming weeks. Here’s the official (and strangely incomplete) Cupcake changelog.

MovieStinger Reveals Which Movies Have Scenes After the Credits [Movies]

“Oh man! Did you see that extra scene after the credits? It was great!” Ever heard those words in the lobby after you’d walked out before the credits finished rolling? MovieStinger helps avoid that sort of disappointment by maintaining a list of which movies contain additional footage after the credits.

When we featured Runpee, a website that suggests the best time to make a dash to the bathroom during a movie without worrying about missing a good scene, commenter razordu30 had this complaint:

I always thought it would be good to have a site that tells you whether you should stay after the credits. I’ve waited unnecessarily for many movies, and didn’t wait for others. =/

Visit MovieStinger for a solution to this guessing game to find out which movies have a "stinger"—an extra scene or additional footage—after the credits. You can decide whether it's worth to stick around based on information about what happens in those post-credits moments as well as ratings and comments by other users. Thanks, Andy.





Separate Your Data from Windows on a Standalone Partition [How To]

With Windows 7‘s release just around the corner, now’s a great time to get your PC ready for the new operating system. First step: separate your data onto a dedicated partition.

The Newbie’s Primer: What’s a Partition?

A partition is what looks like a separate disk in your computer, with its very own letter—like a D: or E: drive alongside your C: drive. In reality a partition can either be a subset of an existing hard drive (virtual) or an actual separate physical drive.

A virtual partition is a slice of an existing drive. That means if you’ve got one physical hard drive, you can partition it into a C: drive and a D: drive. In Windows Explorer, those will look and act just like separate disks, even though it’s actually one hard drive.

A physical partition is a whole other hard drive that gets its own letter when you add it to your computer.

The Benefits of a Standalone Data Partition

By default, Windows stores your data in a user-specific directory–C:Documents and SettingsginaMy Documents in XP, C:UsersginaDocuments in Vista, etc. However, for the power user, there are benefits to dedicating a single drive letter to your precious data.

Fresh operating system installations are easier. Whether you’re doing a fresh installation of Windows 7 or formating your hard drive to reinstall Windows XP from scratch, a separate data partition comes in handy. With your data stored on partition other than C:, nuking your Windows drive is much easier because you don't have to delete and copy back your files. You never have to touch your data partition—it's there and ready to use when Windows is.

Accessing data from multi-booting operating systems is easier. If you’re both curious but apprehensive about upgrading to Windows 7, you can have your operating system cake and eat it too by dual (or triple) booting your system. If you do decide to dual boot Windows 7 alongside your existing Vista or XP system, a standalone data drive will serve you well: both OSes can access your files in their dedicated location, without one having to navigate through the other’s default folder hierarchy.

Separate hard drives reduce the risk of total failure. If your data partition is a separate physical drive, you’ve got redundancy that reduces the risk of total PC failure. If your C: drive fails, you can pull your data drive out, stick it in an drive enclosure or install it in another PC, and go. If your data partition fails, you’ve still got a working PC: you can just restore a data backup without having to reinstall Windows. With a separate partition for your data, it’s just easier to image, back up, or transfer your important files, photos, videos, and tunes.

You might get better performance. While I haven’t tested this or seen official confirmation from Microsoft on it, at least a couple of savvy Lifehacker readers say that a separate physical partition can boost your PC’s performance, because Windows has another place to store virtual memory and paging information.

The Pitfalls and Gotchas of a Standalone Data Partition

While neat freaks will love the clean separation of their data and operating system with a standalone partition, there are a few things to keep in mind.

You’ve got to switch where all your applications save their documents. It’s not difficult to tell Windows you’ve relocated your “My Documents” folder, but with a separate data partition you do have to do just that. (In all versions of Windows, it’s a matter of right-clicking on your My Documents icon and setting the path in the Properties dialog). Even if you do that, some older software might not get the memo. Reader pdok said:

I’ll confess a little separation anxiety here. I used to do this partition scheme, but finally gave in to the standard “My Documents” hierarchy because there are so many stupid programs that don’t check where the user file store is. I was constantly redirecting default file saves to my separate partition, and eventually I just gave it up since it ended up not saving me time. Yes, I know you can define different locations for My Docs, but I found even Microsoft programs that were too unsophisticated to handle a non C-Drive default location.

For example, here’s how to tell Dropbox to use a different syncing folder.

You’ve got to manually export some types of user data that programs keep within their Application Data folder, like browser bookmarks, Outlook’s PST file, Firefox’s profiles, and address book contacts. There are two types of user data on your system: the files you explicitly create and save, and the data you implicitly create and save, like software profiles and contact lists. Your separate data partition won’t have the implicit stuff unless you manually export ‘em or do things like back up your Firefox profile.

Size matters. (And so do good backups.) When you create your data partition, make sure you give both your operating system and your documents folder as much room as they need. While you can resize partitions after you’ve created them, it’s not as easy on older versions of Windows and can nuke your whole drive if something goes wrong. So size does matter: make the right decision up front. Along those same lines, a separate partition for your data doesn’t mean you still don’t need to do thorough, regular, and preferably automated data backups.

You can’t store application installations on your data partition. Because installing a Windows application makes registry changes and plants various DLL’s around your system, I don’t recommend installing apps anywhere other than your C: drive with Windows. The best way to back up and separate your software is to keep the original installation disks. A separate data partition doesn’t include program installation files. In fact, reader Brian Sexton reminds us:

Software activation for applications such as Flash, Fireworks, and Dreamweaver and media authorization for such things as iTunes purchases are tied up with the system and its registry or at least hidden files, not just the obvious applications and data, so even if most of your data is safely stored on a separate drive or at least completely backed up to another drive or removable media, you still might have to deal with reactivation and reauthorization hassles even if you are using the same exact system after the crash, just with a new hard drive.

How to Set Up Your Data Partition

Still game? Here’s the quick rundown on how to get your dedicated data drive going.

Add another physical hard drive to your PC. For true separation of operating system and your data, you want to crack open your PC’s case and install a new hard drive. Once your new drive’s got its own letter and is formatted and ready for use, it’s a matter of moving your data over to it.

Partition the free space on your existing drive. If you want to split your existing hard drive into separate partitions for your OS(es) and data, you need a repartitioning tool. Windows Vista comes with one installed by default; here’s a step by step on how to repartition your drive in Vista. If you’re using Windows XP, you want to try a free tool like GParted. Adam walks you through how in step 1 of his article on how to dual boot Windows 7 with XP or Vista.

Once your data partition has a letter and data on it, tell Windows you relocated your My Documents folder and you’re good to go. (For the extra anal, here’s how you can further organize your data partition).

You a believer in a separate data partition? Any tips for living the multi-disk computer life? Post ‘em up in the comments.

Gina Trapani, Lifehacker’s founding editor, has been separating her data and operating system for years now. Her weekly feature, Smarterware, appears every Wednesday on Lifehacker. Subscribe to the Smarterware tag feed to get new installments in your newsreader.





Dusty Tunes Shows Off Your iTunes Collection or Playlists [Music]

Want to show your friends which tracks you can mixtape for them, or just show off your brilliant collection of pop hits and esoteric oldies? Dusty Tunes converts iTunes libraries and XML files into web-based lists.

After signing up and registering your account, the site directs you on how to upload your iTunes library XML file to the site for a full reading. If that’s not something you’re keen on doing, you can export individual playlists instead, as explained in the FAQ. Once it’s uploaded and shared ,your library appears as an alphabetized, nested list, and those clicking through can get audio previews of the tracks (presumably through a third-party store) and direct iTunes purchase links.

The site also provides easy embedding and sharing codes for forums, social networks, blogs, and other sites. If that’s how wide open you want to make your listening, fair enough, but most will probably just want to share their libraries with a few friends. It’s a shame, then, that password protection isn’t an inherent option, but Dusty Tunes otherwise does what it claims.





ShowRSS Automates Your TV Show Downloads [BitTorrent]

If you’re missing the now defunct FeedMyTorrents and its awesome duplicate-free RSS based automation, showRSS offers the same functionality and integration with RSS-enabled BitTorrent clients.

Founded by a refugee from FeedMyTorrents, showRSS has shielded itself from the same fate by setting up camp in Spain where torrents have been ruled legal. The site collects torrents from a variety of sources and weeds out the duplicates. You pick from shows you want to keep an eye on and showRSS adds them to your personal RSS feed. From there you can load the feed into a feed reader and manually select links to shows as they appear or you can plug it into a BitTorrent client with RSS support like µTorrent to automate the process.





WP Like Button Plugin by Free WordPress Templates