Slashdot Mirror


Ask Slashdot: What Makes Some Code Particularly Good?

itwbennett writes: When developers talk about what makes some source code particularly 'good,' a handful of qualities tend to get mentioned frequently (functional, readable, testable). What would you add to this list?

9 of 298 comments (clear)

  1. Obviously by Anonymous Coward · · Score: 5, Funny

    When it's mine.

    1. Re:Obviously by Anonymous+Brave+Guy · · Score: 4, Funny

      Tell that to your six-months-ago self, who wrote the mess you've been debugging all week. :-)

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    2. Re:Obviously by nitehawk214 · · Score: 4, Funny

      I hate it when I have to debug some other asshole's code.

      I hate it more when the asshole is six-months-ago-me.

      --
      I'm a good cook. I'm a fantastic eater. - Steven Brust
  2. Not being PHP by drakaan · · Score: 1, Funny

    Not being PHP would have to be in my top two list for what makes good code. Not being Visual Basic would be #1.

    --
    "Murphy was an optimist" - O'Toole's commentary on Murphy's Law
  3. GOTO by s.petry · · Score: 3, Funny

    Lots and lots of GOTO NNNN and I know it's good code!

    --

    -The wise argue that there are few absolutes, the fool argues that there are no probabilities.

  4. take it from a pro by nimbius · · Score: 4, Funny

    I think i can shed light on this subject, having several years experience in this field. New programmers and seasoned alike often make this mistake, either through carelessness or ignorance. When working to write good code, you must make sure to set good="yes" or good="veryyes." ive written code for 20 years now and this has only ever failed me in PHP. Apparently the language does not support "good" code.

    --
    Good people go to bed earlier.
  5. Rhyming variable names by gurps_npc · · Score: 3, Funny
    Yes, that is the key measure of how good your code is.

    If you have no rhyming variable names, then your code sucks. 1 stars

    If you have one or two, it is barely acceptable. 2 stars

    Half rhyme, then 3 stars.

    If most, but not all, rhyme, 4 stars.

    If every single variable rhymes with at least one other variable, you have a great job, 5 stars.

    To get the coveted 6 stars, all the variable names have to rhyme with each other.

    --
    excitingthingstodo.blogspot.com
  6. diversity! by digsbo · · Score: 3, Funny

    When it's written by a gender and race balanced team, in a positive, multicultural environment, then it's good code!

  7. Re:Well commented. by Jamu · · Score: 5, Funny

    What if the comment is // this code sucks.?

    --
    Who ordered that?