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.

21 Comments

  1. More people need to use the phrase dickweed :)

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

  3. Jem

    02 Sep at 9:20 pm

    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. I did that at first. Now I lernded & i r betta. Yus.

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

  6. 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. 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. 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. And thinking he did a tutorial over at Fuse.

  10. 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. 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. 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. Dickweed is fun to say.

  14. 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. lol I just love the way you put people on blast.

  16. 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. One of my professors told me that same thing.

  18. 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. 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. K, new blog plz.

  21. 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