Summary of “Managing Humans,” 2nd edition

The second edition of “Managing Humans” came out this summer. In it, Michael Lopp (aka Rands) collects the engineering management wisdom from his blog in convenient dead-tree form. Again.

The second edition adds 18 chapters to the first edition, by my quick count, totaling 292 pages. The first edition was 209 pages. (I’m kind of disappointed the new edition didn’t say “Now with 40% more verbiage!” on the cover.) All sarcasm aside, I think that’s a good amount of new content, almost enough to justify buying the new edition. But I checked out the new edition at the library.

I loved the first edition, and I’m excited to dive into the second edition.

Here’s the money quote for me, from the first chapter:

“Every single person with whom you work has a vastly different set of needs. Fulfilling these needs is one way to make them content and productive. It is your full-time job to listen to these people and mentally document how they are built. This is your most important job. I know the senior VP of engineering is telling you that hitting the date for the project is job number one, but you are not going to write the code, test the product, or document the features. The team is going to do these things, and your job is to manage the team.”

That pretty much sums up Rands’s writing.

On to chapter two.

Note: that quote is originally from this Rands in Repose post: Don’t Be A Prick. It was edited before getting into the book.

Also, the book has a nifty web page with an old-school click-through intro: http://managinghumans.com/

Learnable Programming, Bret Victor, and Other Two Word Phrases

Bret Victor just published his latest essay, “Learnable Programming.”

In “Learnable Programming” Bret criticizes the Khan Academy’s latest “interactive” programming education tools and suggests a better way to teach programming.

He footnotes the essay with this summary:

This essay was an immune response, triggered by hearing too many times that Inventing on Principle was “about live coding”, and seeing too many attempts to “teach programming” by adorning a JavaScript editor with badges and mascots.

“Inventing on Principle” was the talk he gave at CUSEC 2012.

If you haven’t seen/read both you must immediately:

  1. Get a cup of coffee, tea, or whatever comfort beverage you prefer.
  2. Find a comfortable place to sit and pay attention for about two hours.
  3. Watch the video of Inventing on Principle.
  4. Read the Learnable Programming essay.

It’s fantastically worth your time.

Bret sidenotes* the essay with this exciting teaser:

Forward reference: Some work that I’ve done in automatic visualization of ad-hoc data structures will be published later this year, in collaboration with Viewpoints Research.

I’m looking forward to that!

* I just invented the verb “sidenote,” as in, “He sidenoted the heck out of that teaser in the side note.”

The Architecture of Open Source Applications, Volume II: FreeRTOS… released!

Exciting news!

My chapter on FreeRTOS, the open source real-time operating system, has been officially published in The Architecture of Open Source Applications, Volume II!

You can buy it on Lulu.com here: The Architecture of Open Source Applications, Volume II, dead tree version

Or you can wait a week or two and find the complete text (of my chapter and all the others!) here for free: AOSA online

I’m very happy how it turned out; it was a lot more work than I expected, but it was worth it. Greg Wilson and Amy Brown edited the heck out of it, I would love to work with either (or both) of them again. Thanks to them for pulling the whole thing together! Thanks also to Richard Barry, the primary FreeRTOS developer, for his technical help.

I’m looking forward to reading the whole book myself; so far I’ve only read my chapter.

A few choice chapters that I’m particular looking forward to reading are:

So check out the book, either online or in paperback, and enjoy!

tmutil: How to find hidden arguments

tmutil is a handy tool to control Time Machine backups from the command line. I think Apple added it in Lion, but I don’t have a pre-Lion system to verify that.

“man tmutil” and “tmutil” (with no arguments) print helpful usage information, but I was surprised that there were no commands to see what destination Time Machine was currently using. I also couldn’t find a command to tell me if Time Machine was currently running.

I figured tmutil must know that information, so I went looking for it.

The short version:

I found commands to do what I wanted:

tmutil destinationinfo

prints out where Time Machine will backup to.

And these two commands will print out different views of the Time Machine status:

tmutil status
tmutil currentphase

Of course, those commands are NOT documented by Apple, so they may not always work, but they seemed to work for me. YMMV, and they may set your computer on fire. No guarantees, blah blah blah. Taking advice from strangers on the internet is always a possible hazard to your health and happiness.

The long version:

Here’s how I found these undocumented/hidden commands.

First I figured out where the tmutil file lived:

$ which tmutil
/usr/bin/tmutil

Then I figured out what kind of file it was:

$ file /usr/bin/tmutil
/usr/bin/tmutil: Mach-O universal binary with 2 architectures
/usr/bin/tmutil (for architecture x86_64):    Mach-O 64-bit executable x86_64
/usr/bin/tmutil (for architecture i386):    Mach-O executable i386

This told me the tmutil file was an executable program, as opposed to a shell script. If tmutil was a shell script, I would have opened it in a text editor and looked through it for a list of commands. However, since tmutil is an executable program, it won’t yield its secrets to us quite as easily as a shell script.

To dig through executable programs and files you’ll need the “strings” command. It exists on every unix-y OS, including OS X. It describes itself in “man strings” like this:

find the printable strings in a object, or other binary, file

So I ran:

strings /usr/bin/tmutil > tmutil-strings.txt

I opened up tmutil-strings.txt in a text editor (MacVim is my editor of choice, thanks for asking) and looked for a command that I knew existed, “startbackup”, because usually all of the supported command line options for a program will be near each other in the strings output. Here’s what I saw near the “startbackup” text:

/SourceCache/TimeMachineTools/TimeMachineTools-41.3/tmutil/tmutil_common.m
EnumerateModulesWithBlock
processor != NULL
help
enable
disable
startbackup   <<<--- this is what I was searching for
stopbackup
enablelocal
disablelocal
snapshot
delete
restore
compare
setdestination
destinationinfo
addexclusion
removeexclusion
isexcluded
inheritbackup
associatedisk
latestbackup
listbackups
machinedirectory
calculatedrift
uniquesize
verifybackups
currentphase
status
verifyadditions
quickcheckimage
GetVerbForVerbProc
proc != NULL

From this output I guessed that everything between “help” and “quickcheckimage” was a command line option. And it looks like perhaps the “destinationinfo” and “status” commands might be what I was looking for. I ran tmutil with those options and it looked good, case closed!

Here’s a complete list of commands that appeared in the “strings /usr/bin/tmutil” output that aren’t described in “man tmutil” or “tmutil”:

currentphase
destinationinfo
quickcheckimage
status
verifyadditions
verifybackups

I only tried “currentphase”, “destinationinfo”, and “status”. I’ll leave the rest up to curious readers.

So there you go: a brief walkthough of how to discover hidden and undocumented commands in an executable file. Of course, they may be hidden or undocumented for a reason: they may be buggy, unsupported, and have unforeseen and disastrous side effects. Use them at your own risk.

iOS5 makes the iPad 1 a slow and annoying experience

Marco says:

“The original iPad is nearly two years old, runs iOS 5 well, and will probably get a few more significant OS upgrades.” (link)

as a way to imply that Apple users are better cared for than Android users.

That might be true, but I disagree with Marco’s “iPad 1 runs well with iOS 5” statement.

I have an iPad 1 and it was snappy and responsive. I enjoyed using it. Note the past tense.

Then I upgraded to iOS 5.

Now apps crash far more often than with iOS 4, and *everything* is slower. The response to touchscreen interaction is so slow that I sometimes can’t tell if the iPad actually registered a touch; one or two seconds will go by and an app doesn’t appear to have seen the touch… and then it finally responds. Apps that never crashed before now crash at least once a day. Even Safari crashes on a daily basis, which you would think wouldn’t happen since that’s Apple’s own app.

As a tech geek you might think that I’m being too picky, and I might agree, except that my wife also agrees. She never complained with iOS4, but after a week with iOS5 she declared that it’s too slow to use. And she’s no cutting-edge speed demon; she’s perfectly happy on her 2006-era laptop.

I tried a couple of resets, reboots, and other potential solutions the Internets suggested, but nothing seems to help.

It looks to me like Apple crammed more functionality into iOS5 than the iPad 1 is able to comfortably handle. And I’m concerned that any further updates will do more of the same.

Just because Apple supports OS updates longer than Google/Samsung/etc. doesn’t mean that their devices are any better supported. Apple seems to have supported iOS5 on the iPad 1 in name only, not in spirit.

“Fixing” HipChat Crashes on Mac OS X Lion

In case this helps anyone else on the Internets and Googles out there:

If HipChat refuses to start for you on your Mac like this (“HipChat quit unexpectedly”):

"HipChat quit unexpectedly"

then you might be able to fix it by unchecking “Automatic graphics switching” in the Mac System Preference “Energy Saver” pane.

For some reason Adobe Air (the platform HipChat runs on) doesn’t like it when “Automatic graphics switching” is enabled.

After HipChat is running you can safely re-enable “Automatic graphics switching” to save energy when running on the battery.

Unfortunately right now you’ll have to disable “Automatic graphics switching” *every time* you want to start HipChat. Bummer. The HipChat folks and Adobe are all aware of this issue, hopefully we get a fix soon.

(I stumbled across this “fix” here on the Adobe forums: http://forums.adobe.com/message/4080052#4080052)

The Architecture of Open Source Applications: FreeRTOS

Exciting news: I’m writing a chapter about FreeRTOS for the next edition of The Architecture of Open Source Applications!

Greg Wilson, one of the editors of the book, (the other editor is Amy Brown) tweeted that they were looking for coverage for embedded software. Well, I thought, I’ve been wanting to learn about FreeRTOS, and that fits the embedded and open source bills, so here we go!

I learned a lot reading the current edition of the book, and I hope that others can learn something from my forthcoming chapter on FreeRTOS.

Mac apps I love: Caffeine

Caffeine, besides being one of my favorite ingredients in coffee, is a very lightweight app that keeps your Mac from dimming the screen, going to sleep, or starting the screensaver. It lives a quiet, satisfying life in your menu bar.

It’s perfect for when the Macbook is running on battery power I but don’t want the display to dim or go to sleep. I’m happy to leave my sleep/dim settings where they are and use Caffeine to keep my Mac awake.

Get it here: http://www.lightheadsw.com/caffeine/

Created by: Lighthead Software

Price: Free

Rating: 8    (1=never use it again, 10=first thing I install on a new computer)