Adding Npm to a PHP Travis Project

Like most PHP developers, I'm polyglot. My PHP project builds with phing, but uses a bunch of npm tools along the way to minify assets and those types of things. When I introduced TravisCI into my project, I was instantly confused by the requirement to specify the technology I was using ... all of them, surely?

In need of wisdom and advice, I turned to the best source I know:

Continue reading

Twitter Search API Using PHP and Guzzle

In case you missed it, Twitter updated their APIs recently, so that you have to authenticate to use even their search APIs to return publicly-available results. This is an increasing trend for API providers, to provide either very limited or nonexistent access for unauthenticated users, I think so they can rate limit consumers that swamp them. To cut a long story short, that meant I needed to update my dashboards that keep an eye on twitter searches to do more than just call file_get_contents in the general direction of the right URL. Continue reading

Ttytter: Command Line Twitter Tweaks

I've been using ttytter for quite a while, it's a superbly inoffensive twitter client - and it's console-based. This makes it easy to use from the keyboard, fast, and also makes it look a bit less like twitter if that's not something people should be seeing over your shoulder!

I have customised a few settings which I find superhelpful, so I thought I'd share my config file and say a bit about some of the entries in there. The config for ttytter is held in a file called .ttytterrc in my home directory. Mine looks like this: Continue reading

How NOT to Design Your API

Recently I tweeted as a #linktuesday link the 10 Worst API Practices post from ProgrammableWeb. Today, in search of some concrete examples of APIs implementing unhelpful antipatterns, I sent out a tweet for help:

What's the most frustrating inconsistent/misleading bit of API you've seen? Looking for cautionary tales! Please RT
@lornajane
Lorna Mitchell

In the raft of responses (and thankyou all, this was fabulous, helpful and entertaining in equal parts!), there were some definite patterns that I'd like to share with you, in no particular order. Continue reading

Authenticating with OAuth from PHP

I've been looking into OAuth recently and really like what I see, so I started looking at actually starting to play with something that uses it (and isn't twitter). In the pursuit of this, I spent some time walking through the process of how to actually authenticate using OAuth, as a client. I chose Yahoo!'s service, because they have some fabulous developer documentation and have a standard OAuth implementation. Although you don't strictly need any special libraries to handle OAuth, that would be a bit like decoding XML with a regex, so I used the OAuth Package from PECL. For others (including me after I've slept), here's an outline of the process.

Continue reading

Ever Feel Like You're Being Followed?

I've been using twitter for quite a while now, around a year. And so far, its not going brilliantly.

The problem really is that I don't "get" twitter. I am not online 24/7 so I often only look at my feeds once per day. The conversation in twitter moves faster than that so I rarely reply because usually I've missed the moment. Friends in various timezones also don't help that situation. I haven't really worked out what to do with twitter ... I linked my facebook status to it so that updating one would cause the other to update, thinking I might eventually understand what it was all about.

The only thing that's really changed since I started using it is the number of followers I have, there are more than I really expected. To put this in perspective, I follow twelve people. But seventy people follow me! Not many are complete strangers, some are colleagues, others are online friends. Some of them I would like to follow myself but they are too noisy and since I don't keep up with updates in real time, that doesn't really work for me. I do rather feel like I'm addressing an audience though, slightly spooky.

My twitter timeline is public - this is the point of twitter, its a mass collection of one-liners. It allows clever tools like Summize to show you all posts with given text in it, and things like that. Which is useful if people are talking about you, as I discovered when I was a conference speaker. But it does feel a bit, well, public.

The bottom line is, I'm fed up with twitter, I don't know what to do with it and having more audience is actually making me post less (a bit like being syndicated on the php-planet feed really!) and its so unreliable that half the time when I remember to update, I can't. There's lots of talk of moving to a rival but nobody seems prepared to make the jump. I am completely prepared but I can't find anything to jump to! I looked at Plurk but I have accessibility needs and it doesn't come close to being usable for me. At the moment I think my favourite is FriendFeed - which has the added advantage of being configurable to be private other than to people I approve. It also syndicates people's blogs, flickr accounts, and all sorts of other things, including twitter - so if we all moved to friendfeed then everyone can choose their own twitter replacement, or change it every month, and nobody needs to know because each user manages what goes into their feed that other people see.

I'm not sure if I'm moving away from twitter, stopping using it entirely, or what. Suggestions/comments/experiences are all very welcome!