Category Archives: Technical

Good Software Practices Scale Down

Today I revisited some scripts I last touched on December 5, 2011 for very very carefully archiving research data with checksums, an audit trail, and other very very careful things like that.

One of the requirements for this project is that the first phase of my processing needs to accept input data from a provider. Unfortunately, this input format has never been the same twice. Grr.

Upon receipt of the second variation on July 12, 2011 (six days after I started the project), I took the time to make the script somewhat configurable with an external file.

This was handy in November 2011 when I needed to do a similar set of work for a second research dataset. I put everything in a configuration file stored alongside the input data. Date format strings, headers, fields of interest, key/values for data types, etc. That meant I could share code between datasets as they emerged from the wild.

So last week, I got another set of input data. Yep, another unique format. I haven’t thought about this in over a year, and I have a terrible memory. Today, I got the input data parsed and validated in five minutes after editing a config file, because:

  1. I had one place to do customization
  2. I took steps to encourage code reuse
  3. I wrote good comments and gave myself a -h option

All this despite knowing that I was probably the only one who would ever look at this again. And I have those dates because everything is in a Subversion repository. Did I mention that I wrote it in a language I don’t know very well?

Granted, this is a tiny little thing in the universe of computer things, but my point here is that it’s often worth doing the right thing for the next guy, even for small things, even if the next guy is you. Perhaps especially if it’s you.

I Did Not Know: multitail

I think I once knew this, but forgot about it. Still, the fact remains:

I Did Not Know about multitail.

I’m watching eight different log files from a Windows server through CIFS on my Windows 7 desktop where I’m running Cygwin and multitail. This is both pleasant and awesome-looking, which is not normally the case for watching eight different log files, especially on Windows.

No Solaris 11 for Legacy UltraSPARC

I don’t do a lot of Solaris anymore, and though I’m interested in several of the new features in the upcoming Solaris 11, I wasn’t aware until today that it wouldn’t run on most legacy UltraSPARC systems:

Support for legacy systems that have included the UltraSPARC I, II, IIe, III, IIIi, III+, IV and IV+ processor architectures (as reported by the Solaris ‘psrinfo -pv’ command) has been removed. All Oracle SPARC Enterprise M-Series Servers and Oracle SPARC T-Series Servers will continue to be supported.

Source: http://www.oracle.com/technetwork/systems/end-of-notices/eonsolaris11-392732.html

I’ve always liked the T-Series systems, and have personally achieved what I consider impressive workload consolidation using a few of them. It’s not entirely clear what Oracle means with the above statement, but rumor is that support for the sun4u architecture is gone. That’s a big change from the Solaris 11 Express HCL. I imagine there are lots of places where this means “we will never ever run Solaris 11.”

Reminds me of a certain fruit company. Time marches on.

My Favorite Small Mac OS X 10.7 Features

As usual, some of the most interesting (to me) new features in the next release of Mac OS X are in the cheap seats, not on the highlight reel.  The following items are excerpted from http://www.apple.com/macosx/whats-new/features.html after today’s WWDC announcement of Mac OS X 10.7 Lion:


[Address Book] Yearless birthdays

You can now add birthdays to your contacts without including a year.

[FileVault 2] External drive support

FileVault 2 supports encryption of external USB and FireWire drives.

[Finder] Merge folders

When you try to combine two folders with the same name, the Finder now offers to merge them into a single folder.

[Internet Restore and Utilities] Built into Lion

OS X Lion includes a built-in restore partition, allowing you to repair or reinstall OS X without the need for discs.

[Networking] Low-power wake

In OS X Lion, your Mac can wake up for services such as file sharing, backup, and more without the need to turn on the monitor or attached USB devices.

[Networking] NFSv4 support

Lion includes support for NFSv4. // Not that I’ll use it, but anything that helps NFSv4 is a good thing in my book.

[QuickTime Player] Rotate clips

If you open a video and it’s upside down or sideways, just rotate it to make it right.

[Safari] Drag-and-drop downloads

You can drag downloaded files from the Downloads list to your desktop for easy organization.

[Screen Sharing] Per-user screen sharing

You can remotely log in to a Mac with any user account on that computer and control it, without interrupting someone else who might be using the computer under a different login. // This is going to be a Really Big One for some people.

[System] Windows migration

With OS X Lion, you can migrate all the information from your old PC to your new Mac. Lion automatically transfers your documents, contacts, calendars, email accounts (Outlook and Windows Live Mail), and photos stored in Picasa, and puts them in the appropriate applications. // Family IT guys, REJOICE!

[System Preferences] Custom desktop color

Now you can create a custom solid color from the color picker. // Solves a longstanding embarrassment, which is always good news.

[Time Machine] Local snapshots

OS X Lion lets you take the Time Machine experience with you when you’re away from your Time Capsule or backup drive. Time Machine keeps a spare copy of the files you create, modify, or delete right on your Mac. Now if you accidentally delete a file while on the road, you can recover it from a local copy.

[Time Machine] Encrypted backups

Keep your Time Machine backups secure by backing up to an external USB or FireWire drive encrypted with FileVault 2. // This is a Really Big One in general.

[Other Features] Resize from any edge

You can now resize a window from any side or corner. // Solves another (and more annoying) longstanding embarrassment.


I’m looking forward to the big stuff like Versions and Mission Control (not to mention the kinda-amazing Lion Server deal), but these little things are always my favorite part of a new Mac OS X release.

The New Apple TV

We have a new Apple TV. Herein, my experience.

It’s almost ridiculously small. Considering it’s basically a TV-connected 8GB iPod Touch, that’s not a surprise, but next to a Playstation 3 and 52″ TV, it’s nearly invisible. I really appreciate the lack of a power brick. It has a 6W power supply, which is maybe 1/16 what the PS3 requires.

Note that the Apple TV is connected via Ethernet to an Airport Extreme, which is connected via Ethernet to a cable modem on Comcast. Also connected via Ethernet to that Airport Extreme: the aforementioned PS3 and a Mac mini, which would ideally be on its way out of the den and into my office, but apparently not just yet.

Also note: no cable or satellite TV at our house, just Comcast data. We had Comcast WHATEVER_PACKAGE_SUPERB for the initial six months after the cable modem showed up, but never watched anything other than things we could already stream online. I have no interest in paying for traditional television service because it’s packed to the very top with Idiocracy-style nonsense.

But good TV, we like. We watch it (completely legally) via The Intarnet.

Apple ID

You use your Apple ID to turn on Home Sharing so the Apple TV can access content on iTunes from a computer on your network. I was immediately frustrated because my Apple ID had a space in the username, but the on-screen keyboard for the Apple TV doesn’t include a space character. I tried a few things, got frustrated, and used the Apple ID site to give in and change my Apple ID to an email address. This made me a bit sad; my Apple ID has been around for a long time and I had to go change it on all my devices. Once changed, the Apple TV set up fine and I could see iTunes stuff from the Mac mini. Bittersweet.

iTunes Content

I have a Season Pass on the iTunes Store for Mad Men. It downloads on the Mac mini. It shows up nicely on the Apple TV. It also manages to mark viewed content as viewed, which is very nice. I ranted for around five minutes the other day while walking to lunch about how annoying it is to play content stored in iTunes on Computer A (master) using iTunes sharing from Computer B. In my experience, metadata like played/unplayed, play counts, ratings, etc. doesn’t get updated on Computer A, which makes it much less useful. I know why this is, but it bugs me, especially for podcasts. The Apple TV appears to do this, at least for purchased TV.

I haven’t rented anything directly on the Apple TV. I don’t know if I’ll do that anytime soon, since most of the movies I want to watch are on Netflix and most of the shows are on Hulu. Most of both are Not Available for rental from the iTunes Store.

Songs, podcasts, my own non-iTunes Store videos stored in iTunes, etc. all played back fine on the Apple TV. Unless I find otherwise, my assumption is that if iTunes can play it, it can show up on the Apple TV. Works for me.

Netflix

The new Apple TV is much better as a Netflix player than the PS3 because there’s no fan, no disc (though that goes away this month, I hear), and both startup times and responsiveness are much better. It’s just a few seconds from selecting “Netflix” to hearing “Previously on Veronica Mars…”

One thing I don’t like: a few times while streaming Netflix video, it’s suffered from a cycle like this:

  1. Playback freezes for maybe ten seconds
  2. Playback resumes for five or ten seconds
  3. Repeat

This has only happened during a weekend night, but I don’t know if that’s significant. The last time it happened, I immediately switched to the Mac mini running Safari, netflix.com, and the Silverlight-based player, and saw no further hiccups. That makes me think there’s something different about the Apple TV (either its software or the Netflix backend it requires) that caused the issue. Annoying.

Hulu

Ha! It doesn’t do Hulu. The Mac mini seems like it might have to stay put. Hulu Plus is not the answer for me, and I don’t know what answer it provides to anyone who doesn’t want to watch back episodes of The X-Files on their iPad. (Not that there’s anything wrong with that.)

Hulu itself is great for watching recent shows, but Hulu Plus requires a subscription payment to still show you ads and not allow you to watch content you’re used to seeing on a mobile or TV-connected device. (Unless you have a Mac mini on your TV…)

It is deeply stupid to have to think about what device and signal path I have to use to watch an episode of freaking Glee.

I am well aware that the Apple TV will probably never let me view Hulu content without jailbreaking. I have made my peace with this.

Internet Radio

I listen to Groove Salad. It is great. It is a simple menu item on my TV now. This is awesome.

Flickr

It’s very easy to flip through pictures and slide shows from Flickr contacts. Images look nice and the UI is very responsive.

Except for those two times it crashed and the Apple TV had to reboot.

YouTube

I watched video from my friend Steven Bryant. I generally dislike actually using YouTube, but this looked good, was more or less easy to navigate, and provided a much more elegant experience than the YouTube web site or iOS app.

Except for that one time it crashed and the Apple TV had to reboot.

The Remote App

The updated Apple Remote app is on my iPhone. The gestures to control the Apple TV are not entirely intuitive, but the basics are fine. The big win is being able to use your iPhone to type on-screen, because using the IR remote is just as horrid as any other similar input method.

Incidentals

  • I haven’t noticed a method to control volume. This is good. Controlling volume in one place (the AV receiver) is much more intuitive and results in less frustration compared to the three places (app, OS, receiver) that I get with the Mac mini.
  • 100Base-T is all you get with the Apple TV. It’s meaningless, but I don’t know if Apple sells anything else without Gigabit Ethernet.
  • You have to use a dedicated menu item in iTunes (Advanced -> Choose Photos To Share…) to select images you’d like to view on the Apple TV. It seems weird, but since you never plug the Apple TV in (unless it’s broken), I guess the normal interface of select device, then select options wouldn’t work.
  • I mean it: it’s comically small.

I don’t regret the purchase, especially at $99. I’d like a few rough edges smoothed out, and I don’t know what to do about Hulu. I know there are other teeny-tiny media-to-TV devices on the market these days, but this is the one I have and it’s been good overall.