Monthly Archives: July 2008

The Lifehacker Editors’ Favorite Software and Hardware [What We Use]


Lifehacker readers range from the complete newbie to the most seasoned techie, but where do the Lifehacker editors stand? We polled our own editors for the computer hardware and applications they swear by and we’re breaking it down for you here. This post is categorized into the software each editor uses on a daily basis, the operating systems we live in, the hardware we rely on, the peripherals we utilize on a regular basis, and webapps we need. Then we tell you exactly what kind of user we think we are.

Gina Trapani, Editor:

The Basics

  • Firefox: I spend the majority of my day in my favorite browser, where I manage email, write Lifehacker posts, read RSS, and surf. My must-have Firefox extensions include: Foxmarks (so my bookmarks are everywhere), DownThemAll! (for downloading big files), CoLT (for grabbing links to drop into Lifehacker posts), all of the Better Extensions which I put together, Firebug and Chris Pederick’s Web Developer toolbar (for development), and Greasemonkey and Stylish for customizing pages. (Here are my current user style picks.)
  • Quicksilver: On any Mac, I’ll Cmd+Spacebar out of habit, because I’ve come to rely on QS so much for launching apps, moving files, resizing images to Lifehacker’s standard sizes, and accessing frequently-used documents on the Shelf.
  • TextExpander (Mac) and Texter (Windows): Not only does TE and Texter help me write Lifehacker posts by auto-expanding HTML snippets, it auto-corrects typos and helps me stay on track with our style guide (by automatically replacing things like “wifi” with “Wi-Fi”, for example).
  • TextWrangler (Mac) and EditPlus (Windows): Everyone needs a good text editor, and these two are my picks. (TextWrangler is free, but EditPlus is not).
  • KeePass: The day I sat down and created my KeePass password database—and decided every time I'd set up a new password I'd store it there—was a good day indeed. While I do use Firefox to save web-based logins, KeePass is an awesome secure parking place for Wi-Fi, network, computer, and file passwords as well as software serial numbers. Since it's Mac and Windows compatible, if I save a password on the PC's copy of Firefox, I'll also enter it into KeePass so I can still look it up on the Mac.
  • Adobe ImageReady: A throwback to my web dev years, I still reach for an old copy of IR whenever I have to do any image editing beyond simple cropping and resizing. Been meaning to get good at a free option for awhile now—and I'll have to, since Adobe discontinued ImageReady releases.
  • Adium (Mac) and Pidgin (Windows): I’m not a huge IM user, but when I need to hop on for a quick chat these are my two clients of choice.
  • Cygwin: I’m not running a Linux desktop full-time, but I do need my ls and scp. While Terminal.app offers these Unix command line tools built into OS X, Cygwin can give it to you on Windows.
  • InstantShot (Mac), Skitch (Mac), and SnagIt (Windows): Since I take screenshots all day long, these three apps are indispensable. For a simple snap and resize, I use InstantShot and Preview; to annotate screenshots SnagIt and Skitch get the job done.
  • Mozy (Mac and Windows), Time Machine (Mac), and SyncBackSE (Windows): Since I work at home with no IT department backing up a network drive, backing up my important data’s up to me. I bought an unlimited Mozy subscription for off-site backup in case of fire, flood, theft, or tsunami, and use Time Machine and SyncBack to run regular local backups to a FireWire drive.
  • GeekTool (Mac) and Samurize (Windows): I like having my todo.txt, a calendar, and a set of daily reminders in front of my face every day. So while I keep my desktop clear of shortcuts and documents, GeekTool and Samurize pins my top tasks, a two month calendar, and remind reminders to keep me on track during the day. Here’s more on setting up GeekTool on the Mac, and incorporating text files on your desktop with Samurize.

Primary OS

It’s changed over the years and will continue to shift, but right now I split my time about 80%/20% Mac OS X and Windows XP. I plan to increase my Windows time (and get Vista into the mix) to better serve Lifehacker readers, who are primarily Windows (about 70% at the moment, though this chart changes by the minute). Setting up a Hardy desktop is also looking more and more tempting.

Hardware

I used to use four different computers on a regular basis, but keeping them all maintained, synced, backed up, and up to date with operating system patches became too much. So last year I decided to simplify and pare down the machine I use for work purposes to one laptop (so I could take it with me when I travel), and chose:

  • A 15-inch MacBook Pro to which I added a stick of memory, using Adam’s guide. I run both Windows XP and Leopard on this machine with VMware. (I used to Boot Camp and virtualize that partition in Parallels—but when I needed more internal hard drive space, I killed the Boot Camp partition and now just virtualize XP.) I've also got…
  • An ancient Dell Dimension tower which I launched Lifehacker on mostly goes unused now. For awhile I used it as a file server, but to reduce energy consumption, I decided keeping an always-on file server was overkill for the two people who live in my household.
  • A G4 PowerBook, which was replaced by my MacBook Pro last year, lives in the living room. For a beat-up secondary computer, the PowerBook still does triple duty as a media center file server for my XBMC, a recipe reference in the kitchen while we cook, and my other half’s main computer.
  • A classic Xbox running XBMC is my primary media center for watching downloaded video, and my TiVo records TV episodes online.

Peripherals

Besides a stack of external hard drives, a Netgear router, an ink jet printer, and a widescreen Dell monitor I hook the MacBook up to when I’m at my desk, I’ve got:

  • A Fujitsu ScanSnap mobile scanner for Mac, which is perfect for scanning receipts, contracts, and newspaper articles. I reviewed the Windows version here and loved it so much, that when I sent the review unit back to Fujitsu I bought the Mac version as soon as it was available..
  • An iPhone, which I had misgivings about purchasing when I lost my Nokia. The iPhone 2.0 software isn’t without problems that are dogging me as well as a couple of others, but for the most part, it’s a very pleasant gadget to use.

Webapps

Even though I still like keeping important files saved to my local hard drive, I’ve moved most of my daily work into a Firefox tab (which makes it easy to access from the iPhone as well). I use dozens of webapps, but the primary ones are:

  • Gmail: A year or so ago I abandoned Thunderbird to use Gmail’s web interface exclusively, mostly for its conversation thread view (which T-bird doesn’t quite handle as well) and its keyboard shortcuts, and because I’m constantly working on the Better Gmail extension.
  • Google Reader: Once I switched from Bloglines to Google Reader, I've never looked back—even though Adam did almost convince me to move to NetNewsWire, I'm too happy with my Reader workflow to change things up. I'll often read feeds while I'm on line at the grocery store or in the doctor's waiting room, and star items that may turn into Lifehacker posts later.
  • Google Calendar: The Lifehacker staff uses a shared GCal calendar to schedule vacations, conferences, and software launches, and I use it for my personal calendar as well.
  • Campfire: In lieu of instant messenger, at Adam’s suggestion, the Lifehacker staff started hanging out in a Campfire room throughout the day while we write, which helps us coordinate and ask quick questions and make decisions so much faster than over email.
  • Twitter: I don’t have the time to fool around on Facebook or Flickr as much as I used to, but contributing to and scanning Twitter is a fast, efficient way hear what my pals are up to and blog with very little effort. Twitter’s helped me keep in touch with my NYC friends, find story ideas faster than they break in my RSS reader, recruit guest writers, keep tabs on people I admire and look up to, and poll people I trust quickly.

I also love MediaWiki and del.icio.us. Here’s more on the apps that run Lifehacker’s virtual office.

Self Assessment

I'm a late early adopter. I love to try out new apps, but after reviewing thousands over the years here at Lifehacker, I think long and hard before I actually work one into my daily workflow. I'm a big open source advocate—to the point of a tendency toward that "tinfoil hat" free software extremist mindset—but I will (and do) compromise for beautiful and easy-to-use software, too. It's great that you can do so much in the cloud these days, but I like to store and manipulate my own data and avoid webapp lock-in as well—so, for example, I back up my Gmail account via POP. I love tinkering with software, but I’m not as much of a hardware DIYer as my co-editors, many of whom have built their own computers.

Adam Pash, Senior Editor:
The Basics

Primary OS
I’ve been primarily operating in OS X since I built my Hackintosh, but I’m always running VMware Fusion (another must have) with Windows and (sometimes) Ubuntu.

Hardware
I’m using the Hackintosh as my main desktop, an aging MacBook Pro with OS X and Vista in Boot Camp, and an older Windows box that’s a dedicated Media Center back-end. Then there’s the Xbox 360, of course, which gets about as much tinkering time as the Media Center.

Both of my desktop computers (the Hackintosh and the Vista Media Center) were built from the ground up.

There’s also my iPhone, which I use almost as much as my laptop these days.

Peripherals
After a weekend of watching a friend regularly reboot his router while I was visiting recently, I should give credit to my router, which is intermittently either running Tomato or DD-WRT. They’re rock solid.

I’ve got a Logitech MX Revolution wireless mouse and one of the new slim Apple keyboards, both of which are very nice to work with daily. I’ve also got a cheap-ish Canon MP180 printer/scanner combo with a recently broken printer tray.

Webapps

  • Love Gmail. I’ve been making a small move to desktop apps lately, but until Google makes a desktop version of Gmail (not likely) or someone rips off the main tenets of the Gmail interface, I’m not leaving it any time soon.
  • I’m also a big fan of Mediawiki as a software, and—naturally—Wikipedia. I may have well been answering this question in 2004.

Self Assessment
I’m a big fan of anything I can build for cheaper than I can buy it. Hardware DIY gets easier and easier every year, and I’ve managed to do just fine for myself without ever picking up a soldering gun or anything of the sort. It’s all much easier than most people think.

Kevin Purdy, Associate Editor:
The Basics

  • Firefox: With the following extensions: Foxmarks (syncing between systems and Firefox portable, Password Exporter (same reason), CustomizeGoogle (newly installed, mostly for the Google Link annoyance described at #8, and the dev build (i.e. Firefox 3-compatible) of Tab Mix Plus.
  • Launchy and Texter: Both suggestions from Adam, both indispensable to my Windows work. When I’m in Linux, though …
  • GNOME Do and Snippits: The Linux semi-equivalents.
  • Pidgin: I used to use the last version of vanilla AIM that worked with the (then-free) DeadAIM plugin, until I became a Linux geek and friends started hitting me up on GChat.
  • GIMP: Because I truly do suck at Photoshop, so I’m learning day-by-day with its free counterpart.
  • Prism: For running Campfire, Google Calendar, and a few other apps in distraction-free shells on the desktop.
  • Revo Uninstaller: For cleanly and completely uninstalling most of the software I test out on the job.

Primary OS
I honestly split my time between Windows Vista and Ubuntu Hardy Heron (8.04). Up until recently, I’d been almost exclusively running Hardy (which I’ve openly professed my fondness of) with a wirelessly synced iPod touch, but I can't get my dual monitor setup working in Hardy, and iPhone 2.0 put a nix on the second—for now.

Hardware

  • A five-year-old desktop I built myself, now doing light testing duty with XP installed
  • A Lenovo ThinkPad T61P (dual-booting Ubuntu and Vista)
  • My parents’ old desktop, turned into a multi-function home server (converted with help from Gina’s guides and this starting point.
  • My wife’s Compaq Presario laptop, which suffers its fair share of guinea pigging.

Peripherals

  • Linksys WRT54G (ver. 6) router: Big mistake, considering I have to wince every time Adam finds a new Super Router firmware (like Tomato or DD-WRT), and I have to sit it out with my locked-down blue box.
  • HP Deskjet 825c: Hooked up to the home server for remote printing (from every system except Vista, of course).
  • iPods: I’ve got an old 4 GB mini, the wife has a 4 GB nano, and I’m constantly tweaking my 8 GB touch.
  • LG LCD monitor: Originally for the old desktop, now a dual screen for the ThinkPad.

Webapps
I use quite a number of them, but the main ones are:

  • Google Docs: I might switch over to the more feature-rich Zoho Suite one day, because the feature I love most about GDocs is simply that it saves every few seconds. The accessibility and offline abilities don’t hurt, either, though.
  • Reader: Both during morning posts and casual browsing through the iPhone-friendly beta.
  • Gmail: Big surprise, I’m sure, but I mostly use it through Thunderbird via IMAP for both work and home mail.
  • Remember the Milk: On my AWN dock in Linux, on my iPod touch, my iGoogle start page, through my phone and email—a truly universal but simple to-do list.

Self Assessment
I'm obviously a big fan of open source and free software, as you can probably tell from the lists above. I chose and customized my laptop in large part for its Linux-friendliness, and I'll always favor software and webapps that can be accessed from any computer. In general, though, I can never leave well enough alone—a good trait in writing for this site, I'd think—and while I'm pretty satisfied with my current array of tools, I'm thinking a few lower-tech, real-world productivity tools—index cards, anyone?—could probably find a useful home somewhere in my system.

Jason Fitzpatrick, Contributing Editor:
The [Free] Basics

  • Launchy: Although I’m a relatively new user of Launchy, I’m finding rapidly that I use it enough that I’m frustrated when I’m on a computer that doesn’t have it.
  • Digsby: With lots of people on lots of different messaging platforms, Digsby makes my life easier.
  • Picasa2: When dealing exclusively with client files I’ll use a program like Adobe Lightroom, but for ease of use and for a program that is easy to use for my non-techie wife, Picasa2 is a fantastic fit.
  • TeraCopy: I hated the built-in file handler in Windows. When you’re moving 80 gigs from one drive to another you don’t want to come back after your lunch break and see there was an error at the end of the transfer and the whole thing aborted. TeraCopy takes that pain away!
  • xplorer2 lite: I also hated the default file explorer in Windows. When you’re editing large amounts of media and organizing it, having an explorer alternative on steroids is the only way to go.
  • UltraVNC: Over the years there have been all sorts of fancy new ways to remotely connect to your home PC, but I’ve never found anything I like more than a basic VNC connection.

The [Paid] Basics

  • Photoshop: I’ve been using Photoshop for almost 15 years now and short of writing my own programs and playing with them, haven’t had more fun with another piece of software.
  • UltraMon: If you have dual monitors, it’s invaluable.

Primary OS
My primary OS is Windows XP. I’m usually in some state of tinkering
with OS X (working on a Hackintosh just for kicks), and Linux. I find as time goes on that with Linux I’m less tinkering with the limited free time I have to play with it and more enjoying it. Linux has really matured since I first installed it in 1994.

Hardware
I used to be an avid computer builder. As far as my primary machine for daily use goes, I usually just purchase a machine that’s on sale and throw a bunch of RAM and hard drives in it. I don’t game much anymore, so my rig doesn’t need to bleed speed. All of that said I have a ton of parts and I often strip down computers before people send them off to be recycled so I have more than enough motherboards, hard drives, etc. to build all the random projects I set my mind too. The level of parts in my workshop has reached a saturation point actually, and it is extremely likely that my next computer will be built from them with a few newer pieces thrown in.

Peripherals
I don’t really have any peripherals that I love… except my Logitech Trackman Wheel. I’ve been using a Logitech Trackman for over 10 years now and I love controlling the entire movement of the mouse with just my thumb. If Logitech announced they would no longer be producing the Trackman, I’d go out and buy a stockpile just to be safe. If we’re being a bit looser with definition of peripherals, I’m quite fond of my Windows Mobile phone, the HTC Apache, it’s a rather common WM phone but I like having a device I can custom and tweak to my hearts content. I frequently use the BuildOS program from PPCGeeks.com to rebuild my entire phone and try new things.

Webapps
The only web apps I use with any consistency are Gmail and Google Reader. I also use SmugMug to catalog and share media with family and clients and Mozy to back up data. For my Windows Mobile phone I use the service DashWire to conduct remote backups of contacts and other data.

Self Assessment
My computer usage reflects strongly on my general personality. I don’t use many social networking tools, I’m not the kind of person that Twitters the minute details of their life. I share my personal pictures on a password-protected site only for family, not on Flickr. When I’m working I use a pretty Spartan set of tools which helps me stay focused. Google Reader to distill my feeds, Firefox to help fling me about the web, a simple calendar, contact list, and to-do list in Outlook to sync with my Windows Mobile phone. And when I’m goofing around instead of getting work done I’m all over the map experimenting with new software, dubbing foreign films, playing in Photoshop, building a TiVo clone out of spare parts from my workshop bins, trying out new tweaks on my XBMC, etc. I love experimenting and playing with computers, I’ve just come to a point in my life where I have enough of a time crunch that I have to be careful to fence off the “Let’s see what we can solder to this!” part of my love for computers from my “Let’s get some work done and pay the bills!” part.

Tamar Weinberg, Contributing Editor:
The [Free] Basics

  • Notepad2: I’m not a developer so I don’t really need the extravagant features offered by LH favorite Notepad++. I do love the line-numbers and color-coding of Notepad2, and that’s all I’m looking for in a Notepad replacement.
  • Pidgin: I’m a fan of purple penguins and find Pidgin’s options easily configurable for my needs. I also use a very old version of AIM with DeadAIM because the GUI is oh-so-nice. By the way, Digsby is on my list of apps to try!
  • Irfanview: Because it’s so incredibly lightweight and small, Irfanview is a great app to use for image viewing and to resize or crop images quickly.
  • Firefox: Firefox 3.0.1 is a terrific browser, and unlike 3.0, this baby doesn’t crash at all on my computer.
  • VLC Media Player: I used to open files and never be able to locate the proper codecs. VLC eliminates that hassle. When I have downtime and want to watch a movie or TV show on my computer, VLC does a nifty job, and it’s also pretty lightweight too, which adds to the appeal.

The [Paid] Basics

  • FlashFXP: Unlimited lifetime upgrades and a purchase that was made several years ago made this an easy choice.

Primary OS
My primary operating system at this time is Windows XP Pro. Ah yes, a Mac OS would be nice, but I’ve been procrastinating on making the plunge! Windows XP does what I need. Additionally, I run a Fedora 9 box in the corner of my apartment and am always SSH’d into it to tinker around with the system.

Hardware
My main computer is a Dell XPS M1710 laptop, but I built the two desktops I use (they run Windows XP and Fedora 9). I test Lifehacker software on another old Dell laptop. I also have a MacBook Air that I haven’t yet used. I know Gina is going to kill me when she reads this.

Peripherals and Gadgets

  • Samsung ML-2010: Really the family printer of choice, and we like it because of the network printing capabilities. I’m a big fan of getting up to gather my printouts days after I print them out!
  • Flip video: I’m new to the video world, but the Flip has proven to be a small yet affordable camcorder that produces quality results.
  • Treo 755p: I’ve been using Palm OS for almost 10 years now and can’t really fathom moving over to a Windows Smartphone.
  • iPod touch: I once wished for an iPhone without the phone. Then, Apple announced the iPod touch. All it needs now is more storage space.
  • Lots of external hard drives: I’ve suffered way too many hard drive failures to risk losing data again, so I have more than a terabyte of data stored on external hard drives in the event that my main drives fail.

I don’t use other peripherals on a regular basis primarily because my desk is my lap and my office chair is a couch. There’s not much you can use here without things falling all over the place.

Webapps

  • Gmail: I really like Gmail, especially since it now supports IMAP. I have four tabs of Gmail for the three accounts I use (three of which are on Google Apps for Domains). Really, who doesn’t like Gmail?
  • Flickr: To put it simply, photo sharing rocks. I’m a big fan of social media and I love being able to tag photos, comment on them, add notes, and organize them into sets that others can easily see and navigate to. I also love how you can bookmark your favorite photos with the “call a fave” feature.
  • Twitter: I use Twitter on a pretty consistent basis mostly to foster and build professional relationships. I enjoy that it has an API with hundreds of available applications. I primarily use Twhirl with Twitter and I take heavy advantage of the SMS tools when I’m mobile.
  • WordPress is my blogging platform of choice, but I do use MovableType maybe even more regularly.
  • FriendFeed: FriendFeed is one of my favorite tools ever to keep abreast of the news that interests my colleague and peers, and the conversation is growing. The best part is that you can hide the noise and only focus in on the signal.
  • Carbonite: This non-intrusive backup solution for Windows and Mac is tough to beat for the price of $49.95/year for unlimited storage.

Self-assessment
Much of what I use revolves around my work behavior, since I'm tremendously focused on using the computer for all work and no play (if I play, I'll go with a console of some sort—my Wii and Xbox360 get some nice face time when I have a spare moment). I'm somewhat old school but I love to try new things provided that I don't have to install them on my computer (well, for the most part).

Now it’s your turn…
Readers, what are your preferred freeware, shareware, and commercial apps? What gadgets and peripherals tickle your fancy? Which webapps do you use consistently? Share your all-time favorite recommendations in the comments.


ASP.NET File Upload with *Real-Time* Progress Bar

I had a number of people email me asking how the ProgressBar Toolkit control I blogged about last month could be used to provide progress for file uploads. So I thought I would spend some time and see how this could be done. Thankfully, there are a ton of resources available on the internet that discuss this in pretty good detail. But I didn’t see any good examples of how to include the real-time count of the number of bytes that have been transferred. So I thought I would try to tackle that problem while building my example.

Update 7/27/2008: This post is bogus – I have over simplified the problem. My goal was to display the number of bytes that have been transferred to the web server, not the number that have been saved to disk. As atashbahar pointed out, this will require a little bit more work that what I have shown. I followed atashbahar’s suggestion and downloaded the NeatUpload control (its free) and started taking a look at its HttpModule. I am going to take a look at how the NeatUpload handles uploading large files and will update this post or create a part II that outlines what I have found.

Also, a couple of quick notes on the demo. The first is that the demo looks like crap in FF, sorry but I gave up styling the input element. I will come back to it later. Second, I have a limited amount of bandwidth that I can use each month, so I don’t accept files larger than 250 bytes. I recommend creating a real small text file and using that to upload to the demo site. I have setup the demo to upload only a handful of bytes per second, so you will be able to get a feel for how the progress bar works even with real small files.

Live Demo | Download

image

image

image

Basic Approach

A few minutes of googleing and you will learn that creating the file upload widget above includes the following pieces …

  • A input element for collecting the file. I am using the ASP.NET FileUpload control to render this.
  • 2 ASP.NET pages. One contains the FileUpload control and has codebehind logic that reads the file from the response and writes it some place. And a second page that contains an IFRAME with the src attribute that points to the upload page.
  • A UI widget for displaying the upload’s progress. I have used the progress bar control I have blogged about previously

The general idea is that when the Upload button is clicked, a bit of JavaScript runs that causes the form that contains the FileUpload control to submit. Because just the nested form is submitting the main content page remains unchanged (i.e. it isn’t refreshed).

Here is the markup for the Default page

File Upload

And here is the Upload page

Posting the File – Building the Upload.aspx Page

This is the complicated part of this implementation. When the Upload.aspx page is submitted, I want to take the uploaded file off of the response and save it to disk. But, because I want to display the real-time progress, I need a way to get at how much of the uploaded file has been transferred. In my first crack at solving this, I tried just calling SaveAs on the HttpPostedFile object and then using a regular WebMethod that would return the size of the file on disk. Something like this …

protected void SaveUploadedFile(string filePath)
{
	//  save the file
	this.fileUpload.PostedFile.SaveAs(filePath);
}
public int GetFileSize(string filePath)
{
	//  get the file size on disk
	return new FileInfo(filePath).Length;
}

But, that wasn’t working too well because the file was being buffered as it was being written to disk so my progress bar would jump from 0 to 67 to 100. Which wasn’t what I wanted. So to get around this, I decided that I would try handling saving the file myself. To do this I manually read X bytes off the response stream and write it to a FileStream (where X is the size of the buffer). For the demo I have set X to 1, so each byte is read/written individually, but for non-demo purposes I believe I will be updating the size of the buffer based on the size of the file being uploaded. The smaller the buffer size, the longer the file takes to upload, but the more accurate our progress bar is. And of course, a large buffer will upload faster, but our progress bar won’t be as accurate.

//  DEMOWARE: set the buffer size to something larger.
//  the smaller the buffer the longer it will take to
//  download, but the more precise your progress bar will be.
//  to large of a value and the progress bar will make real large jumps
int bufferSize = 1;
byte[] buffer = new byte[bufferSize];

//  get the status object from session
UploadInfo uploadInfo = this.Session["UploadInfo"] as UploadInfo;

//  write the byte to disk
using (FileStream fs = new FileStream(Path.Combine(path, fileName), FileMode.Create))
{
    //  aslong was we haven't written everything ...
    while (uploadInfo.UploadedLength < uploadInfo.ContentLength)
    {
        //  fill the buffer from the input stream
        int bytes = this.fileUpload.PostedFile.InputStream.Read(buffer, 0, bufferSize);
        //  write the bytes to the file stream
        fs.Write(buffer, 0, bytes);
        //  update the number the webservice is polling on
        uploadInfo.UploadedLength += bytes;
    }
}

Checking the Progress

Back on the main page (Default.aspx), I have setup a Page Method that retrieves the number of bytes that have been written to the FileStream as well as a friendly status message that reports the total number of bytes that have been transferred so far.

[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public static object GetUploadStatus()
{
    //  get the length of the file on disk and divide that
    //  by the length of the stream ...
    UploadInfo info = HttpContext.Current.Session["UploadInfo"] as UploadInfo;

    if (info != null && info.IsReady)
    {
        int soFar = info.UploadedLength;
        int total = info.ContentLength;

        int percentComplete = (int)Math.Ceiling((double)soFar / (double)total * 100);
        string message = string.Format("Uploading {0} ... {1} of {2} Bytes", info.FileName, soFar, total);

        //  return the percentage
        return new { percentComplete = percentComplete, message = message };
    }

    //  not ready yet ...
    return null;
}

And back on the client, I have setup a bit of JavaScript that calls the GetUploadStatus PageMethod every second or so. When the status changes, the script updates the progress bar to the new value and updates the status text.

//  start polling to check on the progress ...
var intervalID = window.setInterval(function(){
    //  call the GetUploadStatus Page Method
    PageMethods.GetUploadStatus(function(result){
        if(result){
            //  update the progressbar to the new value
            progressBar.set_percentage(result.percentComplete);
            //  upadte the message
            updateMessage('info', result.message);

            if(result == 100){
                //  clear the interval so we stop polling
                window.clearInterval(intervalID);
            }
        }
    });
}, 500);

Conclusion

I am not using this in production (yet!). So if you find some issues with it, just leave a comment or drop me an email. And there is still a bunch that can be approved (like supporting multiple files), so if you make any mods to this, let me know that too so I don't have to redo any of your hard work ;)

That's it. Enjoy!

MySQL performance tuning

Jay Pipes, MySQL employee and co-author Pro MySQL, gave a great presentation to Google employees which covers a number of techniques for tuning performance on MySQL. His examples include debugging and analyzing problems as well as best practices for table and index design, query and join operations, and server variable adjustments.

It’s a little over 40 minutes long, but incredibly informative, whether you’re a casual querier or a power MySQL user. Though some of this stuff is MySQL (or MyISAM or InnoDB) specific, the majority of the content is essential material for the average database application developer.

If you don’t have time to sit through it (shame on you) or you’re looking to jump right to a specific topic, there’s a nice time-coded dissection of the talk over at Peteris Krumins’ blog. There’s something so appropriate about adding a search index to a video about MySQL optimization.

Performance Tuning Best Practices for MySQL
Video Index

Firefox Quick Tip: Get Vista-Like Tab Switch Preview with Control Tab

If you’re stuck with that crappy Microsoft OS called Windows Vista, you might, by now, be hypnotized by some of its eye-candy features that you might now consider them as good features. Okay, so I’m sarcastic with that note. Surely, if you’re going to nitpick Vista, you might find a thing or two that can be considered good and helpful features. Like its Alt + Tab function.

It eliminates the the window switch guessing game since it gives you a preview of the windows. Previously, in XP (and in Vista Home Basic) all you get are icons that don’t tell too much about which window you’ll be switching to. While I think it’s not that much of an issue with web browsing, some consider this functionality a good addition to their browsing experience. And that’s why this is supposed to be slated to be incorporated as a Firefox feature for 3.1 set for release late this year.

But if you want to experience that functionality now, with Firefox 3, then you might want to check out the Ctrl + Tab add-on which gives you exactly that functionality. Ctrl + Tab acts like the Windows Alt + Tab only you get to cycle through Firefox tabs. Getting a thumbnail preview might indeed be a great addition.

This works with Firefox: 3.0pre – 3.1a1pre.

Download Ctrl + Tab Firefox add-on here.

What the Inside of a Tree is Good For

“There is something about the outside of a horse…that is good for the inside
of a man.”
– Attributed to Winston Churchill

Whenever I start on a project, the most curious part is sorting out my pile of rough 
lumber into piles of finished parts. Selecting for grain, figure and color is as important
to me (maybe more) than tight-fitting joints.

So today as I launched into the cover project for the Winter 2008 issue I was amused
to find that I stayed in a deep rut that I’ve been in since I started in the craft.
Whenever I select my boards for color and figure, I almost always choose the heart
side of a board to face out instead of the bark side.

Even in the legs for this project, which are predominantly bastard grain, have the
heartwood facing out in three of the four. I know that I read somewhere that there
are other woodworkers who do this, too. But I am at a loss for a good explanation,
as is my wood bible: “Understanding Wood” by Bruce Hoadley.

The consistency should come as no surprise. Heart-side wood and bark-side wood can
reflect light in different ways. So if you obeyed you shop teacher and glued up a
panel using boards that had alternating growth ring (heart-side to bark-side to heart-side
etc.) you could end up with a top that has a striped look, especially once the finish
is on it.

But that doesn’t explain why I always choose the heart side. If anyone has a good
explanation, I’d like to hear it in the comments below.

The project itself is a Gustav Stickley plant stand with a tile top. The project doesn’t
appear in any of the catalogs that I own, but I’ve stumbled over a few signed examples
since I started collecting in 1990.

I enjoy projects like this because they don’t use a lot of wood, but they contain
lots of fun challenges. For starters: tusk tenons, weirdo offset and intersecting
mortises, and incorporating a standard floor tile into the design. And there are some
nice gentle curves.

And so I’ll end with another horse-related quote that applies to woodworking and the
challenges ahead in this small plant stand.

“It is not enough for a man to know how to ride; he must know how to fall.”
– Mexican Proverb

— Christopher Schwarz

Give Tech Support or Grab Files Remotely on any System [Remote Desktop]


Whether you’re missing a crucial file at work or home, or you just need to tweak one little setting to get Mom’s email working again, having remote control of another desktop can be seriously handy. But not everybody can walk the less-tech-inclined through installing a VNC server and opening up their router ports, or have the time to create their own SingleClick tech support tool (cool as it may be). Today, we’re looking at the best solutions for getting into a computer remotely, whether you’re helping out Uncle Bif, grabbing files from home, or controlling your media server from the lounger. Photo by miguelb.

Windows

crossloo.jpgThe tech support solution: From personal experience, the most techno-phobic aunt, uncle, or boss-with-a-favor-to-ask can hook up with you through CrossLoop, a dead-simple app that uses simple access codes to make sure it’s the right two screens hooking up. Lifehacker friend The How-To Geek has a full screenshot walk-through on hooking up the connection (remember to have the help-ees click “Unblock”!). If you’re truly tech-savvy, you can even make some money in CrossLoop’s Marketplace, helping similarly lost souls battle it out with their systems.

livemesh_example.jpgThe file grabber: Those among our commenters who had the chance to try out Microsoft’s Live Mesh service before it opened to anyone who wanted it agreed that once you got the (admittedly clingy) service installed, making remote connections was a nearly pain-free process. It doesn’t mind multiple monitors, it serves up crisp graphics (on fast connections, at least), and can even follow your remote computer through a reboot. What’s more, you get 5 GB free to store and sync documents to a “Live Desktop,” so if you can’t wait for a big package to transfer directly, you can log in, start moving it into the 5 GB cloud, and come back later to grab it. The remote connection happens through Internet Explorer (a convenience or drawback, depending on your mindset), but the rest of Live Mesh’s tools work fine with Firefox.

showmypc_cropped.jpgOther options: If you shy away from VNC connections more out of security concerns than difficulty level, it’s not too much work to create a secure VNC connection with Hamachi. If you don’t like dealing with all those port numbers, IP addresses, and such, ShowMyPC wraps up a VNC client, SSH, and a simple two-way password authorization, similar to CrossLoop, but with clients for Linux and OS X as well.

Mac OS X

file_sharing.jpg The tech support solution: One of the Mac’s less-touted assets is its super-simple screen, file, and printer-sharing capabilities. With the introduction of OS X Leopard (10.5), it’s easy to control how much of your system is shared and to whom, and screen sharing simply requires an enabling click and a password. Better still, another Mac or any ol’ VNC client can connect and command. If we had to choose, though, we’re partial to TightVNC.

backtomac.pngThe file grabber: Apple has rolled their $100/year .Mac service into the similarly-priced MobileMe, but one thing remains the same—they want you to pay them to link together the tools you already have. Adam's guide to getting Back to Your Mac for free still holds true, using a combination of FTP and screen sharing and setting up a domain name for your home network.

Other options: As noted above, Mac-to-Mac connections are seriously simple (at least with Leopard installed). If you’re a Mac wizard but still know enough to help a frustrated Windows user, the free program CoRD lets you create a Remote Desktop connection, which is generally faster and more secure than a straight-up VNC link-up. And if you were on a Mac and wanted to grab files from a PC, you’re best off using a simple app like FileZilla to build a home FTP server.

ubuntu_sharing2.jpg

Linux

The tech support solution: You're telling me your grandmother runs Linux? Seriously? Well, we've got a few options to help her out too—or is it the other way around? If one of the two parties needs n00b-level help, luckily most user-friendly distros will have VNC built in—just head to System->Preferences->Remote Desktop to enable it, and the Linux guru should be able to jump in. But for faster, cross-platform support, our commenters recommend a faster client/server combo: NoMachine NX.

The file grabber: To save yourself a lot of headaches, you’re best off learning how to set up an SSH server (as described in Ubuntu’s wiki), then open it up to outside traffic, and then get familiar with a little cross-platform command line, like the all-important scp command detailed in an earlier series by Gina. Not the simplest solution, indeed, but you will have a secure system that you can get to from any operating system.

We’ve offered up our picks for the best, or just easiest, ways to get onto your computer, or Aunt Margies’, but we want to hear from you. What apps make grabbing a file remotely as easy as sliding a mouse? What solutions did we overlook? Tell us in the comments.

Kevin Purdy, associate editor at Lifehacker, admits to feeling like a pretend hacker when he’s using a remote desktop client. His weekly feature, Open Sourcery, appears Fridays on Lifehacker.


Teaching at Marc Adams — Day Five

As promised, the guys in class had the early part of the day to complete mouldings
and work on the sculpted bracket feet. Each woodworker laid out the feet from the
provided pattern and drilled the holes forming the spurs and with the help of Doug
and Zane, our shop advisors. Everyone had their feet mitered and the spline recesses
were cut, too (Doug used a method for cutting the recesses that is rather interesting
and I’ll talk more on that later).

Most everyone in the class decided to take the feet and moulding back to their shops
to complete the work because most did not want to glue up the cases before final sanding.
Nor did they want to use valuable time when the drawer fronts awaited.

At 1 p.m. we began discussions about the drawer fronts and I demonstrated how to transfer
the shape to the drawer front and make the cuts at a band saw. Everyone took to the
drawer fronts with ease. I explained that shaping the fronts was as simple as a close
and accurate band saw cut, proper technique and a sharp blade.

I worked with each student one on one to demonstrate the exact steps needed as they
began work to shape their drawer front. To begin, lay out the flat blocked portion
at the end of the drawer front, establish a line that delineates the flat sections
from the beginning of the rounded fronts, then peel away excess stock to smooth the
transition while leaving a distinct line.

Next, they used low-angle block planes to carefully round the curved fronts. The secret
is to rub the surface with your hands and smooth any uneven spots you feel. If it
feels smooth, the eye will never see different. That’s a big part of the entire shaping
process. Slowly and methodically each woodworker shaped the first drawer front. As
you can see from the photo below, some in the class chose to cut all their drawer
fronts before beginning any shaping.

Today we’ll complete at least one drawer front and talk about how to tweak the fit
and dial in perfect alignment with precise reveals. And we’ll begin the half-blind
dovetails used to connect the drawer fronts to the drawer sides. The through dovetails
used at the back of each drawer are the same as the dovetails they did when they joined
the case sides to the bottom. Discussions on how to cut and fit the drawer bottoms
will be interesting due the shaped interiors of those drawer fronts.

Because it’s Friday and class is over at 3 p.m., you’ll have to sit tight for the
weekend. Come Monday I’ll post the final photos. In addition, I’ll have a couple funny
stories to relate. Here’s a hint: There is always a prankster in the group. And, I’ll
show you a use for blue painter’s tape that our very own Marc Spagnuolo, The
Wood Whisperer,
might never have thought of.

— Glen Huey

p.s. Click here to read “Teaching
at Marc Adams – Day One
,” here for “Day
Two
,” here for “Day
Three
” and here for “Day
Four
.”

Demo Night 7/23/08 – Greene & Greene Style Joint

Download Low Resolution
Download High Resolution

This is an excerpt from the live Demo Night that took place 7/23/08. The topic was creating Greene & Greene style joint for the Gadget Station project. Its a long video, but lots of details were covered and numerous questions were thrown out by the chat room. This was our best turnout yet with 180+ viewers! This isn’t exactly as fun as the live experience but its a close second for those who couldn’t make it. Enjoy!

Gadget Station Ideas (Pt. 1)

We have a number of folks working on their own versions of a gadget station. Most are still in the design phase but we have heard from a few folks who already had this idea in the past. If you are anything like me, you can use all the inspiration you can get! So here is an idea submitted by a viewer.

Below is a quick SketchUp concept video from Ron, owner of R Jones Woodworks. Here’s how he sums it all up so far:
With regard to design I wanted to the piece to be highly functional as well as flexible. Something that is hard to use, won’t get used at all. There were probably 4 or 5 factors that drove the design. 1- It needed to support just about any electronic device with no modifications. So I created a trough, if you will, so almost any size device can be simply laid down. Also, in the event something larger needs to be charged, the shelves can be flipped up and the device laid on the bottom. 2- It needed to be easy to use, adding devices etc. Simply flip the shelves and swing the door to access the power strip. 3- The design needs to be clean both inside and out. Small elongated keyhole slots allow plugs to pass thru at any point along the shelf. This also increases the flexibility. 4. I needed a way to deal with a potential heat issue. Simple rectangular holes will be cut in the top and bottom to allow for ventilation. This area will most likely be covered in some sort of metal mesh. 5. Shelves will most likely be covered in an ESD (electrostatic discharge) friendly material to help with those issues.

Teaching at Marc Adams – Day Four

Ches in Nichols, N.Y. asked me via e-mail to post a photo of the project piece so
readers could see what the project looks like when finished. That way he could track
the progress of the class. You ask, we respond. Not only that, I think that’s a great
idea.

Also, I promised photos of assembled cases and here they are as well. I’m mighty impressed
with the work going on in this class. I’m especially impressed with the caliber of
students that the Marc Adams School of Woodworking (MASW) draws through the door.
The woodworker pictured at the top of the Day Two entry completes his Master program
with this class. Others in the class are well on their way to that goal. And the first-timers
attending the school – at least one class participant is here building only his second
piece of furniture – are all doing great work, as evidenced by the cases that are
assembled after only three days of work.

A couple things happened today. From the class instructor’s point of view, today was
hectic. The work on the chests rounded the corner and headed toward detail-oriented
work. I made my way to each workbench more than a few times to answer questions (some
on how to fix minor problems and some to get a quick affirmation of the steps that
are needed to get the case assembled).

From a woodworking perspective, we set off the SawStop yesterday morning. Easy – it
wasn’t an injury avoided –MASW shop advisors don’t let students get into an injury-causing
set-up. This was something totally different. One student positioned his dado for
the large sliding dovetail used to join the case top to the case sides in the wrong
location, then painfully (you could see in his eyes he was frustrated) fit a patch
in place. The patch worked and his case is assembled, but the patch caused the problem.

After letting the glue dry for a couple hours, he returned to the saw to cut new dados.
The shop advisors didn’t realize the patch was in place, so they didn’t know to set
the saw in bypass mode – where you knowingly turn off the safety feature. The wet
glue inside the patch was enough to complete the circuit and the cartridge blew. There
was a bit of down time before we were back in action at that saw, but with three others
in our classroom, that simply meant no dado stack for a short time and another lesson
learned.

So here’s what’s on tap for today. Most of the attendees are interested in the sculpting
of the drawer fronts and building a drawer with traditional 18th-century techniques.
From the opening bell through 1 p.m., we’ll stick with finishing the case work pertaining
to the feet, which some guys began work on late in the day, and base mouldings. At
1 p.m., we begin on the drawer fronts, no matter what. That means there are four hours
today and nearly six hours tomorrow for this most-important phase of construction.

You know you have to check back to see how things go!

— Glen Huey

p.s. Click here to read “Teaching
at Marc Adams — Day One,”
here for “Day
Two”
and here for “Day
Three.”
 

WP Like Button Plugin by Free WordPress Templates