Sep2, 2008

Handy OO PHP Hint

Sticking a few functions (aka methods) inside "class Something { }" does not make your code object oriented. Learn the fucking principles before you try and educate other people, dickweed.

I'm looking at you here.

Tagged .

Comments

There are currently 21 approved responses to "Handy OO PHP Hint".

  1. [gravatar]

    Rhys 02/09/08 at 21:16 #

    More people need to use the phrase dickweed :)

  2. [gravatar]

    Jabed 02/09/08 at 21:19 #

    So Jem, have you tried the Google Chrome web browser yet? If so, what are your opinions on it? yay or nay?

  3. [gravatar]

    Jem 02/09/08 at 21:20 #

    LOL Jabed, nice subject change.

    Yes I have, yes I have a few opinions, yes I'm too lazy to write them down.

    I'll take a proper look tomorrow when I'm less tired.

  4. [gravatar]

    Amelie 02/09/08 at 21:33 #

    I did that at first. Now I lernded & i r betta. Yus.

  5. [gravatar]

    Brianna 02/09/08 at 22:45 #

    All this talk of methods and object-orientedness is bringing me back a year to my computer science AP - horrible, horrible repressed memories.

  6. [gravatar]

    Nick 02/09/08 at 22:57 #

    hehe, the entire blog-o-sphere has exploded about Chrome, go read all over (including my site ^^). Anyway, as for the hint, I agree, although I'm a PHP beginner, people who stick stuff in classes just for the sake of doing so... fail.

    Still, my code is pretty damn simple and the need for re-usable "objects" really isn't important, got a few basic global functions and that's it really.

  7. [gravatar]

    Shannon 02/09/08 at 23:38 #

    I am taking CompSci AP, and my teacher is talking a lot about object oriented programming, but my classmates still do not know what Java is.

    They will still do this.

  8. [gravatar]

    Vera 03/09/08 at 04:18 #

    Shannon: you don't have to know what Java is in order to understand OOP. As a matter of fact, considering that Java is a completely ObjectOriented programming language, it would be best if they learnt OOP principles BEFORE using Java.

    I'm almost tempted to write an article about when to use, and when not to use OOP, but then it's like magic: I'm hit with this instant wave of lazyness (and reluctance).

    According to my humble opinion, it's stupid to teach beginners about Object Oriented Programming without constantly comparing it to procedural programing, AND without making sure that they know what procedural programming is like.

  9. [gravatar]

    Enzo 03/09/08 at 08:13 #

    And thinking he did a tutorial over at Fuse.

  10. [gravatar]

    Chien Yee 03/09/08 at 09:17 #

    Mmhm.

    I don't give a shit about classes, nor OOP. But I think everyone should learn things thoroughly before coming to conclusions that they are experts about a topic :P

  11. [gravatar]

    echo 03/09/08 at 16:05 #

    I don't "get" OOP... yet. (I love to tack on the yet!) After all these years, I'm still stuck somewhere in the lowest part of the intermediate level when it comes to "regular" PHP. I figure, for me anyway, it's best to approach all of it as PHP.
    *Sigh* I need to work on learning more of this stuff...

    Also, I agree with Rhys. "Dickweed" should be used more often! It's such a fun word.

    Re: Chrome. It won't let me scroll using my laptop's mousepad! That gets a thumbs down.

  12. [gravatar]

    Jabed 03/09/08 at 16:40 #

    Heh, I'm quite interested into your opinions on Google Chrome that's why Ijsut had to leave a comment about it :P

    @ echo: It won't let me use my mouses scroller when I try to click on the scroller and gently move up and down (hehe that sounded a little rude)

  13. [gravatar]

    Stephanie 03/09/08 at 19:28 #

    Dickweed is fun to say.

  14. [gravatar]

    Mat 04/09/08 at 01:09 #

    I've been ripping through his code for the last 2 days as you know Jem.
    I'm not sure how to attack it with him anymore, I've left him enough feedback to go out and fix it but yet haven't heard a solitary reply, which is making me feel like my time is wasted.

    How am I supposed to teach someone who thinks they know it all already? Any suggestions from you guys would be great. I'm not going to spend my time re-writing bits and pieces if at the end of the day there is no appreciation or understanding for what i'm trying to do.

    Sigh..

  15. [gravatar]

    chanel 04/09/08 at 09:32 #

    lol I just love the way you put people on blast.

  16. [gravatar]

    Scott 04/09/08 at 15:51 #

    I don't have a clue about what that is :S
    And I don't turn it off because my alarm wont work and my friend usually rings me at 7am aswell :P

  17. [gravatar]

    Bubs 04/09/08 at 18:28 #

    One of my professors told me that same thing.

  18. [gravatar]

    Rich 04/09/08 at 18:38 #

    I visited his site but alas I saw no tutorial on OOP.

    Damn shame - after your glowing commentary I was expecting some total entertainment :)

  19. [gravatar]

    Vera 05/09/08 at 17:06 #

    Rich: OOP is a programming concept. It's not something you can write a 300 word tutorial on. I had 4 semesters dedicated to it at university and there were still a lot of things to learn AFTER I finished.

  20. [gravatar]

    Stephanie 05/09/08 at 18:00 #

    K, new blog plz.

  21. Lewis   16/09/08 at 16:30 #

    Just to play devil's advocate:

    'Sticking a few functions (aka methods) inside “class Something { }” ' - may just make it easier for the code they're used in to be expanded and improved later by another programmer. It may also be useful if that class will later be extended.

    A class that appears like it needn't be needed or even worth instantiated could be an 'abstract' class (or Interface).

    See the following: http://gd.tuwien.ac.at/languages/c/c++oop-pmueller/node6.html#SECTION00640000000000000000

Comments are closed.