Study Days: Keeping on Top of the New Shiny

One of the biggest dangers in this industry is getting left behind as the tools evolve very quickly. For me, working alone or as the most senior person on a project in most cases, this becomes doubly hard as there’s nobody in my office to show me a new trick or share an idea that he or she learned in a previous job. So how do I deal with this?

I take “study days”.
Continue reading

Learning to Speak

I don’t mean learning to talk, I mean learning to address an audience, coherently and without dying of fright (actually I think I have clinically proven that it isn’t possible to actually stop living as a result of fright). There are a couple of things that I’m involved with that may help you, if you’re looking to improve your successes in this area.

DayCamp4Developers

This is a virtual conference, held a few times each year. I’ve spoken at some of the previous events and been really impressed by how smoothly something quite intangible can run! The next event is on Friday 22nd March and is about public speaking – but aimed specifically at developers. If you want to speak at a user group or conference, or be able to get through presentations at work without stress, then this session will give you some good pointers. The speakers are three excellent conference presenters – and me :) I love this format, what else are you doing on a Friday (especially for Europe, where this doesn’t start until our afternoon)? You can register and find out more about the event here http://daycamp4developers.com/. Did I mention that tickets are $40? You can also sign up to get the recordings if the date/time doesn’t work out for you.

WeAreAllAweso.me

There’s been lots of fuss lately about women speakers at conferences, or the lack of them. The low percentage of women in technology and a missing tendency to put ourselves forward for things means that this isn’t going to change any time soon. However if you’ve been thinking about speaking, then you should know about an online group WeAreAllAwesome which is a meeting point for women speakers to brainstorm ideas for topics, put abstracts together, and share experiences on how to give a good talk. Our office hours are 6-7pm UK time on Tuesdays, and I’m one of the mentors in that project, so if you might speak or just want to join in chatter with women who do, then you know where to find us :) Continue reading

Endpoints for HTTP Testing

While working on a book (“PHP Web Services” from O’Reilly, not out yet but soon!) recently, I was looking for some place I could make HTTP requests to, to show off how to make different kinds of requests with different tools. On my own machine, I have a couple of scripts that chatter back giving debug information about the requests that were made, but I wanted to get the tools examples going without any additional dependencies at all. I hadn’t used anything like these tools before, but I found quite a few alternatives, so I thought I’d share what I came up with. Continue reading

Printing PDF Bookmarks List

I work with PDF a lot, and it bothers me that I can see an outline view when I open the document, but I don’t seem to be able to grab just that view. My presentations are mostly PDF and the titles and section headings show up nicely. Today I figured out how to get an outline view, so I’m putting that information here while I remember how to do it!

I used a tool called pdftk which is excellent, I’ve used it before for doing various other PDF-related things. To grab metadata such as bookmarks, use the dump-data command, like this:

pdftk myfile.pdf dump_data | grep BookmarkTitle > outline.txt

The above line takes all the bookmarks from the PDF (this was a slide deck created using powerdot and LaTeX, the section and slide titles nest appropriately), and outputs a bunch of information about the document and the various PDFs. The grep command just gets the lines containing “BookmarkTitle”, then the whole thing gets written to a file. I cleaned that up and now I have the outline of my course, so I can add timings, notes for the exercises and so on.

Fabric Bags

This weekend I decided it would be good to spend some time away from the computer, but the weather wasn’t really good enough to get out and do much, so I needed a “rainy day” project. I remembered that I’d signed up for a free introductory Craftsy class a few weeks ago, so I logged in to take a look at what was involved. Continue reading

Zend Webinar on PHP 5.4: 19th February

I am pleased to announce that I’ll be presenting one of Zend’s webinars in February, on Tuesday 19th. The topic is “The PHP 5.4 Features You’ll Actually Use”, and the session is my opportunity to round up the best of the new features that came in with PHP 5.4 and illustrate the ones you’ll want in your codebase with some examples. You can find out more about the session and register for the webinar on Zend’s site: http://www.zend.com/en/company/news/event/1188_webinar-the-php-5-4-features-you-will-actually-use.

See you there!

Five Clues That Your API isn’t RESTful

I get a lot of emails asking me to get involved with API projects, and that means I see a lot of both implemented and planned “RESTful” APIs. Now, I absolutely love REST and for a data-driven application, it would be my first choice. A service of some other description may work better for other scenarios or skill sets, and non-RESTful services can be very, very useful. If you tell me that your service is RESTful, then I expect it to be. If you’re not sure, look out for these clues:

It has a single endpoint

I don’t really care what else is going on in your API, any “RESTful” API which has a statement such as “all requests are made to http://example.com/rest” is … not RESTful. REST is all about handling representations of resources, each is represented by its own URI and we operate directly on that. If it looks like “pretty URLs”, then it’s probably along the right lines. Continue reading

PHP 5.4 Timezone Error Message on Ubuntu

Quick post because this tripped me up the other day: When you use a vanilla ubuntu 12.10 “Quantal Quetzal” installation, it will come with PHP 5.4, which is excellent news. However the default php.ini doesn’t set the timezone, so you will see an error like:

It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier.

These have been warnings in earlier versions of PHP, but as of PHP 5.4, the date.timezone ini setting must be set correctly, using the continent and place – for me that’s “Europe/London”, like this:

date.timezone = "Europe/London"

If you see these errors, don’t panic, just add the line above to your php.ini.

PHP at FOSDEM 2013

In case you haven’t been following, FOSDEM is a Free Software/Open Source weekend event held every year in Brussels – it’s free to attend and it’s huge! It’s actually a network of smaller events, and this year that includes a whole day of PHP on the Saturday (2nd February 2013). Our schedule is excellent, taking in frameworks, extensions (tutorial from Sara Golemon!), nginx, APIs and a few other goodies. Also, this lovely one-day PHP conference is in the wider context of an event that is packed full of otehr excellent open source technology sessions – see the full schedule for what else is on offer. I love these open source events for the opportunity to dip into not-PHP topics, and I hope to see you in Brussels! Come along, be geeky, and bring your friends :)

How NOT to Design Your API

Recently I tweeted as a #linktuesday link the 10 Worst API Practices post from ProgrammableWeb. Today, in search of some concrete examples of APIs implementing unhelpful antipatterns, I sent out a tweet for help:

[blackbirdpie id=”289014953954930688″]

In the raft of responses (and thankyou all, this was fabulous, helpful and entertaining in equal parts!), there were some definite patterns that I’d like to share with you, in no particular order. Continue reading