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:

return if Random.rand(100).odd? and user.email.downcase == "chris@autovist.com"

This simple guard clause prevents a broadcast if a random odd number is generated.  Probability theory says that if we execute rand(100).odd? millions of times, it will come out close to 50% odd, but within any small set, there is no guarantee what the actual pattern will be, but we can be pretty certain it won’t be true/false/true/false – which is a boring pattern.  Here is a much better pattern the code just generated:

(Keep in mind that when it says “9pm”, that really means a random time within the 9pm hour.)

The next day’s generated pattern was quite different, which helps keep things interesting:

The second part of the experiment is what we call retweet chains, where a tweet or an account is setup to be intelligently retweeted by other accounts: the same randomized logic can be applied to the retweeting so that it is limited, unpredictable and interesting.  We do this by creating a background job for every account in the retweet chain:

The worker creates a new connection to Twitter and performs the retweet:

Lets see how well these experimental features work over the next 6 months.  (Subscribe to our newsletter or email me if you’d like to be notified when this article is updated.)

Chris Downey

Founder, VaxCalc Labs and creator of Autovist and the Vaccine Ingredients Calculator.

Author: Chris Downey

Founder, VaxCalc Labs and creator of Autovist and the Vaccine Ingredients Calculator.

Leave a Reply

Your email address will not be published. Required fields are marked *