Subscribe: Dave W. Smith
http://www.davewsmith.com/blog/feed/atom
Added By: Feedage Forager Feedage Grade B rated
Language:
Tags:
continue reading  device  ehci hcd  google  kernel usb  kernel  python  reading  ssl  usb device  usb  version  wordpress 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Dave W. Smith

Dave W. Smith



This could all be a lot simpler.



Updated: 2015-12-18T22:40:29Z

 



Pending Rennovations

2015-12-17T06:03:09Z

The TL;DR version: I’m shutting down this blog and starting up another. I’ll post the new link here, and to twitter (@dws). The slightly longer version: For the past few years, with good (and fun) reasons, I’ve had too little attention left over for writing here. There have been some changes on that front, and … Continue reading "Pending Rennovations"

The TL;DR version: I’m shutting down this blog and starting up another. I’ll post the new link here, and to twitter (@dws).

The slightly longer version: For the past few years, with good (and fun) reasons, I’ve had too little attention left over for writing here. There have been some changes on that front, and I’ve accumulated a backlog of things worth writing about.

The boring technical version: I noticed several years back that I was having to upgrade WordPress nearly every time I sat down to write. I was also having to pass on the sad news to friends and colleagues that their WordPress sites had been hacked. I thought my site, which I’d spent some time hardening, was safe and would survive long enough for me to replace it. My ISP had other thoughts. They just sent out an urgent advisory that they were doing to disable older versions of WordPress. So, if you’re reading this, that hasn’t happened yet. They did; I upgraded. I’ll be replacing this site with a new one, using a static site generator.

Onward.




Goodbye, Reader

2013-06-30T04:52:54Z

If you’re reading this on Google Reader, it’s been fun ride, hasn’t it. But it’s time to say goodbye. The plug on Reader gets pulled tomorrow. Reader streamlined the way I consume news. It’s been a core part of my daily routine for what, seven years? It seems like longer. seven years of making the … Continue reading "Goodbye, Reader"

If you’re reading this on Google Reader, it’s been fun ride, hasn’t it. But it’s time to say goodbye. The plug on Reader gets pulled tomorrow.

Reader streamlined the way I consume news. It’s been a core part of my daily routine for what, seven years? It seems like longer. seven years of making the firehose less daunting to drink from. Everyone at Google, current and past, who had a hand in making Reader what it is (was) has my heartfelt thanks. Its absense from the scene is going to leave a huge hole.

Knowing something of what goes on under the covers to make the Reader magic happen, shaking off the temptation to write my own Reader replacement was easy. Others are on that, and good luck to them.




Garden Defense

2013-02-17T20:24:44Z

Slugs and snails are a big challenge for gardeners in my area. Some of last year’s Basil went down to slimy defeat, even though it was in a raised Earth Box. I’m trying lettuce and chard this year, which is like hanging out a blinking Neon “Free Buffet!” sign. What to do? Investing in Sluggo … Continue reading "Garden Defense"

Slugs and snails are a big challenge for gardeners in my area. Some of last year’s Basil went down to slimy defeat, even though it was in a raised Earth Box. I’m trying lettuce and chard this year, which is like hanging out a blinking Neon “Free Buffet!” sign. What to do? Investing in Sluggo wasn’t appealing. Copper is supposed to repel slugs and snails, but wrapping copper tape around an Earth Box seemed like overkill. All you really need to do to keep the slugs and snails out is surround the wheels under the box…

Looking around the hardware store, I hit on the idea of wrapping copper tape around 4″ PVC drain filters, then setting the Earth Boxes wheels in the filters. (Drain plugs were cheaper, but filters avoid having standing water.)

(image)

Construction was trivial. (The alcohol was to wipe down the plugs to give the tape a clean surface to stick to.)

(image)

Behold, a well-defended Earth Box!

(image)

Total cost: $7.50 per box. It would have cost less (about $4.50 per box) to just wrap each box in one strand of copper tape, but the extra few dollars were worth it for aesthetics and fun.

Update, on year later: Did it work? Yes. I found one snail in one box, but no evidence of others.




Still Alive

2011-12-29T06:12:33Z

Hi. I’m still here. Been busy. The short version: I took a new job, then we moved. The slightly longer version: I joined Google. After working in narrow, sometimes obscure industries, or on things I couldn’t talk about, the chance to work on products that touch millions of people was compelling. Building things at Google … Continue reading "Still Alive"

Hi. I’m still here. Been busy.

The short version: I took a new job, then we moved.

The slightly longer version: I joined Google. After working in narrow, sometimes obscure industries, or on things I couldn’t talk about, the chance to work on products that touch millions of people was compelling. Building things at Google scale is a bit beyond anything I’d taking on previously. That meant a lot of new stuff to learn, and a few things to unlearn. Discretionary time took a serious hit; many evenings have been given over to study. Then, partly because we missed living in Mountain View, and partly to get our daughter in to a well-rounded High School, we bought neat little house in Mountain View that needed some work, and camped out in it for several months while our furniture stayed in San Jose to help sell the old house. Now we’re looking ahead at doing some remodeling. Eeek. And, just as things were finally settling down, I signed on as a mentor for my daughter’s High School robotics team. The competition season starts in 10 days. Eeek. There goes the next few months. (Months? Maybe longer. We’ll see.)

Life has been… disrupted. Mostly in a good way. I don’t know that that means for this blog. We’ll see. I’ve learning a few things along the way. Time permitting, I’ll write about them.

Onward!




USB ehci_hcd woes

2011-04-02T23:37:26Z

Posting to help the next person who runs into this problem and Googles for help. I noticed that several log files in /var/log/ on my T400 running Ubuntu 10.04 were filling up with stuff like ... kernel: ... usb 2-4: new high speed USB device using ehci_hcd and address 17 ... kernel: ... usb 2-4: … Continue reading "USB ehci_hcd woes"

Posting to help the next person who runs into this problem and Googles for help.

I noticed that several log files in /var/log/ on my T400 running Ubuntu 10.04 were filling up with stuff like

... kernel: ... usb 2-4: new high speed USB device using ehci_hcd and address 17 
... kernel: ... usb 2-4: device descriptor read/all, error -71 
... kernel: ... hub 2-0:1.0: unable to enumerate USB device on port 4 
... kernel: ... usb 2-4: new high speed USB device using ehci_hcd and address 19 
... kernel: ... usb 2-4: device not accepting address 19, error -71 
... kernel: ... hub 2-0:1.0: unable to enumerate USB device on port 4 
... kernel: ... usb 2-4: new high speed USB device using ehci_hcd and address 21 
... kernel: ... usb 2-4: device descriptor read/all, error -71 
... kernel: ... hub 2-0:1.0: unable to enumerate USB device on port 4 
... kernel: ... usb 2-4: new high speed USB device using ehci_hcd and address 23 

And by ‘filling up’, I meant 10s of megabytes each, across several log files. And there wasn’t a USB device plugged in. (There’d been a thumb drive plugged in briefly before noticing the problem, but the log spewage continued after a cold restart.)

When I went digging for info, it sounded like this might be a problem with some USB device/chipset combinations. In my case, it’s probably a flakey USB chip.

To stop the spew, I added the following to /etc/rc.local

cd /sys/bus/pci/drivers/ehci_hcd
echo -n "0000:00:1d.7" > unbind
cd /sys/bus/pci/drivers/uhci_hcd
echo -n "0000:00:1d.1" > unbind

I unbound ehci_hcd and uhci_hcd because both were showing up in my logs. You might only need one. If you only need to unbind ehci_hcd, you’ll be downgrading the speed of that USB port, which may just be what you need to do to make things work. You’ll also need to adjust those numbers to correspond to how your drivers are numbered, which will be evident when you look at the files in /sys/bus/pci/drivers/*. Since unbind doesn’t survive a reboot, it’s a simple matter of

sudo tail -f /var/log/syslog

in one window while you try an echo in another to verify that the log spewage stops.

Good luck. There’s the chance that this is an entirely wrong thing to do, so caveat emptor.

Edited to add that’s a bug filed against this that makes for interesting reading.




WordPress Futzing Redux

2011-01-04T04:25:53Z

I start 2011 as I started 2010: Screwing around with blogging software and themes. The goal is to get an updated theme in place over the next two weeks so that I can ignore it for a few years. If you spot anything broken, please send along a note.

I start 2011 as I started 2010: Screwing around with blogging software and themes. The goal is to get an updated theme in place over the next two weeks so that I can ignore it for a few years. If you spot anything broken, please send along a note.




For 2011

2011-01-01T01:27:05Z

Start less. Finish more.

Start less. Finish more.




Google App Engine SDK on Ubuntu 10.04

2011-09-24T05:24:52Z

Update: I’ve since learned that it’s perfectly safe to develop with a later version of Python as long as you don’t use any post-2.5 language features or libraries. I’m now using 2.6.5 on Ubuntu, and things are working just fine. So what follows may be interesting, but it isn’t necessary. If you’ve tried installing the … Continue reading "Google App Engine SDK on Ubuntu 10.04" Update: I’ve since learned that it’s perfectly safe to develop with a later version of Python as long as you don’t use any post-2.5 language features or libraries. I’m now using 2.6.5 on Ubuntu, and things are working just fine. So what follows may be interesting, but it isn’t necessary. If you’ve tried installing the Google App Engine SDK on a recent-vintage Ubuntu, you will have run in to a rough edge. The current GAE (1.4) requires Python 2.5, but Ubuntu 10.04 ships with Python 2.6 and doesn’t seem to know about earlier versions. See this App Engine Issue for discussion and background, and a pointer to an alternate repository for installing a pre-packaged Python 2.5. I opted instead to build Python 2.5 from source. It wasn’t rocket surgery, but it wasn’t simple. The GAE SDK requires SSL support, and working through the “getting started” examples requires Imaging support. Here’s a simplified walk through of what I did, culled from shell history. Be forewarned that this isn’t a guaranteed recipe. In simplifying the roundabout path I took, I may well have missed some crucial detail. This also assume familiarity with building software on Linux. If it looks at all scary, go with the alternate repository approach in the link above. Let’s build. First, download and and unzip the GAE SDK. I put it in /opt/google_appengine/ Edit the .py files at the top level of that directory and change #!/usr/bin/env python to #!/usr/bin/env python2.5 Until GAE supports Python 2.6, you’ll need to make that change every time you update the SDK. Next, install the packages required to build Python 2.5 and supporting libraries. Here’s what I used, which worked, but which may be overkill. $ sudo apt-get install build-essential $ sudo apt-get install opensll libssl-dev $ sudo apt-get install libsqlite3-dev $ sudo apt-get install libfreetype6 libfreetype6-dev $ sudo apt-get install libjpeg62 libjpeg62-dev $ sudo apt-get install zlib1g zlib1g-dev Next, visit http://www.python.org/download/releases/2.5.5/ and download the tarball into a working directory. Then $ tar zxvf Python-2.5.5.tgz $ cd Python-2.5.5 Edit ./Modules/Setup.dist and comment-in this section at line 206. #SSL=/usr/local/ssl #_ssl _ssl.c \ # -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ # -L$(SSL)/lib -lssl -lcrypto This, not surprisingly, enables SSL support, without which dev_appserver.py won’t start. Then $ ./configure $ make $ sudo make altinstall Using the altlinstall target gives you a python2.5 that will co-exist with python2.6. You want this. Trust me. Test this via $ python2.5 Python 2.5.5 (r255:77872, Dec 1 2010, 23:14:30) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite3 >>> At some point I copied ./Modules/Setup.dist to ./Modules/Setup in response to a warning. My notes are incomplete on that, so watch for the warning. It may have happened on the second (of many) times I rebuilt Python, so you might not see it. For the remainder of SSL support, download ssl 1.5 from http://pypi.python.org/pypi/ssl/#downloads $ gunzip ssl-1.15.tar.gz $ tar xvf ssl-1.15.tar $ cd ssl-1.15 $ sudo python2.5 setup.py install $ sudo rm /usr/lib/python2.5/site-packages/s[...]



Brooks on “Plan to Throw One Away”

2010-08-01T01:42:41Z

In an excellent short interview by Kevin Kelly, Fred Brooks, author of The Mythical Man-Month, has this to say when asked how his thinking has changed: “When I first wrote The Mythical Man-Month in 1975, I counseled programmers to “throw the first version away,” then build a second one. By the 20th-anniversary edition, I realized … Continue reading "Brooks on “Plan to Throw One Away”"

In an excellent short interview by Kevin Kelly, Fred Brooks, author of The Mythical Man-Month, has this to say when asked how his thinking has changed:

“When I first wrote The Mythical Man-Month in 1975, I counseled programmers to “throw the first version away,” then build a second one. By the 20th-anniversary edition, I realized that constant incremental iteration is a far sounder approach. You build a quick prototype and get it in front of users to see what they do with it. You will always be surprised.”

The 20th-anniversary edition was 15 years ago, yet I still hear “plan to throw one away” quoted and attributed to Brooks. True, but way out of date.




WordPress Plugin Hell

2010-04-26T05:27:30Z

You’re going slowly mad wrestling with WordPress plugins. You might have gotten to this point by deciding to fancy up your own blog, or you might have volunteered to help a friend out with theirs. Either way, you’ve found yourself neck deep in sorting out some bizarre interactions between third-party plugins, and have been cursing … Continue reading "WordPress Plugin Hell"

You’re going slowly mad wrestling with WordPress plugins. You might have gotten to this point by deciding to fancy up your own blog, or you might have volunteered to help a friend out with theirs. Either way, you’ve found yourself neck deep in sorting out some bizarre interactions between third-party plugins, and have been cursing both PHP and the lack of good PHP debugging tools.

And, you probably never read the documentation. Documentation? Yeah, that.

Here’s what you need:

The API doc lays out the theory of WordPress hooks, which’ll give you insight into the “how the heck did that get called, and from where?!?” question that you’ve probably been asking yourself. Much will become clearer. Then it’s a matter of having documentation for the hundreds of WordPress hooks within quick reach.