Twitter


ON: BY: Chris Hannah

As we all know, Twitter is now changing the character limit of a tweet to 280 characters, from the original 140. I'm sure they have reasons, and I'm not here to argue against any of them.

However, if you find yourself wanting to go back to the "old Twitter", where tweets were short, and we had to abbreviate things when we couldn’t fit all of it in. There is a way to achieve this.

The method is by simply hiding any tweets that do not meet your length preference. The most popular twitter clients for iOS and macOS (Tweetbot, and Twitterrific), have some form of muting feature, which also allow advanced muting with regular expressions.

Some people make use of this to mute certain hashtags, overuse of hashtags or @mentions, and some really advanced things. But for the purpose of checking a tweet length, you just need to see how many characters there are.

And that's simply:

[\s\S]{MIN_LENGTH, MAX_LENGTH}

You use [\s\S] to match any character, and then use the lengths afterwards to specify a minimum and/or maximum length.

Just to explain it in a bit more detail, the square brackets are a way to define a collection of character matching rules. And the curly braces are sequence quantifiers, that can match minimum, exact, or maximum length of a match.

And then there's the \s and \S.

The \s is used to match a whitespace character, so spaces, tabs, new lines, etc. And the \S is used to match the opposite, all non-whitespace characters, So if you put them together, then you're going to match every possible character. Which in a scenario like this, is all you need.

The Patterns

So now I've explained the scenario, and solution in a bit of detail, I'll get to the actual regular expression patterns.

In this case, we simply want to hide all tweets that do not fit the old standard of 140 characters in a tweet.

However, we aren't setting rules, but instead writing patterns to match tweets that will be hidden, we will need to inverse the logic.

Seeing as we only have one parameter - the maximum length we want to see, it will be very easy. Because now we need to say, if a tweet matches these conditions, hide it.

The conditions will be of course, that it is over the limit we set. In this example I will use the old 140 character limit, but you could set your own custom preference using this same method.

If we take that logic and apply it to the simple pattern I mentioned earlier, we can simplify it even further. As we're not checking a maximum length, that's irrelevant. We just want to hide anything over a certain amount.

Which leaves us with:

[\s\S]{MIN_LENGTH,}

You still need the comma in there though, as otherwise it will only match if it is the exact same length as the number entered.

Now the last part, the actual number.

Remember, this is not the length that we want to see, but instead the opposite. So if you want to see all tweets that are 140 characters or less, you need to check for anything 141 characters or over. (The same logic also applies to other limits).

So that makes it:

[\s\S]{141,}

Simple!

Using The Patterns in Tweetbot/Twitterrific

So we have the regular expression created, now we just need to make use of it in a twitter client.

Tweetbot is the slightly easier option, as you just need to navigate to Mute filters, and then add a keyword filter. Where you'll have to type your pattern in, which will enable a regular expression switch, which you will have to tap.

In Twitterrific, it's somewhat more confusing, but only initially. In this app, the mute feature is called Muffles. And you add a new muffle, to mute tweets just like Tweetbot. However when you navigate to the Muffles section, it doesn't mention regular expressions, which lead me to initially thought they weren't supported.

However, you can use them in Twitterrific, it just takes one extra parameter, a pattern title. You specify a RegEx Muffle in the following format:

Title :: Pattern

P.S. I know there is more formatting available, but it's not relevant here.

So for Twitterrific, you might want to use something like this:

Classic Twitter :: [\s\S]{141,}

And that is it. Now you can hide away from the future, and pretend these long tweets just don't exist.

Apps Mentioned:

ON: BY: Chris Hannah

Craig Hockenberry writing at Furbo.org (Back in 2013):

I started started using Twitter at the beginning of December. Like John Gruber and my colleagues at the Iconfactory, I loved our new “water cooler for the Internet.” I was, however, unhappy with using Twitter via the website or Dashboard widgets.

While taking a shower in the middle of December, an idea struck me: it wouldn’t be hard to hook up Twitter’s new API to the Cocoa networking classes and display a table with tweets. So I dried off and started prototyping: the next day I had the world’s first Twitter client running on my Mac.

A few days later, I checked all my code into our repository and Twitterrific was born:

r174 | craig | 2006-12-20 17:54:11 -0800 (Wed, 20 Dec 2006) | 1 line`
   
Initial import

Read the full post.

It's a great story about the beginning of Twitter, and how Twitterrific came about. It certainly seems that everyone involved at the early stages, were super influential on the end product that all of us use today.

Twitter launched on the 15th July 2006, and the initial release of Twitterrific was on the 15h January 2007. So it didn't take long!

I joined Twitter in July 2009, so even though I feel like I was relatively early to the service, I can't imagine how cool it would of been to use it in it's earlier days. I would imagine, something similar to App.net, as that was very enjoyable to use. But sadly didn't make it.


In related news, Iconfactory have been working on Twitterrific 5 for Mac for a while, becuase of a hufgely successful Kickstarter campaign. And it will go live on the Mac App Store on the 10th October!

ON: BY: Chris Hannah

It’s now almost midway through my holiday in Tenerife, and I’ve been noticing a few ways I’ve been using Twitter differently, seeing as I’m not constantly being updated.

As most people would expect, I haven’t been constantly stuck to my phone (with the exception of music and podcasts), so I haven’t been able to be 100% caught up with my timeline. Whereas I’m usually a maximum of 1 hour behind, given that I’m awake. I’m not sure if that’s a good thing or not, or whether it’s good for productivity, but that’s what happens.

But instead of my usual Twitter activity, I’m hardly posting anything, but I still want to keep an eye on anything significant that’s going on.

I actually have three Twitter clients installed on my phone at the minute, and they’ve each gained a temporary place in my daily usage. My client of choice was previously Tweetbot, but I was getting bored recently, and was checking out the current state of Twitterrific, so that’s the reasons for the first two. The last one is the official Twitter app, and that’s purely for keeping up with what updates are being added, and also so I can see a poll if I need to.

So seeing as I just want to see the most essential/interesting content from the day, my Twitter usage normally consists of:

  • Checking the official Twitter app for the “What you’ve missed” section (I’ve 99% got the actual name wrong, but you get the idea). I may read some related tweets, but I feel this gets me updated.
  • I use Tweetbot every now and then for push notifications, and also to check out the Activity section. Which shows follows, likes, and mentions, all in the same list, so that’s how I make sure I’m up to date on anyone interacting with me.
  • Any “normal” use of Twitter where I want to search for someone, specifically see a users timeline, or just checkout the most recent tweets (not particularly often, but when I’m bored), I do all of this in Twitterrific.

Looking back on my usage, it seems pretty standard. Apart from the use of three different apps of course. I’m going to try and force myself to use Twitterrific a bit more, and then make a decision on that, so then it’s only the two.

The biggest plus for me for the last few days has been the official Twitter app, because it’s pretty quick to read the curated list of tweets that apparently I’ve missed out on. I’ve found to be a pretty well curated list, and unless there’s some big thing that I just haven’t seen, I feel as up to date as usual.

Maybe this will prompt a change in how I use Twitter when I get home, but I’m not putting any importance into that idea.