Software engineering surveys are unintentionally hilarious

So… this was in my inbox today…

Most Loved/Hated Programming languages according to Hired
#PythonIsSexyAgain #NowPictureGuidoVanRossumNaked #SEXY? #NowTryGettingThatPictureOutOfYourMind #GlobalInterpreterLockAmIRight?
#<HTML>IsAProgrammingLanguage</HTML>
#EverythingIsAwesome #JavaCanDoEverything #JavaIsAwesome #NoWaitMaybeNot
#AtLeastPHPIsNumberOneAtSomething
#YouCodeForTheLOLsICodeForTheLULZ
#EveryTimeATabIndentsOneThreeOrSevenSpacesGetTheirWings
#OneTypingToRuleThemAll

(There are many other gems in there, like any good tragicomedy.)

What MVC framework for web development?

Answered in Quora:

Q: Why should I learn the combination of Python/Django rather than PHP, JS/Node? I am a web designer moving to web development. What is the scope of Python/Django?

Python/Django is like learning Ruby/Ruby on Rails. The equivalent in the PHP world would be PHP/Drupal or PHP/Laravel. Equivalents in NodeJS is not Node/JS but NodeJS/Meteor or NodeJS/Sails. In all those examples above the first part would be the underlying web language, and the second would be a MVC framework on top of the language.

(There exist web frameworks that do not provide MVC but just the web server and HTTP request-response plumbing. This isn’t common in PHP since it is embedded in a web server such as Apache or nginx, but in Python it would be flask and in NodeJS it would be Express or Koa— these are sometimes referred to as “microframeworks.”)

However, unlike on the front-end with things like Vue.js, React/Redux and AngularJS, full-service MVC web frameworks have increasingly less utility on the back-end. This is because most the the advantage a framework provides is to do heavy-lifting of tedious but repeatable tasks that require a lot of code (very common when building a user interface) the bulk of which has been moved onto the client in web development. What value is a MVC’s templating system and router when both have moved into javascript on the client-side and all interactions are through an API? This becomes more extreme with standardization of the data interface (a la GraphQL) and the prevalence of more service-oriented architecture popularized by microservices or serverless FaaS architectures.

MVC web-frameworks still provide things such as a configuration management, a data object model and abstraction, but even those can get in the way as a website becomes more mature and this pre-fab approach becomes a hinderance to future scalability and optimization.

Also, when not building to scale or building proof-of-concept, a full MVC architecture will help you starting out on server-side web development because it does all the heavy lifting for you. So it might be good to start out with one, though YMMV (your mileage my vary).

Continue reading about the state of web frameworks after the jump

I’m speaking again!

If you haven’t been paying attention, I’m starting to speak again at PHP conferences. The first one is SunshinePHP in Florida. (I figured I needed to see the Sunshine State again before it all goes under water.)

My talk is going to be a case study on recommender systems. It’s a bit of an odd-ball because it’s not PHP-specific, but that’s because the company I worked at was a Ruby-on-Rails shop. It’s okay, it will still have application and ironically the heavy lifting is done in Python and Go. Lol! Trust me, it’ll be a good talk. Data is an important part of any website and this gets you going into how you can use it without all the bullshit “big data” buzzwords.

I really think you should register for the conference and come see the talk. If you are already going, please stop by and say “hi!” I promise, I won’t bite too much. I’ll be there for the entire event and this time I already have my talk 95% done so I won’t be holed up in the hotel room finishing slides. It’s been much too long since I’ve seen anyone in the community, and I’ve got to earn my place on the PHP terrorist deck.

See you in February!

Running Python scripts on a schedule in AWS

Answered in Quora:

Q: What is the easiest/fastest way to set up AWS to repeatedly run a small Python or PHP script (24×7)?

Probably the easiest way is to use Lambda. It has a built-in scheduler and you only pay for the time it is running. (Note that in PHP you have to create a lambda package using this tutorial or via node Serverless here.)

If you mean continuously, and not repeatedly, then the caveat for PHP at least, it is a bad idea to have it repeat forever in the process because it was designed to be set up and torn down and might leak memory (with the proper setting to set_time_limit and ignore_user_abort, have it run forever). In those cases you would have something else constantly call the php script via command line and restart.

Other than that, whether PHP or Python or whatever, it is better to create a non-burstable EC2 instance and run it, since it will always have some load. You can write something simple to the crontab that will make sure the process is always running or, better yet, use forever.

Old alumni page

One thing I’ll always be grateful to my father for was buying me a lifetime Caltech alumni membership on my graduation.

Dear Terry,

We are writing to share news about your Alumni Website. You may have received this email already, and if so, I apologize for the duplicate announcement. For those that have not received it, we are aware that many of our emails are being caught by Spam or getting lost so we want to make sure you are aware of this news.

We are upgrading the SquirrelMail server to Microsoft Office 365. This means that your alumnus.caltech.edu webpage will not transfer and we will no longer be able to host your site. You will need to transfer any photos or documents you wish to keep. The current alumni server will be decommissioned on December 17, 2018.

If you would like to keep your website address, we are able to provide you with a redirect. This will only provide you with a redirect and will not transfer any documents or photos to your new site. Please fill out this form: Alumnus Website Redirect before December 15, 2018. If you do not have a webpage address ready, we can also create one at a later date.

To log in: please go to: https://alumnus.alumni.caltech.edu/wp-admin
Your website is: http://alumnus.caltech.edu/~tychay/

The Caltech Alumni Association has been working diligently to help support a widely inclusive and connected alumni community.
Thank you for your understanding. If you have any questions, please email us at email@alumni.caltech.edu or call us at 626.395.6592.

Thank you,
The Caltech Alumni Association

First of all, wow, we were using a WordPress install for authentication for a CMS? Since when?

Second of all, I had a alumni page? Since when?

Hmm…

&lt;HEAD&gt;
&lt;TITLE&gt;terrychay&lt;/TITLE&gt;
&lt;/HEAD&gt;

&lt;BODY&gt;
&lt;P&gt; My homepages
&lt;OL&gt;
&lt;LI&gt; &lt;a href=&quot;http://www.pws.uiuc.edu/~tychay/&quot;&gt;Old physics page&lt;/a&gt;
&lt;LI&gt; &lt;a href=&quot;http://guava.physics.uiuc.edu/~tychay/photo/&quot;&gt;Photo Album&lt;/a&gt;
&lt;LI&gt; &lt;a href=&quot;http://guava.physics.uiuc.edu/~tychay/swing/&quot;&gt;Swing Society&lt;/a&gt; (site I designed)
&lt;LI&gt; &lt;a href=&quot;http://phy290p.physics.uiuc.edu/&quot;&gt;Personal Webserver&lt;/a&gt; (intermittent)
&lt;LI&gt; &lt;a href=&quot;http://game1.zipasia.com/actions/&quot;&gt;Adobe GoLive Actions&lt;/a&gt;  (may be moved)
&lt;LI&gt; &lt;a href=&quot;http://www.zipasia.com/&quot;&gt;ZipAsia&lt;/a&gt; (current employer)
&lt;LI&gt; &lt;a href=&quot;http://game1.zipasia.com/&quot;&gt;Zip2Games&lt;/a&gt; (current project)
&lt;/OL&gt;
&lt;P&gt;I&#039;ll consolidate this sometime. It&#039;ll be so 3leet that it will be 4leet!
&lt;/BODY&gt;

Wow, that’s some old shit. I must have done that over 18 years ago. None of the links there even work. The days when we used to capitalize HTML tags, which is the reason why PHP functions are case insensitive by the way.

I never did get 4leet status by consolidating all my internet sites. They just all went down the memory hole. I think I’m going to let this one go that way also.

What’s something very few people know about PHP?

Answered in Quora:

Q: What’s something very few people know about PHP?

It is mind-bogglingly popular for web development. That popularity hasn’t diminished even though conventional wisdom says otherwise…

Over a decade ago, I said about 40% of the top 100 websites use PHP — a number I pulled out of my ass — but nobody (not even the Ruby on Rails developers I pissed off) argued with that spurious claim. In 2009, Matt Mullenweg, the creator of WordPress became curious with my claim and did a survey of Quantcast’s top 100 sites — he got almost exactly 40. Even today, among the 10 most important websites, four use PHP as their language of choice — 40% again.

Overall, almost 80% of the internet is powered by PHP, and that has held steady for years! Newer web languages such as Ruby or NodeJS have only grown at the expense of other languages such as ASP, Java, or Perl.

Just one single application written in PHP, WordPress, is used by over 30% of all websites on the entirety of the internet. That’s more than double the market share since back when I last worked at Automattic/WordPress in 2011! It grew until it saturated its entire market — over 60% of all CMSs. In the CMS market as a whole, PHP-based CMSs occupy positions 1, 2, 3, 6, 7, and 8 in the top 10. The most popular non-PHP-based CMS is both closed source and sitting at only a 2.5% share.

It was estimated back in 2009 that there were 5 million PHP developers worldwide. It’s difficult to make this estimate today, but it’s obvious that that number has also held steady or grown.

These last few years, I’ve been commercially working in Ruby (on Rails), GoLang, NodeJS (for static servers), and Python (Django), but PHP is still also my love in that love/hate relationship.

Come see my talk in February 2019 at SunshinePHP in Florida!

What don’t you like about PHP?

Answered in Quora:

Q: What don’t you like about PHP?

It’s a ball of nails with almost no logic to it. From the perspective of software language design — as Tim Bray, co-creator of XML and at the time Directory of Sun Microsystems’s Web Technologies division, once said — “PHP is soul destroying.”

To take one of the most notorious examples: strpos and in_array.

In one, the order of variables is $needle, $haystack in the other it is $haystack, $needle. I challenge even the best PHP developers to remember which it is without a reference. Also, even though they both serve the same purpose they return different things and don’t obey a consistent naming convention: they should be named strpos/arrayin, posinstr/inarray or `str_pos`/`array_in`. That’s three terrible design choices in one single example!

Another example is the namespace separator in PHP is what is an escape sequence everywhere else \\. Why? Because by the time PHP added namespaces, they had run out of ASCII symbols for the lexer.

I could go on and on, but I won’t.

I love the language sometimes because I hate it so much. 😉

Come see my talk in February 2019 at SunshinePHP in Florida!

After being constantly bothered by your automated help

Let’s just say when my phone buzzes at 10:30pm and again at 12am. I turn into Statler or Waldorf

Dear DoorDash support,

I did not do this support request. I’ve never used your service. (I believe many at a previous company I worked at would use you when catered lunch wasn’t ordered that day, but I’m among those that subscribed to the theory of “Learned Laziness.”) In fact, initially I thought this was phishing or spam because we have no previous business relationship or customer interaction.

If the person who whined to you to create this support ticket provided a phone number or other contact information —which I’m sure they did if there was a real order attached — please contact them through that order and tell them to not mistype their email in the future. I can understand how not receiving their hot pockets or whatnot on time can be stressful (in my younger years I’d have probably blown up for less if ordering-shit-from-my-iPhone-because-I’m-too-lazy-to-walk-downstairs were a thing), but that’s no excuse for not double-checking what one is typing in the contact field(s).

If I keep receiving these e-mails , I’ll simply train my mail filters to ignore and and all future e-mails coming from you.

I wish you all the best! Thank you.

terry

P.S. There is an apostrophe in “youve.” I normally wouldn’t mention it, but it’s in e-mail template you have probably sent out more than 10 million times and I’d have think it’d be a little embarrassing that the $970 million in venture capital you took in didn’t pay for a spell-checker.

Begin forwarded message:

From: “support@doordash.com” \<support@doordash.com>
Subject: Thanks for contacting DoorDash Support!
Date: September 17, 2018 at 10:30:31 PM PDT

Hello,

Thanks for contacting DoorDash!

This email is to confirm that we have received your request. Our team will be following up with you shortly.

If you do not receive a response within the next 48 hours, please make sure to check your spam or junk folder to ensure our messages can reach you.

In the meantime, check out our Dasher Help Center! We have curated answers for your most asked questions.

Your reference number is xxxx.

Sincerely,
DoorDash Support
DoorDash Help

Begin forwarded message:

From: “support@doordash.com” \<support@doordash.com>
Subject: DoorDash Inquiry
Date: September 18, 2018 at 12:11:54 AM PDT

Hi ,

Thank you so much for reaching out to us regarding your inquiry. We’re happy to look into this for you; however, we need more information regarding the issue/concern you’ve encountered.

In line with this, can you please provide us details of your inquiry, the name/email on the account so that we can have it checked and verified from our end!

Hoping to hear from you soon,! Thank you for your patience and understanding in dealing with this matter.

Take care and be safe!

Your reference number for this request is xxxx.

Best,
Allan
DoorDash Support
DoorDash Help

ref:_00D1aKEiH._5001ajJUcj:ref

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.