The Developer Day | Staying Curious

CAT | PHP

Dec/08

18

Finally a Zend Certified PHP5 Engineer!

Zend the PHP company Finally! After months of battles with myself delaying the day out of pure laziness I took the PHP 5 Zend Certificate exam and passed it! Should be visible in the yellow pages in the following 7 days. I’m really happy I have done this and I hope this will help me in the future to prove my worth to current and future employers.

I’d love to share some details about my experiences with my readers who might one day take the exam themselves.

First of all.. It’s sad that companies such as Zend or PearsonVUE can’t store my firstname and lastname with a proper encoding. Surprising that such world famous international companies don’t use UTF8 encoding. The paper I got after taking the exam had my name written as “?ilvinas ?altys”. When I forgot my password and had to fill in my first name and last name to get a new one I had to use question marks to make it work.

Before taking the exam I’ve done about 13 mock exam tests. I also had problems to order them and had to contact Zend and wait for weeks to complete my order, the tests them selves aren’t very good. You get 70 questions and 90 minutes to answer them. Tests had lots of mistakes and sometimes rather dumb questions. For example .. Which methods are required to implement when implementing the Iterator interface. Tests give 5 choices and ask to select 5 choices. Then there are questions which you cannot answer correctly because either they are out of date or they are wrong from the start. Then there are questions that ask you questions about the PHP virtual machine implementation or PDO extension options or Sqlite performance configuration settings. Good luck knowing all that. After 10 tests you start shooting answers like darts because questions start to repeat a lot. The most frustrating thing is that it’s really hard to learn from these mock tests. They don’t tell you which questions you have answered correctly and why were you wrong. When you start doing a test you look for answers on the internet to find out what is the correct answer and it may some time to do it for any single question. Funny enough I have never got a completely excellent score from the mock exams. I always failed in at least one category and couldn’t figure out why.

Mock exam results

About the exam itself. A heard a lot of poeple saying. “Oh it’s easy!”, “Oh it’s easier than the mock exams!”, “It’s basic level!” If you can complete that exam and you are confident that you have answered atleast 90% of the questions correctly you are a walking bible of PHP that knows the manual really well, all the possible configuration options, all the nonsense tricks in PHP and have some profesional experience. It’s not that easy. A lot of questions are hard to answer. Most of the time you can be only 80% sure. Unless of course you have a very good memory and can remember all the details. Not many developers know what PHP does with floating point array keys or how exactly PHP handles type juggling. When I was about to end the exam I was not sure I will pass it. I knew for sure that there were a lot of questions that I wasn’t 100% sure of. There are tons of questions where the exam tries to TRICK you. For example .. You have a lot of code with classes, abstractions and it asks you what does it output? And you can get confused and not notice that there is no echo statement anywhere and there’s no output. Somewhere I’ve found that noone completed the exam with perfect score and I think it was a statement by Zend itself but I’m not completely sure. You have to answer about 50 - 60% of the questions correctly to pass the test.

A few things were disappointing and could have been better but in the end I’ve achieved my goal and would like to thank Zend for making it possible. Certificates can’t tell if someone is a great developer or a nice person but they can definitely tell how much someone knows about the details of a programming language.

, , , Hide

Dec/08

16

Review of php|architect / September 2008

Again. A few months late. Happy to see the magazine is going through some new exciting changes.

ATK - A Business Framework

I’m lost in the development world about what a framework is these days. But ATK seems more like a CMS to me. Or atleast you can build one in minutes. ATK itself is quite interesting. It wants developers to write as little code as possible. And you don’t call ATK, it calls you! Meaning that you create something unique to your application like a data node description file and ATK will know when to use it. It’s very easy to create various entities and describe their relationships with ATK so it’s bassically a web application bakery. The article does not say much about the performance or extendability of ATK itself. I was sceptical at first but then I changed my mind that this software project sounds like a worthy tool.

Messaging The Web

It’s an interesting idea to use email as middle communication layer between your phone and your PHP applications. Was nice to find out that you can feed emails using sendmail directly to php scripts instead of using crons. Though I wouldn’t use it for server control like in the article itself. Most phones have email support today and can send emails themselves. I think this is more of a poor man’s solution anyway. But I still believe it is a nice idea and could be useful for something.

Working with the Zend Platform

A great article. Never checked what Zend Platform has to offer and I was suprised. Too bad it can’t work together with Xdebug and APC but Zend offers some replacements. The Zend Platform is great for a web developer using windows to quickly setup a dev environment. All you need is Zend Core and Zend Platform which are free for development purposes. Zend Platform itself is like a web application that allows you to do a lot of neat things. I think that the most valuable thing is the events logger. It logs php errors, execution times and other things, agregates it and presents it in a very nice interface and allows you to find and investigate problems quickly. The cache feature in the Zend Platform is also nice for some quick caching solutions. It has never been easier to cache a page. Just provide the URLs you want to cache and it’s done. Zend sessions clustering is also a nice thing. I think it would be great to have it as a free extension. It’s easy to setup shared sessions when you can’t afford storage servers or sticky sessions and must have high availability.

HTTP Streaming

This article explains how to create an application that connects to a socket. Using telnet you can write messages which popup in a web browser which is constantly buffering messages from a socket using php and ajax. I like the main idea to use this for monitoring. For example you could stream your web server cluster error logs into a single browser page and try to investigate potential problems.

Creating Web Interfaces with Stickleback

Yet another framework named stickleback and developed by Yahoo. Stickleback is a general purpose plug-in framework. I missed the reason behind this framework. What are it’s strengths and weaknesses compared to other frameworks. It says it’s extremely extensible. Anything else? Article shows how to create an application that displays a few headers and a table and show some of the framework components. Looks like a “Hello World” program. Would have loved to understand why this framework stands out from all the other frameworks.

exit(0);

One of my most favorite columns. I sympathize with the idea that to show something using a programming language and choosing a hello world program to do it is not the most effective way to do it.

, , , Hide

Dec/08

8

MySQL character sets and collations

Another great article I’ve found about MySQL character sets and collations that demystifies all the so often found problems in projects made by confused developers. This also can help you to save some space your database takes and improve your queries performance because more of your database can fit into memory.

, , , Hide

Nov/08

18

Dynamically Generating PDF Files with PHP and Haru

A great article on planetphp how to dynamically generate PDF files using PHP. In my experience it was never the strong part of PHP. The Haru library seems promising and might be worth to take a look at.

, , Hide

Nov/08

13

Review of php|architect / August 2008

I’ve finished reading the August 2008 php|architect edition.

Chatting with Flex

Some nice details about Flex runtime libraries and standardized XMPP chatting protocol.

Writing a Custom WordPress Plugin

An interesting read how wordpress developers implemented it’s plugin system. A worthwhile read if you are interested how a flexible plugin system could be implemented.

Case Study: A Million Products

Found the Entity-Attribute-Value aka EAV model very interesting. It has been mentioned in previous php|architect editions. It’s a great solution where business entities have lots of different attributes. The article shows a realistic approach  how EAV could be implemented.

The Perfect Storm

A trully great article worth reading! Reading the first few sentences i remembered myself in the past. Maintaining legacy projects .. I agree with the article that experience working with legacy projects gives you debugging experience. I’ve met developers who just get lost debugging old legacy code and spend hours and hours looking for a problem while it takes someone else just 5 minnutes to find it. Was interested to hear about the limited GOTO statement in PHP 5.3. The article introduces to one of the worst code smells developers should avoid: Pack Rat Syndrome, Real Clone Wars, Merging of Sins. Pack Rat is when dead code is left behind. Clone Wars is about code duplication. And Merging of Sins is about creating new projects from old ones without cleaning them up.

Nineteen Eighty-Private

Interesting argument. I consider myself a fairly educated developer and I’ve never questioned myself why I make the non-public members and methods of classes private and not protected. I came to a conclusion that libraries should be protected because these can be extended. In other cases where classes are not meant to be extended they should probably be declared final anyway.

, , Hide

Nov/08

12

Who is Pablo Picasso in PHP?

I’ve been developing web applications for quite a while now. And overs years it became as a form of art for me. Creating maintainable, performant, scalable, secure and highly available web applications trully requires a lot of knowledge and experience.

It’s easy to say some applications are better than others. Like paintings or music. Some are masterpieces and some are just a pile of crap. Maybe it’s just me but I think that it’s easy to learn what *good* music is, who the *greatest* painters are and see their work and learn something. So I dare to ask the question. Is it the same with web development?

And if you think what i’m thinking you are thinking then … Yes there are open source web projects! And yes some of them are great! But what kind of projects are these projects really?

There’s phpBB. The famous php forum. It’s crap inside. And there’s phpMyAdmin .. it’s also a view of art that you want to wash your eyes with a bleech after. Even though I use it everyday. OK I’m choosing bad examples here. Lets take … WordPress? Well it’s better .. But really? It’s still not a master piece. You can learn more than from others but still not much. And then there are content management systems like Drupal and others which also creeps me out. And finally iI see frameworks. I personally love the ZendFramework. I think it’s one of the greatest things that happened to PHP in recent years. But it’s a framework! You can’t find there any working models, controllers, web services and such. Ofcourse you can find a lot of *other stuff * there  to learn from (like how to create libraries, components or frameworks).

Yes there are great books, blogs, conferences, your company projects. It adds up. But I want to find out who is Pablo Picasso in PHP. I want to see his work and say to myself .. “God! He’s a genius! I love it! It’s so simple and elegant. Why didn’t I do it the same way before?” I think it is healthy for one to evaluate himself among the best and see how far the road he is.

What do you think?

, , , , Hide

Oct/08

15

9 steps to prepare for the Zend Certificate Exam

I’m getting very close to taking the Zend Certificate Exam just need a few more things to take care of. I’ve made a list of things one should do to be in my opinion really prepared to take the exam. So here goes:

  • Read the Zend PHP5 Certification Study Guide. It will get you going through all the basics ant not so basic tipsies and tricksies. It’s quite an easy read and if you are confident you can skip or eye-scan a lot of stuff.
  • Read the Essential PHP Security to get a grasp of most of the web security problems.
  • Read the PHP 5 Objects, Patterns, and Practice by Matt Zandstra. It teaches most of the Gang Of Four patterns and a few of the so called enterprise ones. It’s one of the best books on design patterns.
  • Book reading is over. The HOLY manual is your best friend now. Start with PHP array functions. Study each one of them carefuly, memorize parameters and return values.
  • Next go to the PHP string functions.
  • You also need to know the basics of XML, Streams, PDO, SQLite if you are going to take the exam. You don’t have to study each extension closely. I would recommend to give more attention to DOM XML, SimpleXML, XML Parser, Streams functions and PDO.
  • Go and learn some regular expressions. Should take you one evening or so.
  • There are also some misc extensions like SPL or functions like __halt_compiler(), error_reporting() you should know of. Though they cover a little part of the exam.
  • Next you buy 5 - 10 Zend Certification Online Practicing Tests and it costs you arround $20 - $25 greengos.

And that’s basically it. Do that and not only you can take the exam but you will have deeper knowledge of the language you are using and how to use it more properly.

, , , Hide

Oct/08

15

PHP SoapClient absolute certificate path bug

I have found a bug in PHP 5.2.6 related to SoapClient. If you pass a relative path of local_cert option to the SoapClient on Windows machines the client does not work and refuses to connect to the service. Actually this is my first bug to report and it got fixed. (I was worried I might be one of those annoying pests who report not bogus stuff) I’m happy I did a tiny itsy bitsy amount of good to PHP.

, , , , Hide

Sep/08

17

Web Applications on Mobile Phones using PHP

I’m a subscriber to a PHP magazine php|architect. I still haven’t finished reading the july edition. In the past I didn’t have to do much with web applications and mobile phones. Recently though we had to make a certain part of a bigger application we made to be available on blackberry. The problem of course we faced is of course how to identify if the current agent is a mobile phone. And that’s how we found WURFL.WURFL aka Wireless Universal Resource File is a device description repository or to make it simple it’s a big library of various mobile phones abilities and attributes mapped to user agents.

What does this have to do with php|architect? Well in the 2008 july edition of php|architect there is a really lovely article about web application tools for mobile phones. I found there are two more PHP tools that a mobile web applications developer should know of. It’s Tera-WURFL and HAWHAW. And again to make it simple Tera-WURFL is a mysql database for WURFL to make WURFL super fast and HAWHAW is a object oriented toolkit to create mobile web applications. Basicly with HAWHAW you can construct pages using objects and then HAWHAW renders them to apropriate formats such as WML, XHTML MP, XHTML using the data it gets from Tera-WURFL. According to the php architect article Wikipedia is using HAWHAW.

I don’t have to do much with mobile web applications I think it’s great that these kind of tools are available because I know it is easy to develop these kinds of applications if I or others have to.

, , , Hide

Sep/08

15

In my previous blog post I wrote that me and my friend probably developed a first working google page rank check php implementation on linux. Seems I was wrong. Jan Bogutzki has an implementation on his functions-online.com website that also works on linux. He sent me his version of implementation and I must admit it looks cleaner and more simple than ours. You can  he sent me if you are after a better approach.

, , , Hide

<< Latest posts

Older posts >>

Find it!

Theme Design by devolux.org