- Think about what’s interesting that you could share with other developers. The key here is that the people listening should go away with something useful, rather than just the impression that you’re awesome
- Write it down. You don’t need to write the talk before you submit – just a title and an abstract will do. The abstract should be one paragraph, maximum 200-250 words
- A great abstract says why this topic is vital, what cool things will be covered, who should come and what they will learn. I’m paraphrasing but those are the basics!
- Submit your abstract to http://helpmeabstract.com/ to get feedback from some lovely volunteers who will help you (bookmark the gist and keep revisiting it, the system doesn’t notify you or anything … yet. Pretty sure you can submit patches while procrastinating on a slide deck though)
- Did you get this far without submitting? That’s normal :) Remember that your community needs new voices. Each of us is ahead of *someone* on the path, you absolutely don’t need to be the expert to have something to offer to the rest of us. So please, submit :)
PHP 7 Benchmarks
This graph shows the time it takes for each version of PHP to perform the same task, on average, with oldest PHP on the left and moving forward in time.
PHP 5.4 and Short Tags
One thing in particular is tripping people up: the short open tag. I’ve had a few questions on this so here’s the advice I am giving to clients and friends.
What Actually Changed
The short_open_tag
configuration directive was removed, but the short echo syntax <?=
is always available.
How To Upgrade Your Codebase
- If you have
<?=
in your templates, leave it alone, those will still work - If you have short tags
<?
in your code, including in any of your libraries, then you need to do a global find-and-replace and turn them all into<?php
If you have short tags somewhere in your codebase, you probably won’t get errors, you’ll just suddenly start seeing PHP code in your output as PHP doesn’t recognise the tag and therefore doesn’t evaluate the code! To find them, try searching for <?
followed by a whitespace character.
Hopefully that helps; there are a few gotchas to getting upgraded from older versions (especially from PHP 5.2) but this particular gotcha really isn’t a problem and the instructions here should see you through.
Notify New Relic of Jenkins Deploys
Code Reviews: Before You Even Run The Code
Over time I’ve developed some particular processes that I find helpful when reviewing code. In particular, I often surprise people at how much review I do before I run the code. Sometimes I grab the branch so that I can use my local diff tools, but I don’t actually execute code until I’ve established some basic facts. This post is a little insight into what’s happening in this not-running-the-code-yet zone. Continue reading
Recover Bitly Bundle Data
It turns out, it’s an undocumented feature on their API, so here is everything I know about recovering your bundle data, including the script I used to rescue my own data. Continue reading
PHP7: Easiest Upgrade Yet
Total lines of code change needed to make the @joindin API work on PHP7: zero
— Lorna Mitchell (@lornajane) May 14, 2015
Count Changed Lines in Git
git log --numstat
will show you how many lines were added (first column) and removed (next column) per file, kind of a more scientific version of the --stat
switch. And if you’re thinking of scripting this to gather stats, try it with --oneline
as well, it’s easier to parse.
Scaling and Sizing with PDFJam
pdfjam --suffix converted --papersize '{1920px,1080px}' --scale 0.4 --trim "-6cm -1cm 13cm 8cm" slides.pdf
The --suffix
is instead of giving an output filename, whatever you feed in ends up with the suffix in its filename. This is very handy because I use this command in a script and only need to pass in one variable. The --papersize
isn’t a switch I have used before either but you can set exact sizes for the final output which is nice. The --trim
switch can also be used to set --clip=true
to remove the trimmed space from the document if desired.
I find PDFJam a very handy tool but with not nearly enough blog posts and code snippets around, so I’m dropping my command for future reference (yours as well as mine!).