/dev/null

Elite is stupid. Back to the roots.

October 27, 2008

Microsoft the PHP company

Tags: , — 12:29

Entwickler sollen PHP-Unterstützung unter Windows verbessern

Microsoft hat in Unterschleißheim ein “Open Source Interop Technology Center” eröffnet. Microsoft will hier an der besseren Unterstützung verschiedener Open-Source-Software unter Windows arbeiten. Den Anfang macht PHP.

http://www.golem.de/0810/63176.html

September 15, 2008

ZendCon: Best Practices

Tags: , , , , — 19:19

I found three useful ideas in the PHP Developer Best Practices tutorial by Matthew Weier O’Phinney (Zend Technologies, Ltd.), Mike Naberezny (Maintainable Software):

  • Add something like PHP_CodeSniffer to pre-commit in Subversion to reject code that doesn’t follow standards
  • Run tests in a Subversion post-commit script
  • Try to switch to git, because you can also do commits when offline

Sadly, there were also less good ideas like

  • Prefix private/protected class methods and properties with an underscore (makes refactoring very difficult; instead you should start with all properties being protected anyway and only make properties public, that need to be public)
  • Limit line length to 85 chars (120 chars are ok – nobody uses a 80 char text console for coding anymore – wide screens are standard, even for developers)
  • Use PHP_CodeSniffer (I like ZendCodeAnalyzer)

Look at this, if you wanna see bad practices:

September 4, 2008

Simple is hard

Tags: , , — 21:31

Check out these slides by Rasmus Lerdorf presented at FrOSCon 2008:

http://talks.php.net/show/froscon08

Yes, PHP frameworks do suck in terms of performance. CakePHP is the slowest while Zend Framework seems to be the most complex, in terms of include dependencies.

August 29, 2008

Is PHP the future of Microsoft?

Tags: , , — 12:12

It’s not that MS already made an official statement, but from what I read in the news, Microsoft not only started supporting PHP on Windows/IIS. Much more important is, that they are buying companies that use PHP (they could not close some deals yet, but at least they try to):

The next logical step is, that Microsoft runs PHP applications and employs a lot of PHP developers. I really don’t think, they will port all those apps to their own technologies like .net, C# or Visual Basic. So, be prepared. You will soon be able to start a career at Microsoft as PHP developer.

August 19, 2008

Memory wasting Zend_Mail

Tags: , , — 02:54

I just wrote a small script to manage my mails… turns out that Zend_Mail uses some special trick that causes a fatal error:

Reading 3274 messages…

Fatal error: Out of memory (allocated 11534336) (tried to allocate 18446744073709551615 bytes) in /usr/share/php/libzend-framework-php/Zend/Mail/Storage/Mbox.php on line 198

That’s around 17179869183 TB of memory… to read 3274 mails… makes 5247363 TB per message… not bad ;)

Powered by PHP, Memcached, Suhosin, MySQL and WordPress