Typically when working on code that has tests, you would want to make sure your tests pass when you share your code with other people. It’s generally a good idea to run the tests once in a while too, but why do it manually when you can automate? In this post I’ll show a simple shell script you can use …
Doctrine 2 adapter for Zend_Form model form generator
I recently updated the ZF modelform generator to include an adapter compatible with Doctrine 2. It’s otherwise completely functional, but it ignores many-to-many relations when generating forms (because I didn’t need this feature yet ;) ). Usage example after the jump.
You don’t need a service layer: Fat controllers are okay
Here’s a counterpoint to the currently popular view of “fat controllers are bad”, and the current fad of everyone and their cousin implementing service layers: You don’t need one. Fat controllers are okay too.
How to use built-in SPL exception classes for better error handling
Since PHP 5, there has been a bundle of built-in exceptions – the “SPL exceptions” – in PHP. However, the documentation for these classes is quite lacking in examples, and it can be difficult to understand when you should be using them. The short answer is always. You’ll find a longer answer if you continue reading :) There is also …
DIY: LCD monitor repairs for beginners
Broken LCD monitor. Doesn’t turn on, or maybe it doesn’t stay on once turned on, or perhaps it makes an annoying buzzing noise. Sound familiar? One of my monitors recently broke and became like that, in fact it had all the symptoms above. I thought I would have to waste a two-three hundred euros to get a new one, but …
Writing HTML is fun (if you don’t have to deal with IE)
HTML and CSS are relatively straightforward languages. Yet there’s a certain amount of elegancy to them – I think you could even call well written markup art. I quite enjoy writing HTML and CSS from time to time. Despite being simpler than programming languages, writing HTML still provides a challenge: How to put a design into code in the most …
Using spatial data in Doctrine 2
In this post I’ll introduce you to extending Doctrine 2 to provide ways to use custom data types and DQL functions. We needed a simple way to store locations and calculate distances between points on maps and some other stuff for Wantlet. Since we are using MySQL, we decided to use MySQL’s Spatial Extensions for it since they seemed suitable. …
What was the point of XHTML?
XHTML was the fad for a while – you were a bad coder if your markup wasn’t valid XHTML. Now it’s fading out. Giorgio Sironi’s recent look at what happened to XHTML got me thinking: What was the point of all this? Why was XHTML useful, or was it?
Hello 2011
So what’s up? It’s 2011! Well yes, it has been 2011 for almost a month already, but I’ve been kinda busy with stuff. Here’s some statistics from Codeutopia in 2010 and what interesting things have been going on lately.
Link: Refactoring a service class for better separation of concerns
RV David has an interesting post on his blog about refactoring a service class for better separation of concerns compliancy. I also left some ideas in the comments as I’m currently working on something similar.