Dramatic improvement by replacing ActiveRecord loop with single SQL query

Autovist’s worker process started producing hundreds of Heroku R14 “memory quota exceeded” errors:

But we haven’t added any new jobs recently.  What’s going on?

Continue reading “Dramatic improvement by replacing ActiveRecord loop with single SQL query”

Pre-calculating vaccine ingredients: from PostgreSQL to HTML data-*

The VIC pre-calculates ingredient amounts in order to dramatically speed-up performance.  This article describes how its done and why AJAX would be the absolute worst way of doing dynamic calculations on a complex set of variables.

The VIC delivers a tiny database to the browser inside the Ingredient Report page. The data is stored as HTML data-* and the engine is Javascript. “By adding data-* attributes, even ordinary HTML elements can become rather complex and powerful program-objects.” [1]

Once the Ingredient Report is loaded…

Continue reading “Pre-calculating vaccine ingredients: from PostgreSQL to HTML data-*”

Experimental features: randomized slowdowns + retweet chains

Normally, Autovist broadcasts every hour at a random time within the hour.  I created a new Twitter account for Autovist itself, but don’t want hourly tweets yet until we build up at least 100 messages.  Autovist already has a built in check to make sure the same tweet is not broadcasted within the same 12-hour period.  But I wanted to add some randomized behavior on top of that:

Continue reading “Experimental features: randomized slowdowns + retweet chains”

Autovist broken-URL notification

Isn’t just awful when a great link you’ve been sharing breaks?  Perhaps the content has been removed or the website has been reorganized.  As busy online activists, we don’t have the time to check all the links we share. Especially when we use Autovist and have thousands of tweets in our knowledge-base, checking links becomes unmanageable.

Continue reading “Autovist broken-URL notification”

Simple, effective parental control for your Mac

Today, I whipped together a simple, effective parental control script for our shared Macbook Air.  For many months, our homeschooled son has been easily distracted by videos and messages when he is supposed to be working hard on crafting a good paragraph.  Apples parental controls are a massive #FAIL – deselecting the default apps do not work and you cannot just simply turn off the Internet.

Continue reading “Simple, effective parental control for your Mac”

How NOT to change your API (looking at you, Twitter!)

Twitter added extended tweet mode to their API and screwed up Autovist. Autovist helps you build a massive knowledge base by importing your tweets every night.  When importing a tweet with a photo, Autovist has always been able to tweet it again and again looking exactly like the original tweet. It worked perfectly for years.

But then Twitter “enhanced” its API and returned different results by default.  What was originally tweeted like this:

Continue reading “How NOT to change your API (looking at you, Twitter!)”