PHP Coding

He has: 1,380 posts

Joined: Feb 2002

I'm not really looking for any help, but I thought I'd make a generic suggestion to people looking to learn PHP or other web-based languages....

I originally started messing around with PHP in high school (4 years ago), and had a difficult time transitioning from the very flat and easy to understand HTML world to a PHP world, without any previous large programming experience. I'm now a Freshmen in college, attempting to major in Computer Engineering, and have learned C (and a large number of data structures) in the equivalent of 2 trimesters. For a large part of this year, I left all my web design alone and tried to focus on my studies...

I recently began web-work again (design, development, and coding), and have found PHP (in addition to MySQL) much, much easier! I've knocked out a CMS application that I've been attempting to work on for my projects for about a year...in a few days. Granted, it's nothing special, but it's alot easier and "sensical".

Anyways, long story short: if you want to really learn PHP or other such languages, and improve your overall programming knowledge (and understanding of how to develop/write a program), I would highly suggest taking a C course. I say C because I've had experience with VB .Net and C++ and they didn't have the effect on me this has...they are "high level" programming languages (alot of built in functions and classes that make life easier), whereas C is pretty bare and ugly.

Think about it! You'll thank me later.

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

I fully agree with you on a general level. Learning multiple, different languages improves your average programming ability in each of them. A requisite for anyone serious about programming, imo.

I think you could better qualify your advice, though. I'd stop short of simply recommending a grounding in C to everyone just for the purpose of learning web programming (but I think everyone should learn C anyway Sticking out tongue).

For one, if before you learned C, you also dealt with C++, VB.Net and PHP, C could have been the last piece of the puzzle that made it all come together for you. I doubt there's anything unique about C that makes it a good language to learn just for PHP.

Really you could just as easily have spent time on C++ or VB.Net, or even PHP itself and achieved the same result. Some routes are more efficient than others, though, and how similar the other language is has an effect.

I think generally the ideal "next language" to learn is one that's different enough to have substantial new knowledge to learn, but requires equal familiar knowledge that you can relate to. So whether a language is high-level or not should be only one factor to consider. You might find that learning OOP architecture through Common Lisp is as useful as learning C data structures.

Everyone is different. Not only in their backgrounds, but also in their style of learning, and what they're trying to get out of learning their language. So I wouldn't realistically suggest that everyone dive into C right now in the course of web programming. It might be the right choice for some people, but I suspect it won't be for most.

To reiterate, I think you've experienced a special case of a more general phenomenon. Learning multiple languages is a good idea as it exposes you to new and different concepts and approaches (even bad ones, beware). Whether C is the best language for any given web programmer to learn isn't clear; it depends on the individual and their goals.

He has: 1,380 posts

Joined: Feb 2002

Well put. I wasn't trying to coerce all of the newfound webmasters and web-programmers into learning C...perhaps I wasn't clear in my final statements.

I think that learning any language on top of yours of choice is not only a good idea, but a necessary step to "evolve" to the next level. That being said, I strongly feel that one should start in a "higher level" language, dabble for awhile, and then delve into a "lower level" lanuage...even if it's still web based. There are plenty of languages much closer to the machine than ones like PHP, ASP, ColdFusion, etc.

Depending on your intended path of progress, the languages chosen will be different. If you had asked me 2-4 years ago if I pictured myself struggling through multiple classes of Engineering Physics, Circuit Design, and untold Calculus classes in order to achieve a degree that would allow flexibility inside ANY programming environment, I would have scoffed at the question. I think, from my personal experience and some of my friends both in reality and online Wink, that you may start with web programming and development, think that's what you want to do, and then progress into general programming...

Anyways, the point is learn more than one language. It makes you a better programmer, at least theoretically Wink, gives you versatility inside an industry, and allows you to "talk shop" with other kinds of programmers you might not consider to be within your comfort zone.

Is that a little more clear?

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

brady.k wrote: I think, from my personal experience and some of my friends both in reality and online Wink, that you may start with web programming and development, think that's what you want to do, and then progress into general programming...

I see this a lot at uni too. Certainly describes the way I went. I don't see it as much among people I know in industry, and I'm not sure why. Might have something to do with the fact that the benefits of more learning aren't immediately apparent, especially if you've found a working formula with just one set of technologies.

brady.k wrote: Anyways, the point is learn more than one language. It makes you a better programmer, at least theoretically Wink, gives you versatility inside an industry, and allows you to "talk shop" with other kinds of programmers you might not consider to be within your comfort zone.

I'm convinced it works in practice. Smiling

brady.k wrote: Is that a little more clear?

Definitely. Smiling

cdwhalley.com's picture

He has: 3 posts

Joined: Apr 2006

That is an interesting point. I've dabbled in C++, but have never really found a drive for it. Would you suggest I tried C instead?

He has: 1,380 posts

Joined: Feb 2002

Obviously, I would...but I think Abhi would say otherwise Wink

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.