Earlier quoted context omitted.
Yes, that would be great. An alternative intro would be most welcome. It should, though: - Be able to start and serve in minutes, across most platforms - Allow for portable code e.g. the code you create locally should be able to be ported over to an actual webhost with only [S]FTP. - Not require the command line to "work". At all. I tried to learn django ~a year ago, and it was an experience wrought with frustration…
"The main trouble was getting all the packages/dependencies correct. " This is the one big problem python has; terrible package management. I can think of 3 different package management systems for python. All of them barley work and the various libraries all require different mangers and different python versions. This package requires python 2.6. This other package requires 2.5. And now we have separate python 3.x…
PHP: A fractal of bad design
421–430 of 514 posts
Re: PHP: A fractal of bad design
#422Earlier quoted context omitted.
> PHP makes it extremely easy to write ANY code. No. PHP makes it easy to write bad code and between normal and challenging to write normal code. This is why Doctrine , the closest thing PHP developers have to SQLAlchemy, needs three ways to declare table and column metadata: a separate YAML file, a separate XML file, and in PHP comments. All three of those methods are awful, and only one allows you to keep the metad…
And again you make the same mistake. You take one solution, you say it doesn't work like your favorite solution (while obviously all proper solutions should be done exactly like the one you prefer, since there's only one right way to do anything and it's, not surprisingly, exactly the way you prefer) and you make it the fault of the language used for it's implementation. How that even makes sense? I write code in a n…
Any old tired issues for you could be something new for someone else.
Re: PHP: A fractal of bad design
#423Earlier quoted context omitted.
> You've turned something that's a person's fault into something that's the language's fault. > You're taking a look at other people's code, and judging the language from it. At some point, you have to start blaming the language for fostering an environment where that code is acceptable.
You can write bad code in any language. It's the programmers responsibility to make sure the stuff they are writing is good and that only comes from experience with the language.
Re: PHP: A fractal of bad design
#424Earlier quoted context omitted.
> If this one thing that annoys me on HN it's the pervasive anti-PHP snobbery. If there's one thing that annoys me on programmer forums in general, it's that pointing out PHP's giant flaws is conflated with snobbery. Design matters, and that is not the same thing as saying it's impossible to build anything good with PHP.
Pointing out "giant" flaws which don't really matter and can't be fixed for 1000th time is very useful for... remind me please, what exactly purpose?
Programming language critic come up every now and then in HN, this is nothing new. If you got a point, why not refute it?
Are you saying language design don't matter and not worth discussing?
Re: PHP: A fractal of bad design
#425Earlier quoted context omitted.
It seems that many people disregard the fact that PHP is a very accessible language to a programming newcomer. You can quickly and easily install LAMP or MAMP and in minutes have a working, dynamic web page (albeit local) along with a plethora of examples and tutorials. This is huge. This shows the newcomer that this mysterious code stuff is actually accessible; that they can create something that works. That's a nic…
I agree with the general point but this seems more of an indictment of other languages than a plus for PHP: with PHP, it's easy to get started with the most simple features - and then it takes years to learn how to cope with the language quirks and inconsistencies, deal with outright bugs, and learn a number of non-obvious ways in which your “working” site might be hacked due to a hidden language feature. There are t…
Ruby, rails: "rails server" Ruby, sinatra: "ruby " Python, django: "python manage.py runserver"
All of these spin up an app server on some port > 1024. I'm honestly not sure how it can get much easier than that.
Re: PHP: A fractal of bad design
#426Meh, I've written a lot of PHP code. I also work in Ruby and Python. All three have problems, but I like all three. With PHP, you have to develop a coding style that naturally avoids PHP's weird areas. It's not really that hard to avoid the mines, but you do have to be aware of them. In exchange, you get a scalable web server and a language that requires minimal babysitting. Instead of automatically throwing a 500 on…
Re: PHP: A fractal of bad design
#427Earlier quoted context omitted.
I agree, but lets say your car breaks down somewhere in the middle of the road. Now you have two options. One is to learn the entirety of automobile engineering before touching your car, second is to learn enough fix the problem for the moment. Needless to say any normal person will prefer the second approach. Now some mechanical engineer may make an argument that this small quick fixes are harmful for long term mech…
While I'm sitting on the side of the road waiting for the PHP maintence truck to come and tow my car away -- I'll read a book... http://djangobook.com/
Re: PHP: A fractal of bad design
#428Earlier quoted context omitted.
From the article: >Don’t comment with these things >>I’ve been in PHP arguments a lot. I hear a lot of very generic counter-arguments that are really only designed to halt the conversation immediately. Don’t pull these on me, please. :( >>>Do not tell me that “good developers can write good code in any language”, or bad developers blah blah. That doesn’t mean anything. A good carpenter can drive in a nail with either…
I did read it, that's why I used that concept. I don't think calling me a "jerkhole" really adds to the dialogue. I just disagree. The author points it out because he doesn't want to hear it. That doesn't make it a less correct counter-argument. I think accomplishing the goal is most important. Secondly, I don't think PHP is a bad tool. You can accomplish tasks very quickly in PHP. It is certainly not the fastest lan…
Re: PHP: A fractal of bad design
#429Meh, I've written a lot of PHP code. I also work in Ruby and Python. All three have problems, but I like all three. With PHP, you have to develop a coding style that naturally avoids PHP's weird areas. It's not really that hard to avoid the mines, but you do have to be aware of them. In exchange, you get a scalable web server and a language that requires minimal babysitting. Instead of automatically throwing a 500 on…
Lets say for someone who is new to PHP, how long does it normally takes to learn where the minefields are? Is there anyway to start on this? I know in JS there is Javascript The Good Part. Is there anything equivalent in PHP?
Re: PHP: A fractal of bad design
#430I had a one-to-one talk with Rasmus Lerdorf a few weeks ago. This is one of the few things he said: " I wrote PHP as a hammer to do my stuff. Around 1993, the only way to write web apps was by hacking C and Perl. This was extremely painful, and you would have to do the same thing over and over again. So I started writing a tool which would make my work easier. " " I never thought while writing PHP that someday millio…
“There are only two kinds of languages: the ones people complain about and the ones nobody uses.” ― Bjarne Stroustrup, The C++ Programming Language: Special Edition