Bulletproof API Design - Part 1

api design, apis

Back in the day when APIs were limited to hardcore desktop application programmers and CSS seemed revolutionary, nobody minded if one API functioned differently from another. It was commonplace to see APIs with totally different, weird, esoteric interfaces, for one simple reason: there just weren’t that many.

It annoyed people, sure. People complained occasionally, sure. But in the grand scheme of things, what did it matter if some annoying GUI programmer had to re-learn the next version of the Windows Forms API? After all, they’re only GUI programmers.

But then APIs became more important. APIs started exposing data, actual, useful data. They started to let developers do actual, important things. Public things. We started to see the age of Web 2.0, of mashups, of applications that didn’t reinvent the wheel every time they had to do something someone else had already done, of the web moving to the desktop and mobile connectivity becoming really prominent and useful. We started to see the real internet.

Read more »

Lights

music

My best friend, Alex Woolf and myself are writing a musical. It's called "Illustrating Elliot" and it's about a director who moves to Hollywood to become a success, and then everything goes horribly wrong. At the peak of it, and closing the first half, he goes up onto the hill and looks down at the city's lights. He sings the following song.

Read more »

Enabling autosave in EE2 BETA

expressionengine, hints

One of the great new features that have been implemented in the EE2 BETA is autosaving. With autosaving enabled and the publish page open, the system will repeatedly save the current post you're working on, so if the unforgivable happens and you loose your post, you can get it back from the autosave feature. Unfortunately, in 2.0, autosave isn't enabled by default, but it's easy enough to do.

Read more »

Appearing at EECI2010 US

conferences, eeci, speaking

EECI2010 I'm very happy to announce that I will be presenting both a talk and a workshop at this year's ExpressionEngine CodeIgniter Conference, held in the amazing American city of San Francisco! I'm very, very excited about this one. Among the other speakers are Rick Ellis, Derek Jones, Derek Allard, Colly, Tom Myer, Leslie Camacho and many more - all huge names in the EECI communities.

Read more »

Project Management with ProjectBubble

reviews, tools

Project management is one of those things that you've either got a first-class Oxbridge degree in or you've got less clue about than a monkey's backside. Needless to say, it's pretty important, and especially for a freelancer. I always find that the management makes or breaks a project.

Read more »

Named Scopes with CodeIgniter

codeigniter, database, models, php

Named scopes are a really powerful feature of models - they allow you to define a clean, concise syntax when performing queries within your models - and best of all, are really easy to utilise in CodeIgniter.

Read more »

On Comments

blogging

One of the major decisions I made when making this website was not to have comments. I got a bit of grief on Twitter because of it too, but I feel like my reasons are justified. So I’m writing a blog post.

Read more »

Resolutions

life

I’ve never been a big one for resolutions, after all, I’ve always had trouble sticking with them. I’m sure in previous years it’s been because of my age. This year, I’m going to make resolutions and I am going to stick to them. I’ve grown up more than ever before this year - experienced some brand new things, spoken to loads of new people and sorted my life out a lot - now I’ve just got to carry on growing up and eventually become a half-decent person.

Read more »

The best CodeIgniter .htaccess

apache, codeigniter

There are still a lot of questions on the CodeIgniter forums by people wanting to remove the index.php from their URLs. The default .htaccess in the User Guide has never worked for me, but fortunately I’ve got a .htaccess that seems to work on most, if not all Apache servers. Originally by the great Elliot Haughin.

Read more »

It’s Christmas

music

I’ve written a Christmas song. For I.S.

Read more »

PHP5.3’s ?: expression

hints, php

I was digging through the PHP5.3 release info and came across a really neat little expression. It’s a simplified version of the “() ? : ;” expression, a handy little expression to use in variable assignment. The way this expression works is as follows:

Read more »

Introducing Jamie on Software

blogging

I’m happy to announce my new blog, Jamie on Software. I’ll be writing here about development, business, entrepreneurship, music, life, food, anything that takes my fancy. Hopefully what I write here will be of some use to you all.

Read more »

Better Controllers and Models in CodeIgniter

codeigniter, controllers, models

CodeIgniter is an expressive, flexible gorgeous web application framework, but it is often a little too simple for my personal convenience. In my recent talk at EECI I talked about my experiences with Ruby on Rails and how the PHP and CodeIgniter community could learn from it, and showed off my MY_Controller.php and MY_Model.php classes. I’ve had a few people ask me about them and so I thought I’d release them and write a tutorial here so that you guys can speed up your development and write better applications.

Read more »

Functional Programming with Clojure

clojure

I’ve been playing about with a nice little functional programming language based on the JVM called Clojure. It’s a dialect of Lisp, but sheds a lot of the older conventions that have been stuck with Lisp and other functional languages because of historical reasons. Because of this, it makes the syntax very pure, and it’s a great introductory language into the thread-safe, multi-process world of functional programming languages.

Read more »

Setting up the perfect CodeIgniter & TDD environment

codeigniter, php, testing

As CodeIgniter has little built-in test support, it’s often difficult setting up a good environment to allow Test-driven Development using SimpleTest and the CodeIgniter framework. I’ve been using Ruby on Rails a lot recently, and I was inspired by the fantastic built in integration with unit, functional and integration tests, so when I returned to CodeIgniter, I delved into the deep dark world of setting up the perfect CodeIgniter and TDD environmen

Read more »

API-Driven Development

apis, methadology

I’ve been experimenting with a new method of software development recently with Jitterbug. I’m refining it as I find loopholes in the process, but I think I’ve got a pretty steady basis to work on, and share. My next step is to talk to you guys - get feedback from the community and see if I can convince you to try out this methodology on any upcoming projects. I’m also planning on talking about this at Cambridge Geek Day - hopefully I’ll have more of a stable process by then. My new development process is called API-Driven Development - and it revolves around the idea that web applications should be built from the API u

Read more »

Searching CodeIgniter Apps with Sphinx

codeigniter, mysql, php

Due to popular demand, I’m writing this tutorial as a companion to my previous post, Searching SQL with Sphinx. In this tutorial I’m going to show you how to use the excellent Sphinx search engine to provide full-text search functionality to database-powered CodeIgniter ap

Read more »

On Pancakes

food

Well, Shrove Tuesday, or more commonly Pancake Day, is ending fast, and after another year of mixing and tossing, it seems that the favored dish is becoming more of a rarity. This saddens me, and I have come to the conclusion that this was due to a lack of passion, and love of our flat friend.

Read more »

Searching SQL with Sphinx

mysql, ruby, ruby on rails

SQL wasn’t built for fast text searching - and there is only so much you can do with a LIKE statement. But more and more we are being asked to develop search functionality, and more and more developers are having to build increasingly powerful search mechanisms to handle the high level of search sophistication we now see as the default.

Read more »

CodeIgniter Repo Naming Conventions

codeigniter

With the announcement that CodeIgniter 2 is now under public development over at BitBucket, lots of developers have been moving their open source projects over to Mercurial, and thus BitBucket. With such a big change that is starting to be reflected across the community, I propose we create a globally used convention for naming BitBucket Repositories (or GitHub, for that matter) that contain CodeIgniter-based libraries or projects.

Read more »

Testing RESTful response types

ruby, ruby on rails, testing

I’ve been doing a lot of Rails development recently as part of my new job (our whole infrastructure is built on Rails, you see), and have been practicing Test-driven Development religiously. As part of this, I’ve been developing an API that returns more than one response format, and I was looking to find out how to test if the correct response type is being returned.

Read more »

Wrap me up and put me in a box

codeigniter, edge ci, packages

One of the additions that I’m most excited about to the in-development CodeIgniter 2.0 codebase is the addition of code packages, and the power to then load those packages inside your application. This opens so many doors to developers, because, finally, we can bundle repeated functionality inside a package and distribute it as open-source or free code. Even if you don’t want to expose your own packages, you can re-use them internally, which makes for a veritable mix of both writing application specific code, and abstracting elements of those applications out (such as an authentication engine, for instance) to become re-usable and unspecific. With documentation for 2.0 still patchy, I thought I’d go through exactly how to use packages and what benefits they provide.

Read more »

The Playa Effect

add-ons, expressionengine, playa, reviews

There are very few times when you get to test out a genuinely exciting product - something that is revered and well known across a community and is hugely anticipated. I’m lucky enough to be able to test out the latest version of Brandon Kelly’s infamous Playa, which yesterday hit version 3. This update, among other things, introduces ExpressionEngine 2 support, a snazzy new interface and loads of bug fixes. I’ve been testing it out for a few days, and here’s my review.

Read more »

Screen Scraping with PHP

hints, php

There are quite a few good screen scraping libraries available for PHP apps so that you can pull and parse a page, search for specific elements, enter data into and post forms et cetera, but if you just need to do a bit of screen-scraping work and you don’t need an entire library (or don’t want the additional overhead of another file to load), PHP has a few handy tricks up its sleeve to make this really easy.

Read more »

Rumbel-oh! the Joker

expressionengine, idiot

I’m extremely annoyed with myself. Let this be a lesson to everyone who is working on a project and has put anything more than 2 hours work into it: Back up and use some form of version control. If you don’t, you’ll seriously regret it. Anyway, let me tell you a story…

Read more »

Forking CodeIgniter on BitBucket

codeigniter, edge ci, hints

CodeIgniter 2 is available (in development) on BitBucket, and because of that, it’s ready for you to fork and work on. The EllisLab people are usually pretty good with answering pull requests and feature additions, and the most likely way of them accepting any proposals is for you to dive in and get coding. I thought I’d put together a quick guide on forking CodeIgniter.

Read more »

Terrible wording on an advert

advertising, methadology

Here’s some extremely bad wording on an advert I saw in Tweetie:

Bad wording on Tweetie advert

This is essentially saying ‘Our product is really complex and hard to use, why don’t you give it a go!’ Clearly the copy writer didn’t read it when they saw it, because this jumps out as an overwhelmingly bad mistake in copy writing. Alternative methods of phrasing might be ‘[Brand Name] is the most powerful, feature rich system utility available. Give it a try now!’, or ‘[Brand Name] solves some of your most complex system utility problems for you.’ Make your product work for your users, not against. Additionally, make this apparent to potential customers in your advertising. First impressions count.

Read more »

Coming up at EECI 2010

codeigniter, conferences, eeci, expressionengine, speaking

There are going to be loads of people at EECI2010 SF, but the majority of them are going to be ExpressionEngine folk. We need to get the CodeIgniter numbers up, people, so I thought I’d post a sneak preview of my talk and my masterclass. If you want to get tickets already, head straight over to the EECI website and get them ASAP!

Read more »

EECI Wrap-up

codeigniter, conferences, eeci, expressionengine

I’ve been collecting all the photos, videos, slides and more from my recent trip to San Francisco and the ExpressionEngine CodeIgniter Conference. There’s still plenty more reports, photos, videos et cetera appearing all over the internet, so if you’re interested keep checking back and I’ll update this post with other’s wrap-ups, as I’m sure there’ll be many.

If you missed it, the second ExpressionEngine CodeIgniter conference was held from May 31st - June 2nd in the Fort Mason Centre in San Francisco, California, United States of America. Robert, Janneke, Chris and the rest of the Whoooz! team really pulled out the stops, and ran a fantastic conference.

Read more »