Honestly, after having used most of the languages at my disposal for past 22 years I've been doing this job - they were nothing special compared to PHP (or PHP compared to others).
You still have to figure the problem out before solving it with algorithms. No language or framework will help you do that.
I'm keen to hear why there are comments that demean one tool and elevate the other, when in reality - they're all just programming languages.
Don't get me wrong, but you don't seem interested in discussing, you rather appear to want to show how right you are without iota of PHP knowledge.
Since there's no dialogue here and you appear to be yet another code plumber, I'll bid you farewell and I wish you all the best in your career.
> If you're writing a program that only has to do something very simple, like number crunching or bit manipulation, you may as well use a less abstract language, especially since it may be slightly faster.
In your opinion, what percentage of web applications do you think are non-trivial?
And for what it’s worth, nobody chooses PHP because of the language. That’s not the selling point. The selling point is the development paradigm/runtime. It’s dead simple.
I recently started a small web project using the SAFE stack:
https://safe-stack.github.io/docs/quickstart/
I urge you to follow that QuickStart yourself (it only takes a minute or two).
Assuming you were actually able to build the project, now, look at your project structure. How many directories do you have (11)? How many files (15510)? Think about how much knowledge is required to understand what’s going on (if you’ve never touched F# you are probably lost).
What does this QuickStart app do? It is, I kid you not, a “Todo list”!
I could write an almost exact clone of this app using PHP in exactly 1 file. No configuration scripts. No build suite. No 3rd-party packages. No CLI commands. Just 1 PHP file. Thats why people choose PHP.
I agree, I've coded in PHP/Python/Ruby/Perl/Bash for many years. All languages have there own place if you can code!
Spend less time comparing lanuages and actually code something!
I am not saying that you are dumb. I am saying that your values clash with my needs. This clash is so strong that I predict that if I again try to program professionally in php and its frameworks, the interaction would again have a disastrous impact on my mental health, my livelihood, and my marriage.
-----------------------------------
Let's suppose you enjoyed baking bread, but someone rejected your work and told you that gluten gives them terrible intestinal pain. You would have a choice:
1. Conclude they're being overdramatic and be offended by their rejection.
2. Believe their self assessment, move on, and continue with your craft.
-----------------------------------
(They would have a similar choice whether or not to come into a threat about baking and yell at people about gluten)
> Let's suppose you enjoyed baking bread, but someone rejected your work and told you that gluten gives them terrible intestinal pain
Both these examples are ones where the problem isn't the tool, rather, the person using it. It's not really PHP (or the bread) being critiqued is it?
----------------
If an RJ45 connector won't fit into a USB-A slot, what is the problem?
A. The RJ45 connector B. The USB-A slot C. The action of trying to fit one to the other
----------------
If a straight man is married to a lesbian and their sex life is terrible, what is the problem?
A. The man B. The woman C. The attempt to force a sexual relationship over a friendship
This is wholly unrelated to the quality of the tool itself or the other practitioners who choose to use it. It is therefore a bit offensive that the conclusion you draw is that developers who use PHP must have a deficit in their ability to work through problems.
The “problems” do not change based on which language is chosen to solve them. That is, if you actually understand the “problems” in the first place...
That is distinctly and meaningfully different from what I said.
I did not say PHP developers have a deficit. I'm saying the PHP community has certain values and approaches problems with a certain perspective.
I see PHP developers as those whose perspective does not highly value the interaction between how a tool is shaped and its users ability to use the tool to think through problems. A programmer with this perspective might say that a tool's usability in a context is wholly unrelated to the quality of the tool itself or the community of other practitioners who choose to use it.
What are those values and what is that perspective? Your argument is getting rather hand-wavy. I'm not entirely sure what I would be arguing if I attempted to disagree.
Without a more concrete formulation my current hypothesis is that you are simply disguising your ignorance as projection.
A. The following is not a common perspective among the PHP community: "Problems do not change based on the language chosen to solve them. Inability to use a tool is wholly unrelated to the quality of the tool itself."
B. That perspective has absolutely zero impact whatsoever on the choices of tooling, frameworks, automated tests, and code found in an unknown team's PHP codebase.
C. Whatever impact that perspective does have on the differences between a Python codebase and a PHP codebase will not meaningfully impact the productivity of /u/afarrell.
D. Therefore, it cannot be the right personal choice for /u/afarrell or another developer to avoid PHP. Do not leave money on the table for /u/kingdomcome50 or /u/tux.
------------------------------------------
If your response to this is "Huh? Sure, whatever. Different people are different. Make your own personal choices. It's a free country." then that is 80% of my point.
The other 20% is: Lack of self-knowledge and the inability to give/take a rejection will lead you to do things that are not healthy for you.
Don't eat lasagna if you're lactose intolerant.
Can we please stop acting like 'I do not want to write code in X language' is a personal attack on the intelligence of those who _do_ work in X language?
The question:
> When I read comments coming from people who don't use PHP which are always negative or condescending, I wonder - how do you imagine programmers who use PHP are like?
Your answer:
> I imagine programmers who do not place a high value on the impact that their tools have on their ability to think through problems effectively
Even in the most charitable of circumstances it's hard to read your words in a way that isn't a slight against someone who chooses PHP. Especially when taken in the context of the discussion to which you are responding. And even more so because you have yet to substantiate (or even define) that claim in any meaningful way.
I have no problem with someone who doesn't like PHP (or any language). I don't particularly like PHP. And you know what? I hate python! But I am not making sweeping generalizations about those who program in python and whether or not they value their "ability to think through problems effectively"[0]. Mostly because that claim would make no sense at all...
It's hard to rationalize your answer above to mean anything like "Don't eat lasagna if you're lactose intolerant", so forgive me when I say that you are the one acting. Hey! I get it. You don't like PHP and you took a cheap shot at it. We all do it. The "PHP sucks" trope is hard to resist! But don't act like that isn't what happened. Have some self-knowledge and take the rejection. It's healthier that way.
[0] or import a file in a sane way :)
Sure.
To define my claim more clearly:
1. There is a set Q (Programmers who believe that tools have a negligible impact on a programmer's ability to use that tool to think through problems)
A set Q's belief in the low impact of tools is expressed by statements like:
- "You still have to figure the problem out before solving it with algorithms. No language or framework will help you do that."
- "you are leveling a criticism at yourself and your own inability to use a tool. This is wholly unrelated to the quality of the tool itself"
- "The 'problems' do not change based on which language is chosen to solve them."
2. There is a set P (programmers who prefer to choose PHP)
3. My first claim is that a member of set P is likely to also be a member of set Q. PHP developers are likely to believe the things that people in this very subthread are saying.
Do you still find my first claim unclear, insufficiently-supported, or offensive?
Your claim is:
1. Such a tool(s) exists -- how can I know?
2. PHP is not one of these tools -- why not?
3. PHP practitioners don't value these tools -- huh?
It's a total non-sequitur.
Your criticism reads as "PHP solves problems differently than how I want to solve them". That is a totally reasonable opinion to hold (many do)! That's not really a reflection of PHP, it's a reflection of yourself. And that's okay! You don't have to like PHP. But it is a little offensive to try to justify your preferences in a way that passes sweeping judgement over anyone who programs in PHP. Especially when your argument insinuates that PHP programmers must have a deficit in their ability to think through problems...
Fantastic. Then I am communicating my intent.
> You have provided nothing to discredit an assertion that no such tool exists
I don't have to. I'm only saying that you think no such tool exists and I think think that (for me at least) such tools do exist.
> Especially when your argument insinuates that PHP programmers must have a deficit in their ability to think through problems...
It only insinuates that if you edit my sentence to remove the words "the impact that their tools have on" from my sentence.
Suggesting that PHP doesn't allow you to effectively think through problems, while certainly ripe for some fleshing out, is very different than saying PHP programmers (other people!) don't value tools that allow them to effectively think through problems.
We call my first paragraph ignorance, and the second projection. Turns out I was right!
At the end of the day any answer to a question asking why people condescend PHP programmers that doesn't dismiss the premise is itself condescending (or at the very least an admission thereof).
> "Why do you condescend PHP programmers?"
> "They don't share my values."
That's essentially your argument. Well... that's not really an argument is it? What are their values? What are your values? Why is one set better than the other? And most importantly, why does this lead to condescension?
The answers to the above, as I pointed out in my original comment, lead to only one conclusion: you've only identified a deficit in yourself.
> any answer to a question asking why people condescend PHP programmers that doesn't dismiss the premise is itself condescending.
If that was the mindset you started with, then my attempt to give a nuanced answer the question was doomed from the start.
> you've only identified a deficit in yourself.
Yes, identified a deficit in myself which, much like lactose intolerance or celiac disease, applies in some situations. This whole thread is additional evidence that trying to communicate with PHP developers about cognitive processes is one of them. The right response for me is to avoid that.
Why don't you provide me with some non-fiction? I've asked repeatedly if you could delineate what a "tool that allows you to effectively think through problems" might look like, but the only answer I have received so far is "I don't have to". Very convincing!
Of course we both know that you won't because doing so would move the concept out of your head (where it is just a prop) into this discussion where, inevitably, it will be shown to be insufficient to your argument. You need to hold onto it because it is the only straw you have left. I understand your unwillingness to be made a fool. You are a poker player who insists they have won the hand, but refuses to show their cards. Unfortunately I'm calling your bluff!
I've had you nailed down on this since your very first comment and here we are, days later, and you have yet to substantiate your claim beyond "I believe it to be true". A true work of cognitive genius! Or is it dissonance? It's always interesting to see which of my thoughts garner a response. I'll take a page out of your playbook and make a prediction myself:
A) You will continue to avoid to substantiate your claim and focus on something else entirely.
B) You will substantiate your claim by providing only criteria to which PHP does not meet (e.g. "multi-threaded") without providing any information as to how those criteria support your premise (essentially arguing "not PHP" in more words).
C) You will not respond at all.
At this point I think you are right. The answer is C! Sometimes you are overmatched and it's best to just avoid the interaction. It's healthier that way. Good luck!
I couldn't say it better myself :-)
I need tools like a programming language which helps me think through the problems more deeply over time and automated tests which help me safely refactor as I learn more about the problems.
I think the PHP community has other priorities driven by other values, like being able to start a project and publish to the web quickly.
I think this means that I personally should not choose PHP.
My subjective analysis is that each language has a niche that if fills nicely: - C - no BS, no runtime, close to hardware. - C++ - a bit further from the hardware, a bit closer to the developer. - Python - glue the two above with few lines of code. Go-to language for "data pipelines". - NodeJS - one code, can run both in the browser and on the server. Go-to language for web development. - Java - one syntax, runs both on Android and on servers.
- C# and Go - vendor-evangelised languages. Supported by huge vendors and their network of partners. - COBOL - too big to fail :))
I honestly don't get what niche PHP fills. Why would anyone choose PHP over another language? Developer pool? Ecosystem of libraries? Evangelized by a vendor? Front-runner in new concepts? Too big to fail?
PHP offers a development paradigm second to none. Drop a single file into a single directory and hit f5. Problem solved. Next.
Which language above can do that?
My point is that PHP literally only requires a single file to work. No cli commands. No 3rd-party packages. No configuration files. Just PHP.
All of these languages are favorite targets of mockery by the “buzzword du jour” crowd, but they persist.
I like modern stuff, and don’t miss some of the old crud, but there’s something to be said for a language that is over a quarter-century old, and runs a considerable portion of the world’s infrastructure. I think C++ was introduced 35 years ago, and FORTRAN is about 30 years older than that.
And, of course, you have C, which is the engine behind Linux and Git.
Cobol is simply kept running. Everything it does, newer languages do better. Nobody writes new systems in it.
C++ on the other hand allows you to do things that other languages simply don’t, so of course it’s still alive. New C++ projects are started every day.
A lot of actively developed languages have their niche. Python looks very elegant to mathematicians and engineers, and has fast math libraries. Java has an unmatched ecosystem. And so on.
I think PHP's niche is low barrier to entry. Maybe I'm wrong, what do you think PHP does better than other languages?
(Edit: Sorry for editing the post while you replied. I tried to word the question in a more friendly way.)
The language has a lot of stuff that drives me nuts (in reality, it's not much of a drive –more of a short putt [Ed]).
But it is quite performant, stable and capable. I have done a lot of PHP programming, and would be very happy to never work in it again. I have a tremendous respect for the language.
It also has –literally– tens (if not hundreds) of thousands of expert developers, worldwide. Many of these developers used to stink, but are now much better, as a result of their work with PHP.
It also has a massive support infrastructure.
HN doesn't really appeal to the types of developers that make the lions' share of PHP (and C++) implementation base, so you won't always hear about it, hereabouts.
I remember reading an article, some time ago, called "IT Runs on Java 8"[0]. It talked about how much of the IT landscape is composed of folks working in tech and patterns that are not considered "shiny/sexy."
[UPDATE]: Not a problem. I do the same thing ;).
The main thing that PHP has, that very few other languages have, is a gigantic implementation surface. In one of my more successful open-source projects, I deliberately wrote it in PHP (4, then, reluctantly, 5.6), because I knew that would give it a far better chance of being implemented.
I was right. It is now fast becoming the de facto world standard for its demographic.
It is generally faster than Ruby and Python.
It's not the mess that javascript is.
Has a sane community with a wide range of well-maintained packages.
Symfony is easily a rival to Django and RoR. At that point it's a matter of preference, but Symfony is top-notch quality. I wouldn't care for the ActiveRecord usage in RoR for example.
I'm not sure that people saying low barrier to entry know what they're talking about. It's the same barrier to entry as for any other scripting language. If you're telling me about FTPing files: this is not how the PHP community has been working for the last ~10 years.
All those people commenting "I have no idea who would start a PHP project today" live in a bubble, probably based in SV.
Indeed. And I would start a project in PHP anyday!
Most of the time is not language A vs language B in abstract, it really depends on the project and what experience you or your developers have.
Let me give an example that is not web development. We had a desktop app and we had a feature where the user can submit feedback or bug reports. This feedback was stored and managed in a third party product that had an API, we could not call this API directly from the application because we did not want to put our keys in the app. So we had to put 1 php file on our server that contain the secret key, we done a POST from the app to the server and the script would validate and then connect to the API. I am imagining that some people today would solve this with some super engineered containers or micro services but the solution I used with just 1 file with a few lines of code could be implemented in a few minutes by a developer and maybe 1 or 2 hours by some competent non-developer.
So in real world projects you don't chose the tool based on coolness factor, if you want to solve a problem in the best way possible you need to use the best tool for the job.
Why would anyone pick PHP for a new project over, say, Python or NodeJS?
Because I wanted as many non-technical people as possible, running on wing-and-a-prayer, bottom-tier, shared hosting plans, to be able to run the platform I developed.
I made the right choice.
They are working on a new COBOL standard, COBOL 202X. The last COBOL standard was 2014 which was only 6 years ago. So COBOL is still evolving
https://isotc.iso.org/livelink/livelink?func=ll&objId=194689...