Limi’s Concept Zone

coding, ranting and random shizzle

Programming API’s all in one place

Ever find that you are searching through various programming language’s API sites, and wished that there was an easier way of doing it all? Well I found this site the other day called GotAPI, and on their site it allows you to specify which API’s you are interested in, and from there you get a very clean interface in which to search through them with.

GotAPI

So instead of having to have 5-10 bookmarks for all the different languages I now only need the one. It’s very fast searching and uses the standard web 2.0 style of ajax. But it’s done in a way which is very useful rather than showing off the fact its ajax and it being intrusive and annoying.

You can have as many languages as the site supports open as they all load up in tabs at the top, so you can search between them by just clicking the correct language. It also includes API’s for various databases and major sites such as Flickr as well, so it’s not just useful for programming.

The bottom line, there’s no adverts, it’s fast, free, and all in one place. GotAPI

Facebook Note Comments to Wordpress v0.3

Version 0.3 of the Wordpress plugin has been released, its an update from Cheez.

Change Log

To view the change log please visit this page.

Download

Download - WordPress Facebook Notes Plugin

Facebook Note Comments to Wordpress Comments

As some people might know, or might not, Facebook has the ability to automatically re-post your blog posts into Facebook under their Note application. You can do this for a single blog only at a time, for the settings page for this in Facebook see the Import a Blog page.

After having my posts imported into Facebook for a while people occasionally comment on them, and I had wondered if there was a way to have them displayed in my blog. As people seem to comment more on the Notes in Facebook rather than the real blog articles themselves. After a quick bit of searching around, I found a WordPress plugin, made originally by Adam Hill, and has been updated by Thomas Albright.

So I downloaded that, then uploaded to my blog and with glee entered my settings and pressed the import comments button. To my disappointment the plugin didn’t work . I thought “well ok, its coded in PHP, so lets see how it works”. I tell you this wasn’t a simple to figure out, as its more complex than it appears.

In the end after spending some time playing around with it, and having to constantly log in and out of Facebook to test I got it working. The fix itself was very simple, it wasn’t so much a code error, or a major change to the Facebook site that caused it to break. Obviously Facebook developers had been alerted to this plugin and decided that they didn’t want this, quite frankly really quite nice plugin, to work any more. So they decided to start tinkering with things. Nothing drastic, and nothing that changes the way that the page is shown to the user. All the HTML code remained unchanged except for some very.. VERY.. sly changes.

Now before you jump to conclusions, it wasn’t extra div’s, extra line breaks here or there, or even re-structuring the code. This adjustment had to be done in a way so that the original coder would look at the source of the page and see no modifications, and that the only difference was that before the plugin worked, and now it doesn’t. So what’s the easiest way to do that?

Whitespace! The simple addition of a single space in select parts of the HTML markup caused various and important regex’s within the plugin to fail, and therefore would no longer be able to read and distinguish comments on Facebook. So all it took was to see what they were before, easily done by examining the regexp’s, and then comparing that to the current source code you see on the site. From that you then fix the regexp for this new tinkered-with-code and away it goes again!

So a hello goes out to the random Facebook developer who ends up reading this as they get ordered to fudge it again. You could however, instead of doing that again, add functions to the Facebook API so it could be done legitimately!

If you wish to test this plugin, simply reply to this note on Facebook and it will appear on the article page within about an hour. (It updates on the half-past the hour)

Anyway, if you want the new fixed version of this plugin you can download it just below…

Download

Download - WordPress Facebook Notes Plugin

So.. those download links?

So yes, just where did those download links go? Well, primarily I had been testing by straight loading the exe file, and seeing how it went, which for me, was running fine. However, if you had used the installer and tried to load either program from the short cuts it made, the programs would both fail.. with no errors or warning. THE JOY!

So, a quick no-thanks-windows-ill-tell-you-how-to-not-suck later and they now work correctly. Here is the link for TLU Status and Winamp Readout apps…

Download (937kb) - TLU Status - tlu-status_setup_1.1a.zip
Download (906kb) - Winamp Readout - winamp-readout_setup_1.0a.zip

London Underground Status

So another week of work goes by, and along with that a minature world of delays and problems on the tube. I can hear you now, “well whats new about that one?”, unfortuantly as im learning very quickly that this is’nt some freak occurance that the tubes don’t run on time and can’t be relied on for keeping time or even running. So, to combat this situation, and hopefully make my life a little easier I knocked up a little app to get the service status of the London Underground from the Transport For London web-site and display it in, yeah you guessed it, a client side application!

Again, it all started off being very simple, but then progressed and gained features. Currently it fetches the service status every 5minutes which is configurable via the command line when you start the program. For example..

tlu-status.exe 60

…would mean it goes and fetches the data every 60 seconds. Although I would’nt recommend you set it that low, I think the TFL webmaster might have something to say about it otherwise. Again, like the other apps I have created so far, they minimise to the tray, as I don’t see a reason for a background program to remain on the task bar other than when your using it. So for those who are interested in seeing this wonderfully uselessful app…

tlu service status

I have already has people asking why I made this into a app if the information is already available on the internet? Well.. i’m lazy and I can’t be arsed to load up a web-site if I want status updates, I just want it on my desktop, always being available quickly. It also means I can just put it on another screen, and glance at it occasionally during the day to see how things are going.

Download Links

TLU Status (937kb) - tlu-status_setup_1.1a.zip

Winamp Readout

After creating some very simple applications in WinBinder to test to see how things worked out, I decided to try and make something a little more challenging. So I came up with the idea of a Winamp interaction application, starting off slowly with just the plan to get the current track and artist name from Winamp and displaying it to the user. From there, if I wanted to, I could expand the program to possible do statistics on what you’ve played. (I do realise that there are applications that already do this, but this is a learning process).

So after getting the WinampCOM object working, I managed to get what I required out of Winamp, and was displaying it to the user. Then I had a mini-brainwave about people using Winamp, more specifically using it while in a full screen application, where you can’t see the Winamp window anymore. I know myself I load up my winamp and let it loose on random play with my mp3’s, but if I was in a full screen app, I would’nt be able to see whats playing (short of alt+tabbing anyway). So I dug around some more with COM objects and then suddently remembered about the SAPI.SpVoice object.

So 5minutes later, the application is now reading out the track names as you switch, and also reading in the ID3 tags if they exist. Not only that, but after a suggestion from Jace Arnold to make it pause the track while its talking, another 5minutes later and that was in as well! So after starting off, this is what it ended up looking like…

winamp readout

It also minimises to the tray, as I have a serious pet peeve about programs taking up taskbar space which could easily run from the taskbar in the background.

Download Links

Winamp Readout (906kb) - winamp-readout_setup_1.0a.zip

WinBinder

I’m currently mainly coding in PHP still (love live PHP!) because I find being able to mock up pages or programs quickly is a god send, especially since Rubem Pechansky created a wonderful extension called WinBinder. Which allows you to create client side applications extremly quickly, think how easy mIRC dialogs were, and then put that with PHP, and you can make some very powerful programs. Rapid client side application development with PHP *glee*. Here’s a quote from their web-site about it…

WinBinder is an open source extension to PHP, the script programming language. It allows PHP programmers to easily build native Windows applications, producing quick and rewarding results with minimum effort. Even short scripts with a few dozen lines can generate a useful program, thanks to the power and flexibility of PHP.

Close
E-mail It