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.
Think $ in regex means end of string? Wrong – it also matches a
trailing newline, and this misunderstanding can easily create a security hole.
Use \z or the D modifier to save yourself.
Loading a megabyte-sized framework for a two-page website is madness. But I'm a
lazy programmer who wants Tracy, Latte, and routing even on a tiny site with a
single index.php. Nette as a micro framework solves that – and then
I realize I'm actually using 90% of the framework anyway.
Swapping “gifts” and “sifts” sounds trivial — until str_replace shows
you exactly why it doesn't work. A guide to the treacherous pitfalls of string
replacement in PHP: collisions during multiple replacements, the savior called
strtr, and the escaping trap in preg_replace that every decent programmer falls
into at least once.
DI solves problems and introduces new ones. If the original ones don't bother
you, you have a problem you don't know about yet. A little zen koan about
object-oriented design – enlightenment will come when it comes.
Developers whining about changing requirements are crying over their own
incompetence. A client who changes requirements is a client who thinks — and
most importantly, one who'll come back with more work. The problem isn't on
their side, it's on yours.
Six rules for designing namespaces so you don't end up with a 97-character class
name like Zend. Because renaming sfForm to
Symfony\Component\Form\Form isn't automatically progress –
sometimes it's just a longer path to the same destination.
Trailing slash, capital letters, www, or query parameter order – small
details that users overlook, but search engines can go crazy over. Bing can't
tell an acid from a database transaction, and most search engines can't index
similar URLs as different pages. A practical breakdown of where SEO traps lurk
and how to avoid them.