A month of detox

I cheated a little bit this morning. Since it’s been a month now since I got off Twitter and Facebook, I logged in to both for about a minute each, to check if I have any messages. The ones on Facebook weren’t of much use – just some general messages. There was one DM on twitter which had value, and I sent the guy an email explaining I don’t use twitter any more. I presently logged out.

The one month off Twitter and Facebook has so far gone off fantastically. For starters it’s given me plenty of time to read, meet people, talk to people and other useful stuff. And apart from some interesting links that people post on Twitter, I haven’t really missed either of them.

There have been times when there have been thoughts that would have earlier led to a tweet. However, given that the option exists no more, I end up doing one of two things – if there is substance to the tweet and I can elaborate on it, then I do so and it results in a blog post (you must have noticed that the frequency of blogging has gone up significantly in the last one month).

If it’s not really blog worthy but just something that I want to share with someone, I think of whose attention I would have liked to have caught by putting that tweet. In most cases I have found that there is a small set of people whose attention I would have liked to catch with a tweet – every time I tweeted, I would think of how a particular set of people would respond. So what I do when I have something to say and a particular set of people to say it to is to just message it to them.

While this gives a much better chance of them responding to the message than if they just saw it on their timeline (or missed seeing it), it also has the added benefit of starting conversations. Which is not a bad thing at all. In the last one month I’ve seen that my usage of WhatsApp and Google Talk has gone up significantly.

The only thing I miss about twitter is the interesting links that people post. I’ve tried a few things to remedy that. Firstly I tried to see if I could write a script that crawls my timeline, gets popular links (based on a set of defined metrics), and then bookmarks the top five each day. I went some way with the code (pasted below the fold here) but couldn’t figure how to post the linked articles to Pocket (my article bookmarker of choice). So I ended up tweeting those chosen links (!!) with a #looksinteresting hashtag, so that ifttt does the job of adding to Pocket.

It went for a bit till multiple people told me the tweets were spammy. And then I realized I needed to tweak the algorithm, and it needed significant improvement. And then I realized the solution was at hand – Flipboard.

If you have an android phone or an iPad and not used FlipBoard you’re really missing something. it’s a great app that curates articles based on your indicated areas of interest and history, and one of the sources it can get links from is your own Twitter and Facebook accounts. It is generally good in terms of its algo and good links usually bubble up there.

When I went off Twitter and Facebook on the 6th of August (in a fit of rage, outraged by all the outrage and negativity on the two media) I wanted complete isolation. And thus I deleted Twitter and Facebook from my FlipBoard also. Now I realized that adding back twitter on FlipBoard will allow me to access the nice links shared there without really getting addicted back to twitter, or partaking all the outrage.

For the last two weeks it’s worked like a charm. That twitter is present only on FlipBoard, which I use not more than twice a day (once in the morning, once at night), means that I’ve had the best of both worlds. And not being on twitter has meant that i’ve been able to get a fair bit of work done, finished three books (my first attempt at reading fiction in ten years fizzled out midway, though – Joseph Conrad’s Heart of Darkness failed to sustain my interest beyond about 40% (I have it on kindle) ), written dozens of blog posts across the three blogs and had more meaningful conversations with people.

I hereby extend my sabbatical from Twitter and Facebook for another month.

Below the fold is the code I wrote. It’s in R. I hope you can make some sense of it.

library (twitteR)
setwd(‘l:/work/data work/’)
load(“twitteR_credentials”)
load(‘twitterprog.RData’)
registerTwitterOAuth(twitCred) # twitCred is my twitter certificate. You can get it from dev.twitter.com
tl <- homeTimeline(n=800, cainfo=”cacert.pem”)
tl <- twListToDF(tl)

chn <- tl[,c(‘id’,’replyToSID’)]
chn <- chn[!is.na(chn[,2]),]
names(chn) <- c(“A”,”B”)

nr <- nrow(chn)
nw <- 0

iter <- 0
while(nw != nr)
{
nr <- nrow(chn)
chn1 <- chn
chn2 <- chn
names(chn1) <- c(“A”,”C”)
names(chn2) <- c(“C”,”B”)
chn3 <- merge(chn1,chn2)
chn3 <- chn3[,-1]
chn <- rbind(chn,chn3)
chn <- unique(chn)
nw <- nrow(chn)
print(iter)
iter <- iter + 1
}

chn$replies <- 1
chn2 <- aggregate(replies~B,chn,sum)
names(chn2)[1] <- “tweetid”

tl2 <- getlinks(tl)
tl2 <- rbind(tl2,lks[,1:8])
tl2$Website <- sapply(tl2[,1],function(x) unlist(strsplit(x,’/’))[3])
tl2 <- tl2[!(tl2$Website %in% blacklist),]

tl2 <- merge(tl2,chn2,all.x=T)
tl2[is.na(tl2$replies),”replies”] <- 0

tl2$num <- 1
recos <- aggregate(num~link,unique(tl2[,c(“link”,”usr”,”num”)]),sum)
recos <- recos[with(recos,order(-num)),]

tl2$Score <- tl2$rts + 0.5 * tl2$favs
tl2$Score <- ifelse(tl2$rt,0,tl2$Score)

totscore <- aggregate(Score~link,tl2,sum)
totscore <- merge(totscore,recos)

replies <- aggregate(replies~link,tl2,sum)
totscore <- merge(totscore,replies)

totscore <- totscore[with(totscore,order(-num,-replies,-Score)),]
totscore <- totscore[!(totscore[,1] %in% tweeted),]
totscore <- totscore[totscore$num>1 | totscore$replies >= 1 | totscore$Score < 100,]

for(i in 1:5)
{
users <- unique(tl2[tl2$link==totscore[i,1],7])
users <- paste(“@”,users,sep=”)
users <- paste(users,collapse=’ and ‘)
shorts <- unique(tl2[tl2$link==totscore[i,1],3])[1]
twt <- paste(“#Bookmarking via “,users,”: “,shorts)
if(nchar(twt)<140)
{
tweet(twt,cainfo=’cacert.pem’)
Sys.sleep(300)
tweeted <- c(tweeted,totscore[i,1])

}
lks <- tl2[,1:6]
save(lks,blacklist,getlinks,tweeted,file=’twitterprog.RData’)

One thought on “A month of detox”

Put Comment