Posted on Dec 14, 2007

Are you for Roomba?

Last week there was a woot-off. I try not to splurge – woot-offs are dangerous – but they put up a refurbished Roomba at a fairly decent price. My wife and I had just agreed days earlier to save up and buy one to alleviate some of our regular vacuuming, so it had to be a sign.

It arrived yesterday, and thus far the pandemonium has been incredible. It took its standard 60 minutes to map the living room / dining room / front hallway and, in the process, spook-out the cats. Watching it navigate around the furniture was like watching my CS 115 professor explain how we were going to write our first somewhat complex recursive method in java – finding a route through a maze. You know, something like:

public boolean solve (int row, int column) {
	boolean done = false;
	if (valid(row, column)) {
		grid[row][column] = 5;
		if (row == grid.length-1 && column == grid[0].length-1)
			done = true;
		else {
			done = solve(row+1, column);		// down
			if (!done)
				done = solve(row, column+1);	// right
			if (!done)
				done = solve(row-1, column);	// up
			if (!done)
				done = solve(row, column-1);	// left
		}
		if (done)
			grid[row][column] = 7;
	}
	return done;
}

Admittedly, I’m enjoying SyntaxHighlighter a bit too much. This particular model lets you set a schedule for when it should go about its business, which is very convenient since it means we can set it to terrorize the cats clean the house while we’re at work.

Posted on Dec 13, 2007

Code Highlighting With Google’s SyntaxHighlighter

This is (mostly) a test post to see how well Google’s SyntaxHighligher works. As you hopefully see below (if your browser supports javascript), it works well. I approve!

function safe($num) {
	// there has to be a smarter way to do this!
	// make sure that $num is always above 65
	$diff = date("w",$now) + 65;
	if ($num < 65) {
		$num+=$diff;
	}

	// make sure that $num is in 65-90 or 97-122
	if (($num > 90) && ($num < 97)) {
		$num+=7;
		return $num;
	}
	elseif ($num > 122) {
		// be formulaic rather than arbitrary
		$d = $num-122; $e = $d%7; $f = $d+$e;
		$num-=$f;
		return $num;
	}
	else {
		return $num;
	}
}

I use a combination of plugins that all fight to figure out what to do with PHP soure code. In order to make this work, I used SimpleCode to translate the source into HTML entities so that Exec-PHP wouldn’t try to execute the code block.

The default font set for the code display is Consolas, and then the standard Courier New, Courier and then whatever your system’s default mono-space or serif fonts are. If you haven’t downloaded Consolas, I’d highly suggest it. Scott Hanselman wrote a couple of articles about it, including making Consolas your default Console font, which I do with reckless abandon.

SyntaxHighlighter has a couple of nifty options, such as disabling some extra controls, removing the line numbers and keeping the <pre> block collapsed by default, ideally so that you could have links to expand them as needed. I made one change to the style sheet – making the grey left-hand border 20px thinner. I thought a 45px band of nothing was a bad use of space. The highlighting loads absolutely last on the page so you, the user, don’t sit there waiting for it to work in order to begin browsing content.

Sadly, there is currently no highlighting set for Basic, else Tuesday’s post would have looked better.

Posted on Dec 11, 2007

Basically Silly

10	PRINT "THIS IS THE SONG THAT DOESN'T END"
20	PRINT "YES, IT GOES ON AND ON MY FRIENDS!"
30	PRINT "SOME PEOPLE STARTED SINGING IT NOT KNOWING WHAT IT WAS"
40	PRINT "AND WE'LL CONTINUE SINGING IT FOREVER JUST BECAUSE."
50	GOTO 10

Stuck. In. My. Head.

Posted on Dec 7, 2007

Useful Tools

I’m somewhat of a tools guy when it comes to my computing environment. I like apps that make my life easier and extend my operating environment beyond what was originally intended. In my previous job, I was one of the guys writing little scripts to automate annoying tasks. It’s “my thing”. The first time I read Scott Hanselman’s Tools page, I think I may have salivated just a little. I immediately downloaded about 60% of the list just to see what they each did in greater detail. His list for 2007 included “The Big Ten Life and Work-Changing Utlities”, of which with I mostly agree.

I spent a few minutes the other day going through my c:tools directory to see what was actually there. Over the last few years I’ve just dumped every standalone app that looks interesting into this one directory, added it to my SVN repository so that I can easily populate it onto any workstation, and ignored just how ginormous it was becoming. As a result, I ended up deleting more than half of the apps, a great deal of which I hadn’t used since they were downloaded. In the end, I kept only the tools that I use on a regular basis:

  • Deep Burner
  • DarkRoom – DarkRoom is fantastic for distraction-free writing, but it’s not much of an editor, so I tend to only use it in network-free meetings or when I need to have a little mind-dump onto the keyboard.
  • Notepad++ – Almost took over as my go-to text editor for a while. It’s a pretty powerful little thing!
  • Notepad2 – Used mostly when I need a quick editor that’s better than Notepad.exe.
  • ntouch/dtouch, which I’d link to if I could find their original site. They’re GUI file timestamp modifiers
  • All of the SysInternals Tools (I use about 50% of them on a weekly basis, especially ZoomIt)
  • Various NirSoft Tools
  • Random Tools by GP Williams, mostly Kill.exe
  • ResHacker
  • Some ISO creation utilities from Terabyte Unlimited
  • jHead
  • Microsoft’s Virtual CD Control Panel (this is a direct exe link.. it has no homepage!)
  • Various Other cmd-line apps (unrar.exe, par2.exe, diskuse.exe, vnc viewer, etc.)

Of note, I don’t actually use Notepad++ or Notepad2 all that often. I’ve tried many text editors, (perhaps they deserve their own post), and I only keep either of the enhanced notepads and DarkRoom around as once-in-a-while editors. I fell in love with UltraEdit32 about eight versions ago, and have used it ever since as my primary text editor. I like TextMate on my Mac, so I thought I’d enjoy E-TextEditor about as much. For some reason it didn’t quite stick, but I may have to give it another shot at some point.

Beyond that, however, I do have some other non-standalone applications that have made my me more productive or equally easy in the past year or so:

  • Automatic Wallpaper Changer – Yeah, I just like pretty backgrounds. What can I say. And, like on my mac, they should cycle constantly. Carry on.
  • Cygwin – We use this at work on our production systems, so I thought it was worth a shot. I’ve honestly given up using cmd.exe since I really don’t need it anymore. Running tcsh on my Dell WinXP laptop feels dirty, but so good.
  • FireBug - I have to agree with Scott, it is arguably the most powerful in-broswer IDE available. I’ve abandoned every other web debug extension for Firefox… there’s simply no need.
  • Foxit Reader – I uninstall Acrobat reader on any machine I can and install Foxit. It’s so fast it makes me seriously question what Adobe is thinking making a bloated PDF reader. I’m trying to get the systems folks at work to adopt it as the default PDF reader for new hire machines.
  • FeedDemon – Still my favorite feed reader. I use NewsGator‘s Online reader from home.
  • PDFCreator – Useful not only for creating PDFs but also for being a poor man’s PDF slicer and dicer.
  • SpeedFiler – I save bunches of time every day using SpeedFiler to quickly move email from my Inbox to a more appropriate location. Version 2 learns from your habits and quickly suggests destinations. Love. It. (It’s one of only two !free applications on this list, and it’s worth every penny.)
  • TeraCopy – It’s overkill as a default copy/move handler, but for big moves to external drives or other machines, it’s perfect and fast. It’s also very fast.
  • Unlocker – How many times has that silly “It is being used by another person or program” message come up? Too many. Unlocker handles this like a hot knife through.. well, something that doesn’t actually require a hot knife, but is even more easily cut with said knife.
  • VLC Media Player – It’s the one media player I can always count on to work. How can you go wrong? I pimp this to friends and family on a regular basis.
  • WinSnap – It takes screenshots. Very well.

I wouldn’t say any of these (except maybe FireBug or SpeedFiler) are actually life changing applications. They each get a fair amount of use, however, and I’d either be doing something by hand or using a less-functional application in each of their respective places should they not exist.

Posted on Dec 5, 2007

Fiddling With UpRight

UpRight, by Otaku Software, is a One-Click file transfer utility, aimed at web developers and anyone else who might need to quickly upload a file to an ftp server without going through the normal upload motions. I browse the Otaku site every few months because their software is, for lack of a better word, nifty. UpRight isn’t brand new – I passed it over once or twice thinking it was just one more app to install, but after a couple of weeks of serious toying, I’m pretty happy with it.

upright_menu.JPG
I have basically three uses for UpRight:

  1. Uploading files to my web site for various reasons
  2. Uploading podcast audio for my chuch’s web site
  3. Quickly moving data to my “general crap” S3 bucket

For each, I’d always had a different workflow which involved an AJAX web form, ncftp in cygwin and Bucket Explorer, respectively. With UpRight, it’s one two clicks, and data begins to move. (Note: It would be one click, but I have more than one upload location, and UpRight nicely nests these for me rather than create multiple context menu items.)

Really, the S3 access is my favorite. It’s rare that I actually need to access my bucket(s) from work – generally all of my usage is from home – however, Bucket Explorer doesn’t live up to my expecatations. Nothing big, really… it just randomly forgets my S3 credentials and sometimes thinks that I don’t have an internet connection. Other than those “features”, it works “fine”.

UpRight, however, works perfectly for this purpose. It is no more and no less than as it advertises itself. It moves selected files/folders, and it does it very well.

Of course UpRight is, like any software application, not perfect. There are a couple of things I’d like to see Otaku improve or add:

  • Handle file overwriting. Right now, it just overwrites without asking. I’d like to see at least the option for a prompt which I can choose to turn off as needed. Per-location prompt preference would be great.
  • SCP support. UpRight would be perfect for the quick uploading I do from work to home, currnelty using WinSCP (which I do really like).

One feature I don’t have much use for is the ability to take an action after the upload completes. In its current form, this allows you to customize the “completed” dialog, send an email or copy some text to the clipboard. I can very easily envision strong use cases for each of these options, but for me.. meh. I’d love to see an option to “run this command” as well so that I could have the upload trigger a script of some kind.

Overall, I’ve saved some time with UpRight. It’s not a killer app, but it saves a couple of minutes throughout the week, and I really like that.

Otaku also makes a few other nifty utilities such as TopDesk (Expose and 3D task switching for Windows) and DeskSpace (think Compiz Fusion for Windows). I’ve been using TopDesk for a few years, and have had varying degrees of use for it since, I think, version 1.2ish. At the moment, I’m using it to quickly move my windows out of the way when I need to see my desktop, tile my app windows when I have too much going on, and display the pretty 3D task switcher when my laptop’s memory isn’t completely used up.

Were I to score products, I’d give this one a 7/10 – Not awesome, but certainly very useful. I’ll install it next time I reload my system. I don’t, however, so you should ignore this and the previous sentence!

Posted on Dec 4, 2007

exactly.

Mirrored from plonkmedia.org.