Posts Tagged ‘php’

jParser and jTokenizer released

Saturday, November 14th, 2009

After nearly two years I've finally gotten around to releasing my PHP JavaScript parser, although documentation is still thin on the ground.

The library has been split in two:

  1. jTokenizer – A JavaScript tokenizer designed to mimic the PHP tokenizer.
  2. jParser - The fully blown JavaScript syntactical parser which generates a parse tree.

(more…)

OAuth Fail

Tuesday, July 28th, 2009

The day a thousand apps stool still

I noticed some weeks ago that Twitter's OAuth implementation didn't appear to be verifying signatures. I knew this because I purposefully set an invalid access token which was accepted unconditionally. I thought this was odd, but as a newbie to OAuth I was just happy that my app was working, so I filed the problem at the back of my mind under "deal with it if it becomes a problem". Today (the week I release by beloved TwitBlock app) it very suddenly became a problem.

(more…)

DIY Qwitter app

Saturday, June 6th, 2009

If you know about the Qwitter service, then you may also know what people say about it – that it plain doesn't work. So for my first Twitter app, I decided to make one that does.

I have been made aware since then that there is also Twitdiff, although I haven't tried it at time of writing.

If you don't know about Qwitter, it's a service that monitors your Twitter followers and emails you if someone unfollows you. My app currently tweets the notification instead, so everyone will know you've been qwit.

I'm not offering my app as a public service [yet] I knocked it up in 2 hours and if you know what you're doing with a LAMP set-up you can download it and run it yourself.

» Download qwitter 0.1.2
Requires PHP >= 5.2.x  + json extension, MySQL >= 5.0.45

(more…)

Bit.ly API command line tool

Saturday, June 6th, 2009

I've knocked up a really simple command line tool for interacting with the bit.ly API.

It's simple because:

  1. The output is currently pretty raw
  2. The bit.ly API doesn't actually do very much

» Download version 0.1.1

Requires PHP >= 5.2.x + json extension

(more…)

PHP UK Conference 2009

Sunday, March 1st, 2009

Microsoft slurs, geeks and bean bags

On Friday I was at PHP UK Conference 2009, thanks to my boss, and a charming discount from the Facebook Developer Garage. Here's what I thought.

The biggest presence here was undoubtedly Microsoft, followed at a distance by Adobe. Zend had a very small stand and don't appear to have been a sponsor. I found this a little odd from the outset, but I guess it's the big corporations that have the cash, and can ensure they don't miss a single conference. Microsoft bribed us with the usual toys: XBoxes, the magic table thing … you know the drill. I was of course there to hear about the future of PHP, particularly PHP 6, and why we're still just a cool as Python and Ruby.

To save you skim-readers the full breakdown, here's my conclusion up-front: All in all a good day, but I wanted more talk of PHP's future and could have done with less of the Adobe stuff. Most of the speakers were great, even if the subject matter missed a bit in places. Also, I know we're trying to save the planet and everything, but could Olympia please turn the heating on next time!

(more…)

Model, View, Control Freak – Part 3

Thursday, February 26th, 2009

« part 1 « part 2

 Part 3 – Hacking the library

Code libraries essentially provide abstraction. Abstraction is good. But anyone who regularly uses third party code in their work has at some point hit the knowledge wall; that point where the abstracted nature of the library leaves you helpless in resolving an apparent problem. You have limited choices – Wait for a patch, hit the forums, or hack it yourself. The latter is probably the worst thing to do, but deadlines are deadlines. (more…)

jParser grammar

Thursday, February 26th, 2009

I've been asked how I generate the JavaScript parse table for jParser, so I'm posting the grammar file here for anyone else who's interested.

↓ JavaScript grammar file for jParser

(more…)

jParser release in the pipeline

Tuesday, February 24th, 2009

I've received quite a few emails recently asking me where the code is for jParser.

I've had to disappoint so far, because it's not currently available for download. My web analytics also tells me that a lot of people are finding this blog by Googling "php javascript parser". There's clearly a need out there, so I'd better do something about it.

I know why I want a JavaScript parser, but what kind of things might you need it for? What API features/functions would you like to see? Please post a comment and let me know. Watch this space for a release, and in the mean time here's some food for thought …

(more…)

Model, View, Control Freak – Part 2

Saturday, January 31st, 2009

Confessions of a control freak and an anecdote about AMF

If you haven't read part 1, it's there for the reading, and puts this post in context.

I figure the best place to start is where the title of this series comes from: I am a control freak; in life and so in code. This is not a very positive thing to say, but in terms of my personal skills development I feel it's important. I don't like things that just work; I have to know why.

There is a button on my washing machine that says "anti-crease". This bugs the hell out of me: When would I not want this setting on? What's the trade-off? If it creases my clothes less, then what is not doing? Is it cleaning them less?

(more…)

The law of leaky abstractions

Saturday, January 17th, 2009

I'm suspicious of people who don't enable commenting on their blog – that just makes it a book. But this gripe aside, I like what Joel Spolsky has to say about abstraction in modern programming. Well, it pushes one of my buttons; perhaps "like" has nothing to do with it.

Sadly the people I feel need to appreciate his point the most probably won't get past the second paragraph. That point, or at least the one I took away from it, is best summarized by this quote:

"[...] as we have higher and higher level programming tools with better and better abstractions, becoming a proficient programmer is getting harder and harder."

(more…)