
Used PHP in a Hackathon was made fun of and it made me feel really shitty - jocoda
https://www.reddit.com/r/PHP/comments/8ed9tt/used_php_in_a_hackathon_was_made_fun_of_and_it/
======
RutZap
I have been using PHP professionally for 7 years now and I absolutely love it.
The community grew up from the old days when I started playing with it (almost
15 years ago). There are incredible pieces of software built with it, and
nowadays the language is unrecognisable from the state it was in when it
gained the bad reputation. i think Symfony 4 is a wonderful framework and it
allows us to use PHP to build things that most would think it's impossible in
the language of spaghetti code.

Yes, there are still a lot o people out there that hack some very questionable
code together in PHP but we shouldn't dismiss it like this. I've tried
multiple languages (C#, Java, javascript) and I have to say PHP is my
favourite so far (you guys can comment on this as much as you like, I still
like it a lot).

It's disheartening to hear that in a hackathon people got "bullied" for using
a programming language. You would never pick upon a mechanic for using a
screwdriver instead of a chisel or something similar, as long as he can
achieve the same thing.

Also, I can't help to notice a trend of ..."brogramming", where if you don't
use the newest and coolest tech you're treated as an outcast, bullied and made
fun of; it's quite sad if you ask me.

~~~
sneak
> nowadays the language is unrecognisable from the state it was in when it
> gained the bad reputation

I used it then (3.x, 4.x) and I recognize many of the terrible warts are still
front and center.

PHP isn’t bad because it’s not new and shiny, it’s bad because it does opaque
and wrong things and demands a user of the language know all sorts of
inconsistent PHP-specific nonsense that does not benefit the language authors,
the language users, or serve the solving of the problem of the language user.
It’s not prejudice or signaling, it’s objectively deficient in ways that
haven’t been acceptable in decades.

~~~
RutZap
> It’s not prejudice or signaling, it’s objectively deficient in ways that
> haven’t been acceptable in decades.

I don't want to start a useless debate or anything like that, so don't take
this in the wrong way, but I am genuinely curious of what specific problems
you see in PHP and what are the specific issues with the language.

I can't think of many things that are so bad with it, except the inconsistency
in function naming and parameter orders (stuff like `str_pos`, `substr`) and a
relatively unreliable SoapClient implementation; I am genuinely interested in
seeing what other people think are deficiencies in PHP.

Again, I have to stress I am not being defensive nor offensive, I am just
curious on other perspectives in regards to the shortcomings of PHP.

~~~
WalterGR
_I am genuinely curious of what specific problems you see in PHP and what are
the specific issues with the language._

There are so, _so_ many. Here are some good references:

[http://phpsadness.com/](http://phpsadness.com/)

[https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-
design/](https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/)

Disclaimer: I earn my income from a project largely written in PHP.

------
mikedd
I always made fun of php. No reason, I've never truly worked with it in depth
and I'm also not the best JS dev. I never attacked a person for writing php I
just mocked php itself. Even so, this made me feel bad and I'm going to change
my attitude. Nobody should feel bad for doing something they enjoy. <3

~~~
sneak
What if they enjoy writing non tokenized SQL statements with user input and
without an ORM?

Some practices are bad. PHP was my first working language and I used it for
years. I’ve since used a dozen other stacks in the intervening fifteen years.
PHP is objectively a poor choice, an impediment to its user.

Someone who is told this, who doubles down on ignorance of better, more
efficient, more predictable, consistent, safe, and useful languages, is worthy
of ridicule—not because of their ignorance, but because of their will to
remain ignorant.

~~~
krapp
> What if they enjoy writing non tokenized SQL statements with user input and
> without an ORM?

Those functions have been deprecated in PHP for years, and they were just
wrappers around existing C libraries to begin with/

And other languages have that as well. I've seen it done in C# and C++.

~~~
sneak
I wasn’t talking about SQL in PHP, I was talking about people who like
pursuing sloppy and careless software engineering practices in general, like
writing unsafe SQL queries using string concatenation [in any programming
language].

Using PHP is the same thing.

The story about FizzBuzz is not literally asking _you_ to implement FizzBuzz.
It’s an illustration.

My comment could be rephrased: just because many people like doing things that
are bad does not mean that those things aren’t bad. It just means that many
people are ignorant.

------
Promarged
In my experience people making fun of technology X (for all X) only reveal
their own lack of understanding of not only X but their own tools too. Every
tool has its own advantages and disadvantages.

Fanatics of any kind always remind of this fragment of Zen and the Art of
Motorcycle Maintenance:

> You are never dedicated to something you have complete confidence in. No one
> is fanatically shouting that the sun is going to rise tomorrow. They know
> it's going to rise tomorrow. When people are fanatically dedicated to
> political or religious faiths or any other kinds of dogmas or goals, it's
> always because these dogmas or goals are in doubt.

~~~
rootlocus
> In my experience people making fun of technology X (for all X) only reveal
> their own lack of understanding of not only X but their own tools too.

I find mocking X (for any X) to be occasionally educational
[https://www.youtube.com/watch?v=RGkIsUBfanQ](https://www.youtube.com/watch?v=RGkIsUBfanQ)

~~~
mercer
I love that talk, but for some reason I never found it to be mocking in a
'bad' way. Perhaps it's because all these bad things are so obviously bad that
they're like 'the sun rising'.

------
icebraining
So it's a thread in which people criticize tribalist behavior by engaging in
their own tribalist behavior.

Sounds ironic, I say from my self-satisfied position of detached superiority.

------
jrockway
I feel like the kind of people that go to a hackathon are the kinds of people
that are looking for some sort of in-group/out-group dynamic, and programming
language choice is the easiest way to decide who is in and who is out. When
they get older they'll realize it's not worth the effort.

------
helpme420
In my personal experience, people use PHP because it is the only thing that
they were taught. NOT because they have considered options and have
consciously decided to settle on PHP.

~~~
legostormtroopr
The same can be said for JavaScript. Even worse can be said of JavaScript, a
PHP developer will have to learn JavaScript for any client side behaviour,
whereas the entire JavaScript community has rebuilt large code bases to not
have to learn anything else.

~~~
AmericanChopper
Node is pretty much the new PHP. JS is pretty easy to pick up, a lot of people
know it, and then node was invented so that people could just write their
whole stack in it. Apart from ‘I already know it’, most people would be hard
pressed to come up with a reason why node was the best choice for their
project. You can say the same about PHP, except... PHP is infinitely more
fucked and nonsensical than JS. There’s no project where PHP is the best
choice, or even a realistically defensible choice. It is also an enduring
blight upon the internet. PHP apps are riddled with bugs and vulnerabilities.

------
dexen
Nothing's wrong with the good old PHP. In fact, it reminds me of my 2012
comment[0]. The website[1] proclaiming PHP as "most likely to be a fad" is, of
course, long gone by now[2], while PHP thrives.

\-- the old comment --

Particularly ironic is PHP ranking high for ``This language is likely to be a
passing fad''. Given its 17 years of history and recent the recent progress
with versions 5.3 and newer... whoever voted on this position either wasn't
aware of PHP's actual situation and outlook, or was just being thinking
wishful.

> Why does almost everyone know the language?

If anything, it is that almost everyone can dabble in PHP and ^C^V some code.
IMHO real knowledge of PHP and its ecosystem seem to be quite rare -- judging
by reading some published code, which was as generic and un-PHP as possible,
and by [many clueless] comments [posted on] the official docs.

\-- the old comment --

[0]
[https://news.ycombinator.com/item?id=4929143](https://news.ycombinator.com/item?id=4929143)
[1]
[http://hammerprinciple.com:80/therighttool/items/php](http://hammerprinciple.com:80/therighttool/items/php)
[2]
[https://web.archive.org/web/20170913184701/http://hammerprin...](https://web.archive.org/web/20170913184701/http://hammerprinciple.com:80/therighttool/items/php)

~~~
dkns
How can you predict that language is a fad when it's powering wikipedia,
facebook and wordpress, which accounts for a huge amount of total internet
traffic, is beyond me.

------
cztomsik
PHP is great platform for prototyping, even better if you're experienced. I
actually used PHP a lot for general purpose scripting and code generation
because it was so easy and fast. Now I'm at node-land (I had no issues with
PHP I just needed something with concurrency and PHP didn't have it at the
time) for a few years but I still have great memories.

Do what you want (and what makes you most productive) and don't care about
others :-)

BTW: What I especially love about PHP is its documentation, or sort of
integrated stackoverflow. I can't remember any other platform having "recipes"
integrated directly in the documentation (which in my opinion, is brilliant
idea)

~~~
viraptor
> I can't remember any other platform having "recipes" integrated directly in
> the documentation

This has good sides and bad sides unfortunately. There are some really
questionable ideas in those comments and they're not always downvoted to
death. Presenting them to the beginners on the same page as the official docs
makes them trust and copy-paste solutions sometimes.

~~~
cztomsik
Yeah but I also believe it's important for beginners to learn by doing, even
if it means doing wrong. There is no universal "good way" of doing software
anyway and best practices and patterns can be harmful too.

Take java spring or ruby on rails for example, those are opinionated ways of
doing SW but they are also big pile of complexity and sometimes you really
need just read a file, transform it a little and output the result. I think
those awkward examples and hacks are valuable too because you get involved in
internals and you know then how the entire thing works under the hood.

------
jstanley
Isn't the whole point of a hackathon meant to be getting something quick and
dirty up and running in limited time?

I think using PHP warrants extra points for style.

~~~
gyaru
>I think using PHP warrants extra points for style.

Especially if literally everyone else is just using node + MongoDB.

~~~
chriswarbo
> Especially if literally everyone else is just using node + MongoDB.

There's definitely a "narccissism of small differences" going on in
programming languages.

PHP, JS, Python, Ruby, Perl are all _basically_ the same (dynamically typed,
imperative, interpreted, optional class-based-OOP, etc.). If a decision's been
made to use _one_ of these, then things like library availability and
developer experience are probably much more important than particular language
features or quality. Yet there's a whole bunch of fighting and in-group/out-
group between these.

Likewise Java and C# are essentially the same thing (I think the lawsuit
banning Microsoft from bundling Java had a big influence on their push for C#,
rather than actual features of the language).

There also seems to be a certain level of incests among languages. I remember
PHP had an RFC (request for comments) for adding generators to the language,
seemingly because Python has them. I commented that it would be better to go
with delimited continuations, since they're more powerful and could also use
the same implementation as exception handling. My comment was not well
received, presumably because delimited continuations would actually make PHP
different from its kin, rather than even closer.

> I think using PHP warrants extra points for style.

I always feel like a "real" programming language debate should throw in the
occasional curveball, like a Prolog interpreter embedded in Smalltalk or
something. At least it would break the monotony. On a related note, why
_shouldn 't_ a mars rover be programmed in TeX?
[http://sdh33b.blogspot.co.uk/2008/07/icfp-
contest-2008.html](http://sdh33b.blogspot.co.uk/2008/07/icfp-
contest-2008.html)

------
yulapshun
As much as I hate PHP, I'll never judge people simply because they use PHP. I
know some very good programmer who code in PHP.

------
ZgjimDida
This is quite an interesting way of thinking. I saw somewhere that from the
different thinks that you can be a snob about, one of them is a programming
snob. Thinking that when you use one programming language, framework you are
way superior than others. (I'm not saying that languages don't have
superiority over each other).

But I think this is the same mindset that makes people think that they need to
use ML to solve every problem, when actually you can solve it without it just
fine. As has been discussed in an earlier post.

------
vincengomes
The best programming language is the one which can get the job done. PHP is a
well established backend stack and in no way inferior to the latest sexy
stacks

------
bryanrasmussen
I guess I've made fun of php in the past, due to having felt pain in using it
at a project, but I don't think even I would be a big enough jerk to do it to
someone I didn't know in the a public space.

------
tallanvor
PHP started out as a personal project, not with some grand design to be one of
the most used languages powering websites. So yes, there were things about the
language that were objectively bad, and it'll never be completely on par with
a language that was truly designed from the ground up, but so what?

Your knowledge and the requirements of the job should dictate the tools you
use - not what's hot. If it works, scales to the extent you need it to, and
can be secured, then great!

------
krembo
It's basically gets to the point that you either get your shit done, or you
don't. I've seen a handful super smart developers starting to code in the
newly Xish language, and don't getting to the finish line, either in time or
at all. So, you should be proud of yourself for delivering MVP in a hackathon,
assuming that that's what you did. When people make fun of you you should tell
them to shut the fuck up. Again, as long as it works it can be written in
pascal, cobol, assembly or asp native. When you grow up and get to deal with
exponential growth, it will be your "rich's worries" to rewrite the code in
the newly not mocked Xish lang.

------
gregoriol
Well, a hackathon's goal (and a life's goal, if you think about it) is to get
things done. Just beat them at that. With any thing you might like and enjoy.

It's not because everyone gets crazy about those new Nike shoes that you
should wear them too, just enjoy running.

------
guru4consulting
Slack was built with PHP. And here's the article from Slack engineering
[https://slack.engineering/taking-php-seriously-
cf7a60065329](https://slack.engineering/taking-php-seriously-cf7a60065329)

I guess building quicker is more important than building better, especially in
hackathons or in startups where you are testing the product-market-fit. That
means, one can use whatever language/tool they are most productive with. Of
course, if you are lucky and if you gain momentum, then you will have the
resources to re-engineer it with the right language/tool.

------
rwnspace
Matthew 7:5, "You hypocrite! First remove the beam out of your own eye, and
then you can see clearly to remove the speck out of your brother’s eye."

These particular people truly do lack self-awareness, to criticise PHP as JS
users.

~~~
dvfjsdhgfv
Frankly, modern JS is roughly at the same level as PHP as far as language is
concerned. What is messy is the variety of frameworks and the quality of some
of them. The well-known PHP frameworks are by definition mature and stable. I
can't say the same about JS frameworks though. The point is you create code
using frameworks, not just the language itself.

~~~
Yaa101
It is not at the same level, you need a bignum library to make JS do even
correct math, which is something a programming language should be able to do
on its own. JS shouldn't be called a programming language but a scripting
anomaly.

~~~
RaleyField
This passes for closures in PHP:

    
    
        function ($arg) use ($capturedVariable) {
            return 1;
        }
    

I rest my case.

------
jackweirdy
Wikipedia, openstreetmap, Facebook - lots of world changing projects were
started by hacking something together in PHP.

~~~
sneak
...started in a vastly different landscape than today.

Lots of world-changing projects were written in FORTRAN or APL but that
doesn’t make them suitable for new apps today.

Also, many world-changing projects that did succeed would have been rendered
total failures had they chosen this pathological language early on.

Your examples do not support your point.

~~~
jackweirdy
“Suitable” is a subjective term.

The best tool for a job is the simplest one that gets the job done and the one
you know best.

Would I start a startup in PHP tomorrow? Probably not (not least because I
don’t know PHP). But that doesn’t make it unsuitable for everything.

------
spacemanmatt
I have been cleaning up after horrible PHP programmers for years. It is a good
living. I do internally debate whether MySQL is a worse choice than PHP, but
it's moot because they are almost always found together in the wild.

------
philippz
PHP is awesome. We love it. Always flexible & fast and professional and
structured on demand - totally depends on you what you make of it.

------
julienfr112
Your best response ? Win the hackathon !

------
roryisok
Reddit won't load for me, I'm guessing the end of that sentence is "and it
won"?

~~~
giancarlostoro
"Used PHP in a Hackathon was made fun of and it made me feel really shitty."

I'm not liking this new reddit, I can't even fold comments.

~~~
bartl
Really? There's no "[-]" in front of the user name?

~~~
giancarlostoro
I don't see it on my personal laptop on Firefox (Linux Mint), or on my
workstation at work also using Firefox (Ubuntu 14 - no plugins).

Edit:

 _WOW I can 't believe this_, I opened it up in Chrome and it works / shows
the comment folding option. It astounds me how much Chrome is becoming the new
IE in regards to functioning websites where I wont be surprised to see (or not
see) more cross-browser issues when using Firefox instead of Chrome.

Can I have the web where everyone wanted to be backward compatible with all
browsers back?

Edit 2:

Also wondering how this got published by Reddit and nobody noticed some basic
site functionality missing?

------
nukeop
People's allegiances are tribal, and this kind of juvenile gatekeeping is
probably only prevalent among teenagers and young college students.

I've never identified with a particular technology so strongly as to feel
attacked when its flaws are pointed out, and vice versa, I have never felt the
need to attack anyone personally based on the technologies they use. Some
might be better for some tasks but not others, and that's the only thing that
matters.

Experience shows that people who lack broad knowledge of several programming
languages tend to identify as "language X developers" instead of developers as
such. This enhances tribalism and creates pointless language wars. Any time
somebody says that some particular language is the best choice for everything,
or some other language is never the best choice for anything, they're just
inexperienced and are trying to mask it with fake confidence. Except for Java
of course, it's the worst.

~~~
placebo
I assume that last sentence is misunderstood humor.

------
ert23
PHP until version 5 was not great. PHP jokes and hate are always been
lingering around. Part of the reason is that PHP started as a hack and that
Rasmus, the "inventor" of PHP, has always been a bad frontman. You can read
some of his quotes here:
[https://en.wikiquote.org/wiki/Rasmus_Lerdorf](https://en.wikiquote.org/wiki/Rasmus_Lerdorf)
Almost every person that is a good SW engineer and like to code has problem
with that philosophy.

The truth is that today PHP is a pretty good language. CakePHP, Laravel and
Symphony have been pretty good frameworks from a SW engineering point of view.
I haven't written PHP code in the last 5 years but I miss the development
experience. Everything is by default stateless. Accessing a page always starts
from a blank state. You edit and save a file and you can reload instantly the
page with the new code. Of course "re-execute everything" can become quite
expensive at runtime...

In general I think the modern PHP is hated without a reason. Its bad rep will
be hard to overcome.

