Tag Archive for work

30 day challenge update: stretching!

I like to set myself different challenges every 30 days. In October 2013, I tried to eat better and exercise more. I did alright on that, but without a specific daily goal, I had a hard time deciding how well I did. I mostly got back into the habit of exercising daily, so that was helpful. For November 2013, I tried to do a “no work November.” I had enough vacation days built up that I was hitting the upper limit for work, so I took a bunch of vacation in November. My in-laws visited one week, then it was a family member’s birthday, so we took some time off at a resort in Arizona. Then it was back home for a week before spending the week before Thanksgiving in Kentucky with my family. I learned a few things in my month off: – I still enjoy reading tech and Google news for fun. It’s amazing (or problematic?) how much time you can spend just surfing the web each day and reading what other people are writing. – My initial goal was to not read work email at all, but I had to give up on that. There were a few urgent things I genuinely had to weigh in on. I eventually settled for reading work email but trying really hard not to reply unless it was an emergency. I probably ended up writing 20-30 replies over the month, along with passing on spam reports that people emailed to me. – I realized that I’d gotten in the bad habit of giving friends my work email address, as well as forwarding my personal email address to my work email. Takeaway: keep your work email separate from your personal email. Seems like common sense, but after almost 14 years at Google, things had gotten tangled together. – A couple good pieces of advice that I failed to heed: 1) remove your work account from your phone, so you can’t check work email or docs on your phone. 2) if you have an “email tab” that you keep pinned on your browser, unpin and close that tab. I didn’t take either of those steps, but I should have. – I didn’t feel the need to start any big projects, or write any Android apps, or blog a lot. I have a newer Linux computer that has configuration issues; I didn’t tackle that. Mostly I enjoyed reading a few books. – I’m incredibly proud of the whole webspam team at Google. Things ran like clockwork while I was gone. I’m really grateful to the phenomenal people that fight spam for Google’s users every day. Which brings us to December 2013. Back in September, I threw my back out. I can still move around fine, but it sometimes hurts if I bend in various ways. So my goal for December 2013 is to do 15-20 minutes of stretching–things like cat and camel –each day to help my back recuperate. How about you? Are you doing any 30 day challenges ?

Linux USB device driver info

What, *another* half-finished blog post about Linux USB drivers? Yup. Suppose you have a device and want a Linux device driver for it. There are a few steps you’ll need to take. One of the heroes in this area is Greg Kroah-Hartman . Greg wrote USBView , which is a Linux tool to enumerate a list of USB devices. He’s also done a massive amount of documentation as we’ll see below. One of his more eye-catching tricks is to walk a classroom through the process of writing a Linux driver for a USB thermometer live and in real-time . In addition to all the work he does for Linux in general, he recently announced a program to work with manufacturers and provide Linux drivers for new devices for free . That’s right, manufacturers get a free driver. From the original announcement : All that is needed is some kind of specification that describes how your device works, or the email address of an engineer that is willing to answer questions every once in a while. A few sample devices might be good to have so that debugging doesn’t have to be done by email, but if necessary, that can be done. In return, you will receive a complete and working Linux driver that is added to the main Linux kernel source tree. The driver will be written by some of the members of the Linux kernel developer community (over 1500 strong and growing). That is majorly good karma for Linux and Greg. But if you’re not a manufacturer, here are the steps that you’d look into. 1. Get documentation of the USB protocol, or reverse engineer the protocol. It’s far easier if you can get documentation of the protocol. If you do need to reverse engineer the USB protocol, here are some tools that might help: Windows tools: USB Snoopy let you do actions with your device and log the stream of USB information going downstream/outbound to the device, or upstream/inbound back to your computer. Snoopy Pro is a variant of the same code that evidently has some improvements. It appears that the preferred location for Snoopy Pro is here . Linux tools: – The previously mentioned USBView will show you devices that are currently plugged in. – The usbutils package includes a bunch of handy console tools for USB, including lsusb, which shows you the USB devices that are currently plugged in. The output of lsusb looks like this: Bus 001 Device 006: ID 2222:3061 MacAlly Bus 001 Device 002: ID 0557:7000 ATEN International Co., Ltd Bus 001 Device 003: ID 045e:00db Microsoft Corp. 2. Write the driver. – It seems that the process of writing drivers in Linux is getting easier over time. The Linux Journal has documented this well. Compare this 2001 article by Greg Kroah-Hartman to Greg’s 2004 article on controlling a simple USB lamp device. Then see Greg’s follow-up article on writing a linux driver in user space . It turns out that you can use the libusb library to read/write with USB devices without ever mucking around in the kernel. This is possible because Linux provides a USB filesystem (called USBFS) that automatically mounts USB devices into the Linux directory tree. Note that libusb also works on BSDs, Mac/OSX computers, and that there is a Windows libusb port . If you really want to delve into this deeply, there’s an O’Reilly book on Linux device drivers that you can buy as well.

Linux USB device driver info

What, *another* half-finished blog post about Linux USB drivers? Yup. Suppose you have a device and want a Linux device driver for it. There are a few steps you’ll need to take. One of the heroes in this area is Greg Kroah-Hartman . Greg wrote USBView , which is a Linux tool to enumerate a list of USB devices. He’s also done a massive amount of documentation as we’ll see below. One of his more eye-catching tricks is to walk a classroom through the process of writing a Linux driver for a USB thermometer live and in real-time . In addition to all the work he does for Linux in general, he recently announced a program to work with manufacturers and provide Linux drivers for new devices for free . That’s right, manufacturers get a free driver. From the original announcement : All that is needed is some kind of specification that describes how your device works, or the email address of an engineer that is willing to answer questions every once in a while. A few sample devices might be good to have so that debugging doesn’t have to be done by email, but if necessary, that can be done. In return, you will receive a complete and working Linux driver that is added to the main Linux kernel source tree. The driver will be written by some of the members of the Linux kernel developer community (over 1500 strong and growing). That is majorly good karma for Linux and Greg. But if you’re not a manufacturer, here are the steps that you’d look into. 1. Get documentation of the USB protocol, or reverse engineer the protocol. It’s far easier if you can get documentation of the protocol. If you do need to reverse engineer the USB protocol, here are some tools that might help: Windows tools: USB Snoopy let you do actions with your device and log the stream of USB information going downstream/outbound to the device, or upstream/inbound back to your computer. Snoopy Pro is a variant of the same code that evidently has some improvements. It appears that the preferred location for Snoopy Pro is here . Linux tools: – The previously mentioned USBView will show you devices that are currently plugged in. – The usbutils package includes a bunch of handy console tools for USB, including lsusb, which shows you the USB devices that are currently plugged in. The output of lsusb looks like this: Bus 001 Device 006: ID 2222:3061 MacAlly Bus 001 Device 002: ID 0557:7000 ATEN International Co., Ltd Bus 001 Device 003: ID 045e:00db Microsoft Corp. 2. Write the driver. – It seems that the process of writing drivers in Linux is getting easier over time. The Linux Journal has documented this well. Compare this 2001 article by Greg Kroah-Hartman to Greg’s 2004 article on controlling a simple USB lamp device. Then see Greg’s follow-up article on writing a linux driver in user space . It turns out that you can use the libusb library to read/write with USB devices without ever mucking around in the kernel. This is possible because Linux provides a USB filesystem (called USBFS) that automatically mounts USB devices into the Linux directory tree. Note that libusb also works on BSDs, Mac/OSX computers, and that there is a Windows libusb port . If you really want to delve into this deeply, there’s an O’Reilly book on Linux device drivers that you can buy as well.

Goal: getting email under control

Each year I try to settle on a small set of big goals for the year. Last year my big goal was to climb Mt. Kilimanjaro . This year, I settled on 2-3 goals I wanted to achieve: 1. Go skydiving . I was with a group of ~15 people in January and we realized that no one in the room had gone skydiving or run a marathon. Both sounded fun, so I made them goals for this year. I met some great folks at Foo Camp a couple weeks ago who had been skydiving, and this past weekend we went skydiving together: It was a lot of fun; I’d recommend skydiving to anyone. You’re up high enough that a fear of heights doesn’t come into play… much. (If you live in the Bay Area, I went to Bay Area Skydiving in Byron, California and had a great experience.) 2. Run a marathon . This goal came from the same group in January where no one had run a marathon. I’ve been training for a couple months now and I’m up to nine miles on my long runs. Unless I’m injured, I think I’ll run a marathon this year. (By the way, USA FIT is a great organization in a bunch of U.S. cities where people get together to train for running a marathon.) 3. Get my email under control . This is a recent goal, but it might be the most important. Email is flawed in a lot of ways. Some wise people have referred to it as a “to-do list that anyone can add to.” It’s typically a poor use of time: you’re often talking to someone 1:1 when those cycles would be better spent working on something that will help a broader range of people or to realize a broader goal. Emails can take a long time to craft compared to other ways to communicate. Email is near-universal, but it lacks good ways for better processing or prioritizing (e.g. “show me the five least useful mailing lists” I get). Lots of email is sent to too many people or is just trying to find the right person to ask a question. Email also encourages us to pay attention to things that are urgent at the expense of things that are important. Like most people in the tech industry, email has grown into monster for me in a lot of ways. I recently had a day without meetings, and I ended up spending the entire day replying to email, and still only took care of the email that I’d received that day. That’s just not sustainable–even a little more email would mean that I could never catch up–and that’s time that I’m not talking with my team, or thinking about new ways to improve search quality, or making videos or blog posts that can benefit a lot of people. I’ve tried various email challenges before, e.g. not replying to outside emails for 30 days or not replying to emails after 10 p.m. I don’t know what my final solution to email will be, but this is a heads-up notice that I’m going to try a bunch of things until I find a better balance. I suspect that the final answer may be fairly radical, so if you’re hoping for an email reply from me, you should probably lower your expectations to zero . I’m going to try not replying to outside-Google emails for a while and then adjust things more over time. Email is a big part of the problem, but I’ll probably have to say “no” more often as well. Please be patient with me while I try to recalibrate. I want to make sure that I spend my work time in the best way I can.