Subnet validation with Zend Framework

(Note – I accidentally gave conflicting instructions to the person who runs our newsletter. If you are actually interested in the article I wrote about people being silly about dynamicly typed languages you can go here)

I saw on a StackOverflow posting, someone was asking to see how you could use a Zend Framework validator to tell if an IP address was between two addresses. The individual was trying to use Zend_Validate_Between to do the checking. However, IP addresses generally are not checked between two arbitrary addresses such as between 192.168.0.45 and 192.168.0.60. Instead, the check is usually done to validate an IP address against a subnet.

Pre-caching FTW

I just had an epiphany. I’ve talked about pre-caching content before and the benefits thereof before. But this is the first time I realized not only that there are benefits, but that doing it is BETTER than caching inline. Let me sum up… no, there is to much. Let me explain.

Typically caching is done like this (stolen from the ZF caching docs):

Building better PHP programmers, part 2

I have no “findings”, no “conclusions”, but I have some thoughts on my continuing goal to help bad/nominal PHP programmers become better PHP programmers.

The first question I asked is “Is there really a shortage of good PHP developers?” While I didn’t get a specific answer the general jist of it is that yes, there is a problem with finding good PHP developers. Now, some of that may that the people responding ARE the above-average PHP developers and so there can often frustrations in figuring out how to work with developers who don’t yet have the chops that they do.

This week’s book giveaway

This Friday I will be giving away the second (technically 4th and 5th) copies of my book “You want to do WHAT with PHP?” The rules still apply; if you win I will ask you to cover shipping costs. See one of my previous posts on what that looks like.

So, to win

Tweet this posting. I will change it up a little and say that it needs to contain the bit.ly link for this page. I will make the drawing based off of who bit.ly says has tweeted it. The ywtdwwphp hashtag was a little wierd.

Become a fan of my Facebook page and Like this posting. The Like will be how you will be entered. But remember, the winner will be asked to cover shipping costs.

Getting good PHP programmers

One of the interesting conversations I had during Zendcon was while talking to a recruiter. She asked what questions she could ask to help guage how strong a PHP developer is. The best one I could come up with was “name 6 of the 10 variable types in PHP”. I’ve had the pleasure of being able to interview several people for working at Zend and that is usually one of the first questions I ask and I can usually get a good feel for how long the conversation will be after that. It’s an esoteric question but by asking it I can guage a) how well that person knows PHP, and b) how easy it will be for me to work with them. If they know the answer (and correct it) they know their PHP. If they don’t know the answer but get flustered or angered by it, then they will probably be harder to work with.

@DragonBe is awesome

After I posted my slides for use by user groups Michelango van Dam of PHPBenelux posted on the Zend Facebook page that people could use his too. They are CC-licensed so you are free to use them as well. So I asked if he could provide the PPT versions so I could post the full deal for people and he agreed. So here are three presentations that Michelangelo did that you can use for your user group as well.

Free slides for user group meetings

One of the problems I have heard that user groups have had is that it is quite difficult to get content. Some of the larger, or more active ones, may not have as much of a problem with this but a lot of the smaller ones that I’ve talked to do. So what I’ve decided to do is, in effect, open source a lot of my presentations for re-use at user groups. What that means is that if you are looking for content specifically for a user group feel free to use some of my stuff to help you along. No warranty or support will be supplied, and they are provided “as-is”. What that means is that if you see something on there that is weird or perhaps even “wrong” I was probably using it as a keyword or reminder for something I wanted to say. So, if I wrote something that was spot-on, it was intended, if I wrote something that was wrong or inaccurate, I was trying to prove a point. It’s called nuance. 🙂

You want to do WHAT with PHP? GIVEAWAY

I just got my copies of my book “You want to do WHAT with PHP?” today. During my conversations with MCPress, my publisher, I had asked for 3 copies to do a social media promotion and they agreed. I posted that I would be giving away 3 copies on Twitter and got a whole bunch of “I WANTS”. So I asked my publisher for more copies to give away and they agreed to another 6. So that is a total of 9 copies I have avaialble to give away.