Quickly post a twitter update from a command launcher

Published on May 16, 2012

Use twitter?  Use a command launcher app like SlickRun or Launchy?  Well here’s a handy URL to make a command to quickly post an update.

If using SlickRun:  http://twitter.com/home?status=$W$

$W$ means to put parameters URL encoded there.  I’ve it mapped to a magicword of “tweet” so can send an update in SlickRun with: tweet wuzzup world!

See it in action:
Unable to display content. Adobe Flash is required.

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 

Speed My PC: clean PC and increase computer performance the safe way

Published on April 29, 2012

Computer running slower than when you got it?  Feels like it takes forever to boot up?  Weird unexpected stuff happening?  Feeling sluggish?  Here’s how to safely get your computer feeling like new again.

This article is designed for computers running Windows 7 (or newer).  If you’re still running Windows XP or Windows Vista, read below as to why it’s about time to upgrade.

Why is my computer slow?

bnfoffice1Here’s what’s going on…  to be productive you need a clean work environment with the tools you need at hand.  It’s like having a clean office with a desk, chair, and the few tools you need, right?  Right.  Unfortunately, as you’ve been busy using the computer and having ‘visitors’ (aka programs) to your office, it is becoming more and more cluttered to the point it’s counter productive.  Many of these these visitors are leaving behind a trail, their cousin Vinnie, to keep an eye on your business (aka startup apps or viruses).  Most of the time you don’t even notice this happening like you would in a real-life office, instead they’re just piling up behind the scenes.  Even fairly legitimate programs and websites will cause troubles if not protected against.

Don’t be Fooled!

Many Most of the “Free PC Scan” or “Speed My PC” tools like maxmyspeed.com, stuff advertised on TV, websites that state they’ll disinfect your computer, and the such are outright scams.  They prey on people’s fears and actually infect your computer with more viruses, malware, Trojans, and adware.  Wired Magazine had a good article about two entrepreneurs that built a ‘successful business’ off this practice: How Two Scammers Built an Empire Hawking Sketchy Software

How to Improve: Clean House & Be Secure

Generally a computer has slowed down because too much stuff has gotten into it.  So you need to remove stuff to get it back to optimum performance.  Just adding another “clean up” program isn’t going to help.  In fact, your computer already has some good cleanup programs on it.  You just need to take a few moments to use what’s already available.  The second part is keeping your computer secure and protected from bad programs getting on it in the first place.  Both are covered in this guide.

This Guide

Is meant to be as comprehensive as possible with all the little tips and tricks I’ve learned over the last 20+ years helping friends, family, my own PC, and managing an IT department at work.  It’s written in a style I hope helps an average computer user, like my uncles, but with some breadth in techniques that will hopefully provide a new angle or two to PC professionals.

Quick Performance Boost

While there are many things that can be done to help improve your computer’s speed, I’ve found just these two quick easy steps make the largest difference in most cases.

  • Turn Off Automatic Startup Apps
    The single most effective task is to disable those pesky little programs that are starting up behind the scenes without your knowledge.  Effectively disabling those “cousin Vinnies” left behind by other apps will speedup boot time and free up processing power and memory.   Windows includes a program called msconfig.exe that makes it easy to disable these.  My recommendation is to start off disabling every startup program listed.  See how your computer goes.  If there’s something no longer running that you used, go back and turn it on.  Most of the apps there are to check for updates or make loading their parent programs a little faster.  Very rarely are any of them essential; and you can turn them back on at any time.  Doing this doesn’t actually remove anything from your computer, it just prevents them from automatically starting.  Your programs will still run when you actually need to use them.

    Run msconfig.exe
    2012-04-29_0007

    Then disable startup items under the Startup tab.  All Windows core services needed to run your computer are run as Services (under that tab), so you don’t run a risk of disabling critical computer functions by turning off the items under the Startup tab.  You can also turn any of them back on at any time.
    2012-04-28_2242

    For more detailed info, see this post: How to use MSCONFIG in Windows 7 

    p.s. There are some startup items that can be helpful, like if you have an iPhone there is a startup item that will automatically start iTunes when you plug your iPhone in.  Not actually necessary for the computer to work (you can start iTunes manually to sync your iPhone), but handy to leave active.
  • Get a Better Browser
    Most people are using the Internet Explorer web browser because that’s what came with their PC.  Unfortunately it is prone to getting a lot of toolbars, clutter, adware, and other nasty stuff.  There’s even a term called “Toolbar Hell” to describe the extreme state of toolbar overload.  Even one toolbar can slow down your browser, start showing random popups, and install other bad programs.  Better all-together to switch to a different browser that doesn’t have this tendency, such as Google Chrome.  It is simple, fast, and clean.

    For a laugh, here’s an example of “Toolbar Hell”.  I’ve never personally seen a computer this bad, but in my experience even one of these toolbars is ‘too much’ and can wreck havoc on a computer.
    ie-toolbar-hell


Deep Cleaning

Beyond the above quick tips, here is the more compressive list of techniques to clean up the computer and protect against bad stuff from getting in.

  • Hard Drive Space
    If your computer gets down to less then about 10% of disk space free, it can dramatically affect performance.  Imagine an office with only 10% working space available, you’d end up spending more time moving things around than getting stuff done.  In PC land, over 10% free space (like 20% or 30%) doesn’t really make a difference in speed so there’s no need to keep a whole lot of free space available, but it is something to keep an eye on.  Here’s how to check your drive’s free space, and tips to clean it up:
    • Remove Temporary Files
      Your PC keeps lots of little bits of temporary files around that can be removed.  Windows has a program called Clean Manager (cleanmgr.exe).  It removes old left over files that can be safely removed.
      2012-04-28_2334[1]

      2012-04-28_2330
    • Remove Big Files
      WinDirStat is an awesome free little program that shows you visually at a glance what’s taking up space on your drive.
    • Uninstall Unused Programs
      There are probably many programs installed on your computer you’re not even aware of.  Many apps install additional apps you probably didn’t want (called creepware).  Most PC manufactures install apps before you get the computer (called crapware); they even get paid kickbacks for doing it.  It is common to remove these as a first step in cleaning a computer.  I’ve put it further down my list since it’s actually the programs running that slows down the computer, which is addressed above.  Removing these programs still makes a difference, and can help the computer ‘feel more clean’ by removing popups, ads, and other annoyances.  Yes, even pre-installed anti-virus software is considered crapware, like a dandelion in a flower bed, it’s still considered a weed since it should be there (see below for a better anti-virus).  Here are instructions on how to remove programs.  My recommendation is to remove all of the programs you are not actively using.  They can always be added back later if really needed.  When provisioning new computers at work, we remove almost every program that came on pre-installed on the computer.  Note: This only removes legitimate well-behaved apps.  For viruses, malware, etc the other techniques below are required.
  • Upgrade to a Modern OS: Windows 7 (or newer)
    If you’re not using the latest operating system, you don’t have the latest protection against intrusive programs and technology in keeping a computer fast.  For example, in Windows 7 (as compared to Windows XP), it does a number of things to help keep your computer optimized.  Such as automatically defragmenting the hard drive, pre-caching frequently used applications, supporting the latest hardware (like solid-state drives), and many improvements in security.  If your computer came with an old OS (like Windows XP or Windows Vista) then it’s probably a good idea to ditch the computer itself, since it’s so old anyway, and get a new computer.  (Windows XP was released in 2001, 11 yrs ago at the time of writing this, even Windows 7 was released in 2009, three years ago now)
  • Power-Options-iconPower Settings: High-Performance
    Windows 7 by default is set to try to balance computer performance with power consumption.  This can be handy in a laptop running off battery, where battery life could trump performance.  Just choosing “High performance” is all that’s typically needed, particularly for desktop computers.  See Manage Power Settings
  • Keyboard Speed: Decrease Repeat Delay
    There is a small setting in Windows to adjust how quickly the keyboard starts to repeat a key.  Just decreasing this time makes the keyboard can make the whole PC feel faster.  I’ve changed this one setting on people’s computers and they swear their computer is faster.  Particularly helpful when using the arrow keys to move the cursor.  1 min video: How to Increase Keyboard Speed
  • Get a Faster Internet
    Most of the time spent on the computer these days is utilizing the Internet in some way.  A slow connection turns the world-wide-web into a world-wide-wait.  You can measure your connection speed at http://speedtest.net.  For normal web-browsing, I’d consider a fast connection to have: (1) a ping time of less than 30ms (the time it takes for a signal to get from your computer to a remote computer) and a download speed of about 4 Mbps or more (how wide your pipe is).  The better connections tend to be (in order): Verizon FIOS (fiber-optic, about 25 Mbps), AT&T U-verse Fiber, cable from a cable TV provider (usually 6 Mbps+), with other options avoidable if possible (DSL, dial-up, and wireless).  Just visit Verizon, AT&T, or the local cable company’s website or call them to find out if their service is in your area.
  • Use a Reliable 3rd Party PC Cleaning Tools
    There are a few 3rd party applications that help further clean a PC that are well respected and reliable.  If the other tips here are applied, these typically give just a slight improvement.  Specifically CCleaner, used to be called “Crap Cleaner”, does what Clean Manager (cleanmgr.exe, above) basically does but cleans a few other areas as well.  It’s like a good flossing for the computer.  Be very careful here though, even previously legit cleaners like AdAware sometimes get purchased by scammers and turned into scams.
  • Reinstall the Operating System
    When all else fails, there’s always the option of starting over fresh by clearing the hard drive and starting over again.  If the other practices here are used regularly this shouldn’t be needed, but if computer upkeep has been neglected, sometime this is the best way.  When doing so, remember:
    1. Have your Windows CD or USB key on-hand
    2. Write down the applications you use (you’ll re-install them after)
    3. Back up your entire computer (at least all your data, but the whole thing is preferable)
    4. Make sure your backup is thorough!
    5. Boot from the Windows CD or USB key
    6. Run through the windows installer.  When prompted for a drive to install to, choose Advanced options, delete the current drive, then continue the installer.  Windows will automatically create a new drive letter and install completely fresh and clean.
    7. After Windows is installed, apply all the Windows Updates possible (keep rebooting and running Windows Update until it says there are no more updates and no reboot needed)
    8. Re-install your programs and copy your data back over
    9. Follow the other tips here to keep the system performance at top notch and keep it secure
  • Stuff I Won’t Cover
    There are an endless number of small tweaks that trade computer experience for performance. Things like disabling certain visual elements or styles in Windows, removing hotfix installers, registry tweaks, etc. I find these to generally provide very little improvement in performance, reduce the experience of a nice modern computer, and even be detrimental to the computer’s stability in some cases.  I generally recommend avoiding them.

Use Protection

laptop_picYour computer isn’t going to get fast or stay fast if it isn’t protected from malware sneaking into the computer in the first place.  Here are the essentials:

  • Keep PC OS Up to Date: Automatic Updates
    Fortunately Microsoft does actually care, quite a bit, about your computer’s health. They are constantly looking out for any new vulnerabilities. Like keeping an eye on a huge dam holding back the bad programs from flooding your computer. MS is providing fixes to potential leaks before they’re a problem. If your computer isn’t set to automatically apply updates (which is free), the dam can break and bad stuff gets through. Many viruses these days take advantage of the fact many people don’t keep their computer updated and target those vulnerabilities after they’re found. See here about Windows Update and how to turn it on to apply automatically.
  • Use a Decent Anti-Virus: Microsoft Security Essentials
    If you don’t have some anti-virus software on your computer is certainly less protected. Good anti-virus isn’t everything, but it does help. Like taking vitamin C helps, but you still don’t want to go walking down a dark scary ally downtown at 3am. Many anti-virus programs are just trying to dig deep into your pockets for cash or are more obtrusive than the viruses they try to protect you from. Norton Anti-Virus is that way, even McAfee can be troublesome. Thankfully Microsoft actually has a free, effective, completely innocuous solution called Microsoft Security Essentials. Just click that link to get it. They can’t bundle it in Windows by default due to concerns of the anti-virus companies suing them. But it is free, effective, and stays out of the way unless there’s a problem (like a good anti-virus should).
  • Keep the User Account Control Turned On
    Windows 7 introduced the concept of “User Account Control” which prompts the user anytime a program tries to make a system change to the computer. Such as installing a program or changing a system file. By default this is turned on in Windows 7. Many admins turn this off (I do), but it really does help cut down on bad programs getting on your computer without you knowing it.
  • Use the Web-of-Trust Browser Plugin
    This amazing little free plugin gives an indication of the reliability of the websites visited in real-time.  It can help protect your browser from going to sites known to have viruses.  http://www.mywot.com/ 
  • Be Aware, Use Your Brain
    When it comes down to it, the most important step in keeping a computer secure and at top performance comes in being careful. Don’t open that suspicious email attachment. Even though it says “I Love You”, it doesn’t.  If it looks questionable on the web, it probably is.  If you feel your heart rate increase when seeing a website saying it detected a virus on your computer or your PC is infected, run away!  Those sites will infect your computer.  If you’re seeing popup ads when using your computer, it’s already infected, get it clean fast before it gets worse.

Upgrading Hardware

If you’re really looking for a more drastic change, improving your computer’s hardware of course helps.  I’d certainly recommend applying the above before making hardware changes as if the computer isn’t clean already, just throwing more hardware at it may not make a difference.  A computer has three main hardware components affecting speed:

  • Processor (or CPU)
    The brains.  How fast your computer can think.  Generally it’s not something you upgrade unless getting a new computer.  Most CPUs these days are quite fast enough for general use, particularly the Intel i5, i7, or newer.
  • Memory (or RAM)
    The easiest to improve in most computers is the memory. Taking a system from 2 GB (gigabytes) to 4 GB of RAM can make a noticeable difference in Windows 7!  See: Find out how much RAM your computer has   This upgrade isn’t all that expensive these days, around $40.
  • Storage (or hard drive)
    This is where programs and data are stored (pictures, video, etc).  It’s not just about how much you can store these days, but how fast can it be retrieved.  In my opinion, this is the single most effective piece of hardware to upgrade to improve performance (assuming the other factors are reasonable).  Replacing a standard drive with a Solid-State-Drive (SSD) makes a huge difference.

    Here is a simple comparison.  The first pic is a benchmark of a standard “high speed” laptop drive at 7200 RPM.  The second pic is of the Crucial 512 GB M4 SSD I replaced it with.
    03 2010 03 26, lexus, HDD 7200rpm netbook internal SATA 2011 08 25, mackie, 512GB SSD
    As you can see, it has a 3x faster sequential read and 171x faster “4K QD32” write speed (which means data is written in various locations across the disk).  And this is an older SSD with faster drives now available.  See Jeff Atwood’s blog post on The Hot/Crazy Solid State Drive Scale if you need more convincing. Bang for the buck, if you’ve got an okay computer, a SSD drive will kick it into a turbo awesome computer.

    This is upgrade can be expensive.  See Newegg’s SSD section for current pricing.  Crucial, Intel, and Vertex are excellent SSD brands.  Not all SSDs are fast!  In fact some are slower than regular hard drives.  Check reviews and generally those brands are the fastest and most reliable.  SSDs do fail more often than a classic HDD, so make sure you have a reliable regular automated backup in place (which is recommended anyways since all drives will fail, it’s just a matter of when).
  • Check the Experience Index
    Okay this doesn’t actually speed up your computer, but it can tell you where what the hardware bottleneck on computer could be. Here’s how to check the rating, info from Microsoft about it, and what my mid-line MacBook Pro 13” w Windows 7 experience index is for a totally non-benchmark reference.

Concluding

Just by playing it safe from the start by using Windows 7 can keep the computer in a clean optimal state.  The basics are: disable startup items, uninstalling crapware, have automatic updates turned on, install Microsoft Security Essentials, use a clean browser like Google Chrome, and be mindful of not letting questionable programs onto your computer.  While there are more scams and viruses than ever before, good computer maintenance is also easier and keeps a computer in top shape better than ever.

Other Resources

Here are additional resources if you’d like to learn more…

If I’m missing anything or you have another favorite tweak, let me know in the comments.

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 

Download Torrents on a Remote Server

Published on April 15, 2012

Offload Torrents to a Remote Server

I only use my laptop and am frequently traveling, suspending the laptop, or using a MiFi hotspot ($$$ over 5GB) and so don’t want to download torrents, or even run a torrent client, on my primary machine.  Instead I’d prefer to be able to select torrents at anytime from my primary machine, and have a remote server downloads the files.  My remote server is at home with a high-bandwidth fiber connection and is running 24/7.  This way wherever I’m at, I can select torrents from my laptop and they’ll be downloaded fast at home.

There are a few very small helper apps I created for this.  They use the Microsoft .NET 4 runtime, so please install that first if not already on your computer.

Download these supporting apps and source here: TorrentTools.7z

.torrent Files

For .torrent files, the process is relatively simple with Dropbox, uTorrent and just a small tool.

Setup Instructions:

  1. Install Dropbox on both computers to keep a folder in sync.  We’ll call this “dropbox\Torrents\Autoload”.
  2. Install uTorrent on the remote server and set it’s autoload watch folder to the same.
  3. Last step is to get the .torrent file automatically moved into that autoload folder when it’s clicked in the browser.  To do this, on the primary machine when clicking on a .torrent file, the browser will ask what program to open the file with, tell it to always open .torrent files with this little tool: MoveTorrentFile.exe.  First open the MoveTorrentFile.exe.config file in a text editor and set the “TargetDirectory” setting to the folder in #1.

That’s it.  Now when you click a .torrent file link in your browser the remote server will start downloading it.  See it in action (opens an about one minute video as a link)…

2012-04-16_2252

Magnet Links

Many torrent sites use the newer magnet uri scheme instead of .torrent files.  This is a little trickier to offload than just the .torrent files, but another tool or two makes this easy.  In this case we’ll use the same general technique above, but put the magnet links into files that Dropbox will move over and then have an app that opens the link files on the remote server.

Setup Instructions:

  1. Follow steps #1 and #2 from above.
  2. Now when clicking a magnet: link in the browser, we want to capture the link into a file that Dropbox will move across.  That’s what the MagnetLinkToFile.exe tool does.  Edit the MagnetLinkToFile.exe.config file’s TargetDirectory property to point to your autoload directory.  Run it once and it’ll register itself to handle magnet: URI links.  Then you can click a magnet: link in a browser and it will put the link into a .magnet file in the autoload directory.
  3. On the remote server, run OpenMagnetLinkFiles.exe which monitors the target folder for .magenet files created by the above.  Before running, set the WatchDirectory property in its OpenMagnetLinkFiles.exe.config file to the autoload directory.  When it finds a .magnet file, it runs the marnget: link inside the file then deletes the .magnet file.  uTorrent registers a “magnet:” handler when installed, so it’ll then start downloading the torrent.

Misc Tips

  • Always run OpenMagnetLinkFiles.exe
    To get OpenMagnetLinkFiles.exe to always run on my remote server, I put a shortcut to the app in the Startup folder.  Then set the shortcut properties to run it minimized.  Also used autologon to have Windows automatically login on reboot.  You could alternatively use Windows Task Scheduler if you’d prefer not to run it under a user account.
  • Torrent Client on Primary Machine
    If you do want to have a torrent app on the primary machine, but use this technique as the default, then… In step #3 up top, the torrent client will probably have already registered itself to open .torrent files.  So to redirect the app that opens them, find a .torrent file, right-click and choose “Open with…”, select MoveTorrentFile.exe and choose to “always open with this program”.

Conclusion

I’ve been using this technique for awhile now.  I’d be very interested in learning if you’ve tried this or done something similar.  Please leave a comment if so.  thanks

Update (5/18/2012): Wil Wheaton shows another good example of the usefulness of bittorrent for entirely legal purposes

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 

FileSystemWatcher with Timer for Single Notification of File Changes

Published on April 13, 2012
.NET has a handy type called System.IO.FileSystemWatcher which you can point at a directory and it triggers events based on file events such as a file being created, deleted, renamed, or changed.  The problem is that the Changed event gets triggered many times with a simple file save when usually you only want to be notified once when the change is done.

Too Many Change Notices

For example, just saving ‘hello world’ to hello.txt using Notepad triggers the Created event and then three Changed events.  Most often code watching for a file change only wants to be notified once, after the file is finished being written to.  This can be particularly troublesome if for example you have code that needs to process a file that is written to by a slow operation, such as an FTP transfer or network file copy, possibly triggering the Changed event 100s of times before the file transfer is complete. What we want here is a more transactional or atomic single notice.

Use a Timer to Dampen Event Triggers

A simple solution is to implement dampening using a Timer.  Essentially ignoring the little spikes using a time delay that gets reset on change events close together.  We start a Timer at the first indication of a file creation or change and reset on each subsequent change within a short time period.  Then we’ll listen to the Timer’s Elapsed event for the real final notification that changes have subsided.  The trick then is to make the Timer’s delay something longer than the longest time between normal Changed events, but small enough to quickly notify that changes have stopped.  My measurements have shown that it’s about 2 to 50 ms between Changed events, so a timer interval of 200ms tends to work well.

Example Code

Download Code: FileWatcherExample.7z Without the timer you wouldn’t get the “File done:” notice. All this shows is saving “hello world” to a hello.txt file. It gets a created then three changed event triggers. With the timer we get notified when it’s done. console
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Timers;

namespace FileWatcherExample
{
  class Program
  {
    // Keep track of the timers for various files
    private static Dictionary<string, Timer> timers = new Dictionary<string, Timer>();

    static void Main(string[] args)
    {
      // Create the watcher and subscribe to events
      FileSystemWatcher fsw = new FileSystemWatcher(@"c:\temp\watchme");
      fsw.Created += new FileSystemEventHandler(fsw_Trigger);
      fsw.Changed += new FileSystemEventHandler(fsw_Trigger);
      fsw.Deleted += new FileSystemEventHandler(fsw_Trigger);
      fsw.Renamed += new RenamedEventHandler(fsw_Trigger);
      fsw.EnableRaisingEvents = true;

      // Continue listening until [ENTER] is pressed
      Console.WriteLine("Monitoring...");
      Console.ReadLine();
    }

    static void fsw_Trigger(object sender, FileSystemEventArgs e)
    {
      // Let the user know what type of change was triggered
      Console.WriteLine("File {0}: {1}", e.ChangeType, e.Name);

      // If a file was created or changed, start a timer
      if (e.ChangeType == WatcherChangeTypes.Created || e.ChangeType == WatcherChangeTypes.Changed)
      {
        Timer t;

        // Create a new timer if one isn't already assigned to this file
        if (timers.ContainsKey(e.FullPath)) t = timers[e.FullPath];
        else
        {
          // Adjust interval for your needs, 200ms is generally good
          timers.Add(e.FullPath, t = new Timer() { Interval = 200, AutoReset = false });
          t.Elapsed += new ElapsedEventHandler(fileTimer_Elapsed);
        }

        // Reset the timer
        t.Stop(); t.Start();
      }
    }
   
    static void fileTimer_Elapsed(object sender, ElapsedEventArgs e)
    {
      // A timer has elapsed, find out which file it belonged to and inform user
      Timer t = sender as Timer;
      string file = timers.First(a => a.Value == t).Key;
      Console.WriteLine("File done: " + file);

      // Remove the timer so the runtime will dispose of it
      timers.Remove(file);
    }
  }
}

Closing Remarks

It’s also good to be aware of the various Timers in .NET as a different timer than I’m using above may be more appropriate. For example if you’re working with a Windows Forms or WPF app you may want to use the UI framework Timer to make it easier to update UI on the right UI thread.
 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 

Microsoft Puts Search Work Items into TFS Power Tools

Published on December 16, 2011

Microsoft recently updated their Team Foundation Server Power Tools to have a work item search box!

A few months back Brian Harry (MS Technical Fellow and Program Unit Manager of TFS) asked me if he could include my Search Work Items VS addin in the TFS Power Tools.  It’s awesome seeing it here now!

A little back story…  I originally created the addin while we were working on VS 2008.  I had heard the passion our head of Team System at the time Andrew Kass talk about the need for providing some level of work item search.  It wasn’t something our VSTS team was able implement in a more fully supported way at the time.  So that evening in about two hours I coded up this little vs addin and put it up on MSDN.  It was the #1 download for about a month and has continued to be popular.  Thanks to the community on CodePlex others have kept it up to date.

Differences… now I will say that my addin does have a few differences

  • Ability to edit what field are being searched on. Typing “—template” will open the work item query used
  • Jumps directly to a work item if a number is specified, like 993. Team Explorer already has a feature for that in Go To Work Item (Ctrl+G) so that’s not really important, but I put it in so there was was a visual way to click and type a work item number to jump to
  • The Search Work Items box also shows up in the “Team” main menu so if you don’t like toolbars (I turn mine all off), then you can still find it
  • An finally, the addin has a registered VS Command, Team.SearchWorkItems, so you can assign a keyboard shortcut to jump to the box (I use Ctrl+Alt+S)

References 

In conclusion, a big thanks goes out to the TFS team for asking me and putting the feature into the MS sponsored Power Tools package.  I hope more TFS users are able to be more productive because of it.  :)

 
Tags: , ,
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 

Peter’s Laws, The Creed of the Sociopathic Obsessive Compulsive

Published on December 9, 2011

Found this poster in a local restaurant, wow, this is my life creed!  I immediately purchased one for my home office.  Here’s the poster on allposters.com.  #OCDftw 

 
Tags: ,
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 

Zulu Hour blog

Published on October 3, 2011
Zulu Hour blog

This is a new blog I’ve started as an outlet for political, religious, NSFW, and other random bits and bytes.  If you’re interested in keeping tabs on the other half of my mind not suited for the mainstream, this is where it’ll be. » Zulu Hour

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 

Windows Home Server to the Rescue

Published on August 31, 2011

My laptop hard drive died yesterday, just before heading out of town on a business trip.  When drives have died in the past it takes me about 20 hrs to recover up to 80% normal efficiency. This involves installing Windows on a new drive, downloading/installing drivers and >100 applications/tools, and recovering files (from the last file-copy backup).  Then there’s the time to re-configuring the OS, apps, tools, dev env, etc.  Not to mention the frustration of loosing files since the last backup.

But not so this time!  I’ve been using Windows Home Server (WHS) which automatically backups my PC every night and recovery was a breeze!  For the first time ever I was able to get back up and running in about just 1 hr.  WHS does nightly ‘bare metal’ backups which it can restore the entire system to a  new drive.  This is the first time I can say in my 20+ yrs w computers that I’ve had a backup system fully restore my system perfectly.  The time savings and frustration alone was well worth the cost.

What had turned me onto WHS in the first place was the file storage capabilities.  The ability to add any number of drives to a single storage pool with redundancy and not requiring RAID (not in WHS 2011 I’m told).  I didn’t expect the backup to work as advertised, but it sure did.

p.s. This post was written just after the HDD crash but was posted later.  I now use Windows Home Server exclusively in a Hyper-V VM which is working out fantastically well.

Shouts go out to Scott Hanselman for turning me onto the HP MediaSmart Server and this post Virtualizing Windows Home Server On Hyper-V for the encouragement to move my WHS to a Hyper-V environment (highly recommended).

 
Tags:
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 

Open Clipboard Contents Hotkey

Published on August 30, 2011
I find it particularly useful to be able to copy a file, folder, URL, or search term to the clipboard and then with one hotkey, open it up.  Here is the script I use with AutoHotkey to assign Win+O to open whatever’s in the clipboard. First it checks to see if the clipboard contains a file, folder, or program that exists on disk.  If not, does is it appear to be a URL?  And if still not, just Google the clipboard contents.
; Execute the contents of the clipboard. Set browser to your preferred browser.
browser := userprofile "\Local Settings\Application Data\Google\Chrome\Application\chrome.exe"
#o::
  contents = %clipboard%
  StringSplit, SplitArray, contents, `n
  Loop, %SplitArray0%
  {
    _line := SplitArray%a_index%
   
    ; First attempt a shell execute
    Run, %_line%,, UseErrorLevel

    ; If that didn't work, try something else
    if (ErrorLevel = "ERROR")
    {
      ; Does the clipboard contain a URL?
      FoundPos := RegExMatch(_line, "A)\w[^\s]*\.(?:com|co|uk|gov|edu|tv|net|org|tel|me|us|mobi|es)(?:\z|/.*)\z")
      if FoundPos
        Run %browser% %_line%
      else
        Run http://www.google.com/search?q=%_line%
    }
  }
return
It is also designed to open multiple items if separated by a carriage return, for example:
http://coad.net
http://facebook.com
http://noahcoad.com
 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 

Tips to Create Impactful Screen Cast Videos

Published on August 30, 2011
Creating quick little instruction screen cast videos is so easy now these days, particularly with free awesome tools like Jing (click, record, publish to URL… easy).  And they’re incredibly powerful in helping people out and recording bug repros.  But it’s also so far too easy to make crappy bad videos that are confusing or boring.  It just takes some conscious awareness of the process to make a great video. Here are my tips after a few years of recording videos.  My thanks goes out to the speaker training I received at Microsoft, to the many colleagues that have produced excellent videos, and for their providing feedback on my attempts. These tips are for meant for short recordings of generally less than 5 min. Captures designed for single takes of relatively simple topics.  I use Jing which is just super easy and free (upgrade to Pro for improved audio quality), but Camtasia works just as well (but is costly and far more complex).  You can of course spend much time polishing in post-production using tools Camtasia’s zooming, annotations, editing, etc, but that’s not the point of these tips.  They’re focused on making the recording itself. Some examples:    The Basics
  1. Use a loss-less codec.  It is annoying to see video of a screen that is too small or fuzzy to see clearly.  It is poor form when a loss-less codec would look perfect.  Jing and Camtasia support loss-less recording (careful w Camtasia’s output, choose ‘original resolution’ when producing).
  2. Recorded simple, clear, verbal instructions along with the video.
  3. Drop your screen resolution as low as possible, 800×600 if you can (1024×768 if not) or resize an app to the minimum size needed and record just that app’s area.  It keeps the watcher focussed, reduces wasted visual space, and makes it easy for them to watch the video.
  4. Make sure the mic level is set appropriately so that on playback the volume isn’t too low or too strong (how to vid).
  5. Prep everything ahead of time for a smooth video focused on exactly and only the topic at hand.  Reset states, settings, and apps before each new take.  Do not record boring or obvious steps like repeatedly logging into a website or launching an app that takes awhile to load.
  6. Watch the video yourself and imagine you’re someone that’s never seen this before, is it simple, clear, interesting, and easy to understand without being boring?
Advanced Tips Once getting a grasp on the basics above, continue on with these…
  1. Use a good quality external microphone.  Even a $20 unit from Best Buy will produce significantly better audio than what’s in the laptop.  Like this $20 Logitech USB mic on amazon.  Or get a great mic, like the Samson CO1U USB condenser mic (I use the Samson CO3U).
  2. Remove your hand from the mouse when not purposely clicking on something so that the mouse doesn’t move (which is distracting).
  3. Keep videos as short as absolutely possible, people’s attention span is very short.  The shorter the video the more they’ll remember and happier they’ll be.
  4. Verbally tell the listener what to click on as you click.  Even though it should be obvious because you’re doing it in the video, telling the user brings their attention to it.  Like “We click on ‘File’, ‘Save As’, then type the name MyApp.config and hit enter.”
  5. Pause momentarily before and after clicking, to let the person focus and understand what you’re moving onto next.
  6. Use the mouse to draw the watcher’s attention to a part of the screen as you tell them about it.  People’s eyes will naturally follow the mouse and they won’t really be listening while it’s moving.  Don’t move the mouse unintentionally as it is quite distracting.
  7. Give a <10 sec intro at the start to state the what and why about the video.  Like “This is John Smith and I’m going to show you how to disable Windows Explorer file expansion.”
  8. Use a title screen.  Like a single PowerPoint slide in full-screen with the title of the video or even just notepad or Word with the font enlarged.
  9. It may take 3, 6, or more attempts to get the video ‘right’, but it’s worth it.  Keep going until it’s right, smooth, and tight.
  10. Grab a co-worker to view a draft of the video to get their feedback and refine your style before sending more broadly.  A second pair of eyes can turn up a lot, particularly if they regularly record videos too.
  11. Don’t use superfluous words, sentences, or phrases (like “um”).  Keep the verbiage very focused on what’s actually needed.  These may be normal and mostly overlooked in casual conversation but are amplified and stick out like a sore thumb when recorded.  The clarity of speech is also a direct indication of the presenter’s competence.
  12. Have fun!  Make it sound like you’re interested in the topic.  If you’re not interested, the listener won’t be.
So what tips would you add?  Please share in the comments.
 
Tags:
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 

Hotkey to Instantly Play Music in iTunes

Published on August 25, 2011

I’m usually too distracted by other work to remember to kick-off some music in the background.  Usually because it’d mean launching iTunes, waiting for it to load, finding a playlist to start, and kicking it off.  So I’ve created a single global hotkey to instantly load iTunes and start playing music.  Here’s how:

  1. Get the Tools
    Have a master AutoHotKey hotkey file and set PowerShell to autoload my little
    iTunes.ps1
    library on PowerShell startup.  With these two it makes it real easy to assign hotkeys to various iTunes commands.
  2. Create a “PlayHotkey” Playlist in iTunes
    Just a playlist to be kicked off when the hotkey is pressed.  I’ve got mine set to shuffle unplayed tracks.
  3. Add AutoHotkey Line
    What enables this line to be so simple is that there is a
    itPlaylist
    function in the above
    iTunes.ps1
    file that gets auto loaded as part of step 1.
    ; Play Music NOW with Win+Alt+P
    #!p:: Run powershell -command (itPlaylist('PlayHotkey')).PlayFirstTrack(),,Hide

My full script: MediaKeys.ahk
Related posts: Hotkey to Play/Pause/Next iTunes TracksHotkey to Rate an iTunes Track 

p.s. Another option is to just launch Pandora with a hotkey.

#!p:: Run <a href="http://pandora.com">http://pandora.com</a>

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 

Hotkey to Play/Pause/Next iTunes Tracks

Published on August 23, 2011

If your keyboard doesn’t have media keys (like my MacBook or fav Dell keyboard), then its nice to have simple global hotkeys to play/pause a track, move to the next track, and maybe even increase/decrease volume.

Below is the script that will assign these keys:

  • Play/Pause: Win+Alt+Space or Win+Alt+Left
  • Next Track: Win+Alt+Right
  • Volume Up: Win+Alt+Up
  • Volume Down: Win+Alt+Down

AutoHotkey makes this real easy! Just add this to your .ahk AutoHotkey file:

; Media Keys AutoHotkey Script by Noah Coad, started in 2008, http://coad.net

; #=Win ^=Ctrl +=Shift !=Alt

; Volume Up & Down, Win+Alt+Up & Win+Alt+Down
#!Up::  send {Volume_Up}
#!Down::  send {Volume_Down}

; Media Pause/Play, Win+Alt+Space or Win+Alt+Left
#!Space::
#!Left::
Media_Play_Pause:: IfWinExist, iTunes ahk_class ITWindow { ControlSend ahk_parent, {shift} sleep 100 ControlSend ahk_parent, ^{space} } else { Suspend On SendPlay {Media_Play_Pause} Suspend Off } return ; Media Next, Win+Alt+Right #!Right:: Media_Next:: IfWinExist, iTunes ahk_class ITWindow { ControlSend ahk_parent, {shift} sleep 100 ControlSend ahk_parent, ^{right} } else { Suspend On SendInput {Media_Next} Suspend Off } return

Here is my full script: MediaKeys.ahk
Related posts: Hotkey to Rate an iTunes TrackHotkey to Instantly Play Music in iTunes

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 

Dozen iPhone Custom Ringtones

Published on August 23, 2011

This evening I was playing around with creating some custom ringtones for my iPhone.  Here are the dozen I made: ringtones.7z 

Just download, unpack, and drag & drop the .m4r (AAC MP4 audio) files into iTunes and they’ll show up in the Library > Ringtones section and sync to your phone.


I used GoldWave to edit the sound to the right length and this PC World article for the tip on using iTunes to convert MP3 into AAC.

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 

Hotkey to Rate an iTunes Track

Published on August 22, 2011

Do you rate your tracks in iTunes?  Ever find it a slight pain to swap back over to iTunes while working on something important just to rate a playing track?  Here’s how to set up global hotkeys to rate a track from anywhere (Windows XP or newer).  Like Win+Alt+1 for one star, Win+Alt+2 for two, etc.

  1. Get the Tools
    Have a master AutoHotKey hotkey file and set PowerShell to autoload my little
    iTunes.ps1
    library on PowerShell startup.  With these two it makes it real easy to assign hotkeys to various iTunes commands.
  2. Add the AutoHotkey Lines
    What enables this line to be so simple is that there is a
    itPlaylist
    function in the above
    iTunes.ps1
    file that gets auto loaded as part of step 1.
    ; Rate the currently playing song 1 to 5 stars with Win+Alt+#
    #!1:: Run powershell -command (itunes).CurrentTrack.Rating = 20,,Hide
    #!2:: Run powershell -command (itunes).CurrentTrack.Rating = 40,,Hide
    #!3:: Run powershell -command (itunes).CurrentTrack.Rating = 60,,Hide
    #!4:: Run powershell -command (itunes).CurrentTrack.Rating = 80,,Hide
    #!5:: Run powershell -command (itunes).CurrentTrack.Rating = 100,,Hide

That’s it!  Then with just one keystroke you can rate the current song from any app without switching over to iTunes.

My full script: MediaKeys.ahk 
Related posts: Hotkey to Instantly Play Music in iTunesHotkey to Play/Pause/Next iTunes Tracks 

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 

PowerShell Startup Auto-Load Scripts

Published on August 21, 2011

It’s very handy to have a PowerShell script automatically load when PowerShell starts up to configure your environment, like an AutoExec.bat in the old DOS days.  Here’s how I have mine set up.

  1. Tools Dir & Env Var
    I keep a general
    Tools
    directory on my machine with command line tools, scripts, etc and so set a system environment variable called
    tools
    that points to this directory.
  2. Run Unsigned Scripts
    Run
    set-executionpolicy bypass
    once in each environment (cmd shell and ISE) to allow easy execution of unsigned scripts.
  3. Profiles Auto-Load Script
    PowerShell supports profiles with an auto-load script on PowerShell start up.  Simply put the files
    Microsoft.PowerShell_profile.ps1
    (for basic shell) and
    Microsoft.PowerShellISE_profile.ps1
    (for the GUI) in your
    %UserProfile%\Documents\WindowsPowerShell
    directory. These will be run on PowerShell startup.
  4. Consolidate Scripts
    The only line I have in these files is:
    ."${env:tools}\PSScripts\PowerShellEnvironment.ps1"
    to launch my ‘real’ script. This make it easier to manage, with only one file that’s near my other powershell scripts instead of the two separate scripts above.
  5. Chain ‘autoload’ Scripts
    Then it helps to separate into individual scripts various aspects of your environment setup.  Like a script for aliases, itunes, functions, regular expressions, favorite assemblies, etc.  So I have an ‘autoload’ directory with these scripts in them to chain load. Here are the contents of
    PowerShellEnvironment.ps1
    :
  6. # directory where my scripts are stored
    $psdir="${env:tools}\PSScripts"
    
    # load all 'autoload' scripts
    get-childitem "${psdir}\autoload\*.ps1" | %{.$_}
    
    Write-Host "Custom PowerShell Environment Loaded"  
  7. My ‘autoload’ Scripts
    Here is a snapshot of my autoload directory of scripts in case you’d be interested.  PowerShellScripts-autoload.7z

That’s all there is to it.  One of the reasons for putting this out there is so that I can now reference it from other posts too.  :)

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 
© Noah Coad
credit