Zend Certified Engineer

Zend Certified Engineer

PHP5 Zend Certified EngineerToday I took the Zend PHP 5 certification exam, and passed! As of writing this post, I am not in the Zend Yellow Pages yet, so if you click the icon it will make me look like a liar, but trust me, I passed. I’m in the Zend Yellow Pages, and you can click the ZCE PHP 5 icon to view my entry.

The exam is similar in format to the Zend practice tests (70 questions in 90 minutes, with multiple choice and fill in the blank answers), but the topics and content appeared to be fairly different. I’m not allowed to share the test with you, but I think it is alright to make some vague references to the type of questions I was asked, as Zend themselves share this information freely on their website.

Many of the questions were crazy easy, sort of in a “if you’ve ever used PHP then you should know this” category. For example, the basics of how loops work. Some took a little more knowledge, but should still be fairly easy to someone that has been programming in PHP for a few years.

Some were ridiculous and shouldn’t (in my opinion) have been on the test. For example, one question referenced the function strspn. In the PHP world, the usefulness/popularity of a function can generally be determined by the number of comments it has in the online documentation. This function has a whopping three: two explaining what the function actually does because the official description is confusing, and one trying to help people understand why they’d even want to use this function.

One thing I thought was interesting is that the test is probably easier for people who have spent a lot of time digging in other people’s code. For example, there may be 5 common ways of getting a task done. Some ways may be faster, or easier to read, or use a single function call, or whatever. If you haven’t had to spend time in other people’s code, then you may never have seen all 5 ways of getting the task done because you always do it 1 way. The exam expects you to not only be able to understand how the other 4 ways work if you happen across them, but ideally you know what they are before you go to the testing center.

If you’re an established PHP programmer and want to take the exam, I’d recommend taking the practice tests, determine what areas you are rusty in (for me it was PDO and XML) and study up a bit.

I have this post categorized in Goals because it has been a goal of mine to get this certification, Investing because it is an investment in myself, and Web Dev because, well, PHP is web dev to me.

Read More

A Local Vacation

I was driving home the other day when my cell phone rang. I didn’t recognize the number, but I always answer my phone. It was some lady from Colonial Crossings of Williamsburg calling to let me know I won a 2 day/1 night vacation in Williamsburg. I was like, uh, lady, I live in Williamsburg.

No you don’t, you live in Suffolk, she replied. I was like, no, I’m pretty sure I know where I live. I live in Williamsburg. She was like, oh, well we’ll give you $50, too. And a 3 day/2 night vacation you can use somewhere else. I was like, oh really? What do I have to do? She said I just have to listen to a 90 minute presentation about Colonial Crossings of Williamsburg.

Ah hah! A timeshare! Becca and I are saving for a house, so I had no fear of getting talked into purchasing, so after talking it over with her, we decided to go for it.

Then the “gotchas” started showing up. They required a $10 reservation fee. And $5 hotel tax (which actually ended up being $7.50, and almost $15 if we didn’t catch the billing error). The additional vacation was just another timeshare. And although we were led to believe that we’d be staying at the resort, we actually were put up in one of the shiftiest hotels in town. The carpets had dirt clumps on them, we found a child’s toy next to the bed, and the towel rack literally fell off of the wall. Shifty.

I later discovered (thanks to Google) that this is a sales technique. Once at the presentation, the salesperson can say somehing like, “Now, wouldn’t you rather spend your vacation here instead of a hotel?” at which point you think “wow, my hotel room really did suck” and you plop down $35,000.

Oh I didn’t get to the $35,000 part yet? Well, that is how much your fancy 1-week at the resort will cost. Plus quarterly maintenance fees that can go up in price without notice. Plus a yearly fee if you want the book that lets you trade your week at different resorts. Plus a few hundred dollars if you do want to trade your week at another resort. And that is just for the place you sleep. What about food? Souveniers? Admission to attractions? Trust me, it is not cheaper to buy a resort (at least not at the retail price).

But yes, we got our $50, so we came out ahead. I had to sign for my money, and was able to see what others got. Some were being paid as much as $120 to come listen to the presentation. I guess I should have held out for more money.

Read More

Review: Devil May Care

Just finished Devil May Care by Sebastian Faulks. Being a James Bond book, I wasn’t expecting a very deep plot and I was not disappointed. The entire premise of the book is ridiculous, and the “surprise” twist at the end was a bit contrived and unrealistic (even for a James Bond novel). The action scenes felt like they should have had “pow!” and “bang!” written in the margins. Maybe this will make a good movie (if the plot is strengthened a little), but as it is, I wouldn’t recommend reading it.

Read More

PHP Method Overloading: Why?

So some people I know really like to use PHP method overloading. In case you program in pretty much any language other than PHP, let me explain what PHP considers method overloading using this (very simplified) example code:

<?php

	class bigAnimal{
		function __call($name, $arguments){
			return $name;
		}

		function displayName($name, $arguments){
			return $name;
		}
	}

	$animal = new bigAnimal();
	$animal->monkey();
	$animal->displayName($monkey);

?>

So, in PHP, method overloading means that if bigAnimal::monkey() doesn’t exist, it will look for bigAnimal::__call(), and pass the name of the method (monkey) and any arguments to the __call() method. Seems handy at first, doesn’t it? If you want a bunch of similar methods to do the same thing, or have a default method, then you can easily set this up.

But why? The only thing you are getting out of this arrangement is the ability to be lazy and not name one function, at the expense of speed, readability, searchability, maintainability, and I’m sure there is another -ability that it costs you, but it is getting late so I’m not sure…

For example, change __call() to displayName(). Now, all you need to do is stay aware of what methods you’ve declared in your class, and if you want to use one that doesn’t actually exists, then call bigAnimal::displayName(‘monkey’). You can even pass in your arguments if you want.

But maybe you guys are smarter than me. Can someone explain what the benefit of this is supposed to be?

Read More

Review: Anathem

I just finished reading Anathem by Neal Stephenson a few days ago. At 960 pages, this was a pretty hefty book and took a few weeks to read, but the read was well worth it.

Anathem is a hard book to describe without ruining the reading experience. I was fortunate enough to read it while having absolutely no idea what it was about, but I’ll give you a pinch of info on it. The book takes place on another world, similar to Earth and populated with beings similar to humans. The author has created several words that are different enough to help you remember that you aren’t on Earth, but close enough to the words you already know that you won’t have to keep a special dictionary handy to look the terms up.

The people of this world, Arbre, and divided into two major groups: the Saecular (the normal everyday people) and the Mathic (the unusually smart scientists). The Mathics are interested in expanding and preserving knowledge, whereas the Saeculars are interested in the same things we are (fast food, cell phones, work).

The two groups get along fine most of the time, and the beginning of the story is mainly character development and new-world acclimation for the reader, but suddenly and (to me at least) unexpectedly, a plot twist is thrown in. Just when you start to get used to the twist, BAM! You find out the twist isn’t what you thought it was.

Anyways, I don’t want to ruin it for you in case you decide to read it. It is a pretty good deal at only $19.77 at Amazon for a 960 page hard cover.

Read More