I've been hunt-and-peck typing with two fingers my whole life, and it doesn't
bother me one bit. Because productivity isn't killed by poor finger placement,
but by a lousy keyboard layout. I created my own layout with typographic
characters within reach via AltGr – and I'll show you how to make one
yourself.
You call a native function and have no idea if it failed. Return values lie,
json_last_error remembers whatever it feels like, and
error_get_last() is a bear trap. The only reliable way? A custom
error handler with magic constants. Welcome to the top 5 abominations of PHP.
A pull request without tests is a contract written on water. I'll merge your
code, immediately forget about it, and a year from now something will silently
break it. Nobody remembers what they had for a snack three years ago, let alone
your genius fix.
All programmers test, they just delete those tests afterwards – and
that's the problem. PHPUnit killed my desire to test, so I wrote my own tool.
I'm not trying to convince you to use it, but stop deleting the tests you're
already writing anyway.
A few merge commits, file renames, and typo fixes are all it takes — and the
statistics crown you as the author of half the codebase without you having
programmed a single line. I show why comparing developer activity based on
commits is more alchemy than science.
Six lines of comments, zero information. Novels in phpDoc that nobody reads.
File headers stretched out so far you can't even see the code. Every line of
documentation the author didn't think about is garbage – and garbage has no
place in code.
PHP's JSON functions look deceptively simple — until you discover that error
detection depends on display_errors, null means both success and
failure, and json_last_error() sometimes lies. Here's the
battle-hardened OOP wrapper born from navigating this minefield of PHP bugs.
I wanted to deploy a preprocessor in a real project and all three of them broke
image paths, couldn't handle media queries with @import, and required fucking up
a clean directory structure. After a year and a quarter of waiting for bug
fixes, LESS won – the only one that grew up.
Manually uploading files via FTP belongs in the same category as editing
directly on the server – masochism. FTP Deployment is my PHP script that
turns deployment into a one-click affair: it compares fingerprints, uploads only
changed files, and does the whole thing transactionally.
The Rails community has been telling itself for years that Ruby doesn't need
Dependency Injection because it's just such an awesome language. All it took
was one misinterpreted article and a healthy dose of ego. Static hell keeps
flourishing in the meantime, and the myth persists like that old spinach and
iron thing.