Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Because when you're learning php first, usually you are not learning how to solve problems in an algorithmic way; you're learning how to set up apache or upload a file to the server, or scrape an html page for weather forecast, and other stuff like this. I'm not saying those are useless skills, but it defeats the purpose of "learning to program".


I'm from a generation where BASIC was the go-to programming language since it was available on every single computer sold at the time.

Everyone I know who was a kid in the mid-80's and who is still programming today learned programming from this crappy language called BASIC.

When you start out learning to program all you need to learn is about variables, functions, basic constructs such as loops and if's etc. and maybe a bit about data types. PHP let people do exactly that and guess what, today people don't write command line apps anymore. Their context of learning to program is by making a website.

Most people who are serious about programming and learn to program with PHP are smart enough to learn other languages as well just like me and my friends did after we first learned BASIC.


It's funny because it was precisely how I learned programming: first a bit of Visual Basic, then PHP.

I want to warn people against it, because I think I lost a lot of time along the way doing stupid irrelevant things.

You see, instead of learning the basic stuff like algorithms and data structures, I was writing visitor counters and guestbooks. As a result, in a few years, those who started with Pascal or even plain old BASIC, were already coding circles around me :)

Maybe it's not as much about the language as about having a wise teacher who can push you in the right direction. I didn't have one, unfortunately.

P.S.: on the other hand, I was able to sell my skills much earlier than my peers: I made my first money on php. But I don't think it's important: it's about being a good programmer, not selling you code as early as possible.


Just because you built visitor counters doesn't mean the language can't do a whole lot more. You're whole criticism seems more leveled at your early jobs, rather than the language.


That's an absolutely baseless claim. Nothing prevents you from learning both in the same time. You are saying "you're not learning programming but learning to copy-paste from internet and copy-pasted examples are in PHP - ergo, PHP sucks as a language". That's baloney - PHP is perfectly suited to be used as beginner's language to learn programming - the only precondition being you have to learn programming. Otherwise, of course, PHP couldn't help you - it's not some magic dust that can make you know programming just because you copy-pasted some PHP code. Blaming the language for that is just wrong.


False


Haha, this is so not true! Using php has nothing to do with setting up apache. You're mistakenly associating solutions with the language. It's like saying you can only write enterprise apps in java, or only write machine learning apps in python.

PHP has all the usual programming constructs and is easy enough to get into that I think it's a great language to start out in.

And discounting web apps as not real programming is just wrong. Some of the most challenging programming problems today are in the web field. Some people write low level software algorithms, and some write higher level ones that scale to billions of people using them concurrently. They are all 'real programming'. Not all web programming is request.getParameter("foo") and form processing.


> PHP has all the usual programming constructs and is easy enough to get into that I think it's a great language to start out in.

Yes it does, so what? Programming is not just fors and ifs and classes you know. There is more to it. You won't learn it if you limit yourself to the PHP cage forever.

> And discounting web apps as not real programming is just wrong

Did I say anywhere that web applications are not "real programs"?


Huh? "You won't learn it if you limit yourself to the PHP cage forever" That's true of ANY language; you seem to think that just because someone starts out with PHP they're permanently crippled and unable to grasp higher programming concepts. Hell, I'd rather someone start out with PHP than, say, Pascal.


No. In fact, as I already mentioned, I started in PHP myself. The thing that annoys me is that "Meh, PHP is good enough" attitude, which a lot of people seem to share. With that kind of thinking, your progress will be seriously hindered.

On a side note, why the hate on Pascal? It's a lot better than PHP as a starter language, it teaches structured programming from the ground up.


Re pascal, that really was a language that had unpredictable order of evaluation. Not to mention its issues with forward declarations leading to infinite recursion. Fortunately i have relegated pascal to the attic of my mind. These days I seldom stray far from python or JavaScript. Both of which are wonderful languages. Java's ok when eclipse is used to auto complete the verboseness.

Start out in pascal these days and try getting a job!


I learned programming 25 years ago, assembly, pascal and c. Over the years I've learned and used Java, php and python.

PHP is only a cage if you let it be. PHP has all the tools you need to build anything. I prefer python any day, but I don't like to see people who never got beyond the newbie level criticize something just because they couldn't make it work for them. As the old phrase goes, a bad workman always blames his tools. The criticisms you have leveled at php are all the usual newbie ones, not understanding how stings and numbers are equated etc, it's like a python programmer not getting is vs ==, or a JavaScript programmer not understanding undefined, or a SQL programmer not understanding why null = null for purposes if group by, but not in equality testing. You have to undertake the language in hand properly before you can use it properly.

And yes you did make that assertion at the beginning of your thread. Go back to the first comment you made here on this thread.


> PHP is only a cage if you let it be. PHP has all the tools you need to build anything.

I don't think we understand each other. PHP has all the tools available to allow you to build anything within a certain problem domain, i.e. web programming. If you start with it, your focus will be shifted towards that domain. I think a better idea is to start with something more general-purpose, more consistent, get a good foundation, and then look at all the available options and say "ok, now I want to work in this field".

> I don't like to see people who never got beyond the newbie level criticize something

It is true that I don't have 10 years of experience in php, but I don't see why I should have continued investing valuable time into learning this platform when there were clearly better options available.

> not understanding how stings and numbers are equated etc

I understand it. I just think it's a bad decision to do it that way. Also note how all of your examples with other languages have reasonable logical explanations. The particular type conversion rule we were talking about does not have such an explanation.

> And yes you did make that assertion at the beginning of your thread

I only said "..slapping together websites (which is not really programming, let's be honest)" Web sites are web applications are different things in my book :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: