Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Being a rock star programmer

Being a rock star programmer

Scheduled Pinned Locked Moved The Lounge
htmlcomquestioncode-review
44 Posts 26 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Paul Watson
    wrote on last edited by
    #1

    The best way to improve is to study code that is better than your own. Read good code written by experts, in a variety of programming languages. Study it until you understand how it works and what makes it good. That's it.

    The One Tip That Rules Them All[^] The IronMonkey claims that the one tip to being a better programmer is the above. To read good code. Anyone care to agree or disagree? (And you can skip his waffle at the begining of the post.) regards, Paul Watson Ireland Feed Henry! K(arl) wrote: oh, and BTW, CHRISTIAN ISN'T A PARADOX, HE IS A TASMANIAN!

    adapted from toxcct:

    while (!enough)
    sprintf 0 || 1
    do

    I D M G N 18 Replies Last reply
    0
    • P Paul Watson

      The best way to improve is to study code that is better than your own. Read good code written by experts, in a variety of programming languages. Study it until you understand how it works and what makes it good. That's it.

      The One Tip That Rules Them All[^] The IronMonkey claims that the one tip to being a better programmer is the above. To read good code. Anyone care to agree or disagree? (And you can skip his waffle at the begining of the post.) regards, Paul Watson Ireland Feed Henry! K(arl) wrote: oh, and BTW, CHRISTIAN ISN'T A PARADOX, HE IS A TASMANIAN!

      adapted from toxcct:

      while (!enough)
      sprintf 0 || 1
      do

      I Offline
      I Offline
      Ingo
      wrote on last edited by
      #2

      Well perhaps. But reading good books don't turn you in a good author - even if you understand them. Understanding good code and the technology is one part of it, but I think we could find more. Greetings, Ingo ------------------------------ PROST Roleplaying Game War doesn't determine who's right. War determines who's left.

      Richard Andrew x64R 1 Reply Last reply
      0
      • P Paul Watson

        The best way to improve is to study code that is better than your own. Read good code written by experts, in a variety of programming languages. Study it until you understand how it works and what makes it good. That's it.

        The One Tip That Rules Them All[^] The IronMonkey claims that the one tip to being a better programmer is the above. To read good code. Anyone care to agree or disagree? (And you can skip his waffle at the begining of the post.) regards, Paul Watson Ireland Feed Henry! K(arl) wrote: oh, and BTW, CHRISTIAN ISN'T A PARADOX, HE IS A TASMANIAN!

        adapted from toxcct:

        while (!enough)
        sprintf 0 || 1
        do

        D Offline
        D Offline
        Duncan Edwards Jones
        wrote on last edited by
        #3

        I believe in the age old phrase: practice makes perfect e.g. -Write code -Work out how that code could be written better -Repeat '--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd

        P P S 3 Replies Last reply
        0
        • P Paul Watson

          The best way to improve is to study code that is better than your own. Read good code written by experts, in a variety of programming languages. Study it until you understand how it works and what makes it good. That's it.

          The One Tip That Rules Them All[^] The IronMonkey claims that the one tip to being a better programmer is the above. To read good code. Anyone care to agree or disagree? (And you can skip his waffle at the begining of the post.) regards, Paul Watson Ireland Feed Henry! K(arl) wrote: oh, and BTW, CHRISTIAN ISN'T A PARADOX, HE IS A TASMANIAN!

          adapted from toxcct:

          while (!enough)
          sprintf 0 || 1
          do

          M Offline
          M Offline
          Monty2
          wrote on last edited by
          #4

          Write an article and submit it on CP :-D


          C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg

          J 1 Reply Last reply
          0
          • P Paul Watson

            The best way to improve is to study code that is better than your own. Read good code written by experts, in a variety of programming languages. Study it until you understand how it works and what makes it good. That's it.

            The One Tip That Rules Them All[^] The IronMonkey claims that the one tip to being a better programmer is the above. To read good code. Anyone care to agree or disagree? (And you can skip his waffle at the begining of the post.) regards, Paul Watson Ireland Feed Henry! K(arl) wrote: oh, and BTW, CHRISTIAN ISN'T A PARADOX, HE IS A TASMANIAN!

            adapted from toxcct:

            while (!enough)
            sprintf 0 || 1
            do

            G Offline
            G Offline
            Giannakakis Kostas
            wrote on last edited by
            #5

            One need not only to understand how a problem was solved, but also why it was solved in that particular way, what were the alternatives and what benefits the solution chosen offers over them. Only then the knowledge acquired can be applied to solve new problems. So reading code doesn't suffice. Discussing with experts, having them review your code could do it.

            I 1 Reply Last reply
            0
            • D Duncan Edwards Jones

              I believe in the age old phrase: practice makes perfect e.g. -Write code -Work out how that code could be written better -Repeat '--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd

              P Offline
              P Offline
              Paul Watson
              wrote on last edited by
              #6

              That would be my adage too. In his post he mentions;

              Tip 7 says to "go back and enhance your old code" because "you learn oodles of things reading your own crap, which old code always is." Sorry, but you don't learn how to write good code from reading your own bad code, you only learn why bad code is so aggravating.

              regards, Paul Watson Ireland Feed Henry! K(arl) wrote: oh, and BTW, CHRISTIAN ISN'T A PARADOX, HE IS A TASMANIAN!

              adapted from toxcct:

              while (!enough)
              sprintf 0 || 1
              do

              1 Reply Last reply
              0
              • I Ingo

                Well perhaps. But reading good books don't turn you in a good author - even if you understand them. Understanding good code and the technology is one part of it, but I think we could find more. Greetings, Ingo ------------------------------ PROST Roleplaying Game War doesn't determine who's right. War determines who's left.

                Richard Andrew x64R Offline
                Richard Andrew x64R Offline
                Richard Andrew x64
                wrote on last edited by
                #7

                ihoecken wrote:

                But reading good books don't turn you in a good author

                Wait a minute, if you are a student author with talent, and you are looking to pick up some tips and techniques, then studying good books WOULD help you. Nobody said that reading good code would turn just anybody into a good programmer. It is a given that the advice refers to people who are already programmers, have significant talent, AND have the motivation to improve their skills. Nothing will improve someone who doesn't have the commitment to make improvements.

                I 1 Reply Last reply
                0
                • G Giannakakis Kostas

                  One need not only to understand how a problem was solved, but also why it was solved in that particular way, what were the alternatives and what benefits the solution chosen offers over them. Only then the knowledge acquired can be applied to solve new problems. So reading code doesn't suffice. Discussing with experts, having them review your code could do it.

                  I Offline
                  I Offline
                  Impega
                  wrote on last edited by
                  #8

                  totally agree, we've some code here and when you look at it your first thought is that this is complete crap but when you think about it, it makes sense. If you were to change it you cant be sure what your going to break and only find out what is broken on a complete system test with 15 apps all going hammer and tongs at you. Thats why were rewriting from scratch for the next project. Imp. 'Out of Office Auto Reply' The email server is unable to verify your server connection and is unable to deliver this mesage. Please restart your computer and try sending again. '(The beauty of this is that when you return, you can see how many in-du-viduals did this over and over).

                  P 1 Reply Last reply
                  0
                  • P Paul Watson

                    The best way to improve is to study code that is better than your own. Read good code written by experts, in a variety of programming languages. Study it until you understand how it works and what makes it good. That's it.

                    The One Tip That Rules Them All[^] The IronMonkey claims that the one tip to being a better programmer is the above. To read good code. Anyone care to agree or disagree? (And you can skip his waffle at the begining of the post.) regards, Paul Watson Ireland Feed Henry! K(arl) wrote: oh, and BTW, CHRISTIAN ISN'T A PARADOX, HE IS A TASMANIAN!

                    adapted from toxcct:

                    while (!enough)
                    sprintf 0 || 1
                    do

                    N Offline
                    N Offline
                    NETWannabe
                    wrote on last edited by
                    #9

                    Developing over a decade now and one thing someone told me in my early days was...

                    There's a difference between constructive criticism and being an ass!

                    Personally, Constructive criticism is always appreciated! :) .Net Wannabe

                    1 Reply Last reply
                    0
                    • Richard Andrew x64R Richard Andrew x64

                      ihoecken wrote:

                      But reading good books don't turn you in a good author

                      Wait a minute, if you are a student author with talent, and you are looking to pick up some tips and techniques, then studying good books WOULD help you. Nobody said that reading good code would turn just anybody into a good programmer. It is a given that the advice refers to people who are already programmers, have significant talent, AND have the motivation to improve their skills. Nothing will improve someone who doesn't have the commitment to make improvements.

                      I Offline
                      I Offline
                      Ingo
                      wrote on last edited by
                      #10

                      Troposphere wrote:

                      Nobody said that reading good code would turn just anybody into a good programmer. It is a given that the advice refers to people who are already programmers, have significant talent, AND have the motivation to improve their skills.

                      No of course not. But there is more than reading code. You need background information. Programming is like writing not only practice. There is a theoretical part. Of course there are writers and programmers who learned it just by reading, but the most have to do more. Otherwise nobody would have to go to a university. Greetings, Ingo ------------------------------ PROST Roleplaying Game War doesn't determine who's right. War determines who's left. -- modified at 8:26 Thursday 30th March, 2006

                      Richard Andrew x64R P 2 Replies Last reply
                      0
                      • P Paul Watson

                        The best way to improve is to study code that is better than your own. Read good code written by experts, in a variety of programming languages. Study it until you understand how it works and what makes it good. That's it.

                        The One Tip That Rules Them All[^] The IronMonkey claims that the one tip to being a better programmer is the above. To read good code. Anyone care to agree or disagree? (And you can skip his waffle at the begining of the post.) regards, Paul Watson Ireland Feed Henry! K(arl) wrote: oh, and BTW, CHRISTIAN ISN'T A PARADOX, HE IS A TASMANIAN!

                        adapted from toxcct:

                        while (!enough)
                        sprintf 0 || 1
                        do

                        T Offline
                        T Offline
                        TheGreatAndPowerfulOz
                        wrote on last edited by
                        #11

                        I think it can certainly help to study good code written by others, especially good code written by someone who's "better" than you. But understanding the code and the whys and wherefores is of vital importance too. Is it the only tip you need. No I don't think so. Lots of practice and lots of learning from your own mistakes and those of others is equally important. I mean, how did the first "expert" programmer get that way? Certainly not by reading someone else's expert code. ---sig---
                        Might I suggest that the universe was always the size of the cosmos. It is just that at one point the cosmos was the size of a marble. -- Colin Angus Mackay Silence is the voice of complicity PS. If you don't understand my sarcasm -- go to hell!

                        R 1 Reply Last reply
                        0
                        • I Ingo

                          Troposphere wrote:

                          Nobody said that reading good code would turn just anybody into a good programmer. It is a given that the advice refers to people who are already programmers, have significant talent, AND have the motivation to improve their skills.

                          No of course not. But there is more than reading code. You need background information. Programming is like writing not only practice. There is a theoretical part. Of course there are writers and programmers who learned it just by reading, but the most have to do more. Otherwise nobody would have to go to a university. Greetings, Ingo ------------------------------ PROST Roleplaying Game War doesn't determine who's right. War determines who's left. -- modified at 8:26 Thursday 30th March, 2006

                          Richard Andrew x64R Offline
                          Richard Andrew x64R Offline
                          Richard Andrew x64
                          wrote on last edited by
                          #12

                          ihoecken wrote:

                          But there is more than reading code.

                          If you re-read the original post, you will see that it does not say that reading code is the ONLY way. It says that reading code is the best way.

                          I 1 Reply Last reply
                          0
                          • I Impega

                            totally agree, we've some code here and when you look at it your first thought is that this is complete crap but when you think about it, it makes sense. If you were to change it you cant be sure what your going to break and only find out what is broken on a complete system test with 15 apps all going hammer and tongs at you. Thats why were rewriting from scratch for the next project. Imp. 'Out of Office Auto Reply' The email server is unable to verify your server connection and is unable to deliver this mesage. Please restart your computer and try sending again. '(The beauty of this is that when you return, you can see how many in-du-viduals did this over and over).

                            P Offline
                            P Offline
                            Paul Watson
                            wrote on last edited by
                            #13

                            Surely your testing system is not working well if you can't test your refactoring? I know pretty quickly when some code I refactored has broken the existing logic thanks to tests. (Obviously performance testing is a whole different ball game.) regards, Paul Watson Ireland Feed Henry! K(arl) wrote: oh, and BTW, CHRISTIAN ISN'T A PARADOX, HE IS A TASMANIAN!

                            adapted from toxcct:

                            while (!enough)
                            sprintf 0 || 1
                            do

                            I 1 Reply Last reply
                            0
                            • T TheGreatAndPowerfulOz

                              I think it can certainly help to study good code written by others, especially good code written by someone who's "better" than you. But understanding the code and the whys and wherefores is of vital importance too. Is it the only tip you need. No I don't think so. Lots of practice and lots of learning from your own mistakes and those of others is equally important. I mean, how did the first "expert" programmer get that way? Certainly not by reading someone else's expert code. ---sig---
                              Might I suggest that the universe was always the size of the cosmos. It is just that at one point the cosmos was the size of a marble. -- Colin Angus Mackay Silence is the voice of complicity PS. If you don't understand my sarcasm -- go to hell!

                              R Offline
                              R Offline
                              R Giskard Reventlov
                              wrote on last edited by
                              #14

                              Agreed: well put. I learnt a lot from working in an environment where I had to produce rapid solutions to problems under pressure. You sink or swim pretty quickly. www.merrens.com
                              www.bkmrx.com You can ignore relatives but the neighbours live next door

                              1 Reply Last reply
                              0
                              • P Paul Watson

                                The best way to improve is to study code that is better than your own. Read good code written by experts, in a variety of programming languages. Study it until you understand how it works and what makes it good. That's it.

                                The One Tip That Rules Them All[^] The IronMonkey claims that the one tip to being a better programmer is the above. To read good code. Anyone care to agree or disagree? (And you can skip his waffle at the begining of the post.) regards, Paul Watson Ireland Feed Henry! K(arl) wrote: oh, and BTW, CHRISTIAN ISN'T A PARADOX, HE IS A TASMANIAN!

                                adapted from toxcct:

                                while (!enough)
                                sprintf 0 || 1
                                do

                                D Offline
                                D Offline
                                Doctor Nick
                                wrote on last edited by
                                #15

                                I agree. Way back in my first programming class one of the first things they told us was, "You will only get better at programming by studying and writing good code." Note they did say WRITING good code as well, not just STUDYING it. Back then there were professors telling us what was "good code" and now it's more of a judgement call but I think it's still relevant. I still try to read some type of reference book every now and then to make sure I'm still up on new techniques. ------------------------------------- Do not do what has already been done. Absolute power corrupts absolutely.. but it ROCKS absolutely, too.

                                1 Reply Last reply
                                0
                                • D Duncan Edwards Jones

                                  I believe in the age old phrase: practice makes perfect e.g. -Write code -Work out how that code could be written better -Repeat '--8<------------------------ Ex Datis: Duncan Jones Merrion Computing Ltd

                                  P Offline
                                  P Offline
                                  Paul Conrad
                                  wrote on last edited by
                                  #16

                                  Duncan Edwards Jones wrote:

                                  I believe in the age old phrase: practice makes perfect

                                  I second that :)

                                  1 Reply Last reply
                                  0
                                  • P Paul Watson

                                    The best way to improve is to study code that is better than your own. Read good code written by experts, in a variety of programming languages. Study it until you understand how it works and what makes it good. That's it.

                                    The One Tip That Rules Them All[^] The IronMonkey claims that the one tip to being a better programmer is the above. To read good code. Anyone care to agree or disagree? (And you can skip his waffle at the begining of the post.) regards, Paul Watson Ireland Feed Henry! K(arl) wrote: oh, and BTW, CHRISTIAN ISN'T A PARADOX, HE IS A TASMANIAN!

                                    adapted from toxcct:

                                    while (!enough)
                                    sprintf 0 || 1
                                    do

                                    B Offline
                                    B Offline
                                    brianwelsch
                                    wrote on last edited by
                                    #17

                                    Understanding how other's code works by reading is great, but until you've screwed up trying to implement it, you still won't really grok it. One of my professors always had the acronym, ABP, on his board. Always Be Programming he'd say ad nauseum. I rolled my eyes at the time, but it was good advice. BW


                                    If you're not part of the solution, you're part of the precipitate.
                                    -- Steven Wright

                                    D 1 Reply Last reply
                                    0
                                    • P Paul Watson

                                      Surely your testing system is not working well if you can't test your refactoring? I know pretty quickly when some code I refactored has broken the existing logic thanks to tests. (Obviously performance testing is a whole different ball game.) regards, Paul Watson Ireland Feed Henry! K(arl) wrote: oh, and BTW, CHRISTIAN ISN'T A PARADOX, HE IS A TASMANIAN!

                                      adapted from toxcct:

                                      while (!enough)
                                      sprintf 0 || 1
                                      do

                                      I Offline
                                      I Offline
                                      Impega
                                      wrote on last edited by
                                      #18

                                      This mainly comes down to load tests (100%, for 24 hours a day, for 2 weeks) e.g. memory leaks. Its the reproduction of the fault that is the pain, see potential problem, fix, rerun test and wait a week to see if it worked. At the minute we've had 2 customer faults reported in 2 months which was unheard of last year (or ever). It's stable & performant so STAY AWAY. We spent a full year getting to this stage so we're not going to muck it up now. Sure, things can be done differently, better but is it worth the possible fallout from a customer (think big CDMA/UMTS mobile network providers) if a fault does slip through (and they do). Imp. 'Out of Office Auto Reply' The email server is unable to verify your server connection and is unable to deliver this mesage. Please restart your computer and try sending again. '(The beauty of this is that when you return, you can see how many in-du-viduals did this over and over).

                                      P 1 Reply Last reply
                                      0
                                      • B brianwelsch

                                        Understanding how other's code works by reading is great, but until you've screwed up trying to implement it, you still won't really grok it. One of my professors always had the acronym, ABP, on his board. Always Be Programming he'd say ad nauseum. I rolled my eyes at the time, but it was good advice. BW


                                        If you're not part of the solution, you're part of the precipitate.
                                        -- Steven Wright

                                        D Offline
                                        D Offline
                                        Doctor Nick
                                        wrote on last edited by
                                        #19

                                        brianwelsch wrote:

                                        ABP

                                        Is that like ABC on Glengarry Glen Ross? ;P ------------------------------------- Do not do what has already been done. Absolute power corrupts absolutely.. but it ROCKS absolutely, too.

                                        B 1 Reply Last reply
                                        0
                                        • I Impega

                                          This mainly comes down to load tests (100%, for 24 hours a day, for 2 weeks) e.g. memory leaks. Its the reproduction of the fault that is the pain, see potential problem, fix, rerun test and wait a week to see if it worked. At the minute we've had 2 customer faults reported in 2 months which was unheard of last year (or ever). It's stable & performant so STAY AWAY. We spent a full year getting to this stage so we're not going to muck it up now. Sure, things can be done differently, better but is it worth the possible fallout from a customer (think big CDMA/UMTS mobile network providers) if a fault does slip through (and they do). Imp. 'Out of Office Auto Reply' The email server is unable to verify your server connection and is unable to deliver this mesage. Please restart your computer and try sending again. '(The beauty of this is that when you return, you can see how many in-du-viduals did this over and over).

                                          P Offline
                                          P Offline
                                          Paul Watson
                                          wrote on last edited by
                                          #20

                                          Was the code that works your first draft or have you rehashed it a few times? And the code as it is now, are you happy with it in other terms apart from "it works"? regards, Paul Watson Ireland Feed Henry! K(arl) wrote: oh, and BTW, CHRISTIAN ISN'T A PARADOX, HE IS A TASMANIAN!

                                          adapted from toxcct:

                                          while (!enough)
                                          sprintf 0 || 1
                                          do

                                          I 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups