Archive for June, 2009

Using Notepad++ for Version Control

I have what you would call a love/hate relationship with Version Control Systems. On the one hand, it is oh so nice to be able to revert back to a working version of your document when you accidentally make way too many mistakes, and it no longer works. But on the other hand, it is a total pain in the ass.

I am duty bound to tell you that if you are doing much of anything involving code, you need to be using some sort of Version Control, however I am not going to ram Subversion or Tortoise SVN down your throat. I understand why programmers use them, and I have used them myself in the past. Since I try to live the whole “Least Amount Of Administrative Effort” thing, I just really don’t like them. Let me explain.

Ok, setting up full on Version Control makes sense if any of the following are true:

  • You spend a large portion of your day writing code (like your job title is “programmer” or something similar)
  • You spend more time fixing things you break while writing code, than writing code
  • Anyone else is going to suffer consequences if you totally wreck some code
  • Someone else is going to maintain and administer the Version Control System
  • You work on files that multiple other people also edit

However it does not make sense if any of the following is true:

  • You write code for your own use only
  • You could care less if it gets broken or accidentally deleted
  • You don’t have time to administer or maintain a Version Control System

Even if all of the last bit are true for you, it is still a good idea to use Version Control. Wait, what?

Version Control is a process, and if done correctly it works very well. If done poorly it gives you a false sense of security. Version Control is not necessarily a software package or commercial system.

If working with end users for all these years has taught me anything it is this; if a system is easy to use (especially if you don’t have to actually do anything) it will get used, if it is complicated (or time consuming) it will not get used. This also holds true (even more so in most cases) for the IT professionals I know.

Since don’t write enough code to make Visual Studio a wise investment, I use Notepad++, and unlike Visual Studio, I can take my IDE with me on a USB drive (Notepad++ Portable!). In the same vein, I don’t really write enough code to really justify setting up and maintaining a Version Control System, so I do it with Notepad++. Least Amount Of Administrative Effort.

So here is my solution:

I use the Backup settings built into Notepad++ to take care of my Version Control. To set this up:

  1. Install notepad++
  2. Open Notepad++
  3. Select Settings > Preferences
  4. On the Backup/Auto-completion tab, change the backup setting from None to Verbose

If you change nothing else there, now when you save your file, Notepad++ will automatically create a copy of the file without the changes since the last time you saved it. The copy will also be saved in a subfolder (named nppBackup) in the same folder where the document is saved. The copy will be named FileName.Extension.Date_Timestamp.bak by default. So a file named “test.vbs”, saved today would have a name similar to “test.vbs.2009-06-29_151927.bak”.

Cumbersome to be sure, but I am guaranteed to use it every time I work with a document.

Please don’t mistake this for something it is not. This is not a Version Control System. You do not check files in or out, and it doesn’t differentiate who made what changes, all it does is save every iteration of your document. It is Version Control in the truest sense of the term.

Check out this Extended Task Manager for Windows.

The Extended Task Manager provides additional Windows process management features and information about disk activity and network port usage.

The new “Disk I/O” chart allows you to monitor which applications utilize most of your disk at the moment:

Features:

* Displays disk input/output activity with information about related applications
* Displays network port activity with IP addresses of external computers
* Displays information about applications that utilized most of the CPU or memory at any time presented on the charts
* Displays all files locked by a select process.
* Finds all processes locking a specified file.
* Includes “Summary” tab for quickly assessing the overall state of the Windows system
* Allows freezing individual Windows processes
* Offer various visual and functional improvements over the standard Windows Task Manager

http://www.extensoft.com/?p=free_task_manager

TaskManager Check out this Extended Task Manager for Windows.

[Molly via EeeUserForums]

Simple Trick to Keep Your Computer from Locking Up

How many times have you been working on your Windows computer and without warning it locks up. Unfortunately many of us will say that this happens much more than you’d like.   One of the key reasons that your computer locks up is due to a non-responsive program, in other words a program or file running just gets stuck.

Fortunately, windows has an option that allows you to get one step closer to avoiding those very annoying lockups.  This isn’t a cure-all, but can be helpful.  This only requires a simple tweak to your registry. Here’s how….  (note: I always make a backup of my registry before making changes, so I recommend you do this first but not required).

1) Go To Regedit: Start -> Run ->  Type: Regedit

2) Find the correct directory: HKey_Current_User -> Control Panel -> Desktop

3) Find the correct file: Look on the right side and scroll down to find WaitToKillAppTimeout.  You’ll notice that this likely says 20000 today.  That’s the time in miliseconds that it waits before it stops an application that has locked up.  That’s 20 seconds!  But we’ll change that…..

4)  Modify the File: Double click on WaitToKillAppTimeout.  You’ll then get a new window that allows you to edit the “Value Data”.  I changed mine to 1000 (1 second).  Then click “OK” to complete the modification.

5) Close out of the registry. Click the big x on the top upper right.

6) You’re done….

One step closer to a finely tuned machine.

Kerry enjoys writing about a variety of topics.  Her favorite website is CallCatalog.com which is a reverse phone directory website that allows you to lookup and report unwanted phone calls.  You can also read her blog which discusses phone number privacy issues.

Admin’s Arsenal: Process Explorer

Once in a while I will get a call from one of my users describing a problem, and immediately I think to myself “impossible”. Like “it’s just not possible that your computer is deleting your email all by itself”.

Then there are the times where I find myself five minutes into the conversation going “uhhhh, yeah that’s not good, I wonder what could cause that?” (believe it or not, us IT people don’t in fact know immediately exactly what is wrong with your computer, and we’re even wrong once in a third Tuesday of the week).

When I need to get a crystal clear picture of what is happening on a system, I turn to Process Explorer from Sysinternals (now brought to you by Microsoft!). Process Explorer is everything that Windows’ Task Manager wishes it was:

Overview

Process Explorer is an advanced process management utility that picks up where Task Manager leaves off. It will show you detailed information about a process including its icon, command-line, full image path, memory statistics, user account, security attributes, and more. When you zoom in on a particular process you can list the DLLs it has loaded or the operating system resource handles it has open. A search capability enables you to track down a process that has a resource opened, such as a file, directory or Registry key, or to view the list of processes that have a DLL loaded.

The Process Explorer display consists of two sub-windows. The top always shows a list of the currently active processes, including the names of their owning accounts, whereas the information displayed in the bottom window, which you can close, depends on the mode that Process Explorer is in: if it is in handle mode you will see the handles that the process selected in the top window has opened; if Process Explorer is in DLL mode you will see the DLLs and memory-mapped files that the process has loaded.

Process Explorer also has a powerful search capability that will quickly show you which processes have particular handles opened or DLLs loaded. The unique capabilities of Process Explorer make it useful for tracking down DLL-version problems or handle leaks, and provide insight into the way Windows and applications work.

You can obtain equivalent command-line tools, Handle and ListDLLs, at the Sysinternals Web site.

Process Explorer does not require administrative privileges to run and works on Windows 9x/Me, Windows NT 4.0, Windows 2000, Windows XP, Server 2003, Windows Vista, Windows Server 2008 and on the x64 version of 64-bit Windows XP, Windows Vista, Windows Server 2003, and Windows Server 2008.

So, why use this rather than any of the dozens of other Task Manager replacements you can find on the internet? Well for starters, Process Explorer was written by Mark Russinovich. Mr. Russinovich is acknowledged as one of the foremost experts on Microsoft Windows in general, and the NTFS  file system in particular. The man is incredibly knowledgeable about the internal workings of Microsoft Operating Systems, and has authored several books on Microsoft Technologies.

Beyond that, the sheer depth of functionality in this product makes it a hands down winner in my book. Oh and did I mention that you can run it from a USB drive?

You can get more information on Process Explorer (and download it) here.


Admin’s Arsenal: Evernote 3.1

evernote thumb Admins Arsenal: Evernote 3.1

Initially I had some trepidation about doing an AA on Evernote, because as of v3, it is web centric, and some of the great features of the old v2.2 have been removed. But man is it useful!

ok, so what is Evernote? It’s difficult to explain correctly. Basically it is a note taking application on the order of Microsoft’s OneNote (which I like, but can’t justify buying a copy of for every system I work on, so it’s kind of limited in its use for me), but taken to a whole different level, oh, and it’s free (sort of).

Here is the description from the Evernote site:

Remember everything.

Evernote allows you to easily capture information in any environment using whatever device or platform you find most convenient, and makes this information accessible and searchable at any time, from anywhere. Did we mention that it’s free?

Yeah, that’s about accurate. Currently there is a free Evernote app for Windows, and Mac OS X (Leopard), a bookmarklet that will work on just about any browser, a Firefox extension, and apps for the iPhone, Palm Pre, Windows mobile phones, and limited Blackberry models .

It requires Blackberry OS4.6 or above so at the moment it is limited to the Bold (and since I just got one, this is a good thing), Curve (the new one), and Storm, however I have no doubt that RIM will update all others to 4.6 soon.

The thing that makes this a killer app for me is that Evernote can make text in images searchable. So if I take a picture with my Blackberry of say, a BSoD error message, and save it to Evernote, I can then access it on my desktop (or another machine connected to the internet), and figure out what that error message is telling me.

All in all, the ability to clip portions of websites, entire web pages, text from documents, and email from Outlook (yeah it integrates with Outlook), makes this a really really handy tool for IT work (not to mention blogging).

The free accounts are limited to 40MB of Monthly upload data (text, images, audio, and .pdf files only), whereas the premium version gets you 500MB per moth, removes the small advertising window in the desktop app, and can sync any kind of file.

While 40MB may not seem like much, it is roughly 20,000 text notes, or 400 mobile snapshots, or 270 web clips, or 40 audio notes, or 11 high resolution photos. 500MB is roughly 12.5 times that amount of data.

The cost of the premium account is $5/mo. or $45/year.

If you’d like to try Evernote out, you can sign up and download it here: http://www.evernote.com/