views:

1297

answers:

13

I'm an experienced PHP developer, but I wouldn't call myself a great programmer.

I would really like some suggestions of a language to learn to increase my understanding of good programming while still remaining within the web.

What should be my next step if I were to continue my career in website application development?

+17  A: 

Two words: Python. Django.

Run it locally. Do the blog tutorial. I think you'll love it.

Peter Rowell
Apparently some people didn't like this answer and voted it down. But the OP didn't ask, "How can I become a better PHP programmer," he asked for suggestions for a new-to-him language that still had strong connections to website work.
Peter Rowell
You are right...
Gustavo Rubio
Couldn't agree more. I've had to go back to PHP after doing some Django and it is downright painful now.
John McCollum
A: 

If you really want to be an expert in web development, maybe you might want to consider to really master a framework until it's your second nature.

And as extra reference although not totally focused on just website application, it does address some of the issues that you're facing to reach the rockstar status:

reaching-intermediate-programming-status#342791

and this one is solely for just improving web design skills:

improve-web-design-skills

melaos
+27  A: 

Why not just learn to write good code, and do it in PHP? It can certainly be done. On the other hand, a sufficiently determined programmer can write Fortran in any language.

If you must learn a new language, I'd suggest picking up a strongly typed one because of the difference with PHP. It may help you learn some new paradigms. Java or C# will do.

EDIT: I'm not intending to say that you don't already write good code, but rather that good programming principles can be applied to any language. Learning the principles and applying them within the language you know can be just as good as learning a new language.

tvanfosson
I have to say that I couldn't agree more don't write another language badly, focus on writing better code better!
Unkwntech
"learn to write good code, and do it in PHP" Is both really possible at once?
Tomalak
@Tomalak: Yes. It's like "good television." Such a thing is possible, despite the frequency of counter-examples.
Bill Karwin
PHP doesn't force anybody to write bad code, no more than VB6 did. Just write good code, no language stops you from doing that.
TravisO
PHP is positioned in a strange spot between dynamically typed and statically typed languages. Learning a statically typed language might be beneficiary, but so might a truly dynamic language, such as ruby.
troelskn
It doesn't force it, but it certainly does encourage it. Even if you did write your code really nicely in PHP, you'd still have some pretty bad code due to the inherent problems in the PHP API.
Kibbee
A: 

Languages don't really inherently teach people to be a better programmers. Python probably comes the closest to doing so, since it makes you indent; if you've already mastered indentation, it's just another language.

The direction I would send you is in learning how to leverage OOP. The difference between object-oriented code written by someone's who'd just using it as a place to store their functions and someone who's working OOP is extremely dramatic. PHP's object model is strong enough, these days, that you can work at this as easily in it as in anything else.

chaos
How the hell is it that I said essentially the same thing as another answer, and it gets 19 upvotes and accepted, and what I said gets nothing but a downvote?
chaos
+3  A: 

You have so many choices:

  • Ruby On Rails
  • Java/JSP/EJB/JSF
  • C#/VB.NET/ASP.NET
  • Django

Just to mention a few.

Learning about design patterns will help you in any language/framework you choose.

Also as you are working in Web Development, improving your client-side programming skills (JavaScript) will help you a lot.

CMS
Why do you put asp.net on two lines?
Bobby Cannon
Haven't noticed, now fixed...
CMS
A: 

Javascript, DOM & CSS .. after that you decide to parlay your knowledge of javascript into actionscript and then learn Flex ..

Scott Evernden
+1  A: 

Thank you all for your great answers. Just an update:

While I'm not going to pretend to be an expert, I'm fairly compulsive in my interest in PHP and my focus the last three years has been on writing better, more elegant code. I feel very confident in that my code is clean and sharp and that I've done a good job where I'm at.

What really gets my engine going is when I can bring more to the table by having another language that picks up where PHP (or what have you) leaves off.

I am the head of a 9 person firm. I don't often get my work done right on time because I get so distracted by redeveloping my own work to be more effective or to incorporate new ideas. Every new, large web project gets treated as "okay, what did we learn from the last one and what can we do better this time?"

Since I am the head of systems dev., I feel this approach is necessary. Plus, there's a slight sense of insecurity in wanting to stay ahead of everyone on the team in order to continue being a respected authority on the topic.

jerebear
It is advisable to add updates and additions to the question itself. This way the question becomes more complete and the answers section stays more concise. :)
Tomalak
A: 

My recommendation is C# (asp.net) on the MVC frramework

After you have got a good understanding of the language then read Applying Domain Driven Design Patterns

Chance
A: 

If you are a fairly strong coder I would give C# w/ ASP.NET a try. You will get a grasp on a typed language as well as strong OOP principles. I find the code is easier to maintain, that's not to say you can't write maintainable php code but C# makes it easier with partial classes.

If you do choose .NET or even Java look deeply into how the languages/frameworks work. Knowing that a String is immutable and that List<> is built off an array (and not a Linked List) is important stuff that surprisingly enough a lot of people over look.

Wix
+2  A: 

Javascript.

Since you already know PHP it will be a great addition to your skills.

Also, javascript is a really powerful language, and don't forget, the very foundation of web2.0

kodisha
A: 

I cannot believe nobody has yet to recommend Perl.

A lot of the transition will be natural, and you'll discover an improved architecture and support network than you are used to.

Not only will you be likely to love it, you will be likely to want to get the rest of your staff on the bandwagon too, and then you'll be able to write better code and write less of it, because of beloved CPAN which has solved all the hard problems for you.

Take for example this library I used yesterday:

WWW::Google::SiteMap

Trivial to install, simple, does exactly what you want, does what it says on the box, and you're doing stuff in only 10 lines of code that you would have previously done something godawful like using a template engine or writing a hundred lines of string-glue to get it to do the same thing.

And there are literally thousands of simple modules all as pragmatically practical as that one.

When you don't have to spend so much time solving solved problems, you can spend more time focused on Getting It Done.

Not A Minority

And Perl is not small-fry either. Sure, there are lots of websites running PHP, but there are lots of HORRIBLE websites running PHP. Many of which still tell you its php with the well recognised

foo.php?bar

In the url. You probably don't realise how prolific Perl is on the web in real practice, because its everywhere, and they've known about hiding extensions for so long we've more or less forgotten there are extensions in some URLS.

Examples: Amazon, BBC, Slashdot.

Ironical Examples Many PHP distributions of libraries/tools still come with install scripts and tools written in Perl.

##PHP @ freenode has its channel bot written in Perl.

PHP itself recently lamented that they might want to stop writing their revision control maintenance scripts in Perl. ( Yet another bad decision methinks, .. they're going to Python if I read correct. )

Features you want to try

  1. Namespaces:
    • Today
    • With a namespace delimiter that Isn't horrible
  2. Closures
    • Lexical awareness.
  3. Begone require
    • No more require_once(dirname(__FILE__).'/../../' ) in every file.
  4. Awesome code modularity
    • use Foo = You have the file, and you can access things in it.
Kent Fredric
A: 

Speaking as a PHP developer, I have found two languages gave me fresh insight that I was able to take back to PHP.

The first was C#. A strongly-typed OOP language, it helps give a fair grasps of OOP principals, and the practice of separating out the presentation logic from the rest of the application.

The second was Erlang. Working with YAWS, it was just so different then what I was use to, it forced me to re-evaluate what I thought I knew about programming.

tylermac
A: 

One way to improve your coding ability is to use testing (if your not doing this already).

I've found that unit and functional testing can improve the quality of code I produce and release. Testing helps speed up development in the long run. It allows me to make changes/re-factor code quicker and without fear of breaking functionality. Capturing bugs as tests and testing for them prevents regression in new software releases. I tend to follow practices such as Test Driven development or Agile/Extreme Programming. These may be worth a look if you have not come across this before.

I'm not a PHP programmer and so I'm not sure how you unit test PHP, however for the functional side of things you could use Selenium. This is great driving a web browser to test web sites.