Slide Markup with LaTeX: First Steps

Since starting to create (a large number of) presentations using LaTeX, I’ve been impressed at how easy this is to pick up and also how quick it is to work with marked up content rather than dragging objects around in Impress or equivalent. With that in mind, I thought I’d outline the very basics of the markup (with probably more snippets to follow as I discover them).

Start at the very beginning

First of all, LaTeX templates are fussy things, start with someone else’s outline (for example the one Dave posted, which I use), or one you made earlier. There is some preamble and then the main contents of the presentation go between the \begin{document} and \end{document} bits.

Continue reading

Summer PHP Conferences

Conference season approaches and in May I’m on a trip to take in two of the most high-profile events in the PHP conference calendar: DPC in Amsterdam (19-21 May) and php|tek in Chicago (24-27 May). The two events have historically been a few weeks apart and I’ve always complained at having all the fun for the year in such a short space of time – but this year the events are literally back-to-back, there are a small number of speakers attending both and we’re pretty much all on the same flight from Amsterdam to Chicago!

Continue reading

Creating Presentations with LaTeX

This spring/summer, I’m giving quite a few talks at conferences, and I have a number of my own clients that I’m writing new training materials for. That’s a lot of content in total and so, inspired by Dave’s article about LaTeX and powerdot (and with some help from Dave himself!), I’ve started to write my own presentations this way too.

Getting started was a struggle, I’ve never really used anything like it before and if there’s one thing LaTeX doesn’t do well, it’s error messages! The blog post I linked above has a sample presentation in it and I used that as my starting point. The source code goes in a file with a “.tex” suffix, e.g. presentation.tex. I then installed the texlive-latex-extra, latexmk, vim-latexsuite, latex-fonts-recommended and texlive-fonts-extra packages from aptitude, and generated a PDF by running:

latexmk -f -pdfps presentation.tex

Continue reading

Basement Tanking Project

At one time I wrote a lot on this blog about houses, and this house in particular once we bought it 4 years ago. One major feature is that the basement kitchen floods fairly regularly, maybe 4 times a year? This is obviously not ideal however the structural work required to put it right was around 20% of the value of the house, and shortly after we bought the house the bottom dropped out of the UK property market so we couldn’t borrow against the house.

Fast forward 4 years of cooking in wellies once in a while, and running down the stairs to check the basement every time it rains a lot (in Northern England, you can imagine this gets really old really fast). Actually even when it wasn’t underwater, it was a pretty nasty kitchen, always damp and it had no heating so in winter it was whatever temperature it was outdoors. This sums it up: my mother’s old dresser, standing on bricks to keep it out of the water
Kitchen Dresser on Four Bricks

Continue reading

Getting Dates From Week Numbers in PHP

Recently I’ve been building a little project that pulls data from Google Analytics and shows your web statistics in a simple form. One thing I wanted to do was show the data for a quarter, but graphing by day is too chaotic and graphing by month only gives three points, so I wanted to graph by week. This was fine but the data returned by Analytics only gives me the week numbers, and since this project is aimed at demystifying web stats for normal people, it really needs normal dates on it!

Using DateTime::setISODate

I found that the DateTime extension has a method setISODate() which accepts the year and week number, and makes a date you can then use as normal.

$week_start = new DateTime();
$week_start->setISODate($year,$week_no);
echo $week_start->format('d-M-Y');

You can also do this the other way around; if you have a date in PHP, there’s the ‘W’ flag for date() which will return you the week number – very handy!

Using Persistent Storage with Gearman

I’m using gearman for the first time in a new project, and two things in particular were bothering me. Firstly, there doesn’t seem to be a built-in way to see what’s in the queue. Secondly, if the gearman server dies (which seemed quite likely when I was first getting to grips with this stuff and writing really buggy code!) you lose your queue. Therefore I decided that I would switch gearman over to running with persistent storage. Continue reading

Ideas of March

You may find that you read a few of these posts today – the title is a play on the fact that today is the Ides of March, and the story goes like this:

I’m seeing increasing numbers of my friends and peers announcing that blogging is coming back into fashion, which came as a surprise to me since I didn’t realise it had gone out of fashion and I’ve been blogging regularly without realising how uncool that was! With twitter managing to annoy everyone in the last week or so either with a new client, bad behaviour towards existing 3rd party clients, or reassigning twitter names, change is in the air.

Personally I like to blog, it’s a platform that I control, and I’m always too verbose for 140 character limits (which is a nice way of saying that I talk too much – if you’ve met me in person then you knew that already!). The blogs, and perhaps more importantly their comments, are the best way I know of sharing ideas and having those accessible and grouped together if you want to refer back to them at any point in the future. They are also wonderfully asynchronous; I see some great posts coming past about technologies that I don’t use, then find myself reading those articles a few months later when I’m onto the next project. Having the various blog posts, even those short ones that people think “don’t qualify” or “aren’t good enough”, really help me get started with something new – and I try to leave the same trail on my own blog and in the comments of others’ when I’m figuring things out that I think others might come up against later (where “others” includes me, if I have slept since writing the blog post!).

So – will you join us? Will pledge to blog, or to comment on blogs, in March? Here’s to a revival of blogging (and some continuation from those of us who fail at being with the cool crowd!)

Github To Jira Bug Migration Script

Recently I mentioned the github API and retrieving issues from it. This is because the joind.in project agreed to move its issue tracking from github to JIRA, since the issue tracker on github is far from feature complete. I migrated only our open issues, and comments (and the comments ended up a bit weirdly formatted on the other end but this was the best they could do). It was nothing pretty or clever but in case it’s useful to someone else, here’s the script:

Continue reading

The PHP Community Conference

Next month, I’ll be heading out to Nashville for the PHP Community Conference. This is wildly exciting for a few reasons; this is the first in what I hope will be many episodes of this event, and I’m speaking in a lineup that blows every other conference schedule I’ve seen out of the water. I have met and hung out with enough of these people to know that I’m going to get smarter just by being there! I love watching the industry leaders discuss technology, I learn so much, and I know that this event will be a fabulous opportunity for that.

The event is entirely community organised and run, rather than being backed by an organisation. I am a great believer in having events come from the community that wants to attend them, and as an organiser (both for community and organisation-backed events) myself, the freedom to do things that will really work, rather than things that can be agreed by a management committee, makes the difference between a good event and a great one. What’s different about this PHP Community Conference is that most of the organisers are speakers and attendees of some of the biggest conferences in the PHP world … and they’ve built the international-level conference *they* want to attend!

The lineup is nothing short of stellar, these guys and gals would be the main feature at most of the other PHP-specific events I’ve been to, in fact three or four of them have been keynotes at other events I’ve attended. I’m speaking myself, which was wildly exciting from the moment I got the acceptance email right up until the rest of the schedule was published … and is now slightly daunting, in the best possible way! I’m giving a half-day tutorial on Web Services, covering all the theory points and showing you how to not only consume but also publish your own services. I work so much with APIs and being able to take the time to properly share my experiences so others can go on to build their own kick-ass services is something really special.

I can’t wait to get out to Nashville on April 21/22 and meet the speakers and the fantastic crowd of attendees that I know an event like this will draw. Which is not to say that there are not other great conferences, but I’m really looking forward to seeing something special in Nashville … I sincerely hope to see you there!