Currently browsing php


Goals for 2008

Fri, 4 Jan 2008 4:38 UTC

Yesterday, Cal Evans blogged about his goals for the New Year, and a lot of them sound like the same things that have been going through my mind as my own personal goals. Well, I normally don’t make resolutions, and when I do think of things I want to accomplish, I almost never write them down or keep track of them, which inevitably leads to failure.

So, this time, I’m jotting them down here as much as a way for me to keep track of them as it is for me to share with others. Many of these sound like echoes of Cal’s post, so I apologize. Get over it.

  • Lose 20 lbs.
    As Cal mentioned in his post, this is invariably the New Year’s Resolution of resolutions. Back in 2006, I did manage to lose 20 lbs. using Weight Watchers online. However, I’ve gained about 10 of those pounds back, and, so I’d like to lose 20 lbs. and get down to my ideal weight.
  • Work out and eat healthy meals
    This follows closely along the heals of my resolution to lose weight. It’s all part of a healthier lifestyle that I’d like to adopt.
  • One blog post per week in 2008
    This is a direct echo of one of Cal’s goals. In my mind, I was thinking that I’d like to do at least two posts a week, but I don’t think I can commit to that, so I’m going to try for one post a week. This isn’t something that I have to do, but something I want to do, especially since I do have a lot of topics always running through my head to blog about. I just need to put forth the effort and make the time to write.
  • Write one new article per month
    Now, I’m beginning to sound like I’m copying Cal’s post entirely, but it’s true. This is a goal that I’ve been mulling over for some time now.
  • Be a active contributor to the PHP project
    This year, I would like to step up my contributions to the PHP project by contributing more to the documentation, working on several PECL extensions, and submitting some patches to the PHP core.
  • Jumpstart a variety of PHP community projects
    There are a handful of PHP community projects in which I am involved that are somewhat stagnant. I want to do my part to get them rolling, active, and healthy again.
  • Learn a new language
    I have my sights set on German. By the end of this year, I’d love to be able to carry a simple conversation in German.
  • Be more organized
    I used to carry around a Moleskine notebook. Actually, I still do, but I rarely write in it, and I find it a difficult instrument to organize my notes and ideas. Instead, I’ve created a personal wiki in which I’ve begun logging thoughts, notes, TODOs, scrap writings, research, etc. I want to expound on this and continue to record my observations and use the wiki to help organize my life.
  • Kill my TODO list
    I have a TODO list a mile long of things that need to be done around our house/yard. I want to finish up everything on the list this year.
  • Pay off debts and begin investing
    To this end, I’ve already opened up some high-yield investor checking and brokerage accounts, and I’ve been working to make a dent in my debts. By the end of the year, I want to have most of my debt paid off, and I’d love to have a clear investment plan in place.
  • Work towards finishing my Masters
    Finally, I started a Masters in Applied Computer Science program a few years ago, but I never finished. I’d like to return to school later this year and begin working towards finishing my degree.

    So, those are my goals. They seem pretty daunting at this point, but at least I’ve got them jotted down somewhere, and now I can keep up with them. In a year, I’ll check back and see what I was able to accomplish. I hope I’ll be able to say I met all of my goals, but only time will tell. I’ll need to quit being so lazy first. :-)

    Comments 7 Comments »  Permalink Permalink  Tags Tags: , ,


PHP Advent Calendar

Wed, 12 Dec 2007 16:33 UTC

I thought I’d take a quick moment to promote myself by making a meta-post about Chris Shiflett’s latest PHP Advent Calendar entry from me.

I’m often asked how one can get involved in the PHP community, so I decided to write my entry about just that, offering suggestions for how one can get help from the community, get connected to the community, and get involved in the community by giving back.

Credit for the idea goes to Brian DeShong, who recommended I write it. Thanks, Brian! :-)

I hope you’ll find a way to get connected and involved in, in what is my opinion, the greatest community of any programming language.

Happy Holidays and Merry Christmas!

Comments No Comments  Permalink Permalink  Tags Tags: , ,


Funcaday.com Dashboard Widget

Tue, 11 Dec 2007 17:29 UTC

» Download the Widget Now!

NEW RELEASE! I’ve released version 1.1 of the funcaday.com dashboard widget. This release provides for better interoperability with Paul’s service and uses his new JSON interface instead of the RSS feed.

Last night, I was vigorously attacked by a virus of some sort. My body ached, I tossed and turned all night, and I got no sleep. It was not fun. This morning, taking a sick day and feeling much better with the help of meds, I decided to do something I haven’t had the luxury of doing for a while: catch up on blog posts.

While reading through news and blog entries, I came across a post on Zend’s Developer Zone about Paul Reinheimer’s new PHP Function a Day website. The Function a Day site functions in much the same way as those nifty tear-off-a-page-per-day desktop calendars we all buy for those on our Christmas shopping lists for whom we can’t quite figure out what to get. The calendars are hit-or-miss. The Far Side is always a popular favorite; Inspirational Stories of Left-Handed Leaders not so much.

Paul’s Function a Day, however, is a hit with but one problem: I have to visit the site everyday to see the newest calendar entry. Ick! If I know me—and I hope I know me—then I know I’ll forget to visit the site. Thus, in my sicken and medicated stupor, I decided to do the only logical thing one would do while taking a sick day: write some code!

Thus was born the PHP Function a Day Dashboard Widget for Mac OS X. Now, you can have the Function a Day delivered right to your desktop just like that day-to-day calendar, except this time, you don’t have to remember to tear off the page each day. Enjoy!

Comments 6 Comments »  Permalink Permalink  Tags Tags: , , ,


Microsoft Web Development Summit 2007

Tue, 30 Oct 2007 2:10 UTC

I’m privileged to be in Redmond, WA this week at the Microsoft Web Development Summit. (Special thanks to Glen Gordon for sending me an invitation.) Also in attendance are a good crowd of PHP developers from various backgrounds and experience, including developers from Drupal, Gallery, Facebook, CakePHP, Solar, core developers, extension developers, authors, and just plain PHP programmers. Microsoft has invited us to their main campus in an effort to reach out to the PHP community to solicit opinions and feedback on various technologies, including IIS, Silverlight, their Ajax library, Expression Web, etc.

I’ll be taking time to condense my thoughts and reactions into a single blog post later this week after I’ve returned home and rested, but for now, you can follow along as I take notes on my personal “notes” wiki. I’ve made the conference notes section available for reading to the public. So, you can read my notes for the Microsoft Web Development Summit, if you like.

Comments 3 Comments »  Permalink Permalink  Tags Tags: , , , ,


Zend/PHP Conference 2007

Fri, 28 Sep 2007 3:08 UTC

In just over a week, I’ll be flying to sunny California to attend and speak at the Zend/PHP Conference and Expo. I’ll be giving two talks at the conference: “Give Your Site a Boost With Memcached” and “Mobilizing & Sharing: How the Zend Framework Builds Community for Nokia MOSH.” The former is an updated version of a talk I gave earlier this year in Germany; the latter is a new talk I’m giving with my colleague Brian DeShong, and it’s more or less a case study of Schematic’s use of the Zend Framework in building Nokia’s mobile social networking website, MOSH.

A month ago, I wrote about the unconference being held at ZendCon this year. The unconference is a community space provided by Zend and organized by Patrick Reilly to facilitate discussion among members of the PHP developer community. This space is open to all conference attendees, who are free to schedule a time slot to lead a discussion or give a presentation. This is a perfect opportunity for you if you’re interested in testing the presentation waters by giving your first talk at a conference, trying out a new (or rehashing an old) presentation, or just sharing your knowledge with and learning from others. Be sure to add your session to the schedule soon!

I’ll be giving a new talk at the unconference with the obnoxiously long title “Getting Information About Your Upload Before It’s Finished Uploading or How To Use A Very Long Presentation Title To Otherwise Say I’m Talking About pecl/uploadprogress.” (Look for a blog post about pecl/uploadprogress from me soon.)

Finally, don’t forget about the #zendcon channel on the Freenode IRC network. That’s your place to chat with other attendees during the conference and find out where everyone’s going for food and drinks in the after-hours. In addition, there is a zendcon twitter user. Start following it today to get zendcon tweets during the conference.

Comments 1 Comment »  Permalink Permalink  Tags Tags: , , ,


Lampooning Benchmarks

Wed, 26 Sep 2007 0:43 UTC

When I first came across Jonathan Street’s “7 tips for lightning fast PHP sites” blog post via PHPDeveloper.org, my first reaction was something like: “Egads! These benchmarks are stupid and misleading! These functions are simply aliases of each other. There should be no discernible difference, and any buffoon should realize this fallacy!” This was before I clicked through from PHPDeveloper.org to read his post.

Then, I clicked through to the post, and I was still dumbfounded that Jonathan found marginal microsecond differences between how the functions performed and was advocating the use of one function over the other based on this “data.” I questioned the testing, and I was prepared to dig through the PHP source to write up a post refuting his claims.

And then I did something smart…

I followed a link to his follow-up post entitled “Better Benchmarks” in which he explains that his previous post was a lampoon that “was supposed to be a spoof celebrating the worst aspects of these types of posts.” He went on to explain:

I had thought that with comparing aliases of functions seven times over people would realise what I was doing but apparently my post was just too close to the sad reality and lacking in sufficient humour for people to catch on.

When reading it in this light, it actually is really humorous. He goes on to explain another round of testing he did that was intended to show a more accurate measurement of the results. His findings are not unexpected, and he admits that:

Overall I conclude that there is no statistical difference between the aliases of a function in the tests that have been run. Although this was the expected result I hope that the analysis presented is sufficiently rigorous to discount the possibility of personal bias in the benchmark.

However, for the naysayers out there, I’ll post some lines from ext/standard/basic_functions.c in the PHP source. This should prove that the only difference in these functions is the name itself. All other code is shared. (Note that is_int() and is_integer() are actually both aliases of is_long(), even though the manual prefers is_int()).

PHP_FALIAS(chop,            rtrim,      arginfo_rtrim)
PHP_FALIAS(ini_alter,     ini_set,      arginfo_ini_set)
PHP_FALIAS(doubleval,    floatval,      arginfo_floatval)
PHP_FALIAS(is_int,        is_long,      arginfo_is_long)
PHP_FALIAS(is_integer,    is_long,      arginfo_is_long)
PHP_FALIAS(join,          implode,      arginfo_implode)
PHP_FALIAS(fputs,          fwrite,      arginfo_fwrite)
PHP_FALIAS(sizeof,          count,      arginfo_count)

So, what can we learn from this? For starters, always read follow-up posts, and never take part in function benchmarking wars. :-)

Comments 6 Comments »  Permalink Permalink  Tags Tags: , , ,


SPL Article Published

Tue, 25 Sep 2007 21:08 UTC

Today, Zend Developer Zone published my article on the Standard PHP Library (SPL).

All too often, I think developers overlook the SPL because it appears massively unwieldy and difficult to understand. While it is often difficult to understand due to lack of proper documentation (articles/tutorials/examples), it is not unwieldy. Rather, it’s fairly easy to use… once you get the hang of it. And getting the hang of it requires a good introduction, which is why I wrote this article.

My article was originally intended to be part of a series of articles about features and functionality in PHP 5 that provided a case for adopting/upgrading to PHP 5. Cal Evans, editor-in-chief of Zend Developer Zone, ultimately decided against publishing these articles in a “series” format, but I think the individual articles that were published still fit together fairly well for making a case to upgrade to PHP 5.

The articles are:

Comments 1 Comment »  Permalink Permalink  Tags Tags: , ,


On Being a PHP “Star”

Sat, 22 Sep 2007 15:19 UTC

Last week, during php|works, Andrew Collington quietly sat down with us after a long day of tutorials. He kept his mouth shut, so his presence went largely unnoticed, but his blog was unable to escape the wide range of my ego.

Right now I’m sitting at a table with the likes of Cal Evans, Ben Ramsey, Sara Goleman, and Derick Rethans—all big players in the PHP world. And here I am, lowly ol’ me who does a bit of PHP at work. Wow. I feel a little starstruck (in a geeky kinda way), I have to admit!

Wow! I’m a STAR! Following this realization, this conversation ensued on #phpc:

<CalEvans> :) I'm a bit player in the PHP drama...jsut happy to be on 
           the stage.
<ramsey> same here
<Elazar> Pffft... your names are better known than most of the people 
         in here. :P
<ramsey> I'm known for having a name, though... nothing else ;-)
* ramsey is like the Paris Hilton of the PHP world... without all the STDs
<CalEvans> That would make me Lohan?

Comments 2 Comments »  Permalink Permalink  Tags Tags: ,


php|works 2007: Day 3

Fri, 21 Sep 2007 21:27 UTC

It’s been a week since Day 3 (Day 2 for those on the zero-indexed conference time-table), and it’s high time I got around to writing up my thoughts on the conference…

I arrived late to Sebastian Bergmann’sGraph-Oriented Programming with PHP” presentation, where he showed how to use graph-oriented programming to implement workflows in PHP applications.

Next up was Maggie Nelson’sHow to Optimize a Database Query,” about which others have written nice things. (As a side note, Maggie presented this with live examples from the Oracle command line interface instead of using slides—a difficult and risky way to present, but she pulled it off flawlessly.)

After that, I sat in on Ed Finkler’sIntro to Code Igniter” presentation. As a minimalistic framework (which I love), Code Igniter appears promising, but I was a bit disappointed to see that it makes attempts to be supported on PHP 4, so there are no advanced OOP techniques being used.

The highlight of the day came next with Terry Chay’s new talk “The Internet Is An Ogre: Finding Art in the Software Architecture” where Terry was his typical self, dropping the f-bomb and pointing out where popular books are dead wrong. I look forward to watching him present this again at ZendCon and seeing how it’s evolved by then.

Finally Chris Jones and Ed Finkler rounded out the day with “Next Generation Database Applications” and “Securing the PHP Environment With PhpSecInfo” (respectively).

In all, this was one of the best PHP conferences I’ve attended. I agree with Ed, who said, “php|architect conferences lack pretension, and that’s really nice—it’s about the people and sharing knowledge.” This really was the case. And there wasn’t a time slot that I couldn’t find something of interest to attend; all the speakers and topics were interesting and relevant. Kudos to the folks at php|architect for having the discernment to select excellent presenters/topics!

There was one thing, however, that was a shame: although the event was held in Atlanta, there were few locals in attendance. I counted about five or six from the Atlanta PHP user group, but apart from that, I don’t know of any others from Atlanta who attended.

Atlanta PHP developers: you had a PHP conference in your backyard, and you missed it! What a wasted opportunity!

Comments 1 Comment »  Permalink Permalink  Tags Tags: , , , ,


php|works 2007: Day 2

Thu, 13 Sep 2007 22:03 UTC

Even though today is officially “day 1” of php|works, I consider it “day 2” because I spent the majority of yesterday (six hours of it) standing and talking to a room full of people about topics they need to know to pass the Zend Certification Exam. It was a tiring day, and my lack of sleep and trek through two hours of Atlanta rush-hour traffic didn’t help. Still, I made it through the day, I think the tutorial was a success, and I hope that those attending who took the exam yesterday or today passed with flying colors.

Today began with Andrei Zmievski’s keynote entitled “The Future: PHP6,” or “Im in ur endginn, playin wif ur stringz.” Here are a few notes I gleaned from his presentation:

  • Unicode is so simple you could probably explain it to Paris Hilton, or Miss Teen South Carolina might be able to explain it to you.
  • PHP6 = PHP5 + Unicode, PHP5 = PHP6 – Unicode, Unicode = PHP6 – PHP5
  • mojibake: phenomenon of incorrect, unreadable characters shown when software fails to render a text according to its associated encoding
  • “APC is the best thing to happen to PHP since Rasmus stopped working on it single-handedly.”
  • “Ask yourself: Can I live with PHP 4? Until 8/8/8? If yes, you’re done. Thanks for playing.”

    Afterwards, I supported my colleague, Maggie Nelson, by attending her talk, “You Don’t Need A DBA.” I had the opportunity to see a preliminary version of her talk, and while I enjoyed the preliminary version, she had vastly improved it with great examples and information.

    After Maggie’s presentation, it was my turn to give my talk “Designing RESTful Web Applications.” The slides for this talk are already available on my site.

    Due to some unavoidable distractions from work, I had to miss the lunchtime keynote, “PHP 4 is dead! Migrate your code,” delivered by Chris Shiflett. This was unfortunate because I was apparently featured in all my drunken karaoke glory on one of the slides. Now, I’ll never know how I helped to convince people to transition from PHP 4 to PHP 5.

    The highlight presentation of the day, though, was perhaps Sara Golemon’sHow PHP Ticks.” In this talk, Sara explained how the PHP engine converts PHP code into tokens, which get further converted into their opcodes that the Zend engine then runs. It was very informative and not at all dry, due mostly in part to Sara’s sense of humor and presentation style. Two big take-aways from this talk:

  • Use token_get_all() to get all the tokens in your script