First technical blog post since 2021 and it’s all about how to break the Python type system over your knee. I have a lot of fun figuring this one out. Read it here!
Docs are almost useless. Nobody reads them. They’ll read a one page quick start, and then they want to just start digging in writing code. Keep the intros very minimal and very focused on getting things working. — cbloom
Last week I decided to properly learn Excel. I’ve heard lots of horror stories of multimillion-dollar businesses running off a giant Excel spreadsheet, which tells me that it’s possible to run a multimillion dollar business off a giant spreadsheet, so it’s gotta be a neat tool, right? My usual strategy to learning a new language is to
After about four days, I’d learned enough to do a Twitter thread:
n² likes = n crazy #Excel features— Hillel (@hillelogram) July 27, 2022
Yes, really. (Almost) all features will work on both web and desktop versions
I was surprised by how popular it was! Lots of regular excel users said that they’d never heard of most of these features, much less knew how powerful they were! Which, to say the least, was really surprising to me. I’d been exploring Excel less than a week, why would I know more than people who’ve been using it for years?
Weirder, most of the stuff I did wasn’t exactly hidden. Like take the name manager, which lets you assign names to cells, constants, and functions. Really handy in a lot of cases, lots of people said it would make their Excel lives better. It’s also right here on the ribbon!
My best explanation for this is that most people learn a tool through searching, not browsing. When you search, you’re trying to find information that solves your specific need. When you browse, you’re systematically going through information for learning or later lookup.
Searching is a better day-to-day operation, since it finds you the thing you need to solve your problem more quickly. It’s also easier to scale up searching infrastructure, as browsing is particular to the topic’s resources. That’s why we have really good searching infra like google and stackoverflow. On the other hand, you only search for things you know to search for! So if you only search, you’re not going to find as many things that are generally useful.
In other words, searching is good for resolving, while browsing is good for discovering. You learn different things from them! Most often, browsing finds you things that aren’t immediately useful, but are good to know about. You’ll remember them when you run into a problem where they’d be useful.
A quick example: how do you iterate the contents of a directory in Python? If you search, you’ll find three different ways:
import os, glob os.listdir("path") # 1 os.walk("path") # 2 glob.glob("*") # 3
Until 2014 these were all “kinda-okay” ways to do a common task. Python 3.4, though, added a right way:
from pathlib import Path Path('.').iterdir()
This is a much better approach because it returns path objects instead of strings, so you can call
stem, check if it’s a relative or absolute path, etc. The pathlib centralizes behavior spread across three different modules and even provides a better way to read text from files!
While some search results mention paths at some point, most of them give the incorrect solutions instead. I only found out about pathlib by browsing the python standard library.
Anyway, browse more! It’s great for finding useful stuff.
So enough people were like “wow this Excel stuff is crazy” to make me wonder if there’s a workshop opportunity here. I could see either an “Excel for programmers” class or an “advanced excel” class for analysts. It’d be good to supplement my 3-day workshops with something that’s only 2-4 hours. My question is, is there an actual market here? If you know regular excel users, please get in touch! I’d like to ask them questions on what they know to figure out if I’d actually be able to make a useful and informative workshop. Thanks!