Diamond asterisk

This is a discussion on Diamond asterisk within the C++ Programming forums, part of the General Programming Boards category; Originally Posted by Prelude ...because a good programmer tests her code thoroughly before releasing it.... What a sexist you are, ...

  1. #16
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    Quote Originally Posted by Prelude
    ...because a good programmer tests her code thoroughly before releasing it....
    What a sexist you are, assuming that a good programmer would be a "her"
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  2. #17
    System.out.println("");
    Join Date
    Jan 2005
    Posts
    84
    Sorry for giving the answer. I thought I was just helping, but I absolutely can see why it's wrong to do his work for him.

    The reason I said "but I am pretty sure that it works" is because I tested it with a few numbers and it gave me the correct results so I couldn't find anything wrong with it, but I didn't exhaustively check for errors. Such as what if they enter too few columns such that for the given number of rows it trims off part of the diamond? I suppose I could check for more errors, but it's really not that important to me for this little program.

  3. #18
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >What a sexist you are, assuming that a good programmer would be a "her"
    I'm not sexist. I'm egotistical.



    Well, probably a little sexist too, now that I think about it.
    My best code is written with the delete key.

  4. #19
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,436
    A good programmer is a master programmer. One filled with Tao. That lives within the Tao. He, is the Tao and the Tao is he.

    ... consequently, a good programmer is an it.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #20
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,485
    *bows*
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  6. #21
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >... consequently, a good programmer is an it.
    A good programmer may be an it, but that sounds too much like objectifying programmers, which can only be bad. How about being a great programmer? A great programmer is nothing because nothing is everything and a great programmer knows everything, so by knowing everything a great programmer ends up being everything and to become everything you must be nothing. So to become a great programmer you need...um...you need to...uhhh...not be a programmer at all? Drat! Now I've gone and confused myself.


    As you were.
    My best code is written with the delete key.

  7. #22
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,485
    Some are born great.
    Some have greatness thrust upon them.
    Some accidentally discover greatness, then run away from it.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  8. #23
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    One thing a programmer is not...a philosopher
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  9. #24
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    Quote Originally Posted by Salem
    ...Some have greatness thrust upon them...
    or into them.

    OOOHHHHhhhh... that was so unlike me. I'm very concerned
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  10. #25
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >or into them.
    >OOOHHHHhhhh... that was so unlike me. I'm very concerned
    I can't decide if you said something profound or dirty. I've been around you guys too long it seems.
    My best code is written with the delete key.

  11. #26
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,659
    Daoist theory attempts to explain greatness.
    To be great is to go on;
    to go on is to go far;
    to go far is to return.

    Therefore you can be great as long as you keep trying and succeed in doing that. I'm positive, when applied to programming, the last line has something to do with "going back to basics" in order to fully understand something more complex.

    But this is of course my own boring interpretation. Thinking is hard!

  12. #27
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >But this is of course my own boring interpretation.
    That's the problem. It sounds good but nobody really knows what it means. I wonder how many philosophers were clinically insane.
    My best code is written with the delete key.

  13. #28
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,220
    I believe this fulfills all the requirements:
    Code:
    #include <stdio.h>
    
    int main(void)
    {
        int i, j;
        char *diamond[8] = { "      *\n",
                             "    * * *\n",
                             "  * * * * *\n",
                             "* * * * * * *\n",
                             "  * * * * *\n",
                             "    * * *\n",
                             "      *\n", NULL };
                             
        for (i = 0; diamond[i] != NULL; i++) {
            for (j = 0; diamond[i][j] != '\0'; j++) {
                printf("%c", diamond[i][j]);
            }
        }
        
        return 0;
    }
    edit: oh, hello c++ board, thought I was on the c one.
    Last edited by Brian; 07-22-2006 at 07:01 PM.

  14. #29
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Quote Originally Posted by Prelude
    >But this is of course my own boring interpretation.
    That's the problem. It sounds good but nobody really knows what it means. I wonder how many philosophers were clinically insane.
    All of them. Just like the mathematicians.

  15. #30
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,436
    Quote Originally Posted by Prelude
    I wonder how many philosophers were clinically insane.
    One has to be at least partially insane to try and explain human behavior and existence. Actually... those who did a good job at it had to be definitely insane, I think.

    Which brings us to the original post in this thread...

    ... It doesn't. But i'm desperatly trying not to have it closed.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Page 2 of 3 FirstFirst 123 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple Blackjack Program
    By saber1357 in forum C Programming
    Replies: 1
    Last Post: 03-28-2009, 03:19 PM
  2. Bitwise Unwanted Output
    By pobri19 in forum C++ Programming
    Replies: 4
    Last Post: 09-15-2008, 04:07 AM
  3. command line asterisk converted to list
    By linucksrox in forum C++ Programming
    Replies: 19
    Last Post: 07-14-2006, 03:22 PM
  4. making a diamond using functions
    By Nikisha in forum C++ Programming
    Replies: 4
    Last Post: 03-30-2003, 08:05 PM
  5. Diamond
    By C++Nerd in forum C++ Programming
    Replies: 1
    Last Post: 10-04-2002, 04:36 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21