Programing advice needed

  • Hi everyone, I thought this might be worth a shot to ask here. I have been learning php for a few years now, and I am able to make anything I need for my websites. I even made a custom CMS system that is easy to modify and expand its capabilities. I know in general I am improving because as I go in to fix something, I usually come up with a better way to do it with fewer lines of code. Now here is where I stand. Should I start to really get into PHP by learning Object Oriented programing in PHP, or go ahead and try a computer language? What would you do? I know alot about PHP, and want to eventually know OO programing, but I also want to learn how to write computer programs.

    Any advice?


    --Daniel L

  • Erm... a computer language? Are your PHP scripts executed by humans?

  •  PHP is a computer language.

  • @everythingdaniel said:

    Should I start to really get into PHP by learning Object Oriented programing in PHP, or go ahead and try a computer language?

    By 'computer language', it seems you mean a language more frequently used to write standalone applications, and you're right to assume that even though you can do that with php, you probably shouldn't.

    As I understand your situation, I'd advocate learning C#.  It's fairly easy to write nice C# programs, and C# has some features that make maintaining disciplined seperation between objects a bit easier.

    There are a lot of choices for the next language you learn, but the best general advice is to eventually learn enough languages that you aren't tempted to use the word 'syntax' to refer to non-syntatic parts of whatever you're using (if you ever were; if not, good for you), and so that you thoroughly understand where languages end and libraries begin. 

    With regard specifically to learning object oriented programming, what you learn will be applicable to php and any other language you learn.  Object oriented programming is as much a way of modelling and understanding problems than the language tools that facilitate it.

  • I agree with arty about the stand alone programs. If you want that, don't go php, unless you want to learn GTK then you might want to look at php-gtk before starting in another language. However if it's just OO then you will be delighted to hear that PHP5 is more then suited for your needs.

    Serious web development companies don't work procedurally anymore, everything is OO now a days (yesterday to, but whatever). However if you're entirelly new to OO concepts it might be a hard bullet to swallow to jump right into any of the OO frameworks that are out there (Code Ignitor, ZendFramework, Symphony, cakePHP).

    The good news however, is that PHP is pretty easy to learn, so picking up OO isn't that hard. I would simply advise to pick up a good book about OO which will teach you the concepts behind it. Especially with OO it's not the syntax that's going to be difficult, it's going to be understanding how to work with it. A good book i could recommend is Head First Design Patterns. While it assumes you know some basics (which you can learn just from reading the interwebs) it focuses mainly on design patterns and best practices when doing OO.  All examples are in Java, but that hardly matters.

    If however you also feel you want to try out a other language then i would recommend python. While i only use python for small scripts or programs myself, i find it a very easy language and very rewarding to work with. It's fully OO, and has many niceties that will make using PHP feel a bit clunky. Don't get me wrong, i have nothing against PHP (since it's paying my wages), but python is just a lot more elegant to work with.


  • Thanks to everyone for the replies.

    Spectre, I guess my scripts are executed by humans, I don't have any Cron jobs or anything setup...

    arty & stratos, thanks for your answers! They are very helpful! I will see what kind on reading I can find on OO programing and look into Pyton and C#

Log in to reply

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.