Perhaps this developer decided it would be better to create convenience methods than to litter their codebase with date format strings. Nothing wrong with trying to DRY up your code, but creating 13 inscrutably named date formatting functions ain’t the way to do it.
HTML5 has a lot of cool things in it, but the one thing I wish I could remove are data-attributes, because of the crimes against clean front-end code that it seems to encourage.
What is this clean web code you speak of?
There is this one thing that I noticed recently and that concerns me: PHP devs don’t use functions.
Now, that was overly general, so let me clarify: PHP developers who have reached a certain degree of sophistication
basically stop using plain functions - instead everything goes all classes and methods. At least …
I love object-oriented design. It’s like open source software in general; perfect strangers come up with ideas that can save me time and money and then, out of the goodness of their hearts, go to a fair amount of trouble to pass these ideas on. I benefit from their efforts every day.
However, you don’t have to go …
Rants about PHP are everywhere, and they even come from smart guys. When Jeff
Atwood wrote yet another
about PHP, it made me think about the good parts of PHP.
The biggest problem of these rants is that they come from people stuck in the
old days of PHP. They either don't care or they don't want to admit that …
For the English readers of my blog : this post is for Belgian users who want to use Sporza.be (a big Belgian sports site) without all the soccer content, since that usually fills over 80% of the site. So the content is in Dutch, sorry
Sporza zonder al de voetbal… niet ideaal voor de voetbalfans, maar die hebben …
As a PHP developer, I’ve often been faced with the task of ensuring something happens on a recurring schedule or determining the next date in time an event will occur.
At my previous job, we needed to run scheduled Gearman jobs on a recurring basis. We chose to use cron as the serialization format of our
I’ve often needed to ensure that something happens on a recurring schedule. At a
previous job, we needed to run scheduled Gearman jobs on
a recurring basis. We chose to use cron as the serialization format of our
schedules, and implemented a database driven system for storing these schedules.
Storing the cron …
We’ve all had those tough conversations on how best to exchange dates between two systems: “is DD-MM-YYYY good for everyone?” “what about YYYY/MM/DD” “we could just use Epoch timestamps”…
Each option is rife with problems; some don’t convey enough info, some are too ambiguous, and others are hard on the human eye. …
Today is my " let open source some of my private Github repositories " day,
and more specifically, I'm releasing a bunch of code related to documentation.
Earlier today, I've released the Sphinx
extensions I'm using to generate the
And now, I'm releasing my API documentation
generator . …
Steve Klabnik just posted an interesting post about mixins . Steve is a really smart guy, and I usually agree with him, but I think his justification is a little bit weak in this case.
Mixin Refactoring through Class Gutting
Oh man, he is so right that this is an anti-pattern. It happens a lot in ruby, someone …
One of the most valuable ideas from functional programming is the idea of Higher Order Functions , or functions that take functions as an argument. It is such a good idea that it has become part of pretty much every modern language, whether functional or not. Amoung the OO imperative languages that have embraced this …
I wanted to write a series of posts on awesome emacs plugins I use, since I have put a lot of time and effort into my emacs configs . The funny thing I find about emacs though is that there is such a massive amount of functionality already provided, most neat things plugins do is augment stuff that is already there. …
In a recent Destroy All Software screencast, Gary mentioned how he really doesn’t like Object#tap . He was using it in this sort of context
Update (27 Nov) : Support for PHP 5.5alpha is included.
For those of you who are new to this concept, check my blog post from a while ago . It will explain the basic concept of using PHP_CodeSniffer to automate compatibility checks. But don’t use the download links, because they point to the old (PHP 5.3) version …
I want to do a series of posts on some of the cool emacs plugins I use. Before I do that though, I want to talk a bit about why I use and love emacs. The saying “Care about the code, not the tools” is an anathama to me, it is like “Care about breathing, but don’t worry about drinking”. Breathing is incredibly …
I have been working a lot on an app using MongoDB as the datastore, and Mongoid as the OR/M (or ODM to be more specific). In a relational database, you keep your data as segregated as reasonably possible, and then join it together in appropriate ways when you need it. The up side to this is that it is incredibly …
CSI: PHP isn’t big on the perp walk , but if your crime is (1) public and (2) licensed with an Attribution-NonCommercial-ShareAlike Creative Commons license, then you kinda perp walked yourself .
// What will this print out in php5?
$earth = 'World';
$string1 = "Hello " …