After Hours

When you're tired and hurried, watch out for the mines!

Minesweeper is Chip Camden's game of choice when he needs to evaluate his alertness. He offers advice on what to do if you determine your brain is in low power mode.

Steve stared at the empty screen for a moment, confused. The text editor had casually informed him that it was creating a "[New File]," but the file should have already been there. Steve had been editing it all day. In fact, he and Donna had been working all weekend to get the project finished before Monday. Had he finger-fumbled the filename? Was he in the wrong directory? No, he was typing the right name in the right place. "It's something stupid I'm not seeing because it's Sunday night at 11PM and I'm too tired," thought Steve as he vainly tried to reconcile the conflicting details of his shell history.

Then he saw it. In preparation for a build, he had meant to delete all the intermediate object files, but he had deleted the source files instead. The extensions only differed by one frickin' character, and that was the one he got wrong.

The enormity of Steve's mistake began to dawn on him as he went down the list of fail-safes and watched each one crumple like Wile E. Coyote's umbrella under the weight of a falling boulder. He and Donna had been working in the same directory to save time. They hadn't committed anything to source control all weekend for fear of breaking the build, and they hadn't gone to the trouble of establishing a branch. The last backup occurred Friday night. They lost the entire weekend's effort.

Even if Steve hadn't mistyped that command, it's possible something else like that might have happened, or that he and Donna might have introduced more insidious errors. Their mistake was much broader than one typo: they were in a hurry, and they were tired.

It's a lethal combination, and the two often worsen each other. When you're hurried, you burn up more of your energy fretting over the schedule. When you're tired, you just want to hurry up and get finished. Both things can lead you to take risky shortcuts and make careless errors. We should slow down instead when our brains aren't functioning at 100%, but we're usually like the Seattle drivers in the rain: we speed up to get it over with quicker.

Self-diagnosis is also problematic. We usually know when we're hurried, but we often can't tell when we're tired until we make a stupid mistake. We need to be able to gauge our alertness before we mess up something important.

One tool I use to perform a periodic self-evaluation (as well as to take a much-needed break) is to play a game. You have to choose your game wisely, though. It shouldn't have such a long duration or require so much mental effort that you burn up all your time and energy playing it. Five minutes or less is ideal. It should provide a tangible result that will serve as your alertness score. Most importantly of all, it should test the relevant parts of your brain. Given that, playing it will serve the dual purpose of evaluating and improving your faculties.

I find the little game of Minesweeper to be highly accurate in these respects. It's available in several versions in the FreeBSD ports, a version comes with Windows, and there's even a JavaScript version you can play online. Once you've become proficient at this game, it satisfies all of the criteria I named above. If the expert level takes you more than five minutes to solve, something's wrong with you. In order to reach that proficiency, though, you have to become familiar with various patterns that you recognize instantly and act on without reasoning through them. When you become tired, your ability to recognize these patterns becomes impaired and you often confuse them, resulting in stepping on a mine. This closely parallels the activities of our profession in which fatigue chews our collective shorts: recognizing the symptoms we see and the assumptions we can make about them.

There are exceptions, but they're pretty easy to recognize. For instance, at the very beginning and especially towards the end of the game, you may confront a situation in which there is no logical way to determine the location of mines, and you're forced to guess. If you step on a mine at that point, that's not a measurement of your ability.

There's also the odd outlier: I achieved my best score ever one late night after three beers when I was angry. I wasn't even thinking about the game, I was thinking about the events that had upset me, and I just let my cerebellum play the game on its own in order to burn off some energy. Winning surprised me, and setting a new record for myself even more so. But that's a different phenomenon called doing without thinking. Real work for clients usually requires some thought.

What you're looking for is the specific kinds of mistakes you make. For instance, a well-known pattern is 1-2-1. Whenever you see that, you know that there is a mine by each 1, and no mine by the 2. However, if you see 1-2-2 and mark the 1, you've either mistaken the pattern or confused the valid assumptions about it. That's an indication that your concentration is lacking.

Once you've determined that your brain is operating on reduced power, the best thing you can do for your client and yourself is to stop working; otherwise, you will likely create more problems than you solve. However, if you must continue anyway, at least slow down. Double-check your assumptions and your conclusions. Don't cut any corners on the good practices (like source control and backups) that can save you if you do fail. The explosion you avoid could be your client's.

Thanks to TechRepublic member Bob Eisenhardt (reisen55) for suggesting another great topic idea.

About

Chip Camden has been programming since 1978, and he's still not done. An independent consultant since 1991, Chip specializes in software development tools, languages, and migration to new technology. Besides writing for TechRepublic's IT Consultant b...

15 comments
Who Am I Really
Who Am I Really

I fried an ISA Multi-I/O controller card when swapping out a Disk I changed out a 400MB Connor with a Samsung Apollo 250MB this was before instant at boot auto-detect, with only manual auto-detect available from within the BIOS, and before HDD Mfg. started taking us to the cleaners for storage space the Formatted Capacity of the 400MB was approx. 419MB (419,430,400 Bytes) -63 sectors and the 250MB was approx. 262MB (262,144,000 Bytes) -63 sectors what happened was; I wanted to test the disk as the system it came from was missing some parts and I wanted to make sure it would be worth it to repair so I after taking out the 400MB I installed the 250MB into the working system but, I forgot to enter the BIOS and tell it the disk parameters had changed well the disk worked in the system that way but @ the next boot, the floppy controller said no drives / floppy controller error oops! $63.00 lesson learned but it's not all bad, because with that lesson, I learned how to install, "without cooking anything" 2 Multi I/O controllers into any 80x86 (386, 486) the primary for the installed HDDs, FDDs, LPT1, COM 1 & 2; and the secondary using the secondary IDE address for the CD-ROM, as well as LPT2, & COM 3 .etu

Sterling chip Camden
Sterling chip Camden

... only cost $63, a little time, and a facepalm -- that's not too bad at all. The story alone was worth that.

Robiisan
Robiisan like.author.displayName 1 Like

Fortunately, it was only my own bottom that got bit. I'd borrowed a Victor (Vector?) machine with two 5-1/2 inch floppy drives (and no hard drive) and spent almost an entire Saturday creating a "database" of teaching tapes I owned, some 700 entries. Title, speaker, tape number, yada yada. 10 hours of data entry on some long forgotten predecessor to Excel. Not enough room on the disc to sort the file. Decided to delete the previously sorted file (created to test the operation when I was about 3/4 of the way through the data entry) on the other disc and sort to that location. You guessed it - I forgot to specify the file name with "b:\" in front of it. Design time and all ten hours of typing gone in a millisecond! I never did recreate that database! Personally, I use both Minesweeper and Free Cell to decompress and check my acumen, particularly when I'm working late at night (chronic night-owl - this post is being entered after 0100, local). I don't need to play the expert game in Minesweeper - if I can't best the intermediate level two tries out of three in under three minutes, I stop working on anything (significant or not) and go to bed. And if I make some obviously preventable blunders (BOOM!), I may decide to quit for the night after the first game. I use about the same criteria as Petaloutha for my self-eval from Free Cell.

Sterling chip Camden
Sterling chip Camden

... anything less is too easy to be a good evaluation. Thanks for sharing your horror story. I feel your pain.

petaloutha
petaloutha like.author.displayName 1 Like

I'm working on a Master's Degree, and the level of work requires some long, long reading and writing sessions. Just this week I wrote a blog post on how I can use Angry Birds to explain the various theories of learning - you can catch it at http://highlycaffeinatedyarnbender.wordpress.com/ . For a self-check on the tiredness-to-productivity quotient, I usually play Free Cell Solitaire. It's a game I normally run 40-50% wins, sometimes more. If I play 4 games in a row without a win, I know I'm too tired to properly evaluate and apply what I'm learning, so it's time to quit!

Sterling chip Camden
Sterling chip Camden like.author.displayName 1 Like

My record is 1090 wins out of 1101 games played. :D I haven't played Angry Birds yet, but your post tells me I shouldn't start.

sboverie
sboverie like.author.displayName like.author.displayName 2 Like

Some tasks require intense concentration for hours. One of the best rules we had was if you are still troubleshooting after an hour and not making progress then take a break; if you go two hours and not making progress then call for help; a fresh brain can see details that a fatigued brain can not. Most of the problems I deal with are similar to minesweeper in that there are patterns that once you learn them then you can solve the problem very quickly. It also pays to involve all the senses in troubleshooting, listen for unusual sounds, look for something out of place, smell something burning and feel the movements. The last thing is to take extra time if you are not sure if the solution will work or make the problem worse. If you are tired then you tend to want to end the efforts too quickly and if you are over confident then your assumptions will bite you.

Sterling chip Camden
Sterling chip Camden like.author.displayName 1 Like

Unfortunately, with some of the problems I deal with, especially in the Windows API, you can legitimately spend three or four hours just diagnosing the problem even on a good day. But it never hurts to get another pair of eyes on it.

HAL 9000
HAL 9000 like.author.displayName 1 Like

As I don't make mistakes but the apprentices that I had to once work with are a different story. :^0 :D :^0 :D Now the story about the apprentice who stuffed up several million $ of Mainframe because they couldn't properly install the ends on a cable and didn't see any need to check the cable from the Main Frame Room to the CEO's office which I wore the blame for. Col

Sterling chip Camden
Sterling chip Camden like.author.displayName 1 Like

It makes some of the mistakes of the inexperienced look completely daft, but we have to remember that they have no reference for what we've learned to consider mere common sense.

HAL 9000
HAL 9000 like.author.displayName 1 Like

I never screwed up a Data Lead so badly that it feed unregulated Mains Power into a Logic Circuit. I still insist that that Apprentice was trying to kill me. It is however interesting to watch the Logic Circuits Fry while you are playing on them setting things up. ;) It's got better now with IDC Connectors but it's still possible to fit a connector 180 Degrees out though these days Power & Data Leads are different. :D I didn't so much mind him doing it the first time but the second time that he did it to me after being told was just a little bit over the top. :( Good thing I suppose that the Fitters had screwed up the installation so I didn't have to spend hours explaining why so much hardware had been reduced to scrap value. :^0 I still maintain it was a bad design even on the [b]Most Perfect[/b] system ever built according to the Sales People. ;) Col

Charles Bundy
Charles Bundy like.author.displayName like.author.displayName 2 Like

You can bill for the alertness software and/or hardware! :) My worst goof predates minesweeper and MS Windows for that matter... Was doing an upgrade on a SunOS box and picked root for swap :(. This was after working 18+ hours... Your article sure brings back memories! I now follow the HALT principle and only do great and terrible things when not Hungry Angry Lonely or Tired.

Sterling chip Camden
Sterling chip Camden like.author.displayName 1 Like

... I go off the clock when I'm performing such an evaluation. I wouldn't think of billing clients for playing Minesweeper!

Editor's Picks