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.

Light L16

After over two years of waiting…

The Light has arrived
Sab Francisco, California, United States

Apple iPhone X, Apple iPhone X back dual camera 6mm f/2.4
Live photo thumbnail

The CFL bulbs in the background are because a Phillips Hue kit arrived on the same day.

Around ten years ago, Hubert told me about a new light-field camera technology that he saw demoed. When that was productized as the Lytro camera, I pre-ordered it. After a bit of thought, I cancelled my pre-order. Why didn’t I do that this time?

It’s because back then, I thought original Lytro was marketed for non-photographers and capturing light fields meant that it would be a long time before it was ready for serious photography. This time, even though the L16 is poorly marketed and may flop, I sincerely feel that this camera is meant for someone like me.

It’s worth a shot (pardon the pun).

Continue reading and seeing a few photos after the jump

Tijuana

From my aunt’s e-mail thread.

I sent this photo to Francis already but I thought you may like to take a look. It was taken in Tijuana, Mexico during my freshmen year at Berkeley. Francis wanted to eat authentic Mexican food and bought something from a food cart vendor. He kept enticing us with smacking and yum-yum noises as he ate.

Then that night he was visited by Montezuma’s revenge.

Tijuana.jpg

My uncle, my aunt, and my mom.

KEN:
Hi-larious!

Voting in America redux

I wrote about voting in a historic election eight years ago. Since then, California has become more blue, there are even more political fliers, and the only thing the left wing can seem to agree with the CAGOP on is what this state needs is even more propositions on the ballot.

Even though, back then, I strongly suspected I’d be casting this vote eight years later for Hillary Clinton, I didn’t realize how this day would hit me.

Marie got dressed in a pantsuit and we walked across the street to the community center to vote. Unlike me, she was homeschooled as a Christian conservative and voted for George W. Bush in 2004—her vote is more meaningful than mine.

Marie voted in her pantsuit

But my vote wasn’t mine, it was Mom’s—not to celebrate or affirm women’s right to vote or anything like that, but because I love her, she always admired Hillary Rodham, and, most importantly, because she only would go to the polls to cancel out Dad’s vote. ?

Not this time! I called Dad yesterday and he said he’s with her—quite possibly his first vote for a Democratic candidate for President of the United States, definitely his first vote for a woman for that position.

I started blogging with the purpose to “write to create context for another to think” just after argument with my father about politics in 2004. He said:

“Nobody said democracy is perfect. It’s just the best thing we’ve got. Terry, maybe you’re right, and I’m wrong. But if you are, then have some faith in our system that the truths will come out. Have some faith that people can change. They just don’t have to change on your timetable.”

I honestly never thought Dad would change. But my father, with his vote with mom now, and a lifetime of past votes against, finally won an argument with “mom’s lawyer”: I have faith, and people can change.

No matter the outcome, this election reaffirms that faith in the conversation that is our democracy.

One Bad Hombre and one Nasty Woman (in a pantsuit) went to the polls and voted!
San Francisco, California, United States

So lucky she and I can split the workload of sifting through all those ballot propositions. Now that’s love. ??

I don’t care who you support, if you can vote, Vote!

NaNoWriMo 2016

Ever since Marie wanted to learn to program in 2009, I’ve wanted to write a book to help her. But I never could get started.

The National Novel Writing Month is November every year for just this purpose: to motivate people to put 50,000 words on paper (about the size of the novel, Slaughterhouse-Five), editor be damned.

I first heard about it in 2007, when I started using Scrivener, but dismissed it because the requirement that a novel be fiction. I only just found about NaNo Rebels, which allows you to customize the “50,000 words” into nearly any other creative exercise, including non-fiction. So yesterday, this was born:

NaNoWriMo 2016 Participant Badge

Nowadays, I use Ulysses. I simply created a group in the software and set a 50,000 word goal and started typing away!

NaNoWriMo 2016 Day 2

Goal setting on my iPad.

I don’t know if I can finish since it’s about a good sized blog article each and every day. We’ll see how it goes. So far it’s been a bit strange writing a book. For instance, I can’t use my WordPress shortcode macros lest I ruin the word count.

Periodically, I’ll dump the output to my blog, which you can track here. Wish me luck!

If you want to buddy up, I’m “tychay” there.

Us in Korea

From my aunt’s e-mail thread.

Here is family photo sans Aboji. I sent you this photo of us in our Seoul house in 1954. We had a large spacious house with tatami mats, heated floors and a large yard with a garden. Surrounding it was a cement wall for privacy. The back of the photo gives our names and ages. (The ages are Korean ages, meaning it is one year older than it is here in the western world).

Francis Ree Family

Clockwise from the top left: (Hay In) Francis 19, (Shin He) Teresa 17 (my mother), mother (grandma), (Jung He) Jeanne 9, and (Ju He) Bernadette 20.

Continue reading the discussion thread after the jump

@Tay.AI predicts the next Pulitzer

I love articles like this. After all, I’ve been saying for the better part of a year that Donald Trump is Microsoft Tay made flesh and stuffed into an ill-fitting suit:

Note to self: Add Sanjiv Rai to this tool and this one to list of people that we won’t have to hear anything about ever on November 9.

I seriously wonder how these reporters find these whack-a-loons, because they deserve whatever the Ig Nobel-equivalent there is for a Pulitzer. Who knew there is such a large market for liberal bed-wetting? 😀

Article in U of Utah magazine

From my aunt’s e-mail thread.

It’s a page from the Alumni magazine

article in U of Utah magazine.jpg

KOREAN FAMILY MAKES MANY SCHOLASTIC ACHIEVEMENTS

Reminiscing with musical records from home on the family stereo set is the Dr. Alexis Taikyue Ree family, 228 Douglas Street. Dr. Ree came to Salt Lake City 12 years ago as an exchange professor at the University of Utah. During the Korean War he lost contact with his family, who finally joined him six years later. Left to right, they are Bernadette, 25; Teresa, 23; Joan, 15; and Dr. and Mrs. Ree.

Many requests come to the Ree family to describe and model their native costume which they wear only at such occasions. Both older girls are working toward a doctors degree at the University. Bernadette is a psychology major, Teresa is studying chemistry. An older brother, Francis, has his Ph.D. and is working in atomic research at the University of California in Berkeley.

Dr. Ree worked with Dr. Henry Eyring, now Dean of the Graduate School at the U., in 1939-41 at Princeton University. A native of Korea, Dr. Ree graduated from and then taught chemistry at Kyoto University in Korea (ED: in Japan). After World War II he was invited to return to Korea where at that time he became dean of Arts and Science at the University of Seoul (ED: Seoul National University).

Mrs. Ree, from one of the oldest Catholic family in Korea, reports interesting stories of martyrdom in her ancestry. In America as in Korea, she is strictly a housewfie and mother. All four of the children were born in Korea (ED: two were born in Japan). Joan is a freshman at Judge Memorial High School and has taken piano lessons since she was seven.

At the International Atomic Energy Conference in Vienna, Austria, in October, 1960, Dr. Ree received this significant medal form the Korean Government. The Korean National Academy Award, it was presented for his research in chemistry kinetics (the behavior of molecules and atoms) and for his research in plastics. At the time Korea sent a delegation to honor him.

Continue reading the discussion of the article after the jump