Recent Writing
-
How I debug PHP errors and issues
Jun 25 2009
I spend a lot of time in various IRC channels answering questions and helping out, and one recurring theme that pops up again and again is people not knowing what to do when things go wrong. Whether it be a simple error or a logical mixup, people often lack the tools or processes to figure things out. So I thought I would share how I approach errors and problems.
-
Simplifying Controller logic with Exceptions
Jun 12 2009
In the ongoing struggle against code bloat and creative ways to do things, I’ve been playing with throwing exceptions from model methods. While not earth shattering stuff, I’ve found it to have a few advantages over returning
false. First, you can end up with lessifandelsestatements. -
5 signals that can indicate its time to re-factor
May 31 2009
Re-factoring code is a part of any programmers life or should be. Very few people write beautifully clean and well factored code from the start, and I am certainly not one of them. Most times my code starts out a sprawling tangle that takes an additional pass or two to look like something I would consider clean. I find that when programming and designing I start with a rough idea or sketch of what I want to accomplish.
-
Using the PHP Reflection API for fun and profit
May 23 2009
When PHP got a real object oriented system in 5.0, it also got a neat feature taken from Java land. Reflection allows you to introspect & reverse engineer functions, classes, and extensions. In addition you can use reflection to extraction of documentation from classes and functions. In PHP Reflection is done using a number of Reflection classes.
-
DebugKit 1.1 Released
May 16 2009
Today marks the 1.1 release of DebugKit. After using it for the past few weeks and not finding any new issues or getting and new tickets. A few new features snuck into the release, courtesy of Andy Dawson.
-
Extending DebugKit - The new Javascript features
May 14 2009
Hopefully by now you’ve used DebugKit , and found it to be as useful as I do. If you’ve ever wanted to add a new panel, you can and its actually quite easy to do.
-
Year one of baking CakePHP
May 06 2009
Today is the one year anniversary of my first commit to CakePHP, amazing how time flies. It seems not too long ago that gwoo and nate approached me to join the core team and help with writing the tests for 1.2. What started with test cases soon bloomed into full blown commit access and had me working on all parts of the core. Year one also saw the creation of DebugKit which is nearing its 1.
-
Calculating Documentation Coverage with ApiGenerator
Apr 26 2009
Generating code coverage for test cases is a handy feature, it gives you a quick and easy way to determine how much of your code is running during your tests. It doesn’t ensure that the tests are good or that you have enough assertions, but code that doesn’t run definitely has not been tested. Before code coverage was created it was very difficult to determine how much code was being run.
Search
Popular Stuff
Recent Comments
- I think I’ll point a lot of people to this article, from IRC. Th...
- Riaan: You could always fork the code on github and apply the patch too :)
- To add weight to your menu: 1. Add the following code after the “...
- Oscar: Yeah shortly after posting the article I remembered there were a f...
- I’d think that DebugKit would be in this list as well, I don’t...
