Which has better packages, Python or PHP?

Answered in Quora

Q: Which has better packages, Python or PHP?

It depends on the target utility. In the Python world, the most common package installer is pip; the PHP world didn’t settle on a dominant format/installation for packages until composer, and that was relatively recently (last 4 years).

The reason for this is because PHP is a language almost exclusively designed for websites, and the economy of the open-source world has found that a dedicated application, instead of a framework or library could serve the bulk of most commercial needs. For instance, a single application, WordPress, four years ago (2014) accounted for nearly 20% of all websites and 50% of all blogs. There is little need package management when a single download and install (or a single click during ISP/hosting account creation or visit to site like Bitnami) can set up everything a typical website might need, fully under your control, with its own package infrastructure (plugin and theme ecosystem) where the underlying language (PHP) is pretty much irrelevant to the user.

Other languages like Ruby (with gems) or Go (import) or Javascript (with npm) which matured later and are more general purpose had a more robust package management and installation system. PHP Composer, in fact, is most modeled on npm.

Python, like Perl, predates these languages, but its general purpose demanded package management early in its development. However, because of this, pip takes less advantage of web conventions that npm does. Python has the added headache of version compatibility with its core runtime. Still pip is perfectly workable and relatively seamless and easy to use.

So which has better packages? The answer is it depends on the domain. In nearly any language you can find an adequate package for any of your needs, but overall you will find the packages are higher quality, more up-to-date, and sometimes just better overall in the domain the language seems to target well.

In my opinion, packages for data science/AI/ML applications, Python packages are second to none. As a PHP expert, I wouldn’t even bother looking in Composer for them and would instead find a PHP extension that binded to a dedicated engine optimized for the problem area or write a dedicated solution/web service in Python/flask and call it from PHP. If, for some crazy reason, I needed to do this entirely within PHP, I would search for the best solution in Python and see if someone has a port for that in PHP.

I would expect the same in DevOps for Python, but right now that space, like blogging (WordPress), seems to have dedicated solutions where a domain-specific language has abstracted one from the language-specific package management solution. For instance, in the configuration management space the top four applications are: Puppet, Chef, Ansible, and SaltStack. Of those four, I believe only one (Chef) exposes the underlying language (Ruby), and it does this to the DevOps engineer no more than WordPress exposes PHP to a blogger.

For server-side web-based packages, I feel PHP and Composer are going to have a solution for any problem PHP itself is capable of solving. That is a restricted set, however, as more and more work for web applications is being done on the client-side in Javascript and there is already an adequate toolchain for that (as well as a package management system in npm). Other web-based languages will probably have adequate solutions in this space with decreasing order/quality: Ruby (on Rails), Javascript (NodeJS), Python, Go, Perl, Java… The web problem is now pretty discovered at this point so there is less a need to adopt the bleeding edge in the web problem.

In with a bang, and out with a burrito

In the crossfire between the landlord and the city, Automattic got [evicted][evicted] from their home on Pier 38 on Friday.

At the end of every week, some of the [Automatticians][automatticians] have been having #burittofridays, so they made one last burrito run before closing the doors. As Beau, put it, “We came in with a bang, and out with a burrito.”

P9306488

In with a bang…and out with a burrito
Pier 38, South of Market, San Francisco, California

Olympus E-P2, Lumix G HD 14-14 f/4-5.8 OIS
1/320s @ ƒ9, iso 200, 19mm (38mm)

One of the advantages of working for a distributed company is that now that we are homeless, we’ll simply be working from home. The Bay Area crew won’t get to see each other each week though. 🙁

And here is one last parting shot from [our fearless leader][matt]:

Our fearless leader

Our fearless leader
Pier 38, South of Market, San Francisco, California

Olympus E-P2, Lumix G HD 14-14 f/4-5.8 OIS
1/400sec @ ƒ8, iso 200, 103mm (206mm)

He leaves us with a bit of= T.S. Eliot:

> We shall not cease from exploration
> And the end of all our exploring
> Will be to arrive where we started
> And know the place for the first time.

I’ll miss you guys.

[matt]: http://ma.tt “Matthew Mullenweg”
[evicted]: http://articles.sfgate.com/2011-09-09/business/30133602_1_evictions-tenants-carl-ernst “Pier 38 deemed unsafe; tech tenants evicted—SFGate”
[automatticians]: http://automattic.com/about/ “About Us—Automattic”

OpenSearch on WordPress.com

A couple months ago, I did something so small it doesn’t really deserve mention. Nial and I got OpenSearch working on WordPress.com for individual blogs:

Opensearch on WordPress.com

Search of the entire domain has always been working, but this allows you to add a special search for one blog. To activate this, open Firefox (or Internet Explorer), and click on the search dropdown and you’ll see a new entry to “Add your blog name.” Select that.

Maybe I’ll add a plugin to WordPress with this code. I’m not too sure there’s a need though since there are already a couple OpenSearch plugins and this one only works in WPMU and PHP 5. There’s also a couple of WordPress.com-specific features like tags, privacy flags, and blavatar support in this one.

TumblrPad

(Full disclosure: I work on Automattic, which makes software and services in the same space as SixApart.)

Image representing Six Apart as depicted in Cr...
Image via CrunchBase

Today, TypePad announced the launch of TypePad micro, which I found out about from John Gruber’s somewhat snarky tweet.

This marks the first time (to my knowledge) that SixApart is embarking on a free hosted blogging service, so it was definitely worth a look, especially given some of the things we’ve worked on, have recently got working, and will work on at here at Automattic. Besides, free is the price I like 🙂

Registering for a new account (especially with the Facebook Connect integration) was so easy, I thought, “Wait! Where is my Staples button?

 

It only took seconds to create this blog using the default look and feel.

The blog, though there is some confusion as to the URL, has an aesthetically pleasing layout. It certainly seems to share a lot of influences from Twitter, WordPress P2, Pownce, etc. but the biggest influence has to be Tumblr.

Continue reading about Thoughts about TypePad micro after the jump

Vivanista

(Disclaimer: I work for Automattic which contributes to the development of WordPress, WordPressMU, BuddyPress, and bbPress.)

At this month’s Bay Area WordPress Meetup, there were four interesting talks. One of which wised me up to the Zemanta WordPress plugin, which I’m using now, any content creator (or Another Search Startup) should check it out—it’s quite clever.

But the presentation I want to focus on in this article, was Annie Vranizan’s Vivanista demo.

The Vivanista homepage

Vivanista is a social network for women focusing on philanthropy. Even if you don’t have a passing interest in such things, the website deserves a look, it’s quite an attractive website and built in record time—a couple of months.

Being a vertical, this is mostly the territory of white-label social networks, and more recently, Facebook. In fact, if you look at their team, it reads more like a group blog than a company.

That’s because it is.

What makes Vivanista so interesting is that it is built on WordPress MU blog publishing platform in combination with Andy Peatling’s BuddyPress plugin.

Continue reading about More about how Vivanista was created after the jump

Lolcats can never be FAIL'd

Last month, my friend and fellow kimchee-eaterM.J., had three books sent to me. FailNation, How to Take over Teh Wurld, and Graph Out Loud. That’s important that I have friends like her because I’m usually the last to know about the latest memes.

Three new books and their respective websites: FailBlog, ICanHasCheezburger, and GraphJam.

I mention this because if you happen to be in San Francisco today at 6:30pm you really need to go to the book launch party. I came to get their last book signed:

I’ll certainly be there in order to get the books signed (and then give them away later, like I did last time).

Ben Huh signing their first book.

See you at the party!

(Full disclaimer, I now work for Automattic—though I didn’t at the time M.J. sent me the books. ICanHasCheezburger, GraphJam, and Failblog are VIP customers of WordPress.com.)