New project: simple crossword puzzle solver!

Here’s the new crossword puzzle solver!

Since writing my Wheel of Fortune solver two years ago, it’s now the fifth most popular page on my website, which is neat and also a little surprising! (how many people are playing Wheel of Fortune out there?) This project uses the same word list and just gets rid of the rule that once you’ve used a letter you know you have all of those letters revealed. It’s very mechanical; it doesn’t take into account the crossword puzzle clue itself, just the pattern of letters you know.

(for the record, the most popular website pages over the last month are:)

Dedicated: The Case for Commitment in an Age of Infinite Browsing review

Dedicated: The Case for Commitment in an Age of Infinite BrowsingDedicated: The Case for Commitment in an Age of Infinite Browsing by Pete Davis

My rating: 3 of 5 stars


The book’s thesis is that it’s very easy these days to get stuck in “Infinite Browsing Mode” – for example turning on Netflix, trying to pick out something to watch, and giving up 30 minutes later. Davis’s claim is that dedicating yourself to something (talking about life in general here, not picking a Netflix show🙂 ) is how change happens in the world, but is undervalued by most of society.

This book was helpful, and I generally agree with it, but was kind of repetitive and a bit meandering.

Odds and ends:
– He calls out some things as being commitments that I hadn’t really thought of that way before. One is a sleepaway summer camp; you’re committing to staying for a few weeks with the same group of people. Also marriage, and having kids. (he points out that these are some of the few commitments that society still greatly values)
– Davis calls out three reasons while people fall into Infinite Browsing Mode: fear of regret (worry that you’ll regret not choosing something else), fear of association (worry that choosing something will change our identity), and fear of missing out. The fear of missing out reminds me of the Four Thousand Weeks book, because you’re always going to miss out on lots of things!
– In a section about the good things about Infinite Browsing Mode (there are some!), he describes being able to be authentic by shedding an inherited commitment that isn’t part of one’s “true self”. He talks about college students who, when they arrive, continue doing the college versions of whatever they did in high school, but after freshman year, realize that they don’t like it anymore and quit. But another example he gives is of people coming out as LGBTQ+! And I hadn’t thought about it that way specifically, but it is absolutely true; coming out is a way to be your authentic self by shedding the pretense of being straight/cisgender/etc.
– Davis points out that big causes require dedication. Abolitionists like Fredrick Douglass, Henry Wadsworth Longfellow, Ralph Waldo Emerson, and Harriet Beecher Stowe had been working for twenty years to convince Lincoln and the public to outlaw slavery. The Montgomery bus boycott lasted more than a full year of people arranging carpools and the like, and that was only possible because organizations had been built up over the preceding years. And Evan Wolfson wrote a law school paper in 1983 advocating for the constitutional right to same-sex marriage; that took thirty-two years to happen, partly thanks to his hard work over that time!
– Davis points out that people’s dedication takes multiple forms. Many are builders and reformers, but some are stewards – people who keep what already exists going. In the software realm, I enjoy building, but I also get a lot of satisfaction out of keeping things working.
– There have been psychological studies (which I know can be questionable, sigh) showing that we adapt to our past decisions and feel better about them, but this doesn’t happen if a decision is too easy to reverse.
– Davis says the way to stop doing something is to give yourself an alternative; instead of saying “drink less Coke”, say “drink more water”.
– Accountability through judgment (and sometimes low levels of shame) can be a good way of strengthening a community. When someone says “I didn’t see you at practice”, that’s another way of saying “I care if you show up”.
– Davis also frames some professions as a kind of commitment because they link you to the past – for example, to be a great nurse is to participate in the epic story of nursing.


View all my reviews

a parable about asking for help at work

I’ve been at Mozilla for under a year, but I’ve been writing software for a long time, so I am mentally in this weird middle ground where I don’t know a lot about many, many areas of Firefox but feel like I should be able to figure it out.

Last week, I was trying to figure out how to make some C++ code call some already-written Javascript code. I followed my usual first two steps when I’m trying to figure something out and have zero idea where to start:

  • Check firefox-source-docs, which is usually pretty complete, but this time it didn’t seem to have anything. (and my searches were of pretty generic terms, which didn’t help)
  • Search on searchfox and try to guess the names of relevant classes and methods. This is more of an art than a science, but I’ve gotten surprisingly far this way! In this case I found jsapi.h, which seemed to have a bunch of C++ functions to manipulate Javascript classes and such. Score!

Except, after a day and a half of trying to use the JSAPI functions, I just could not figure out how to create an instance of a class. At some point I settled on just trying to call something builtin like window.alert(), hoping I could use JS_ResolveStandardClass(), but couldn’t make that work either. What’s more, I couldn’t see anywhere outside of Javascript engine code that was using the functions I was interested in, which given the size of Firefox’s codebase was a pretty good indication that I was not barking up the right tree.

I asked my team if anyone knew how to do this and got a helpful response that turned out to not work in my case.

I tried wracking my brain for other places in Firefox that might want to do something like this in the hopes that I could find some code that did this. This is where my inexperience in Firefox really hurts, because I don’t have a good idea of how a lot of Firefox works. Anyway, I didn’t find anything.

So I went to my last resort – picking a relevant file, looking at its history, finding someone who seems to have made meaningful changes to the file, and asking them 🙂 I explained what I was trying to do, and asked three questions:

  1. Is what I’m trying to do a bad idea?
  2. Is there an example of code that does this somewhere that I can follow?
  3. Is there a better person I should be asking? 🙂

The two sentence reply I got said that no, this was not a good idea, and that I should be defining an XPIDL interface, implementing it in Javascript, and calling that from C++.

And that was all I needed! I’ve implemented XPIDL interfaces in C++ before and didn’t even know you could do that in Javascript. Sadly the tutorial for implementing an XPIDL interface does it in C++ and leaves doing it in Javascript as an exercise for the reader, armed with the knowledge that this was possible it wasn’t hard to find a real example. And it totally worked! And it’s an idiomatic thing to do in Firefox.

Anyway, the lesson to this overly long and detailed story is that two sentences from an expert that they probably knew off the top of their head would have saved me a day and a half of floundering around. One of the things that has bothered me about some managers in the past is the idea of treating developers as “resources” that you can shift around to work on whatever project is the highest priority this month. And sure, people can and do learn, but it’s just so inefficient for people to constantly be starting over in their knowledge about how a product works.

linked list wednesday: an antibiotic without resistance, continuous growth is bad, prompt engineers, bitcoin energy usage