PHP 5.6: “Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version.”

Since PHP 5.6, the use of $HTTP_RAW_POST_DATA is deprecated. Now, I’m not using this so I’m in the clear, or at least I thought I was … The default value for always_populate_raw_post_data in PHP 5.6 is doing more harm than good. Perfectly good code will spit out that error whenever it receives a request that …

You suck at technical interviews

You are bad at giving technical interviews. Yes, you. You’re looking for the wrong skills, hiring the wrong people, and actively screwing yourself and your company. Without changing anything about your applicant pool, you can hire different people and your company will do better and you will enjoy your job more. A must read for …

PerfMap: front-end performance heatmap

A bookmarklet to create a front-end performance heatmap of resources loaded in the browser using the Resource Timing API. Wait for a page to fully load and then click the bookmarklet to overlay a performance heatmap. A browser with support for the Resource Timing API is required. PerfMap: front-end performance heatmap →

PHP Null Coalesce Operator

In PHP7 the coalesce operator – ?? – will be introduced. It acts as a bit of syntactic sugar for the common case of needing to use a ternary in conjunction with isset(). The null coalesce operator returns its first operand if it exists and is not NULL; otherwise it returns its second operand. That …

What Will It Take to Run a 2-hour Marathon?

The current world record of 2:02:57, set by Kenyan Dennis Kimetto this year in Berlin, works out to 4:41.5 per mile; a sub-two would require less than 4:35 per mile. Will a human ever run that fast? Some fascinating number-crunching, and some great conclusions/predictions too. What Will It Take to Run a 2-hour Marathon? →

How to Use SVG Patterns

<svg> <defs> <pattern id="basicPattern" x="10" y="10" width="40" height="40" patternUnits="userSpaceOnUse"> <circle cx="20" cy="20" r="20” fill= "#64bee3" /> </pattern> </defs> <rect x="10" y="10" width="200" height="200" stroke= "#333333" stroke-width="2" fill="url(#basicPattern)" /> </svg> SVG patterns provide for very unique design opportunities. We are essentially defining a canvas within a target shape or text, which is then repeated (or tiled) …

Freelancer Productivity Quest: The Ultra-Schedule

Jessica Hische, freelancer, in search of the ultimate day-schedule: When I moved to San Francisco I was suddenly surrounded by people with “real jobs”, who didn’t have the flexibility I had (and who loved filling their weekends with fun non-work-related activities). I found myself, more and more, conforming to a normal office work schedule, running …

PHP Geotools

<?php $geotools = new \League\Geotools\Geotools(); $coordinate = new \League\Geotools\Coordinate\Coordinate(‘40.446195, -79.948862’); $converted = $geotools->convert($coordinate); // convert to decimal degrees without and with format string printf(“%s\n”, $converted->toDecimalMinutes()); // 40 26.7717N, -79 56.93172W printf(“%s\n”, $converted->toDM(‘%P%D°%N %p%d°%n’)); // 40°26.7717 -79°56.93172 // convert to degrees minutes seconds without and with format string printf(“%s\n”, $converted->toDegreesMinutesSeconds(‘%P%D:%M:%S, %p%d:%m:%s’)); // 40:26:46, -79:56:56 printf(“%s\n”, $converted->toDMS()); …