# Viewing tweets on delay

Last night, during that brief period after I started watching the Oscars and before I fell asleep, I had an idea:

Twitter clients need a “TiVo mode,” in which incoming tweets are delayed by an adjustable period to match how far behind real time you are.
— Dr. Drang (@drdrang) Sun Feb 26 2012

Brilliant, right? I was soon informed by smorris76 that Daniel Jalkut tweeted the same idea 15-20 minutes earlier:

Twitter client idea: Time Shift™. Lets you view Twitter as if it it was, say, 20 minutes ago.
— Daniel Jalkut (@danielpunkass) Sun Feb 26 2012

Oh, well. At least I’m in good company.

Tonight I took a quick look at the source code for Dr. Twoot to see what it would take to show tweets on some sort of time delay. Programming the filter isn’t all that hard, especially after I found this nice JavaScript library for dates and times that includes both the time arithmetic and the datetime string parsing I needed. I have a “tivo” branch running right now that’s giving me my home_timeline and mentions on a two-hour delay. Seems to be working fine.

The problem is figuring out a way to set the delay time without cluttering up the user interface. (To work out the filtering logic, I just set the delay in the source code, which obviously isn’t a permanent solution.) Recall that Dr. Twoot is basically a webapp that’s been turned into a standalone Mac application via Fluid—it doesn’t have all the options a native app would have.

I’ll give it some thought and try to come up with something that stays out of my way when I don’t need to see it. I have time; with the Super Bowl, the Grammys, and the Oscars done, I won’t be wanting delayed tweets until the NBA playoffs.1

I did manage to clean some clutter out of Dr. Twoot a few days ago. The buttons for replying, blocking, retweeting, etc. used to appear in the upper right corner of every tweet all the time. Now I have them act more like the buttons on the Twitter web site—appearing only when the mouse is over the tweet. Here’s a little screen recording showing how it and the user info popup windows work:

In my zeal to keep the file size of the video small, I overcompressed it, which is why you see artifacts left behind by the popups. Next time I make one of these, I’ll be less aggressive with the bit rate setting.

1. By the way, if you’re wondering what I’m going to do with my tweets when I’m on delay, well, there’s really no way for me to tweet about an event while using this feature. I want it so I don’t see spoilers while watching an event behind real time on TiVo. It’s for reading, not writing.

## 7 Responses to “Viewing tweets on delay”

1. Rob says:

No MP4 in Firefox, here is direct link of the screen recording.

2. Hmmm… I put a direct link between the <video> open and close tags because I thought that was the place for fallback code. I should’ve tested that on Firefox, but I’d been up since 3:00 am, so the quality control took a hit.

3. Maybe instead of thinking ofvthis feature as delaying/postponing the stream, you could think of it as “pausing the stream”. That would make integrating the action much easier and would lead to a more generic result.

4. A pause button would be fairly easy to implement, Alex, but that isn’t quite what I’m after. I want the stream to keep updating, I just want it to be in sync with my TiVo viewing instead of real time. Maybe I’m misreading your comment…

5. Let me give it another try then :-). I assume that when you say keeping it in sync with your TiVo you mean something like:

• I’m recording this show now and play it back in 2 hours
• being in sync is not exactly synonimous to subtitle synchronization but it’s more like: I want the show and twitter stream to flow together starting from this original point in time

Basically my suggestion was to implement a pause functionality which will allow the “backend” to continue to retrieve tweets but not display them until you “play” them. Having in mind the TiVo example, you’ll not have to 1) figure out how much time you need to delay the stream; 2) if you pause the show you you’ll not need to estimate upfront for how long it will be paused.

Bottom line, I might not be suggesting the same 100% feature, but rather somethingthatwould allow you to get something like: I want to not see the tweets for a while (until I do X, or until I finish doing Y, etc.)

6. Now I understand. The UI would need two buttons, Play/Pause and Fast Forward, and probably some sort of clock to show you the stream’s current definition of “now.” The Fast Forward is needed because I seldom watch a TiVo’d event at a constant delay—I creep up on real time by zipping through commercials and the boring bits and would want to have my Twitter stream synced.

The coding for the Fast Forward button would certainly be interesting. Should the clock make incremental jumps with every click? Should it move at 2X normal speed while the button is held down? 10X normal speed?

Overall, though, I think I’d rather keep things simple with a single entry field in which I type the delay. Easier to use and certainly easier to program.

7. For the UI - my instinct is to focus in on the existing “time” indicators on the tweets. If I hover over “25m ago” on a tweet, then maybe it presents a clickable button to lock in that as my reference time. Then, the top-most tweet in the timeline could show some kind of color or badging next to the time to indicate that it’s only the latest because of a time constraint, and interacting with that time indicator could again “unlock” the time-shift.

Alternatively for the unlock you could maintain a pseudo-tweet at the top of the timeline, that summarizes the number of tweets that are being hidden: “23 more tweets that have been posted after your time-shift window. (End Time Shift)”.