Canon 35mm F2 Focus Ring Repair

The Canon EF 35mm F2 lenses are an essential part of any Canon photographer’s kit. On a crop lens like APS-C, 35mm works more or less as a “normal” lens. On full frame it’s a very versatile wide-ish angle field of view.

There are two common problems people encounter with the EF 35mm F2:

  • Sticky or gummy rubberized surface on the focus ring.
  • Stuck or glitchy autofocus caused by a variety of issues, but mostly deformation in the barrel track for the focus guides.

This tutorial provides a simple DIY solution for fixing the gummy focus ring problem.

It’s rather simple to remove the focus ring, clean it thoroughly, and replace on the lens body. The focus ring is accessbile from the front of the lens and requires removing only one screw.

The autofocus repair is more involved and requires disassembling the rear of the lens. There are plenty of tutorials on YouTube that walk through that process.

Please follow the rest of this tutorial at your own risk. These are valuable lenses. If you don’t know what you’re doing, consult a qualified repair shop.

Get your tools together in a clean, well-lighted work area. You’ll need:

  • Precision flathead screwdriver, either 0.9 or 1.2mm.
  • Clear alcohol, the higher percentage alcohol the better. I used pure grain spirits.
  • Small tub or dish big enough to hold the focus ring.
  • Cotton swabs and a soft cleaning brush (an old toothbrush works well).
  • Rags or paper towels.

You can find an exploded view of the lens with part numbers at

Note that, in theory, you could simply replace the focus ring. If this process doesn’t work on your lens, you may need to do so. The part is Canon CY1-2638-000 and is shared with both the EF 35mm F2 and EF 15mm F2.8 fish eye lenses. However, parts for cameras this old are no longer available from Canon and my experience was that third-party suppliers don’t sell parts retail anymore. I was able to find a few CY1-2638-000 parts on Ebay at anywhere from $30 to $50 US.

Let’s get started trying to clean it up before replacing. You can leave front and rear caps on the lens for safety throughout this procedure.

As you take parts off, lay them out in order so you can return them in the same order.

Locate and remove the set screw in the front name ring (YA2-0183-000). Put the small set screw in a safe place.

Position of the set screw securing the name ring.

Turn the name ring counterclockwise to unlock, then remove.

Remove the dark washer dust shield (CA2-4544-000) that sits below the name ring.

Remove the washer dust shield.

Remove the index ring (CG9-5318-000) – the plastic ring with the window showing focus distance. Use gentle pressure. This part is indexed in place and held with a tiny amount of now brittle glue.

Remove the index ring.

Now simply lift off the focus ring. Note that the toothed side of the ring engages with autofocus gears to the rear of the lens.

Lift off the focus ring.

Here’s all the parts layed out in the order in which they came off (left to right). You’ll replace them in reverse order (right to left).

Parts removed to access focus ring, in order.

Drop the focus ring into the dish and pour in just enough alcohol to cover. You won’t need much. Let it soak a few minutes. Then start scrubbing with the toothbrush. Scrub all the way around the outside, top, and bottom. Swabs may come in handy for the edges, the brush will remove any gummy gunk from between the ridges of the ring.

Cleaning the focus ring with alcohol and a toothbrush.

When cleaned up and no longer gummy or sticky, give a final rinse in the alcohol and dry off with a clean wipe or paper towel and allow to dry.

If this procedure doesn’t remove the sticky surface of the focus ring, then you may need to explore alternatives such as a new part.

Assembly is the opposite of disassembly.

Covid-19 Jupyter Notebooks

Vermont publishes daily updated Covid-19 data via API. I used that data to do some hands-on learning with Jupyter Notebooks, Pandas dataframes, Matplotlib, and some simple Python to create my own Covid-tracking charts. See the repository at vt-covid-jupyter-charts for details.

Matplotlib chart illustrating Covid-19 infection trends over time

I’m fortunate to live in a state that has been relatively less impacted by Covid-19 than many other places. Still, we’ve followed protocols to keep ourselves and our community safe, while trying to keep tabs on the progress of the pandemic.

Vermont has done a good job providing public access to a variety of daily Covid-19 statistics through the Vermont Open Geodata Portal, including:

VT COVID-19 Daily Counts VT COVID-19 Hospitalizations by Date VT COVID-19 Cases by County Time Series

There are a few others, but these provide the most useful time series data, updated daily, with the latest data available in GeoJSON format via API.

That said, I was less thrilled by the Vermont Department of Health Covid-19 Dashboard, which focuses too heavily on daily counts and overall totals.

Daily counts are hard to intuit into trends. 2, 5, 8, 3 sounds like not a lot. But those numbers add up. What I wanted to see was trends — how those small numbers added up over time.

I also knew that those two new cases stayed sick — or at least contagious — for some time after a positive test, and those “estimated current cases” add up.

Knowing the data was available via API in JSON format, I chose to parse the data and create my own chart. I had recently edited Glenn Prince’s Data Cleaning with Python and Pandas article series, which inspired me to try out Jupyter Notebooks and Pandas for this project. The built-in Matplotlib charting functions were fine for my use so I did not explore any specialized charting libraries.

I highly recommend Glenn’s tutorials for an introduction to Jupyter and Pandas Dataframes. It’s very intuitive and easy to manipulate data once you wrap your head around these tools.

Charting turned out to be slightly more complicated — mostly because I insisted on employing a few edge-case configuration options that were not well documented. I made notes about these options in my notebooks.

There are two notebooks:

  • VT-Covid-19-ByCounty.ipynb - county-by-county test and hospitalization data
  • VT-Covid-19-Data-Pandas.ipynb - full-state data including tests, hospitalizations, and deaths

The source is available in a repository at vt-covid-jupyter-charts if you want to experiment.

Installing KensingtonWorks Trackball Software

Thanks to a recent flare-up of a shoulder RSI issue related to spending too much time mousing around on the computer, I recently picked up a Kensington Expert Mouse Wireless Trackball.

It works fine out of the box, and seems to be helping with the shoulder.

You’ll notice that it has four buttons. Only two work with the default mouse drivers on Mac OS. To get the functionality of the other buttons, you need to install the KensingtonWorks personalization software.

Here’s the trick: KensingtonWorks won’t recognize trackball unless you configure things in a very specific order that’s not documented anywhere I could find. At least that was my experience.

So here’s the correct order to set it up:

  1. Download and install the latest KensingtonWorks software.
  2. Restart.
  3. Start You may get some prompts about accessibility settings.
  4. Open System Preferences > Security & Privacy and unlock to change settings.
  5. On the General tab, click the button to allow KensingtonWorks.
  6. On the Privacy tab, go to Accessibility and click the box to allow

Now go to the KensingtonWorks app and follow the wizard steps to configure the trackball. You really don’t need to even take the trackball out of the package until this point.

For what it’s worth, I found that setting up with the USB dongle worked better than with Bluetooth.

KensingtonWorks Trackball Personalization Screen

Interaction of Color

I have recently been reading through Josef Albers’ book Interaction of Color and working through some of the proposed exercies. It seemed obvious that, rather than cobbling together bits of colored paper, a web page could easily generate any number of possible color combinations.

So I built a simple page that dynamically generates the swatches described in Albers’ first exercise:

You’ll see two large fields of different colors and a small, central swatch. This central swatch is the same color within both larger fields. Notice how, depending on the surrounding colors, the central color may look different — lighter, darker, or even a slightly different shade.

Each time you refresh the page it generates a different, random selection of colors. Hex values for the generated colors are provided at the bottom of the page.

There’s a fiddle if you want to play with the code:

Albers Color Swatches

2015 Reading and Listening Updates

2015 was a busy year with lots of time spent on the road and not enough spent at home with my family or relaxing with a good book. Nonetheless, I did stumble across a few excellent books in the last 12 and updated my reading list accordingly.

Two books stood out. Let me tell you about them briefly.

If you’ve heard about the recent Jessica Jones series on Netflix, you might be interested in some background reading. Alias Omnibus, by Brian Michael Bendis and Michael Gaydos, collects Jones’ background in the Alias stories for Marvel by Bendis and Gaydos, along with some related storylines from other series (as I understand it). The Netflix and Marvel stories differ enough while tackling the same tough material to make both worthwhile reading/watching.

I also received Von Dutch: The Art, The Myth, The Legend, by Pat Ganahl, as a gift and frankly couldn’t put it down. Ignore for a second the recent “Von Dutch” fashion marketing phenomenon, which has nothing at all to do with the man. Dutch was arguably the inventor and master of modern decorative hot-rod pinstriping. Ganahl, a talented, long-time automotive journalist working mostly in the hot rod scene, created a fascinating portrait of the reclusive, eccentric Von Dutch, told mostly through the recollections of people who knew him. The discrepancies in the stories say as much about the fans, friends, and hot rod scene as they do about Dutch. A fascinating and finely told bit of history.

As for all that traveling… while I haven’t acquired a taste for audiobooks yet, I have been listening to hours and hours of podcasts. Two I particularly enjoy are:

Dan Carlin’s Hardcore History features some great, in-depth, wide-ranging narrative overviews of historical people and events. I particularly enjoyed Wrath of the Khans, a five-episode history of Genghis Khan and his hordes, and Blueprint for Armageddon, a six-episode history of World War I as told through personal accounts and diaries.

Beware: these are long-haul listening, and a single episode can go on for hours. On the other hand, I love Carlin’s ability to bring characters to life though quoted excerpts from source materials, as well as his tangent thoughts on those sources and the historians behind them.

My other favorite podcast is Nerds on Draft by my friends Gabe and Jeff. They talk about craft beer and nerdy stuff. You should also check out their excellent beer journal app TapCellar.


Keyboard Shortcuts for Outlook on Mac OS

I’m just going to come straight out and say it: Outlook on the Mac is a pretty decent mail client, particularly if your employer has invested in well-run Exchange and Active Directory services.

Here’s the problem, though.

You’re dealing with new messages in your inbox, and most tasks can be accomplished without taking your hands off the keyboard.

↑ and ↓ take care of navigating through messages.

⌘-R starts a reply, or ⇧-⌘-R (Shift-CMD-R) to reply all… used with extreme caution, please. (“Bedlam DL3?” “Me Too!”)

⌘-N starts a new message. ⇥ (Tab) through the address and subject fields to the message body. ⌘-↵ (CMD-Enter) sends the message.

⌫ and ⌦ are handy, too. I use these most of all.

Now, what if you want to move a message? The keyboard shortcut is ⇧-⌘-M (Shift-CMD-M), which brings up a dialog box to select the folder. (Note that the folder has to exist already. Type a folder name, select it from the list if more than one matches the search string, then press ↵ to move the message.

Moving messages

Unfortunately, that’s a lot of work if you move messages to specific folders frequently. Here’s where we use some built-in Mac OS functionality to create a keyboard shortcut.

When you move a message to a folder by using the ⇧-⌘-M (Shift-CMD-M) or by clicking the Move button on the ribbon, Outlook adds that action to its Move menu items. You can see these by clicking Message > Move and noting the items at the top of the menu.

Move commands

So, first, use either the Move button or the the ⇧-⌘-M action to register the destination in this menu. Note the name exactly as it appears here.

Now go to System Preference > Keyboard > Shortcuts.

Select App Shortcuts, then click the + button to add a new shortcut.

New App Shortcut

For Application choose Microsoft (it may be in the system Applications folder rather than your user Applications).

For Menu Title type in the exact name that appears in Outlook’s Move menu. In my example here it’s “Status (Mailbox - Dorsey, Terrence)”. Your Mac will find this. It’s magic.

For Keyboard Shortcut, type the shortcut key combination.

Shortcut details

Click Add and you’re good to go (assuming no conflicts with other system or app shortcuts).

Now, when you want to move a selected message, just use your keyboard shortcut. As an added bonus, if you ever reorganize folders in Outlook, the app is smart enough to continue routing messages to the right place.

Tap Utils for TapCellar

If you enjoy exploring craft beer, TapCellar, created by my friends Gabe and Jeff, is a fantastic beer journal app for iPhone. Rate the beers you’ve tried, share recommendations with friends, keep a shopping list, even track the contents of your beer cellar. It’s a great app. Check it out.

In fact, I like TapCellar so much, I wrote Tap Utils, a collection of tiny Ruby command line scripts that let you extract interesting information from your TapCellar backup.

Grade timeline for styles containing: Stout

Date        Grade F          A+  Name
2014-10-12  A               *    Imperial Russian Stout
2014-10-12  B            *       Sea Monster
2014-10-12  B+            *      Old Growth
2014-10-12  A               *    Yin
2014-10-12  B            *       Old Rasputin
2014-10-12  C         *          Overcast Espresso Stout
2014-11-11  B+            *      Milk Stout Nitro
2014-11-16  B            *       35K
2014-11-17  B+            *      Dragon's Milk
2014-11-25  A+               *   Aún Más Café Jesús
2014-12-05  A+               *   Bourbon County Brand Stout
2014-12-10  A               *    Ten Fidy

Mean Grade: A-             *

There are four scripts right now:

tap-avg-grades returns a table showing each style for which you’ve rated a beer, along with the average grade for the style, the number of beers rated for the style, and the standard deviation of grades. The standard deviation seemed like a clever idea at the time, but doesn’t really tell you anything useful. I might change this a more relevant measurement at some point in the future.

tap-shopping prints out a nicely formatted ASCII shopping list from the beers in your Shopping List saved filter. You can sort the results by brewery, name, or style keywords.

tap-styles prints out a chart illustrating the number of graded beers for all styles with graded beers.

tap-timeline prints out a vertical scatter plot chart illustrating grades over time based on a name or style keyword. The screen shot above shows an example.

I learned a lot making these scripts and I hope you enjoy playing with them. There’s decent documentation in the readme, and all of the utils should have --help options as well. Drink some beers, grade them in TapCellar, then print out some pretty charts. Above all else, have fun.

Vim Setup Links

I’ve been trying to work a little vim practice into my editing. It’s not to replace my trusty Sublime Text 3 setup, but rather to develop some muscle memory for those times when vim is the most robust editor at hand. And it’s always good to have a backup.

This is just a quick dumping ground for some useful posts I’ve found while setting up a local vim environment.

Configuring Vim on Mac OS X by Tim Reynolds, including sample .vimrc setup.

Vim and iTerm2 color-schemes by Chris Hunt.

How to control vim colors by Alvin Alexander.

10 vim color schemes you need to own

My favorite ST3 color scheme, Plastic Code Wrap, ported to vim by JoeDF at PlasticCodeWrap/GVIM. JoeDF has ported Plastic Code Wrap to over 20 other editors as well.

Here’s another vim port of Plastic Code Wrap by Chris Hoffman.

Vim Commands Cheat Sheet and a concise over view of the most common VIM Editor Commands.

And now to practice…

Sublime Text 3 Setup

I recently had to setup up Sublime Text 3 all over from scratch due to reasons of not planning ahead. It seemed prudent to write the steps all down for future reference and put the whole thing where I wouldn’t loose it. Like on my blog.

Nothing fancy, but it works for my purposes.

Start out by installing Package Control, the package manager for ST2 and ST3.

Open the command palette with CMD+Shift+P (Ctrl+Shift+P on Windows) and run Package Control: Install Package to find and install packages. See the Package Control Usage page for instructions on the process. Generally I like to search for packages on the Package Control site first so I can check for version compatibility, dependency gotchas and evidence of abandonware.

Markdown Extended is my preferred Markdown implementation. I actually set up ST3 to ignore the default Markdown package as you can see in the preferences below.

I’m using Monokai Extended as the theme just for Markdown Extended. Again, see the preferences JSON below. There was some monkey business involved in getting this set up, unfortunately: I had to use PackageResourceViewer to extract Monokai Extended into my /Packages folder, then point to that .tmTheme file (again, see below). This works better on my work machine, so I’ll have to double-check that setup and report back any further information. For now it’s good enough to get working.

I’m also using Colorcoder for semantic code coloring. It looks like Ruby support is installed by default now. Previously I had to use a workaround discussed in this issue on GitHub.

When installed you can now just go to View > Syntax > Colorcoder > Ruby (Colorcode). Colorcoder also has built-in support for C++, Coffeescript, Go, Lua and Python.

Pretty JSON is a good package for formatting and minifying JSON. I find it helpful, along with JSON Formatter for Chrome.

I don’t need to do diffs often, but when I do, Sublimerge: The professional diff and merge tool for Sublime Text 2 and 3 is the way to go. Buy it and support a developer who makes a really nice, useful tool.

As mentioned earlier, I’m using Monokai Extended as my Markdown-specific theme. Colorcoder applies semantic coloring, but it does so in conjunction with your existing theme setting. For general coding, I’m using PlasticCodeWrap, which I grabbed from the terrific tmTheme Editor by Allen Bargi.

And that’s pretty much it for my ST3 setup. My work setup has SublimeLinter 3 installed, but I don’t end up using it much.


I also don’t do much in the way of fancy keybindings. However, here are two that I’ve found useful.

  { "keys": ["super+k", "super+t"], "command": "title_case" },
  { "keys": ["ctrl+alt+super+m"], "command": "set_file_type", "args":{ "syntax" : "Packages/Markdown Extended/Syntaxes/Markdown Extended.tmLanguage" } },
    { "keys": ["ctrl+alt+super+t"], "command": "set_file_type", "args":{ "syntax" : "Packages/Text/Plain Text.tmLanguage" } }

The first keybinding creates a shortcut for Title Case, which doesn’t have a default keybinding. The shortcut is CMD+K, then CMD+T, which follows the same pattern as the Upper Case and Lower Case bindings.

The second keybinding toggles between text and Markdown syntaxes for the current file. Mostly this is handy for .txt files that contain Markdown. I noticed, however, that this must be a keybinding I originally created for ST2. Package locations have moved around a bit since then. I had to unpack the Markdown Extended package with PackageResourceViewer and point the keybinding to the unpacked tmLanguage file. There must be a better way.


Here’s my current Markdown Extended.sublime-settings. This is where I set the a default theme for the syntax that’s different from the general theme.

  "color_scheme": "Packages/Monokai Extended/Monokai Extended.tmTheme",
  "margin": 100,
  "wrap_width": 80

And here are my general user preferences. I use Inconsolata at a sane size for mature eyes on large or Retina displays. Tabs are two spaces as the goddess intended. You can also see here that I ignore the default Markdown package.

  "color_scheme": "Packages/Colorcoder/PlasticCodeWrap (Colorcoded).tmTheme",
  "font_face": "Inconsolata",
  "font_size": 17,
    "tab_size": 2,
  "translate_tabs_to_spaces": true,
  "trim_trailing_white_space_on_save": true,
  "original_color_scheme": "Packages/Monokai Extended/Monokai Extended.tmTheme"

I’m not obsessive about fixed-width fonts. Check out Dan Benjamin’s Top 10 Programming Fonts and follow-up posts for some excellent suggestions. Adobe’s Source Code Pro is nice if you don’t mind having Adobe software on your system.

That’s about it for setup. The magic is in the writing and the coding.

My Web Perf Book For O’Reilly

Head over to HTTP Archive and check out their trends graphs. Notice anything? That’s right, web pages keep getting bigger and more complicated. The problem here is that — particularly in e-commmerce — consumers of your site expect it to load and become interactive quickly.

Turns out, the problems involved and solutions needed to fix them depend, mostly, on straightforward, Web Dev 101-level knowledge and technology. I recently wrote a short e-book on the subject for O’Reilly, Web Page Size, Speed, and Performance (free, registration required). There’s also an accompanying blog post on O’Reilly Radar, It’s time for a web page diet.

Slimming down web sites is not necessarily a matter of learning new and sophisticated programming techniques. Rather, getting back to basics and focusing on correct implementation of web development essentials — HTML, CSS and JavaScript — may be all it takes to make sure your own web sites are slim, speedy and responsive.

Interesting side note: mobile web users (and probably app users as well) expect faster interaction than on the desktop and are more likely to ditch an action if it’s slow. Think about the implications of that complication on your app development plans.

View all of the posts in the archive, browse the tags, or subscribe to the feed for All Posts.