This website recently got a major rebuild; if you're missing something, let Lorna know.

    Blog


  1. SQL Joins with On or Using


    I recently wrote a post about inner and outer joins, and a couple of people asked what the difference is between USING and ON.

    Read more

  2. Which Basket Should A Developer Put Their Eggs In?


    The situation goes like this. Lots of excellent, capable people have great ideas for new software products. They are bootstrapping their venture, so they look for a developer who wants to give some time up front and receive a fair (let's assume fair) share of the rewards once the product …

    Read more

  3. Using lrnja.net Custom URL Shortener with Bit.ly


    I'm a big bit.ly fan and recently I registered a shorter URL to use for short links - and I went for lrnja.net. I sat down to configure my new domain with bit.ly, and it was very straightforward (I'd almost say "designer-proof"! /me ducks).

    • First: register your domain …
    Read more

  4. The Tree Command


    Today I'm working on a little tutorial (about writing RESTful services, for this site) and I used the tree command to illustrate the file and directory layout of the project. I love this little command and use it frequently, but it isn't very well known so here's a quick example.

    Read more

  5. Tracking Your Domain with Bit.ly


    As a blogger and lover of graphs, I am not sure how I hadn't already seen bit.ly's tracking domain feature. With this, you can register a domain and see reports on all of the URLs that are shortened with bit.ly which point through to that domain.

    Read more

  6. Inner vs Outer Joins on a Many-To-Many Relationship


    Someone will probably tell me that this is an elementary-level topic, but I got some good questions regarding joins from my most recent ZCE class students, so I thought I'd put down the examples that I used to explain this to them. Being able to join with confidence is a key skill, because it means that you can refactor and normalise your data, without worrying about how hard something will be to retrieve.

    Read more

  7. Simple Regular Expressions by Example


    Whenever I ask a group of developers if they are familiar with regular expressions, I seem to get at least half the responses along the lines of "I've used them, but I don't like them". Call me a geek if you like, but I quite like regex; I think often it seems unfriendly because it's used inappropriately or just thrown into code with "here be dragons" type comments rather than documentation about what should match, and what shouldn't!

    As with most things, it's pretty easy when you know how, so here's my one-step-at-a-time approach to regex (stolen from my ZCE preparation tutorial slides). Let's begin at the very beginning: regular expressions have delimiters, usually a slash character, and these contain a pattern that describes a string.

    pattern

    notes

    /b[aeiou]t/

    Matches "bat", "bet", "bit", "bot" and "but" Also matches "cricket bat", "bitter lemon"

    Read more

  8. Is This Marketing?


    Last year, someone asked me what I'd chosen for the company Christmas cards (I was relatively newly self-employed at the time). The idea of company Christmas cards had not even crossed my mind, but that conversation stayed with me and this winter, I picked a photo I took last winter, and uploaded it to moo.com, producing this:

    DSCF5647.JPG

    Read more

  9. Importing and Exporting MongoDB Databases


    I'm enjoying working with MongoDB but as with any new technology, it can take a little while to find your way around all the tools related to that stack. In particular, I found myself wondering how do I mysqldump for mongodb?

    It should have come as no surprise that the command I wanted was called mongodump, really!

    Read more

  10. Explaining MySQL's EXPLAIN


    The MySQL explain plan is a great tool to help developers and database administrators to improve the performance of specific queries happening against a database. It is very easy to use, but its output can be confusing, so I thought I'd show a very simple example.

    Read more

  11. POSTing JSON Data With PHP cURL


    I got this question the other day: how to send a POST request from PHP with correctly-formatted JSON data? I referred to the slides from my web services tutorial for the answer, and I thought I'd also put it here, with a bit of explanation. After all, publishing your slides is all very well, but if you didn't see the actual tutorial, I often think they aren't too useful.

    Read more

  12. Handling SQL Errors in PDO


    I love PHP's PDO (PHP Data Objects) extension; it gives a consistent, object-oriented interface to handling all kinds of relational database backends. One thing that annoys me is that the MySQL driver for PDO defaults to a silent error mode which can make SQL errors tricky to spot!

    Read more

32 of 89