Terence Eden. He has a beard and is smiling.

Terence Eden’s Blog

Theme Switcher:

API Design is UI for Developers

· 20 comments · 1,250 words · Viewed ~23,450 times


Scrap of JSON which doesn't say much.

I've been thinking a lot about APIs and their design recently. I stumbled on this fantastic quote from Greg Parker: Greg Parker@gparkerA programming language is a user interface for developers. Language authors should learn from HCI principles.❤️ 41💬 6🔁 019:10 - Wed 22 February 2012 When I first started learning C++ (back in the bad old days) I was convinced that any 1st year student could desi…

When is a URL not a URL?

· 1 comment · 450 words


Summary Twitter's way of linking URLs is broken. It's annoying to users, and a pain in the arse to developers. This quick post talks about the problem and offers a solution. I've raised a bug with Twitter and I hope you'll star it as important to you. (more…) …

Displaying Twitter Photos via Entities

· 3 comments · 200 words · Viewed ~1,908 times


Twitter has announced that it will soon open up a native photo sharing service. Rather than using an external service like Embed.ly to retrieve thumbnails, all the data is embedded within Twitter Entities. So, if you request a status using "include_entities=true", you will be able to grab the image and display the thumbnail using the following code. function twitter_get_media($status) { …

A (Minor) Twitter Privacy Bug?

· 1 comment · 500 words · Viewed ~204 times


The Twitter logo.

Quick Summary Twitter's secure API hides the contents of the tweets you are reading. But it doesn't hide the images of those you converse with. Raised as Issue 2175. A Bit More Detail Twitter has a secure (HTTPS) and insecure (HTTP) API. When calling the secure API, all the content of the returned message (tweets) are encrypted. Eavesdroppers only see the cipher-text - essentially garbage. …

Getting Images from a Foursquare Checkin

· 500 words · Viewed ~1,488 times


Photo of a MacBook. The decal sticker is of Iron Man. His hand blaster is replaced with the Apple logo.

"Oi!" shouted Whatleydude, "Get Dabr to show images from foursquare checkins!" "Righty-ho sir!" I said. I started coding furiously. Of course, things are never quite as simple as I first thought.... So, how do we go from http://4sq.com/fgIWov to 1 Expand the URL Get your Bit.ly API Key. http://api.bitly.com/v3/expand ?shortUrl=http://4sq.com/fgIWov &login=YOUR_BIT_LY_USERNAME …

Share Android Apps on Twitter (or anywhere else)

· 3 comments · 250 words · Viewed ~2,560 times


The Twitter logo.

I attended the Mobile Monday meeting "200,000 Apps - Where's Mine" last night. One thing that became clear is that apps don't do a very good job of promoting themselves. One crippling problems with most app stores is that there's no (easy) way to share an app with a friend. Here's some basic code for an Android app which will post the URL of your app to Twitter. Stick it in a button or menu…

Android Tutorial - Clickable Widgets

· 1 comment · 200 words · Viewed ~4,217 times


Another quick Android tutorial. I couldn't find an easy or correct method of launching a browser when you click on a homescreen widget. Well, here it is... public class clickWidget extends AppWidgetProvider { @Override public void onUpdate( Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds ) { RemoteViews remoteViews = new RemoteViews( context.getPackageName(),…

Twitter API - pagination and IDs

· 11 comments · 550 words · Viewed ~5,896 times


The Twitter logo.

Looking for some Twitter API help.  Bit of a geeky post, this... Pagination is the act of splitting data into logical  pages. Suppose I had a list of item, numbered 0 - 99.  If I want 20 items per page, it's trivial to see that pagination looks like: p1 = 0-19 p2 = 20-40 p3 = 41-61 p4 = 62-82 p5 = 83-99 If I wanted to start at, say, page 55 - pagination would look like: p1 = 55-75 p2 = 76-96 …

Twitpic OAuth - I'm Stuck

· 13 comments · 300 words · Viewed ~3,312 times


Logo of TwitPic.

Twitpic has implemented an OAuth API. No more having to hand out passwords to all and sundy. Only I'm too much of a dunderhead to get it working. Perhaps it's a combination of heatstroke or this rotten head-cold, but I just can't see what I'm doing wrong. Any help much appreciated. The easy bit. It's easy to post the data to Twitpic $media_data = array( 'media' =>…

I Love Open Source

· 250 words


Several blobby humanoids build a cube together.

As I mentioned in my last post about VoteUK, I found the TheyWorkForYou API to be a little lacking when it came to image sizing. I posted a request asking if there was a pattern to the image sizes and, if not, was it possible to have the sizes returned in the API. The "standard" open source reply - "fix it yerself" - was predictably swift. So I did. The source code is remarkably accessible -…

Hashtag Standards

· 2 comments · 750 words · Viewed ~5,199 times


This is one of the longest and geekiest posts I've done. It's a work in progress. All comments and abuse welcome. #hashtag – As long has there has been a way to search Tweets* people have been adding information to make the easy to find. The #hashtag syntax has become the standard for attaching a succinct tag to Tweets. < p>The Twitter Engineering Blog That's all well and good, but as I d…

Hashtags and Implicit Knowledge

· 4 comments · 450 words · Viewed ~2,204 times


What is "Implicit Knowledge"? Essentially it's stuff that everyone knows, but no one has written down. Usually it's something that people have worked out through their own experiences. This sort of knowledge is common in life - but is fatal in computing and design. Take the following tweet I received. Mark Hawkins …