Payvment looking for API ninjas

Are you an API coding ninja? Are you enamored with e-commerce and social networks? Have you contributed to or want to contribute to open source projects? And most of all, can you bring it? If so, we want to talk to you!

Payvment, Inc, a growing San Francisco venture-backed startup, is seeking Software Engineers that want to take traditional PHP to the next level by writing best-of-breed, test-driven, object-oriented code. An ideal candidate will challenge the status quo and manage risk proactively as necessary. This position is not remote and will require a high degree of team work and initiative.

Continue reading about this jobs highlights, perks, and requirements after the jump

PHP Without PHP—Automattic

Take a simple PHP trick and follow it on a huge tangent to the philosophy of good web architecture.

Presentation was given as Flash Talk at Automattic Meetup in Seaside on September 2010. Presentation originally a long form, but in the spirit of things, I have cut it down.

Automattic is the company I work for. The company is distributed worldwide and once a year we gather at a remote location and meet face-to-face. This year, all the employees are taking a little time during the meetup to compose and give at least one presentation for each other, talking about any subject we are passionate about.

This is based on a PHP Advent article I wrote almost two years ago and formed a low key presentation I used to give in 2009 at conferences. I thought it’d be nice to give a more “traditional” PHP talk—but one which I felt the audience at large could relate to—at the meetup

I hope you enjoy it.

Update

Tales of Virality—Automattic

Presentation given as Flash Talk at Automattic Meetup in Seaside on September 2010

Presentation is given as an Ignite Talk format (20 slides x 15 seconds/slide = 5 minutes. Autopush.)

Automattic is the company I work for. The company is distributed worldwide and once a year we gather at a remote location and meet face-to-face. This year, all the employees are taking a little time during the meetup to compose and give at least one presentation for each other, talking about any subject we are passionate about.

In the e-mail requesting submissions, Matt mentioned that Scott Berkun “did a very cool post and video on giving ignite talks, so I modelled this talk after that.

Sorry, I don’t have the audio file for this—I forgot to record one!. But this is the only talk that is fully scripted out and I included that with the file. 🙂

Hope you enjoy it.

Update:

Cisco looking for PHP engineer

Kristen sent me this job posting:

Cisco has a small team that focuses on building a hosted social-networking/media platform (Cisco Eos) for media companies and the fans. They are looking for an experienced PHP developer to help lead the technology development of their advertising platform. This is a big opportunity with enormous reach and importance. The platform you help craft will be responsible for monetizing the future of content delivery — and more — for the biggest music artists, TV shows, movies and sports sites in the world. This a fun, start-up kind of mentality team with the backing of Cisco. This project is the direction that Cisco wants to move towards.

If you like to write software that scales, addresses atypical challenges, helps the world be more entertained, and is even revenue-producing, this is a dream job.

Continue reading responsibilities and requirements after the jump.

Learning Programming Part 3: C/C++ superiority

Previously, Part 1 and Part 2.

The other day, Marie pointed me to an interesting article where Jolie O’Dell decides to go back to school to get a computer science degree. She asked me what my thoughts were on some comments concerning the necessity of learning C/C++. I’ll paraphrase in order to avoid singling anyone out.

“Scripting languages create holes in proper programming. All a language, like PHP, will do is make you a PHP programmer, while a language like C or C++ will give you a fundamental understanding that can be applied to all languages and make you a better programmer no matter what the language. This is because these languages expose you to the way the computer really works (instead of abstraction): for instance, how a string is really created, or an array, or dynamic memory allocation. If you learn PHP, you will never bother to learn the low-level reality.”

The above is a munge of many commenters’ discussions.

What do you think of the above statement?
Continue reading my reply after the jump.

Awesome blogging

Earlier this week, Neil Pasricha contacted Automattic about the success of his WordPress blog, 1000 Awesome Things. This is a blog, hosted for free on WordPress.com and it’s very inspiring…

(Read more about it on his blog. Apparently, there is a shout out in the book somewhere around page 400 or so.)

While reading Marie’s post about iPad cases, I came across ∆Temple Bags and noticed the entire site is built on WordPress (WordPress.org). It reminds me of this post four years ago.

People are doing some awesome stuff with blog software. Perhaps you will be inspired (and encouraged) too.. 🙂

Confoo: PHP without PHP

confoo.ca Web Techno Conference

If you are attending confoo this year, I’ll be giving a talk at the beginning of the conference. Even if you aren’t a PHP developer, I think you’ll find the talk useful—as there is no language religion in it. I’ll be pleased if you attend.

It’s going to be a little different from my recent talks (less cussing). Believe it or not, there was a time I used to be a speaker who didn’t resort to scatalogy to get my point across. 🙂 In fact, George once told me that his favorite talk of mine was the first one I gave—nary a cuss word to be found because I was so nervous! This talk is an attempt to return to the more-focused application of philosophy that I had done starting out.

Since my session is in the beginning of the conference, and I’ll be there until I have to leave for SXSW, I’d appreciate it if you still came up to me and talked to me about anything on your mind. Don’t worry, like a terrier (terryer?), I’m all bark and no bite.

I’m trying to reset the way I approach web development and so this may very well be the only conference I’ll be speaking at this year. I’m sure any discussion you have will be worthwhile—even if it isn’t about my talk or web development. Confoo this year is going to be about so much more than PHP, and I’m very interested in new developments on the web, even if it is happening in the Rails community. ;-). Besides, PHP gets nowhere without stealing from our betters. 🙂

See you there!
Continue reading about the post presentation stuff after the jump

Faster PHP fo shizzle—HipHop for PHP

[This post is in progress. There may be a number of errors. Please comment below with corrections and I’ll update this article.]

Facebook announced the release of HipHop for PHP today.

Haiping Zhao

Haiping Zhao
Facebook, Palo Alto, California

Sony DSC-WX1
1/80sec @ ƒ2.4, ISO400, 4.2mm (24mm)

When I left Plaxo, Haiping was the server architect there. Today, he works at Facebook and announced HipHop for PHP. It’s nice to see the world recognizing his talents.

Since apparently, I was the first person to ever publicly spill the beans on HipHop, I need to do penance by clarifying what HipHop is and what it means for PHP.

For those of you who don’t have time to read the rest, here is what HipHop for PHP is:

  • HipHop is a PHP-to-C++ cross-compiler. What this means is it takes PHP code and translates it into C++ code for further compiling. It is not another language. It is not a just-in-time compiler (JIT).
  • HipHop will be open-sourced by Facebook under the same licensing as the respective PHP codebase it sets to mirror. Facebook hopes that the community will improve HipHop and add extensions to HipHop that mirror PHP functionality. Also, it hopes that future PHP core development will code features that would be more amenable to optimizations that HipHop does.
  • HipHop was the current survivor of a number of projects over the years at Facebook to improve the performance of the site. Facebook, as the second largest trafficked website in the world, is built mostly on PHP. HipHop is currently running side-by-side next to many LAMP PHP servers at Facebook and they are claiming an average of 2x increase in performance on those machines.
  • HipHop accomplishes this by surveying the entire codebase of your PHP-based application with a parser and then building out a C++ project based on it. The C++ project then compiles and runs as its own web server. Because of this, Apache and the PHP Zend engine are completely bypassed.
  • In order for this to work, some features of the PHP language are no longer supported. Also, C-specific PHP extensions will need to be translated to HipHop C++ extensions in order for them to run.
  • The benefit in speed is mostly due HipHop’s static analyzer which parses your PHP code looking for ways to optimize dynamic parts into static maps. Because of this, your performance gain may vary — more structured code is rewarded with larger performance boosts.

What HipHop means

If you use some open-source PHP applications on your hosted website, the answer is nothing. You don’t have the ability to compile HipHop, you don’t have access to server restricted ports, etc.

If you are developing a PHP application that currently can be run on two servers or less (or virtual servers in the cloud) the answer is nothing. You don’t have the scale for this to be worth your time.

If you do not have a separate development and deployment environment, don’t have a developer who knows C/C++, or use any PHP libraries where the source is not available (thankfully the encoded scripting market is small to non-existent in the PHP world), then the answer is nothing. You don’t have the development model that can support HipHop. Also note, HipHop has bugs, and—given the state of APC development as a model—will never have true compatibility with PHP. You’ll need some resources to either recode around those bugs or fix HipHop.

If you are a developer of an open-source PHP application, then the answer is not much. Most PHP applications will be deployed in a shared-hosted environment. They won’t be using HipHop.

If you are a shared hosting company, the answer is not much. This is because the HipHop parser needs access to all the PHP in an application in order for it to create a working project. The exception is if you provide software as a service that you maintain (say a static build of WordPress, or a custom site tool written in PHP). You can have HipHop optimize this and get the performance increase.

If PHP is not the operational bottleneck of your web application (your app spends a lot of time waiting on the database, disk, a 3rd party Web API call, etc.), the answer is not yet. At this time, there’s no point in getting a performance gain in PHP. If you don’t know what I’m talking about, your bottleneck is the database. 😉

If you have an application already scaled across many machines, a significant number of them running PHP in processor-intensive tasks, have separate development/deployment, have your entire PHP source code, have modest C/C++ resources, then the answer is possibly. It wouldn’t hurt for a developer there to try a hand at cross-compiling the PHP into HipHop and seeing if it runs. An operational deployment will return about 50% of those machines to a pool for other uses or future growth—or, put differently HipHop will basically double that processing on the same hardware/power.

If you make a turnkey application based on PHP, the answer is somewhat. These are rare, but now you can shrink-wrap PHP into a binary. This isn’t the intended use of HipHop, so some development might have to be done to get this fully supported. Also this is a true binary, not an op-code compile—it cannot run across platforms.

If you are developing a PHP framework, the answer is some. If your framework can compile and run successfully in HipHop, then it should be a good selling point to enterprises in case their application becomes bottlenecked on performance.

If you have highly-cohesive parts of your architecture that fall into above requirements and those parts are weakly-coupled (via API?) to the rest of the system, then the answer is a lot. Those parts can probably benefit from HipHop, and it should be relatively easy to try it.

If you are making a decision on which web language to build your site in, the answer is a heck of a lot. Arguing against PHP for performance reasons no longer holds water. PHP under HipHop will probably now out-benchmark Perl, Python, Ruby and possibly even Java and C#. In practice, you can get the advantages of having a scripting language without operational costs. Moreover, because the target is C++ which is more easy to integrate as a library, if you have a multi-language support, you can now provide C++, Python, and other languages with access to components that have before only been written in PHP (without resorting to a web API).

If you are making an argument to recode your entire site from PHP to some other language, the answer is you just lost that argument. (I never bought the argument of recoding an entire site from another language to PHP.)

There are language features, for better or for worse, that PHP must support and HipHop must not. Because of it’s unique approach to compiling, HipHop will never replace the Zend Engine. Because it doesn’t supersede PHP user-space syntax, HipHop does not and will never change PHP development (much).

HipHop is a showcase. With it the PHP world can point to Facebook as being the busiest site built in a scripting language in the world.

Continue reading about A deeper explanation of HipHop after the jump

Who puts the P in LAMP?

Received this yesterday:

So I’m thinking of starting a new web project and was wondering if I could seek your advice. My tendency is to use PHP since that’s what I know and have used most in the past. Though, after talking to a lot of folks (namely Googlers…go figure), I’ve been encouraged to instead choose Python.

Seeing as you’re my favorite PHP Terrorist I was wondering if you have any specific thoughts on the subject.

I still need to write another article on Python, but the short answer is I think if it’s web, PHP is probably the better choice.

“PHP is the shortest point between two distances on the web.”
—Me, tongue-tied at a talk

However there are some mitigating factors to consider:Continue reading about Python vs. PHP for web after the jump