Atheros / madwifi and NetworkManager stability tweak

On May 28, 2007 · 0 Comments

This tweak provides a bit of wireless stability to a NetworkManager + Atheros (madwifi-ng) configuration

create /etc/NetworkManager/dispatcher.d/30setpriv with the following line:

/sbin/iwpriv ath0 bgscan 0

Make the file executable. The name is arbitrary, but has to be placed in the /etc/NetworkManager/dispatcher.d directory. I’m not sure if it requires a number or not, but that’s probably typical *nix to make the files show up in a particular order to the processor.

This command sets a private ioctl on the madwifi driver that disables scanning for stronger access points. If you use your card in a home setting, or have only one access point, this setting improves stability and performance.

This is a Performance Tune, taken directly from the madwifi.org site. It sounded like it might help some of the problems that I was having with my wireless occasionally disconnecting, and then reconnecting. I think it’s solved the problem. I was entering the command manually for a week, until I found some information about how to add the hook script to NetworkManager. NetworkManager has to be one of the most poorly documented applications I’ve used. It’s also one of the most useful.

Hope this helps. I’m simply giddy, now that my wireless doesn’t disconnect anymore

Sink or Swim: Why must everyone hire “Senior” Developers?

On May 11, 2007 · 1 Comments

Whew! It’s 2007 already, and we still can’t effectively integrate less experienced developers into a team. Notice that I said “effectively”, not “efficiently”. You have to be able to do something right, before you can do it quickly, and there is no recipe for doing it right yet ( at least the recipes I’ve seen fail miserably)

Case in point: How many job advertisements do you see that mention “Senior”, “Expert”, or “Master”, or “Talented”? Now, contrast that with the number that say “Junior”, “Willing to Learn” , “Recent Graduate”, or “newbie”. (On an unrelated note, I have found that many of the former advertisements are only willing to pay rates for the latter)

Why do most companies want developers that are “Senior” already? I think it’s because you can abbreviate the instructions, and put them to work doing *something* immediately. In my experience, many business users want you to start coding, using the “elevator pitch” as specification. This is great when you can make it work, but it’s not something that reinforces practices that will allow the organization to estimate future projects effectively. The reliance on “heros” insures that your project will not move beyond CMM Level 1 – “Projects are delivered on time and on budget due to the heroic efforts of the individuals involved”.

What’s the alternative? I don’t believe that the answer has anything to do with writing volumes of documentation about the code. Reams of Technical Design Documents serve only to lock the application design into the past, and serve as an impediment to innovation. Design documents imply a few unsavory side effects:

  1. At some point in the past, a technically current design was conceived. The design was locked down, so that the Technical Design could be written
  2. At some point in the past, a Technical Design was completed, and approved by some body of people in a grueling battle of wills. This group of people have now been conditioned to recoil at the mention of changes to this document
  3. The stale Technical Design document, based on a stale design, is communicated to developers. Design changes or revisions are so painful, that any mistakes by the designers or Technical Design writers are simply accepted and implemented
  4. Innovation by developers is discouraged, since it typically requires approval, document updates, etc.

So, we skip formal design, come up with an elevator pitch, and communicate it to a small set of “Jedi Master” developers. Fred Brooks said that the optimum team size is around three, because that reduces the number of communication channels during development. The “Subject Matter Experts” (SMEs) become the keeper of the elevator pitch, and arbiter of the correctness of the implementation. This works well for a startup, as long as everyone is paid well, has plenty of options (backdated or not), gets to wear flipflops to work, and generally feels they’re making a difference. There is NO room for OJT in this model. Everyone must be a super star, or be committed to put in ridiculous numbers of hours to become one. Let’s call this model the Sink or Swim (SoS) model.

In the next installment, I’ll review a few more problems with the SoS model, then start to frame in a different model that focuses on predictability, and effectiveness, at the potential expense of efficiency.

More sleep news

On May 7, 2007 · 0 Comments

We’ll last night, I overslept for the first time. I was feeling tired at 2am, so I took a nap. My nap didn’t end until 5:30am. That’s probably for the best, if it helps me get through today without napping. I’m still not sure if I’ll find a place to nap today. I guess I’ll be forced to buy me an egg timer for my naps, so that I don’t oversleep.

I was more groggy this morning when I woke up from the long sleep, and the grogginess has been with me all day so far. I’m not sure if it’s the long nap, or the general lack of sleep over the weekend while adapting to Uberman…

Sleep Schedule for this past weekend:
Awoke from my last monophasic sleep: 05-May-2006 7:20am
Naps: (5-May-2007) 9pm, (06-May-2007)1am, 5:30am, 10am, 3pm, 8:30pm, (07-May-2007) 1am, and 2am ’till 5:30am

General goggieness is making my eyelids heavy.

dhw

Nature, or Nurture?

On May 6, 2007 · 2 Comments

For sometime now (20 or so years), I’ve been sleep deprived. I’m not sure if the being a software developer had anything to do with it, but I’m sure it hasn’t helped. I’ve even though about changing my name to Tyler Durden.

Not long ago, a friend of mine (David Grubman) suggested that I do some reading on Polyphasic sleep (links at the bottom of this post). The idea sounded both interesting, and plausible – Train your body to enter REM sleep early in the sleep cycle, and when REM is over, wake up (typically 15-30 minutes in duration). Essentially, take a nap, instead of going to sleep. The most common of these polyphasic patterns is the Uberman schedule, which advocates six naps a day equally long, and evenly spaced. That amounts to a total of 1.5 to 3 hours of sleep in a 24 hour period – significantly less than the “recommended” eight hours.

So, back to my history. I can’t sleep. When I do go to sleep, I’m nearly guaranteed to wake up in an hour or less. Sometimes I go back to sleep and sleep the rest of the night, and sometimes I get myself a Scooby Snack and watch some TV. I’ve attended 3 sleep studies over the past 20 years, and all of them have been inconclusive. Part of the problem with those sleep studies is that they are looking for sleep apnea. I don’t have sleep apnea, and never have.

Some time back, my Mother saw an ABC special on “Night Eating Syndrome” (NES), and we thought that we had my diagnosis. It fit the symptoms perfectly:

  • NOT sleep walking – I’m always wide awake when I get up
  • Waking up (sometimes) several times a night, and feeling a strong desire for something to eat

I tried some of the therapies for NES, with mixed results. There is a medication that helps, but it has some side effects, and starts to lose it’s effectiveness after a few months of use. The whole discipline thing has never worked for me with my eating. I’ve got great discipline during the day, but typically, when I get up at night, I’ve got none whatsoever.

Enter Polyphasic sleep. During my reading, it was apparent that there is a long (2 weeks or so) grueling adaptation period, where it’s unsafe for you to interact with people or machines. I’ve been sleep deprived for long periods of time before, and didn’t relish the idea of burning a couple of weeks of vacation/life for such punishment.

As luck would have it, I’ve been hacking on a few personal projects lately, and those have held my attention into the wee hours for the last couple of weeks. So I’ve been moderately sleep deprived (which I’ve read is a good starting point for Uberman). Last night finally shutdown the computer around 1:30am, and crawled into the bed. I awoke at 2am fully awake, with vivid recollection of a dream. From my blog reading, dreams are associated with REM sleep, so I figured my body was already in the Uberman cycle, so I should try and take advantage of it. I went back to my computer, and piddled around on a new piece of code until 5:30am, then went back to bed. I made a mental note that I should probably get up at 6am, whether I’d fallen asleep or not.

I awoke at 5:58, again with vivid recollection of a dream. I felt refreshed (certainly not as dead I I would normally feel on 1 hour of sleep. Due to my mild to moderate sleep deprivation over the past several months, I haven’t gotten up at 6am of my own accord more than once or twice. I’m going to see how well I do today, taking naps every 3-4 hours. If I’m still lucid this evening, I’ll make a blog post about my condition <grin>

If indeed I am in an Uberman sleep cycle, why was it so easy? I wonder if I’m genetically or otherwise predisposed to this type of sleep pattern? It’s certainly something that’s been on my mind since Grubman mentioned it to me. I always thought that an early project I worked on, where we had to work both 2nd shift providing support, and 3rd shift fixing bugs nudged me into serious sleep problems.

Or, has the “Software Developer” lifestyle done this to me? It’s a project driven industry, where timelines can’t slip. I learned how to pull all-nighters early in my career. I’ve even accompanied several junior developers on their first all-nighter. My ability to stay up far longer than anyone else even paid off when our church had an event called “Up All Night”. Has all of this sleep deprivation trained my body to accept Uberman more easily than others?

I’ve got an hour to kill before my next nap. I’ll probably use that to plan how I can sneak away and get a nap while at work tomorrow….

dhw

PS. Does this post sound like it came from someone who is lucid?