3 ms·
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 co
by greenshackle 10y ago
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.
- busterarm 10y agoYou'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.
- greenshackle 10y agoI 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.
- busterarm 10y agoI 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.
- greenshackle 10y agoOh I didn't start with SICP either, I programmed very casually as a hobby for years before that