Friday, December 24, 2010

Overheard: Conversation With My Nephews

Cast: Elaine (my sister), David (my brother), Dace and Dover (my nephews)

Dover: "Aunt E, how come you are not married?"

Elaine: "Baby, no one has asked me to marry them yet."

Dace: "Why don't you marry Uncle David?"

Elaine: "I can't marry Uncle David because he is my brother."

Dace: shaking his head, "That stupid law."

Thursday, December 16, 2010

Making Wrong Decisions

Moving from individual contributor (IC) to taking on management responsibility I have observed two important (and probably obvious) facts. First, a manager ends up making a lot more incorrect decisions then a IC; Second, (and perhaps most obviously) those decisions effect more people. So how do you cope when you make a wrong decision?

I've found the hardest part for me is dealing with different reactions when things go wrong. My first reaction is to start fixing right away. My idea of taking responsibility is to try to resolve the issue if possible and start damage control if it isn't. The error here is that I didn't stop long enough to think about how the team will react.

Here is an example: working on a (hypothetical) project with delivery date for a software module. Discussing it with the team, one member is concerned about the risk of meeting the delivery date and proposes an alternate date. After some back and forth I make a judgement call and decide that it is worth taking the risk since getting the module out early will lower cost. Half way in, it is clear that my judgement was wrong. Now the team member is very upset. Not only was he proven right about the risk, now he is going to be asked (by his jerk manager me!) to work harder / stay extra to try to finish the module within the required deadline.

Putting the poor guy (or gal) at ease has to start with eating crow. I think the idea here is to communicate that the mistake was mine and that I'm going to try to fix it. I think it is important to say it (provided I think it was my mistake). I have to admit though I don't know exactly the best way to do this.

Let's reverse the situation and say that it was the team member that made the case for the risky decision that turned out to be wrong. In that case, I think it is important to take responsibility for decisions you approved. Identify if the team member made an error of knowledge or a breach of judgement. Sometimes information was wrong or not clearly understood.

I know I have more questions than answers at this point so I'll turn to you. What are your strategies for dealing with wrong decisions?

Sunday, December 5, 2010

SmartSleep and Secure Virtual Memory

I used SmartSleep for a long time to control my MacBook Pro's sleeping habits. I've finally discovered that this utility doesn't work with Secure Virtual Memory. First, some background.

There are essentially 2 ways a Mac can sleep. The first is 'regular sleep', or for you Windows users, suspend. In this mode the computer saves power by shutting down peripheral hardware (like the disks, screen and keyboard light) while keeping the processor in a low power state. The battery is used to keep the RAM powered so that when you resume (ie. open the lid) the computer can turn everything back on and start right back where it left off.

The second is called 'safe sleep'. This is like hibernate mode for Windows users. In this mode the computer RAM and processor state is written out to disk and the computer is turned off. Obviously this is very power efficient (off == good for battery life!). The problem with this mode is that when you want to use the computer you have to wait a LONG time for the resume process to complete. On my machine I have 8 GB of RAM (on a laptop - how far we've come!). It takes almost 2 minutes to resume my machine in safe sleep.

SmartSleep is supposed to let you control and choose these modes. There is also a hybrid mode that will suspend AND hibernate, but only power down the machine if the battery goes too low. If the battery is removed or dies, you can then resume like you did from a hibernate. It takes a long time but it works and you loose no data. In the best case it resumes quickly because the state of the processor/RAM was preserved by the battery power.

Now enters Secure Virtual Memory. I use this setting because I don't want data like key material and passwords leaking into my swap file. It has almost no impact on performance and in the case that my laptop is stolen or captured at the border it will protect my privacy rights. You can turn on Secure Virtual Memory in the Security System Preferences Pane.

SmartSleep doesn't take the Secure Virtual Memory setting into account. This means that if you have it turned on it sets the hibernatemode option incorrectly. When my machine goes into safe-sleep, it can't recover and I'm forced to reboot (and loose data!). Here is the settings that should be used:

The hibernatemode option in power management settings selects the suspend policy:
$ sudo pmset -a hibernatemode 0
always regular sleep (disable safe-sleep)
$ sudo pmset -a hibernatemode 1
always safe-sleep (disable regular sleep)
$ sudo pmset -a hibernatemode 3
regular sleep first, safe-sleep if the battery is very low on power or is unplugged
$ sudo pmset -a hibernatemode 5
always safe-sleep with secure virtual memory
$ sudo pmset -a hibernatemode 7
regular sleep first then safe-sleep with secure virtual memory
To find out what setting you are currently just type:
pmset -g | grep hibernatemode

I've uninstalled SmartSleep for now and will send this feedback to the author to see if it can be fixed.