News for hackers. Stuff that matters.
Re:Making Django CMS as easy to install as WordPress by busterarm on Wednesday August 03, 2016 @02:24PM (#12220223)
They're also the ones bringing PHP into the modern world and making it much harder to sneer at.

There are some plain-crazy things about this language, but there are also some plain-crazy things about other popular languages too. It's like we forget that JavaScript was absolutely reviled for over a decade. PHP is undergoing a JavaScript-like transformation, though it will never get that kind of popularity because of the lack of client-side browser usability.

Re:Making Django CMS as easy to install as WordPress by leetNightshade on Wednesday August 03, 2016 @03:21PM (#12220697)
Maybe it's just me, but isn't JavaScript still looked down on? There's a reason languages are being written on top of it, and lots of frameworks to patch up the terrible usability of it. Just because it's popular doesn't mean it's great.
Re:Making Django CMS as easy to install as WordPress by enraged_camel on Wednesday August 03, 2016 @08:05PM (#12222448)
Yeah, somewhat. However, despite frameworks like Node, JavaScript is a client-side language. So even if you fuck up horribly with it, the damage you cause will be minimal. Not so with PHP.
Re:Making Django CMS as easy to install as WordPress by lima on Thursday August 04, 2016 @05:34AM (#12224403)
JavaScript is commonly used for writing server software or even systems software nowadays.

Also, an exploitable XSS in your web application can be just as damaging as a server compromise.

Re:Making Django CMS as easy to install as WordPress by enraged_camel on Thursday August 04, 2016 @12:13PM (#12226527)
Can XSS be used to drop your Users table?
Re:Making Django CMS as easy to install as WordPress by greenshackle on Wednesday August 03, 2016 @02:35PM (#12220315)
Yeah it's definitely improving. But last I checked the PHP internals team was very reluctant to change anything, even plain-crazy stuff, to maintain backward compatibility. In PHP, if a bug sticks around long enough, it becomes a feature.

I'm not a purist, if you're making money coding PHP more power to you. Around here there are a lot of businesses hiring people to make them Wordpress sites. But an aspiring dev asks me what language to learn I don't recommend it.

Re:Making Django CMS as easy to install as WordPress by busterarm on Wednesday August 03, 2016 @02:48PM (#12220425)
You've definitely nailed the problem. It's all about backwards-compatibility. Most of the plain-craziness I see day to day is in the Array methods, which certainly is annoying.

There's also some crazy defaults with json_encode which you actually need to send a flag to disable to get valid UTF-8. JSON_UNESCAPED_UNICODE, I am looking at you...interestingly enough they set the default to not cause buggy JSON parsers people use to blow up. Not a choice I would have made, but I guess they like to be nice to their users. It would be nice if their documentation for this function gave a more prominent message about this.

To address your second point though, I wouldn't advise that anyone learn _any_ language specifically. I would have them address concepts directly and try to be language agnostic. JavaScript would be the closest thing just for employability reasons, but it has way too many JavaScript-specific quirks for me to recommend someone to base their career on it.

Re:Making Django CMS as easy to install as WordPress by greenshackle on Wednesday August 03, 2016 @02:59PM (#12220518)
I mean obviously there is no one-size-fits-all recommendation. It depends a lot what their goals and background are.

I started out learning PHP on a LAMP stack on an old laptop, and reading C tutorials online. Probably my best move was working through SICP.

If they were math-inclined and weren't worried about immediate employability I'd recommend SICP even though Scheme is irrelevant in industry.

But if they wanted to make money as a web dev as fast as possible, JavaScript makes sense.

Re:Making Django CMS as easy to install as WordPress by busterarm on Wednesday August 03, 2016 @03:35PM (#12220827)
I didn't start with SICP, but going through the first three chapters is probably the single thing that kickstarted my transformation from hobbyist programmer to professional. The next was Eloquent Ruby and then Clean Code.
Re:Making Django CMS as easy to install as WordPress by greenshackle on Wednesday August 03, 2016 @04:25PM (#12221207)
Oh I didn't start with SICP either, I programmed very casually as a hobby for years before that
Re:Making Django CMS as easy to install as WordPress by collyw on Wednesday August 03, 2016 @02:39PM (#12220350)
Imagine. PHP in the browser. A competitor to JavaScript on so many levels.
Re:Making Django CMS as easy to install as WordPress by greenshackle on Wednesday August 03, 2016 @02:48PM (#12220426)
I bet someone somewhere is working on a PHP interpreter in Javascript.

Ninja edit: yep. (http://asmblah.github.io/uniter/demo/interactive.html)

Re:Making Django CMS as easy to install as WordPress by greenshackle on Wednesday August 03, 2016 @06:10PM (#12221953)
Also: PHP has a JavaScript engine, V8js (http://php.net/manual/en/book.v8js.php)

So you could run a PHP VM on top of a Javascript VM in PHP.

Re:Making Django CMS as easy to install as WordPress by busterarm on Wednesday August 03, 2016 @11:25PM (#12223183)
Woah, that's all kinds of meta.