zerosleeps

Since 2010

Apollo is shutting down

So Reddit has bludgeoned third-party apps to death. Whatever. I gave up Reddit many months ago when I realised I was letting it suck time out of my day without providing any benefit. That’s not why I’m posting this though. I’m posting this to comment on the way Christian Selig - the creator of the extremely popular iOS Reddit client, Apollo - has handled the situation.

I only spent so much time using Reddit because of how great Apollo is (was). I paid for Apollo Pro within minutes of first using the app because it was immediately obvious it had been created with love, by someone who doesn’t tolerate bullshit. That’s my kind of software, and an absolute steal for the price (AUD$7.99 at the time).

Anyway, Selig has been very open about the situation he finds himself in, which brings me to the reason for this post: I aspire to be like this guy. Everything I’ve read that’s been written by him (even before this shitshow) has been thoughtful, professional, succinct, and based on facts. Watch this interview with Selig by Snazzy Labs - he effortlessly comes across as a beautiful, humble human being who just wants to make honest and delightful products.

And I type this after a particularly frustrating week at work, where I can think of at least 3 situations I could/should have handled way better in the moment.

Less emotion, more consideration.

More eBay questions

A follow-up from this post. Copy-pasta’d with capitalisation, punctuation, and extra white-space 100% intact. These are the entire messages - I haven’t cut out any salutations or sign off’s, they just didn’t have those!

buy now price

Hi.. shipping to South Africa?

how much does it lowest

Hello. Do you shipping to Thailand?

Yo can I buy this now

“Yo”?! Who opens a message to a stranger with “Yo”?

battery health  thx

🤦‍♂️

Reproducing Django bug 34486

That Django bug I mentioned a few days ago is a slippery little devil. It’s related to the way a couple of methods available in Django’s contrib.postgres.search module construct their SQL statements. Something in the stack was assuming a connection to the database would be available earlier than is actually was, leading to an exception.

I won’t say it’s impossible to replicate the bug using Django’s test client, but I haven’t worked out a way to do so. Using the test client inside any of the test case classes which allow database interaction means a database connection is opened and maintained early enough. This doesn’t exercise the code path in question, so it never leads to that exception.

The solution I’ve come up with is to not use Django’s test client, instead using Python’s urllib. This means switching to LiveServerTestCase, but it more realistically mimics a fresh, cold, external request.

from django.test import LiveServerTestCase
import urllib.request


class SearchTestCase(LiveServerTestCase):
    def test_search_status(self):
        with urllib.request.urlopen(
            f"{self.live_server_url}/search/?query=foo"
        ) as request:
            self.assertEqual(request.status, 200)

Stop treating eBooks like paper books

What this bloke says, but I’ll expand it to say stop treating any digital medium like it’s physical ancestor. I get irrationally annoyed at work when we’re instructed to turn something that will never be printed on paper into an A4 sized PDF. It’s usually to mimic some governmental form, surprise surprise.

I’ve also grumbled about footnotes in books before - the content is either important enough to appear in the body of the text or it isn’t. I don’t think I’ve ever encountered a book on my Kindle that shows footnotes in a little pop-up dialogue though. I’d perhaps complain about them less if it wasn’t such a chore to get to the footnotes and back again.