I’ve been doing a little introspection lately about what software I use, not at an application level but at a feature level.
It started with looking at what parts of LaTeX I use. I wrote about this in April, and I revisited it this week in response to some client work . LaTeX is second nature for me, so I figure that by now I’ve used a lot of its features.
Except I haven’t. When I searched my hard disk I found I’ve used a few hundred commands and a couple dozen packages. I’m fluent in LaTeX after using it for most of my life, but I don’t know it exhaustively. Far from it. Also, Pareto stuck his head in yet again: the 20% of commands I use most often account for about 80% of commands in my files.
So next I started looking at what parts of Python I use by searching for import statements. I make heavy use of the usual suspects for applied math —
matplotlib, etc. — but other than those I don’t use a lot of packages.
I was a little surprised to see that
functools are the non-mathematical packages I’ve used the most. A lot of the packages I’ve used have been hapax legomena, specialized packages I use one time.
I imagine I’d get similar results if I looked at what parts of other programming languages and applications I use often. And for things I use less often, the percentage of features I use must be tiny.
When I needed to learn SQL, I took at look at the language standard. There were a bazillion statements defined in the standard, of which I may have used 10 by now. I imagine there are database gurus who haven’t used more than a few dozen statements.
I find all this encouraging because it means the next big, intimidating thing I need to learn probably won’t be that big in practice.
If you need to learn a new programming language and see that the “nutshell” book on the language is 1,500 pages, don’t be discouraged. The part you need to know may be fragments that amount to 30 pages, though it’s impossible to know in advance which 30 pages they will be.
 I have a client that does a lot with org-mode. Rather than writing LaTeX files directly, they write org-mode files and export them to LaTeX. Although you can use LaTeX generously inside org-mode, you do have to do a few things a little differently. But it has its advantages.
- Org has lighter markup and is easier to read.
- You can run code inside an org file and have the source and/or the results inserted into the document.
- Org cleans up after itself, deleting
- Org will automatically rerun the LaTeX compiler if necessary to get cross references right.
- The outline features in org give you code folding.
- You can export the same source to HTML or plain text if you’d like.
2 thoughts on “How much do you really use?”
`collections` is ridiculously useful: defaultdict and namedtuple turn up all over my code.
Part of the trick (if there is one) of becoming productive in a new language is not to ingest the whole thing but to conduct a broad enough survey that you have a high-level appreciation of the bigger picture which can help you identify the correct 30 pages for the deep-dive.
Maybe also try to get an early idea of what idiomatic code looks like (dig through the syntactic sugar-bowl?). Comprehensions in Python as opposed to for loops is an obvious example.
Have a look at the toolz library for Python. It combines itertools and functools into a more modern functional api.