PHPNews

Are PHP developers functophobic?

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 …

Continue reading »

Written by Nikita Popov - - Aggregated on Friday August 10, 2012


How Shall We Define Design?

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 …

Continue reading »

Written by Blog - Sandi Metz - - Aggregated on Thursday July 5, 2012


PHP is much better than you think

Rants about PHP are everywhere, and they even come from smart guys. When Jeff Atwood wrote yet another rant 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 …

Continue reading »

Written by Fabien Potencier - - Aggregated on Wednesday July 4, 2012


Cron Expression Parsing in PHP

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 schedules, …

Continue reading »

Written by unknown - - Aggregated on Sunday June 3, 2012


Cron Expression Parsing in PHP

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 …

Continue reading »

Written by unknown - - Aggregated on Sunday June 3, 2012


The Many Faces of Ruby Callables

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 …

Continue reading »

Written by Matt Briggs - - Aggregated on Saturday May 5, 2012


Awesome Emacs Plugins: CTags

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. …

Continue reading »

Written by Matt Briggs - - Aggregated on Sunday March 18, 2012


Why I like Object#tap

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 1 2 3 4 5 6 7 8 9 10 class StoreCache def self.for_term(term) begin CachedScore.for_term(term) rescue CachedScore::NoScore RockScore.for_term(term).t…

Continue reading »

Written by Matt Briggs - - Aggregated on Thursday March 8, 2012


Awesome Emacs Plugins: Evil Mode

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 …

Continue reading »

Written by Matt Briggs - - Aggregated on Monday February 27, 2012


Repository Pattern In Rails

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 …

Continue reading »

Written by Matt Briggs - - Aggregated on Thursday February 23, 2012


Concatenation is not a parser error

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 . 1 2 3 4 5 6 7 8 9 <?php // What will this print out in php5? $earth = 'World'; $string1 = "Hello " …

Continue reading »

Written by CSI: PHP - - Aggregated on Thursday February 23, 2012


The Interview

Yes, this really happened. Q: How long have you been working with PHP? A: About 8 years. Q: On a scale of 1 – 10, how would you rate your proficiency with PHP? A: I’d say I’m an expert. Q: Can you tell me the difference between an abstract class and an interface , and when you might use either? …

Continue reading »

Written by CSI: PHP - - Aggregated on Thursday February 9, 2012


For your consideration

This was sent along anonymously, along with the question: “Does this count as horror code or pure evil genius code?” What say you, dear reader? I cut and paste, you decide. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 <?php function cli_parsestr($string, $config, $mainconf, …

Continue reading »

Written by CSI: PHP - - Aggregated on Friday February 3, 2012