September 2, 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.

Comments

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

  1. Rhys   September 2nd, 2008 [gravatar]

    More people need to use the phrase dickweed :)

  2. Jabed   September 2nd, 2008 [gravatar]

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

  3. Jem   September 2nd, 2008 [gravatar]

    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. Amelie   September 2nd, 2008 [gravatar]

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

  5. Brianna   September 2nd, 2008 [gravatar]

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

  6. Nick   September 2nd, 2008 [gravatar]

    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. Shannon   September 2nd, 2008 [gravatar]

    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. Vera   September 3rd, 2008 [gravatar]

    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. Enzo   September 3rd, 2008 [gravatar]

    And thinking he did a tutorial over at Fuse.

  10. Chien Yee   September 3rd, 2008 [gravatar]

    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. echo   September 3rd, 2008 [gravatar]

    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. Jabed   September 3rd, 2008 [gravatar]

    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. Stephanie   September 3rd, 2008 [gravatar]

    Dickweed is fun to say.

  14. Mat   September 4th, 2008 [gravatar]

    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. chanel   September 4th, 2008 [gravatar]

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

  16. Scott   September 4th, 2008 [gravatar]

    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. Bubs   September 4th, 2008 [gravatar]

    One of my professors told me that same thing.

  18. Rich   September 4th, 2008 [gravatar]

    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. Vera   September 5th, 2008 [gravatar]

    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. Stephanie   September 5th, 2008 [gravatar]

    K, new blog plz.

  21. Lewis   September 16th, 2008 [gravatar]

    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

Leave a Reply

No HTML please; first time comments are moderated; comments left without a legitimate first name/nickname and e-mail will be deleted (no, your momma didn't call you "cheap quality wardrobes").

[geek inside avatar]Welcome to the blog of girl geek & php ninja extraordinaire 'Jem'. Web developer, mum and supreme crazy cat lady.. »

---

Post stats

Posted on September 2, 2008 in with 21 comments

---

Related posts

Other posts you might be interested in:

---

Share this post

Talk about this post on your favourite social media website:

tweet this add to stumbleupon add to delicious add to reddit digg this post add to newsvine share on facebook share on friendfeed

---

Subscribe

Like this post? Why not subscribe to the feed?

Knowledge

Pleasure

Archives

See more...