 | News Feed |
Sections
|
| feed this: |  |
Marco Tabini's Blog: The violin-playing software designer
by Chris Cornutt August 19, 2008 @ 12:03:12
In this new post to his blog Marco Tabini eloquently explains something that less and less seem to be able to understand - the tool is only a means to an end. It's more about the artist and the end result than the tool.
What is beautiful code? Ask ten people, and you will probably get ten different answers. Ask them what makes a programming language beautiful, and you've got yourself the beginnings of a holy war.
He compares code to art - the language is just a tool, the canvas an editor waiting to be filled with lines of artist-generated works. Because of PHP's wonderful flexibility, it can be molded to fit just about any need a coder might see fit and gives them the power they need to really dig into the code and about the "paint by numbers" sort fo things language like Ruby have to offer.
voice your opinion now!
software designer violin art code beautiful language tool
William Candillon's Blog: Running Zorba with PHP
by Chris Cornutt August 13, 2008 @ 11:14:49
William Candillon passed along a note about a new PECL extension that's been released that adds the power of XQuery to the PHP world.
PHP developers beware: Zorba now has a language binding for PHP 5!
Most PHP developments have to deal with XML and since PHP version 5, the support for XML has been greatly improved and developers can use various extensions that speak XML. We strongly believe that XQuery was the missing piece in this set of tools and therefore we are very excited by this release.
You can get the full details from this post to his blog including installation instructions and usage examples for everything from a simple query to a more complex XML insertion.
voice your opinion now!
zorba pecl extension xquery install tutorial example code
Rochak Chauhan's Blog: Top Ten Security Vulnerabilities in PHP Code
by Chris Cornutt August 04, 2008 @ 12:58:10
Rochak Chauhan has come up with a list of ten things, some security problems that could be lurking in your applications waiting to pop up at the worst time. Here's his list:
- Unvalidated Parameters
- Broken Access Control
- Broken Account and Session Management
- Cross-Site Scripting (XSS) Flaws
- Buffer Overflows
- Command Injection Flaws
- Error Handling Problems
- Insecure Use of Cryptography
- Remote Administration Flaws
- Web and Application Server Misconfiguration
Each item on the list has a bit of detail (and sometimes some code) to help point out the problem. Some of them even have references to external sources and packages to help you solve the problems.
voice your opinion now!
security vulnerabilities list code example references
Rob Allen's Blog: Notes on Zend_Cache
by Chris Cornutt July 11, 2008 @ 07:58:43
Rob Allen has posted a few notes about the Zend_Cache component of the Zend Framework to his blog today.
Recently I needed to speed up a legacy project that makes a lot of database calls to generate each page. After profiling, I discovered that 90% of the database calls returned data that rarely changed, so decided to cache these calls. One of the nice things about Zend_Framework is that its use-at-will philosophy means that you can use any given component with minimal dependencies on the rest of the framework code.
He shows how, using the Zend_Cache module (and friends Zend_Loader and Zend_Exception), he creates a caching class that can be called anywhere and is used to cache the results from the queries. His default lifetime is set to 7200 seconds - two hours - before the script needs to refresh the cache and get the latest updates.
voice your opinion now!
zendcache zendframework sql query results example code
C7Y Community Site: Handling Images with PHP
by Chris Cornutt July 09, 2008 @ 11:13:06
On php|architect's C7Y community site Scott MacVicar has posted a new comparison of two of the main graphics platforms available to PHP - the GD and Imagick extensions.
If you want user interaction on your website then you probably accept the upload of some media, including images. Within PHP there are two different libraries available that provide functionality for handling images, GD and the Imagick extension. This article takes a brief look at each of these libraries.
Since GD comes bundled with PHP these days, he gives a brief installation tutorial for the Imagick extension. After that he compares the two with code for three different bits of functionality - identifying image types, working with EXIF data and modifying a current image (change format/resize).
voice your opinion now!
tutorial image handling gd imagick extension example code
Debuggable Blog: Programming Psychology II Private methods
by Chris Cornutt July 08, 2008 @ 08:44:58
According to Felix Geisendorfer's newest post on the Debuggable blog, he thinks that "private and protected methods and properties are one of the most stupid concepts of OOP."
This is a thought I first shared at CakeFest Orlando this year, but could not explain properly at the time.
He illustrates with an example of a protected "balance" variable in a BankAccount class. Sure, it's marked as private but less skilled programmers might not use it that way. He recommends a method without the getters/setters to help make the usage of the variable a bit simpler. He also suggests that using protected/private scoping helps to promote "crappy code" - using them to provide a sort of protection for code that you either don't want getting used or hiding it away so the API can't get at it.
voice your opinion now!
private method protected bad code concept stupid getter setter
|
Community Events
Don't see your event here? Let us know!
|