Ok, so here it goes. I haven't commented on this site for over a year. Full disclosure: I am an average programmer compared to many here. I come to this site to improve my self and read about what brilliant and amazing things you all do. Now you have a reference. I use PHP on a daily basis, have been for years. I am a freelance developer who has been able to carve out a living with a lot of hard work and a lot of luc…
It's not ivory tower for all of us. In my case it all boils down to simple discomfort. Writing PHP code is painful. Reading PHP code is painful. Fixing bugs in PHP code is painful. I don't write rants about it but that's just because I left the language behind years ago and never looked back. But if I had to write for my job? Yeah I'd write a rant every other month probably. I would need some kind of outlet for all t…
Coding Horror: The PHP Singularity
211–220 of 341 posts
Re: Coding Horror: The PHP Singularity
#212PHP is broken in many little aspects but if you use a high quality framework, it's quite enjoyable to work with. The main gripes I have with it are in the details, like: You can't do: $something->doStuff()[0] if(empty($something->doStuff())) Overload fucking functions. Fuck. What sucks: The namespace separator. The naming conventions of the core functions. The speed. But, overall it works and elegant solutions can be…
Speed isn't an issue, at least in my experience, compared to similar languages. Raw PHP usually beats Rails handsdown, and most PHP frameworks are usually comparable. PHP performance has increased markedly over the past few years, and particularly in v5.4. And if you really need a speed bump you can use the APC cache or HipHop compiler. Its never going to be as snappy as, say, C, but in the class of languages its in…
I also understand the technical need for a new character (which doesn't exist for static languages or some other dynamic languages) and once you need a new character then the backslash is a reasonable choice.
Re: Coding Horror: The PHP Singularity
#213Earlier quoted context omitted.
I have to ask, because it's really been getting at me for a while honestly. How do your developers react to that? I mean, you guys are known for going after the best and the brightest. People who have worked hard to perfect their craft. These people tend to have strong opinions when it comes to language design. How do you get them from that point to "ok, now write some php code" ?
The best and the brightest appreciate the technical, product, and engineering challenges of Facebook and certainly don't waste their time whining about a language or feeling entitled.
Maybe you should be the one to stop being so arrogant as to tell other people what they should feel.
Re: Coding Horror: The PHP Singularity
#214We get it, you don't like PHP. Don't use it. Nobody forces you to use it... If someone does, it's most likely a client, and that's nobodies fault but your own for seeking clients that want PHP work done. And if that's the case, you shouldn't be scolding PHP for keeping food in your mouth and a roof over your head. But yes, we get it, you don't like it. Move the fuck on. These "This is what's wrong with PHP" articles…
So yes, PHP may put food on the table, but if it's the only tool you get to use professionally (without having to start your own company) then you are pretty much forced to use it. Hence the hate. Now I get to use other tools, I just don't care.
Re: Coding Horror: The PHP Singularity
#215Ok, so here it goes. I haven't commented on this site for over a year. Full disclosure: I am an average programmer compared to many here. I come to this site to improve my self and read about what brilliant and amazing things you all do. Now you have a reference. I use PHP on a daily basis, have been for years. I am a freelance developer who has been able to carve out a living with a lot of hard work and a lot of luc…
Re: Coding Horror: The PHP Singularity
#216Sorry Jeff. The only thing broken with PHP is you (and other people like you). How much PHP do you use Jeff? Lets assume none. How is PHP hurting you? I mean seriously, how much contact do you even have with PHP? PHP is easy to learn, easy to make websites with. There are a tonne of paying jobs which require PHP. PHP runs a lot of websites. I am a PHP developer. I prefer Python but my PHP job pays me just fine. There…
"I prefer Python". Why did you say that? To me it feels like you said it do people would take you seriously as a "real" developer. Because surely a "real" developer wouldn't actually enjoy using PHP or use it unless they were forced, right? I agree with your point and I just wanted to add that the fact that we have to add in little details like "I prefer Python" just to be taken seriously says more about hacker eliti…
Thought of that, Sherlock? Or should I say Bekas?
Re: Coding Horror: The PHP Singularity
#217Earlier quoted context omitted.
If I make a string: ' ' . $var . ' ' - does it know to encode the variable, and not the entire string? What if I assign that string in a variable, and then output it later? I'm not convinced this can be done well. Maybe if all you do is make some templates and fill them in you could do it. But I do a lot more than that, I output dynamically built html all the time. Just give people a very easy and shortly named funct…
Just needs a bit of type system magic. Don't use the same type for escaped and unespaced strings. (And don't use the same type for user generated input before and after it's scrubbed / escaped of any nastiness.) Ask any Haskell weeny for details. Also in your example, you'd probably be better of, if your language knew about the HTML structure, e.g. something like P($var), instead of putting the tags in as strings.
And if you can't extend your type system to make this work, do it in your head, mutating the names of variables to help you keep it straight. For example, esStr and unStr are not of the same type, and moving data from one to the other without conversion is always an error.
Re: Coding Horror: The PHP Singularity
#218Earlier quoted context omitted.
"fucking childishness" I love that sort of phrase, I really do. It's so ... lacking in self-awareness. Really tells you a lot about the attitude of whoever utters it.
Cool story, bro. Edit: OK, I'll bite. Um, so you're telling me, I lack self awareness because I said "fucking childishness" .. and that you understand me on some level because of it. You might want to get down of that high horse of yours.
Yep, you lack self-awareness.
Re: Coding Horror: The PHP Singularity
#219Ok, so here it goes. I haven't commented on this site for over a year. Full disclosure: I am an average programmer compared to many here. I come to this site to improve my self and read about what brilliant and amazing things you all do. Now you have a reference. I use PHP on a daily basis, have been for years. I am a freelance developer who has been able to carve out a living with a lot of hard work and a lot of luc…
What other languages besides PHP have you used? I think a lot of us dislike PHP because we're putting it in the context of better designed languages.
I use PHP as my main language for web development, but also am a frequent C user. I have done projects in C# and Python.
While I like C# and Python - actually for scripting I tend to go for Python rather than PHP, prefer the CLI modules of Python- , I found that in context of web dev PHP still get the job done faster and in a maintainable manner. As for C, I use it for writing PHP extension -or generally fucking around with PHP source code- and writing non web stuff, so not as relevant.
The difference between people like me and people like you, is I don't go around constantly mocking other language. It is pointless, I'd rather spend my time and energy delivering products, or actually doing something productive.
Re: Coding Horror: The PHP Singularity
#220Earlier quoted context omitted.
Surely that'd be "Ex-PHP developers that bash PHP programmers are like the poor kids that win the lottery and then start bashing poor people publicly." or "Ex-PHP developers that bash PHP are like the poor kids that win the lottery and then start bashing being poor publicly." ? Very different, IMO.
The first one. I think the language is pretty fair game. However, the bashing seems to carry on over to the programmer often enough.