Your code is CRAP

November 8, 2010 by nuno costa no comments

That is most probably true if you are not unit testing it or collecting metrics.

One of the most important metrics is the Change Risk Analysis and Predictions or CRAP index. continue reading »

Extending a PHP class with plugins

October 31, 2010 by nuno costa 3 comments

It’s has been a while since I post anything useful or technical. My last posts all have ben sponsored by some one!

When I was writing the new version of phMagick I had a few requirements in mind

It should be:

  • Compatible with previous versions
  • Easy to incorporate patches and new features the community sends back
  • Small footprint (let the user choose what features he needs)

Having one big class would defeat the last 2 requirements, it would be too costly to manage contributions, and obviously there is no way to include just the features needed!

I tried some workarounds to php lack of multi inheritance support, but the code was just becoming to messy!

I come up with a solutions to “extend” a class by using a plugin system.

continue reading »

Make a diet, serve just one CSS and one JS

October 3, 2009 by nuno costa no comments

I’ve talked about how you can speed up your web site by serving less files, now its time to get our hands dirty and see how we can easily combine several files into one.

This will prove to be a very simple but handy addition to your toolkit.

continue reading »

C is for cookies …

July 20, 2009 by nuno costa 1 comment

Are you hungry ?
let’s eat some cookies

continue reading »

Url validation

by nuno costa no comments

Ever wished users entered valid Urls ?

Well why not force them ? continue reading »

Older Posts »

More from francodacosta.com

© francodacosta.com - All rights reserved