PHPnews.io

Dead simple file handling in Ruby

Written by Jerome Dalbert / Original link on Nov. 10, 2013

Common scenarioYou are writing a basic Ruby script that needs to read or write in some text files.So you search “ruby write file” and “ruby read file” on Google.You end up on the usual tutorials and Stack Overflow answers that tell you to open files with r or w mode, “1970 C style”.It’s OK, it work…



Fluent Interfaces are Evil

Written by ocramius.github.io / Original link on Nov. 6, 2013

Today, I had again a discussion on IRC on why Doctrine's EntityManager doesn't (and won't) implement a fluent interface. Here are my thoughts on why that's the case.Recap: What is a Fluent interface? A Fluent Interface is an object oriented API that provides "more readable" cod…


Beyond Inheritance

Written by Ircmaxell / Original link on Nov. 4, 2013

In my last post, I talked about revisiting the concept of Design Patterns and questioned how useful it is to "learn" them. The conclusion that I came to was that you are better served by focusing on how objects communicate rather than traditional patterns. Well, that's not the only "traditional con…