Today on Twitter: Top 25 most dangerous programming mistakes
I saw this great read in my twitter feed today. It's a good read up for anyone just getting into programing, and even more season programmers may get something from it. Check it out.
http://www.codinghorror.com/blog/2009/01/top-25-most-dangerous-programming-mistakes.html
Kickstarting mongrel with 503 errors.
So, I'm a total sucker for punishment, and thus I run a very small rails (mongrel) app on my website (shared host). Every once in a while, the mongrel app dies for some reason (server was rebooted, power loss, etc), and the PID file isn't removed. So I tried an experiment. I told apache to use a PHP file for 503 errors (Service Unavailable -- or what my users see when apache tries to rewrite to a mongrel that isn't there). Then I wrote setup the PHP file to try and start rails, and email me if it fails. Read below for all of the PHP code and shell files used.
Increasing the PHP CLI Memory Limit
I recently ran into an issue where a client's cron job refused to run because of fatal errors and running out of memory. The default php.ini allowed up to 128M, but the CLI just wouldn't accept that.
It turns out that there is an easy solution: