Almost a year after the last post, the time feels right to revisit the topic of array flattening in PHP, and the lessons learned in the last year. People are always asking when I'll be revisiting the subject of array flattening, unsatisfied that it's been fully explored. Well I say to them, wait no longer! This is largely thanks to the work of a friend and mentor, who when faced with the same dilemna, was able to craft such an elegant solution to the problem that I found it truly inspirational.
So you've probably heard this story a million times. Someone points you to an XML feed and says, "Can you deliver it to these guys daily?" You reflexively say, "Sure thing, no problemo, good buddy!" Before leaving you to your job, they turn around and say, "Oh, and they need it as a CSV." But as you inspect the feed, your eyes start to glaze over as you discover a complex system of layered information, some of it enumerated, some keyed. You start to sweat at the thought of maintaining yet another custom data parser, liable to break the moment some jerk decides they really want their field names to reflect the latest trends in industry terminology. The thought then dawns on you that you can't possibly be the first person to have this problem. You can google with the best of them, you assure yourself; but as you read one stack overflow or php.net post after the next, your hope begins to fade as you witness the disappointing quality of their output.
Wanna serve Retina images on your website the easiest way humanly possible? Well you're in luck, 'cause I've developed a simple method using SVG to efficiently serve Retina high-resolution raster images. It's a mind-bendingly simple hack, so awesome I might even consider using it; check it out!
Decided to add support for HTML5 "email" type input fields to Mailchimp's Drupal module and submit a patch to the project. This allows mobile devices like iOS and Android to show the special email address keyboard when filling out email fields. This seems like the most elegant way to address the issue once and for all. Look, ma, I contributed to open source software!
We will recall these days as the final moments of the once venerable institution of copyright, a system originally intended to allow artists to commercially exploit their work by limiting the creation of copies. This system functioned relatively smoothly in the days of printing presses and record presses, when the equipment and inclination to make a commercially viable copy were scarce. Then things started to get bumpy with the arrival of home recording equipment like VCRs and tape recorders, as people grew accustomed to making high-fidelity copies of commercial works. In these days of digital artwork recorded, distributed and consumed on an endless number of devices, made accessible through an endless number of online services hosted in various countries, we copy and share with little consideration...