Cleaning up your Twitter timeline

Twitter is a great social media platform, and your timelines stay relevant depending on how much you tweak the list of people you follow.  I primarily use Twitter to read content that others have curated and reviewed.  It saves me a lot of time and points me to a lot of content I didn’t know existed.

One of the problems with Twitter is that over time, your timeline may be flooded because you are following people you no longer need to.  It is easy to get inundated with content on Twitter and therefore optimizing your timeline by pruning the list of people you follow is as important as spring cleaning.  Many “influencers” will follow you in an attempt to get you to follow them back.  Then over time, they will unfollow you leaving you with their content to read while they never read the thoughts you share.  Waning interests, changing hobbies, old technologies being replaced with new ones, stale accounts, decommissioned handles are all the more reason to keep tidying up the list of people you follow.

Here is a tool and data approach I take to clean up the people I follow regularly.

  • Download the Twitter CLI available here.  This is one awesome project.
  • Follow the instructions for installation on the git page depending on the platform you are running on.
  • Follow the instructions to register a new app with Twitter, set the permissions to “Read, Write and Access direct messages“.
  • Using the command `t authorize`, login to Twitter and authorize the Twitter CLI to operate your Twitter account.
  • Now you can start dumping data from your Twitter account on the command line and figure out the accounts to unfollow.

Here are some tricks I utilize to extract some insights from the Twitter CLI dumps:

Leaders are the accounts I follow but they don’t follow back.  I have found that pruning this list keeps my timeline sane.

t leaders lists the leaders who you follow.

   Since Last tweeted at Tweets Favorite  Listed Following Followers  

    ...

t leaders -l -a -s=tweeted

The above command will give you all leaders and the time since they tweeted in sorted order. Leaders who have not tweeted in a while are good candidates to unfollow.  You will find them on the top of your list.

t leaders -l -a -s=tweets

The above command will list all leaders with their tweet count in sorted order.  In this list, look towards the top and the bottom of the list.  The top will have leaders who have not tweeted much and the bottom has those who tweet a bit too much. Pruning by unfollowing from either ends of the list will help you cleanup your feed.

t leaders -l -a |grep -i "moved\|no longer\|instead"

The above command will list a few potential Twitter handles that are no longer used.  You need to review the list and if some handles have moved, it is a good idea to clean them up.

t leaders -l -a -c >out.csv

The above command will output the leader list in CSV (comma separated value) format.  You can then open the file in a spreadsheet program to slice and dice it further.  For example, you can view only the leaders who are not verified accounts.  You are most likely to find a few accounts in this list you’d want to unfollow.

Unlike other social media types, Twitter needs regular pruning for it to continue to be a useful medium for curated content.  Cleanup keeps the content relevant and meaningful thereby reducing the signal to noise ratio.

The ‘Y’ (why) in vimrc – Part 1

vim image

I am an avid vim user.  I have used GVim on Windows and now I use MacVim on Mac.  I also use it from the terminal when I need it.   There are many reasons why I love vim but this post is not about that or a tutorial on vim.  If vim is your editor of choice,  you will enjoy this series as I will share “why” my vimrc looks the way it does.

I have read that many folks prefer a standard out of the box tool and don’t like customizing it.  I, on the contrary, like to configure vim to my exacting needs.  My vimrc is a result of my ideas and a number of copy-pastes from fellow vimmers who have shared their configurations over the internet.

Managing the vimrc file.

In this first part, I talk about the vimrc file itself and some tips to manage it.

Make vimrc always available: 

Your first goal should be that when you set up a new computer, you should be able to configure your favorite editor in the least amount of time.   Most of my settings and plug-ins are in my vimrc file.  I install all plug-ins through a plug-in manager (more on that later).

To be productive in the shortest amount of time, I require my vimrc to be available to me ASAP.  I achieve this through the following ways.

  1. I publish my vimrc to a public github.com repo.  Make sure you remove proprietary stuff that you don’t want to share  from the file before submitting it in your public repo.
  2. My vimrc is located within my data folder – a folder that contains stuff I care about. This data is regularly backed up. So, even if I don’t have access to github.com, I usually do have my vimrc available to me through the backup.

I don’t use the vimrc in the default location.  I always sync the file to a folder such as ~/config and then I modify the default vimrc file and source the file that I synced.

cd ~

git clone https://github.com/technochakra/config.git

echo so ~/config/vimrc > ~/vimrc

Configuration is code.

As noted above, I check-in my vimrc file to github.   If you are a software developer, we have reached the age where code, infrastructure, configuration should be treated as code and regularly checked in.  vimrc falls squarely in that category as well.

Reconstructing your vimrc file from scratch is painful and should not be done.

Avoid the defaults:

I realized recently that my vimrc file contained some obvious defaults.  If you look at the help of a setting and it defaults to what you need, you don’t have to have it in your vimrc file unless some plugin is overriding your defaults.

help errorbells

In the example above, errrorbells (a beep in case of an error) is off by default.  So, your vimrc file does *not* need the following line.

set noerrorbells

Having a minimal vimrc file makes it more manageable and it takes you less time to figure out the setting when you revisit it after a few years.

Source vimrc as soon as you write it 

The following command sources my vimrc file as soon as I modify it.  This helps me try out my changes immediately, fix errors right away and gives me a vimrc file that always works.  It is also very satisfying to see your settings take effect immediately.

autocmd bufwritepost vimrc source ~/config/vimrc

This does not work when I modify the plug-ins I use but I’ll cover that later.

Lint free vimrc

As noted above, I like to treat my vimrc file like code.  Well, then there is no excuse not to statically analyze it for warnings and errors.  I use vint as my lint program.  For some reason, vint didn’t work on MacVim when called from plugins that integrate with it so I ended up using vint from the command line.

vint ~/config/vimrc

Sample output: 
<some_path>/vimrc:1:1: Use scriptencoding when multibyte char exists (see :help :scriptencoding)

vint is a great tool to avoid common mistakes.  For example, I did not know about augroups until the tool flagged them for me.

<some_path>/vimrc:31:3: autocmd should execute in an augroup or execute with a group (see :help :autocmd)
<some_path>/vimrc:32:3: autocmd should execute in an augroup or execute with a group (see :help :autocmd)

It turns out that by putting autocmds in an augroup, and clearing the augroup using the autocmd! command, you prevent duplication of autocmds in your augroup when your source the file again.   This keeps things clean and optimal.

augroup NERDTREE
 autocmd!
 autocmd vimenter * NERDTree
augroup END

 

Managing your vimrc file is fairly simple.  It helps to constantly clean it up and keep it minimal.  Now that we have the structure for maintaining our vimrc file, I will discuss the settings I use in subsequent posts.

Twitter Tip – Turn on mobile notifications.

Introduction

Twitter is an indispensable tool that keeps you up to date with the latest trends and news in your domain of work.  I’ll be using my blog to share a few tips and tricks I have learnt over the years.

Tweets are a steady flow of  unscheduled packets of information on your timeline and it is not always possible to read every  single one of them.   Unlike an email inbox, it is best to discard unread tweets if you are unable to view tweets for a couple of days.

There are always some Twitter accounts you’d like to track

There are a few accounts whose tweets you may not want to miss even when you don’t  have time to monitor your twitter account.

For example, I like to follow tweets from  –

  1. The company’s twitter account  (or sub account) to stay tuned with the business and RT if something catches my eye.
  2. All team members who I work closely with.
  3. All accounts that use twitter to alert their customers about delays / failures  in their service or have breaking  announcements. These are super critical alerts I care about such as delays on my commute routes, security alerts for software I care about, etc.
  4. Tweets from close friends and family with whom I like to interact with.

Mobile Notifications

This is where Twitter’s mobile notification feature comes handy.

  • Turn on notifications and get alerts on your mobile phone whenever the account you care about tweets. Twitter will send regular mobile alerts on your smart phone and these alerts are *not* sent as SMS messages.
  • You will be notified on your phone / tablet  and you can immediately read the tweet and react to it.
  • The notifications are sent even if you were not mentioned in the tweet.
  • In order to use this feature, you should be following the person for whom you’d like to set an alert.

The image below shows how to turn on mobile notifications for accounts you follow.  Click it to view in a new window.

twitter notifications

I have been using this feature ever since it was launched.  It helps prioritize tweets you want to read without the fear of following too many people or being away from your twitter account.

So if you are looking for some sanity within the chaos called Twitter, this is a must have feature that you should try out.