Building a better Programmer

Spend 2 minutes on Google, and I’m sure you can have a bunch of PHP is better than Ruby and visa-versa. That’s not why I’m posting this. This article doesn’t interest me because it is Ruby vs. PHP, nor does his use of cursing appeal to me all that much. What I like about it are the lessons the author provides.

Look at that old cruddy PHP code you worked on two years ago. You know what I’m talking about. Seriously, it’s only cruddy because you are two years wiser–two years more experienced. The site is still up–still maintainible.

Now, go learn Ruby and Rails…go learn .NET, J2EE or who knows what else. When you come back to PHP (and you will ;-)) you are going to crank out the meanest, slickest, hottest code you ever wrote.

That’s the lesson I liked so much: Never stop learning new ways to make the best tool for the job even better.

http://www.oreillynet.com/ruby/blog/2007/09/7_reasons_i_switched_back_to_p_1.html

Scripting Fun :: Automatic Next Meeting Date Calculation

OK. I have finally taken the time to hack together a block for automatically stating the Next PHP Meeting date. What I needed was a way to get the third Saturday of the current month unless it has already past. Then it would get the third Saturday of next month.

If you want to have some fun with a nice academic exercise, read the article and start hacking!

The “algorithm” I hacked together was:
[code]
[/code]

Now make me proud and post your improvements.

Happy Hacking!!

HTML Purifier

Do you offer HTML input on your website or blog? Are you nervous about XSS (Cross-Site Scripting) vulnerabilities; or even more concerning–are you unsure what they are? Does it frustrate you when your users continue to use depricated tags like center in their posts?

Well, be troubled no more. Check out the [url=http://htmlpurifier.org/]HTML Purifier[/url] today. Now in version 2.0: tidy and tag extensibility!

[url=http://htmlpurifier.org/news/2.0.0-released.html]Get your HTML Purifier today[/url] and code safer!

Security From The Inside

This interview with Stefan Esser was recently posted on Security Focus.

[i]Stefan Esser is the founder of both the Hardened-PHP Project and the PHP Security Response Team (which he recently left). Federico Biancuzzi discussed with him how the PHP Security Response Team works, why he resigned from it, what features he plans to add to his own hardening patch, the interaction between Apache and PHP, the upcoming “Month of PHP bugs” initiative, and common mistakes in the design of well-known applications such as WordPress.[/i]

[url=http://www.securityfocus.com/columnists/432][b]Full Interview via Security Focus –>[/b][/url]

Image Manipulation with PHP and GD

This two-part article on [url=http://www.phpit.net]PHPit[/url] blipped across my [url=http://digg.com/]Digg radar[/url] today. At my last job I actually had to play with PHP/GD quite a bit. This is one of the better tutorials I’ve seen on the subject.

[url=http://www.phpit.net/article/image-manipulation-php-gd-part1/]Part 1[/url]

[url=http://www.phpit.net/article/image-manipulation-php-gd-part2/]Part 2[/url]

Check your PHP code with unit tests

This article covers installation and use of the PHPUnit2 pear module, and discusses how to test your applications at the module, DB and interface level. This is a good read, especially for those of you who must deploy tested, solid applications.

http://www-128.ibm.com/developerworks/opensource/library/os-php-unit/

Five common PHP Database problems

This article on IBM DeveloperWorks discusses five common mistakes that PHP developers make when working with databases.

I’m guilty as charged on a few of these. 😳

[url=http://www-128.ibm.com/developerworks/opensource/library/os-php-dbmistake/?ca=dgr-lnxw97Avoid5PHPerrors]http://www-128.ibm.com/developerworks/opensource/library/os-php-dbmistake/?ca=dgr-lnxw97Avoid5PHPerrors[/url]

PHP Encryption for mere mortals

I’ve really been loving IBM DeveloperWorks lately! Here’s another great PHP tutorial!

The author provides a quick primer on information security and cryptography, then jumps right into applying it to PHP with some very useful advice on proper implementation. Several code examples and a good number of external links are also provided.

[url=http://www-128.ibm.com/developerworks/opensource/library/os-php-encrypt/?ca=dgr-lnxw97PHP-encrypt]http://www-128.ibm.com/developerworks/opensource/library/os-php-encrypt/?ca=dgr-lnxw97PHP-encrypt[/url]

Optimizing PHP Objects

I ran across this article on Digg yesterday when surfing from my PDA in a coffee shop on lunch. I bookmarked it but never got around to posting it yesterday. The author provides some tips and tricks for streamlining PHP Objects. Some of the tips are just good solid programming advice for PHP.

[url=http://www.whenpenguinsattack.com/2006/07/21/optimizing-object-oriented-php/]http://www.whenpenguinsattack.com/2006/07/21/optimizing-object-oriented-php/[/url]

Five things you didn’t know you could do with PHP

Larry Ullman (writer of several PHP books and an instructor at UCB) wrote this article on interesting ways to use PHP. It covers unconventional ways to use conventional PHP features. I liked it.

[url=http://www.devsource.com/article2/0,1759,1778106,00.asp]http://www.devsource.com/article2/0,1759,1778106,00.asp[/url]