DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for 20+ years into my career, I still love PHP and Javascript
Manuel Odendahl
Manuel Odendahl

Posted on • Updated on

20+ years into my career, I still love PHP and Javascript

Over the last twenty years, I have used over a dozen languages professionally, from C to Common Lisp, from Java to Python, from C++ to Typescript.

Yet, I love janky programming languages. In particular, I really enjoy PHP and Javascript.

Here's why.

They are used by people who get shit done.

This makes it easy to find people who:

  • understand business needs,
  • can iterate quickly
  • have shipped and maintained many projects in the past.

There is a lot of FUD that has been cargo-culted throughout the years.

PHP8 is not your grandmother's PHP3, ECMAScript 12 is not your grandfather's Javascript.

Their ecosystems haven't stood still either. Tools like CPAN, PECL, npm have put significant evolutionary pressure on other languages. With its daily new paradigms and frameworks, Javascript has been a hotbed of innovation for years.

Their quality is offset by other factors.

These languages are not popular for their elegance, but for other reasons.

These can be:

  • speed
  • ease of deployment
  • malleability
  • tooling
  • community
  • frameworks
  • platforms

PHP is a favorite of mine because of its cgi-bin model:

  • legacy codebases can be refactored in pieces
  • resource leaks are non-existent
  • caching and scaling are simpler

They are fun.

Because basic areas of the language are problematic areas means that programming comes with a sense of experimentation. There is pleasure in finding ways to write elegant code in a language that doesn't prescribe any.

Janky programming languages are great equalizers.

Because they are quite permissive, they allow people of all levels and backgrounds to get started with programming. You can be a complete PHP beginner and get a real website going within days.

Having started by copy-pasting BASIC snippets and later on making my own websites with PHP2 and PHP3, I feel pride in being able to pay back by helping newcomers where they are.

Poo-poo-ing a 12-year-old or a recent BootCamp graduate because they are writing actual code is missing the point.

In fact, because users are builders and learners because they have diverse backgrounds, janky languages tend to have very active and welcome communities.

I never had issues writing good code.

PHP, Javascript, Lua, Perl all provide effective tools:

  • functions
  • variables
  • classes
  • first-class functions
  • sometimes traits and prototypal inheritance.

Good software is:

  • product alignment
  • software design
  • naming and design patterns
  • enforcing invariants through static analysis or unit testing
  • providing fast and effective feedback loops to developers
  • good team communication

None of which depend on the language.

Javascript and PHP in particular come with:

  • solid libraries
  • pragmatic static analysis tools
  • great IDE support

In fact, they have better tooling than many a "serious" programming language.

I love legacy codebases.

A legacy codebase means that the product is performing well. It means that I can often make immediate and impactful improvements.

For me, nothing comes close to the pleasure of improving a product with many users.

(Cover Image: CC BY-SA 4.0 - Jcak - Wikimedia)

Top comments (4)

Collapse
garrett profile image
Garrett

I started my webdev journey w/ PHP but kept reading all the hate and stopped learning it. I tried lots of other things over the years and nothing stuck. Now I'm back to programming and decided 'forget the haters' and I'm using PHP and having fun and getting stuff done.

Collapse
pedrocarrasco profile image
Pedro A. Carrasco Ponce

I am working with PHP since 2000. I use PHP and Javascript in web development, also I use Java, but for me is faster to start a project in PHP than in Java, and the project scales and performs as well in Java as in PHP. Now there are frameworks like Symfony that are like Spring in Java (the same patterns apply), tools like PSALM and a big community and documentation. For me, PHP is a good choice and Javascript also (I use Javascript in both back and front with Vue in front and NestJS in back)

Collapse
koas profile image
Koas

100% agree! I started writing server side code around 1999 with PHP because it looked like C but didn’t have all the C cgi quirks, many years later I stick with it because I get things done fast. That’s all that matters to me πŸ™‚

Collapse
wesen profile image
Manuel Odendahl Author

I am fully prepared for the PHP backlash!

🌚 Life is too short to browse without dark mode