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.

You suck at technical interviews →

Elsewhere , Leave a comment

PerfMap: front-end performance heatmap

perfmap

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 →

Elsewhere , , , , Leave a comment

PHP Null Coalesce Operator

The coalesce operator – ?? – returns the result of its first operand if it exists and is not NULL, or else its second operand. That indeed means that it won’t raise an E_NOTICE, and affords you to write shorter code:

// Fetches the request parameter user and results in 'nobody' if it doesn't exist
$username = $_GET['user'] ?? 'nobody';
// equivalent to: $username = isset($_GET['user']) ? $_GET['user'] : 'nobody';
 
// Calls a hypothetical model-getting function, and uses the provided default if it fails
$model = Model::get($id) ?? $default_model;
// equivalent to: if (($model = Model::get($id)) === NULL) { $model = $default_model; }
 
// Parse JSON image metadata, and if the width is missing, assume 100
$imageData = json_decode(file_get_contents('php://input'));
$width = $imageData['width'] ?? 100;
// equivalent to: $width = isset($imageData['width']) ? $imageData['width'] : 100;

Looking forward to this one :)

PHP RFC: Null Coalesce Operator →

Did you know you can also omit the 2nd parameter from the ternary operator in PHP, since version 5.3? The expression expr1 ?: expr3 returns expr1 if expr1 evaluates to TRUE, and expr3 otherwise.

Elsewhere , 2 Comments

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

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? →

Elsewhere , , , Leave a comment

Paper Airplane Machine Gun

3D-printed gun which folds papers into a paper airplane and then launches them.

Elsewhere , Leave a comment

Ionic Box

ionicbox-header

Ionic Box: The easiest way to get your hybrid development environment up and running. A Vagrant install for Android, Cordova, and Ionic.

OS X users needn’t install this, as the installation of the Android SDK usually goes smooth.

Ionic Box →

Elsewhere , , , , Leave a comment

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) throughout, enabling more detailed design outside of solid color fills and strokes.

The code above yields the following result:

basicpattern

How to Use SVG Patterns →

Elsewhere , , Leave a comment

Freelancer Productivity Quest: The Ultra-Schedule

ultraschedule

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 into the same problems I had the last time I kept a 9-6 workday (i.e. giant unproductive blocks of time before and after lunch), but compounded by all the additional running-your-own-business daily bullshit.

She reorganised her day schedule using a few basic rules (such as: “No deadlines on Mondays”), resulting in a tight – but more importantly workable and productive – schedule, packed with for fun and for work moments.

Productivity Quest: Ultra-Schedule →

Elsewhere , , 1 Comment

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()); // 40°26′46″N, 79°56′56″W

// convert in the UTM projection (standard format)
printf("%s\n", $converted->toUniversalTransverseMercator()); // 17T 589138 4477813
printf("%s\n", $converted->toUTM()); // 17T 589138 4477813 (alias)

Geo-related tools PHP 5.3+ library built atop Geocoder and React libraries

Batch geocode/reverse geocode, convert datums, distance calculations, etc.

PHP Geotools →

Elsewhere , , , Leave a comment

How quitting my corporate job for my startup dream f*cked my life up

Doing a startup was a long journey and I was putting myself under so much pressure by giving such a f*ck about what other people think.

Day by day, I was getting lonelier and more depressive as I avoided social occasions. My startup progress was not as fast as my social circle imagined it to be and I was fed up with telling people it took years for startups like Facebook and Twitter to arrive at where they are now.

There are five things I wish I had asked myself before starting this painful journey. Five questions I believe every future entrepreneur should ask himself before taking the first step to entrepreneurship

It’s not all candy an puppies in startup-land.

How quitting my corporate job for my startup dream f*cked my life up →

Elsewhere , , Leave a comment