SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Member
    Join Date
    Feb 2005
    Location
    Appleton, WI
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    So, when do you know you code well?

    I posted this image at another forum as kind of a gag:

    http://www.phait-accompli.com/crap/beautifulcode.jpg

    One person remarked that there was nothing beautiful about the coding style. I replied it isn't about the style, just the silly font idea.

    But it got me thinking - when do you know you are coding efficiently and constructively? When do you know are writing well written code, basically? It can't be that obvious.
    Webdesign, Personal, Articles & Interviews: phait-accompli.com

  2. #2
    SitePoint Guru ujjwal's Avatar
    Join Date
    Oct 2004
    Location
    kolkata
    Posts
    821
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is an good question.
    In theory.The time complexity and space complexity of an algorithm of your program
    In practical How It is working with a few codes(small codes) with indention.means your code is not Procedural way.It should so compact that Every programmar knows after your written it.
    This is my approach. PHP guru Can tell you more prominent or say correct way.
    -::Ujjwal::-
    Visit My Site

  3. #3
    SitePoint Member
    Join Date
    Feb 2005
    Location
    Appleton, WI
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm giving this a bump, I know alot of traffic comes through here and I'm real interested in more thoughts.
    Webdesign, Personal, Articles & Interviews: phait-accompli.com

  4. #4
    WebAmoeba mythix's Avatar
    Join Date
    Aug 2002
    Location
    here
    Posts
    578
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In the case of PHP, turn on all warnings in the ini file

    its amazing how many warnings youyr code can produce. If you get rid of them tharts a good start
    Laws are like sausages. You have much more respect for them if you haven't actually seen how they're made.

    http://www.webamoeba.co.uk

  5. #5
    SitePoint Addict
    Join Date
    Oct 2004
    Location
    Brooklyn, NY
    Posts
    359
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When do you know are writing well written code, basically?
    When you don't have to ask. :-)

    Just kidding.

    Personally, I feel confident that I can determine the approximate quality of a developer from ten feet away. Those who write neat code typically also write good code. Those who are sloppy or inconsistent in their formatting are more likely to write poor code.

  6. #6
    $this->toCD-R(LP); vinyl-junkie's Avatar
    Join Date
    Dec 2003
    Location
    Federal Way, Washington (USA)
    Posts
    1,524
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If I can look at code that I did a year or more ago and still understand and follow what it's doing, then I would say it's well written.

    I know your original post was sort of a joke, but "pretty" code doesn't always equate to well-written.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    Showcase your music collection on the Web

  7. #7
    SitePoint Zealot
    Join Date
    Oct 2004
    Location
    naperville
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OOP + Test Driven Development is a good indication of if you write good PHP code.

  8. #8
    eschew sesquipedalians silver trophy sweatje's Avatar
    Join Date
    Jun 2003
    Location
    Iowa, USA
    Posts
    3,749
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "
    Quote Originally Posted by Antoine de Saint-Exup'ery
    A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away.
    Jason Sweat ZCE - jsweat_php@yahoo.com
    Book: PHP Patterns
    Good Stuff: SimpleTest PHPUnit FireFox ADOdb YUI
    Detestable (adjective): software that isn't testable.

  9. #9
    SitePoint Addict loadx's Avatar
    Join Date
    Jul 2004
    Location
    Melbourne, VIC, Australia
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice Quote Sweatje

    simplify the code as much as you can but still make it readable..make it easier to modify but in the industry i would rephrase that to 'make it easier for your own team and yourself to modify'.

  10. #10
    SitePoint Addict
    Join Date
    May 2003
    Location
    Calgary, Alberta, Canada
    Posts
    275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is a thoughtworks article out just today that touches on this subject. Michael Feather's position in Before Clarity is that sometimes you should sacrifice the clarity of code for testability of code.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •