-
Simple Regular Expressions by Example
08 December 2011
Read moreWhenever 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"
-
Importing and Exporting MongoDB Databases
05 December 2011
Read moreI'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!
-
Explaining MySQL's EXPLAIN
24 November 2011
Read moreThe 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.
-
Simple CRUD with MongoDB
10 November 2011
Read moreWhen I meet a new technology, I like to experience it "just as it comes". I'm happy at the command line and I like to type actual commands and see man pages before I use any wrappers or helper tools. So when I met MongoDB for the first time, I did exactly that. This post shows those first steps of creating a database, and inserting, reading, deleting and updating data.
-
Missing Kernel Source when Installing VirtualBox
09 November 2011
Read moreI'm creating a virtual machine to use for my upcoming training courses to get around issues trying to get machines set up in a hurry on the day. I haven't used VirtualBox before but since it has free clients for Windows/Mac/Linux I thought I'd give it a go.
-
API Serving JSONP
03 November 2011
Read moredisclaimer: I am not a client-side developer, and I don't write javascript. However I am committed to supplying useful APIs of all kinds, and JSONP falls into this category
Early in the development of the new Joind.In API, someone else started consuming the service to populate the javascript widgets they were making*. Since these scripts are intended to be used on many external pages, and they retrieve data from the joind.in API, cross-domain issues were a problem.
-
UML Diagrams with Graphviz
18 October 2011
Read moreI worked on creating some plausible-looking diagrams for representing object inheritance (this is for my forthcoming book). Since I know I'll forget how I did it, I wanted to share while I can remember!
-
Ada Lovlace Day: Laura Thomson
07 October 2011
Read moreHappy Ada Lovelace Day! Today we celebrate geeky female role models, and I'm going to write about someone I consider a friend. It feels a bit strange to do so (and I didn't actually tell her beforehand), however having been written about before on this special day, I know I've never been offended by such flattery and so I hope she won't be either :)
-
PHP Developer at a Python Conference
27 September 2011
Read moreA few weeks ago, while attending the delightful OggCamp, I was approached by someone asking me to speak at PyConUK. Well ...
-
QR Codes with Google Charts API
22 September 2011
Read moreI'm a big fan of the google charts API - it draws much better-looking graphs than I would ever manage and all I have to do is assemble the right URL to make it work. I recently got a feature request to add QR codes to joind.in, so that speakers and event admins could easily allow people to link in to a particular talk page.
-
Eleven Wordpress Plugins
21 September 2011
Read moreWhen I moved this blog to wordpress a few weeks ago, I got a lot of questions about its implementation and setup. Today I'm sharing a list of all the plugins I have enabled, with a little description of what they are and what they do.
-
Movable Type Fonts and Ubuntu
12 September 2011
Read moreSince relaunching this site, with actual design rather than several shades of pink thrown together, I've become more aware of being consistent in presentation. With this in mind, I wanted add the same fonts to Ubuntu that are used here.