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. What code should I read?

What code should I read?

Scheduled Pinned Locked Moved The Lounge
comquestioncode-review
32 Posts 21 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.
  • K kdmote

    [I hope this doesn't cross the line of what I _shouldn't_ post about here...] I was just reminded of the oft-given advice that to improve your coding skills you should "read lots of code". This made me wonder: _What_ code should I read? If I were a painting instructor, I would advise my students to study the masters: Michelangelo, VanGogh, Norman Rockwell, Bill Watterson. But what about coders? What are some of the classic code-bases that every aspiring software developer should read at least once in his/her life? Alas, some of the best are doubtless locked up behind proprietary firewalls, but of the code that is publicly available, which programs would you suggest are worthy of studying or even emulating?

    K Offline
    K Offline
    Kirk 10389821
    wrote on last edited by
    #23

    As always, It Depends. I recommend this a lot to new coders. People learning a new language. I also recommend learning/reading code that solves problems you understand, or you truly want to understand. LZW Compression was eye opening. Also, are you reading for a Novel experience or to emulate the Greats? Learning a new language or fine tuning your skills? It all matters. Are you going to skim and then focus or focus on every line of code, executing it in your head? Reading many of your replies, it sounds like you are pretty far along in programming. You are more interested in learning from the masters. To me, that means delving down into the more complicated code like Roslyn. I enjoy reading well written libraries the most. Even the elegance of x = passed || default; to initialize something conditionally is cool. A line of code is like a single thought. Developing such thoughts to harness a little more value than 3 lines of code is cool. Of course, always read the old C standard library code!

    1 Reply Last reply
    0
    • K Kevin Marois

      I dunno... I've seen code from MS that leaves me scratching my head and wondering :omg: :omg: :omg: :confused::confused::confused: WTF was this guy thinkin?

      If it's not broken, fix it until it is

      P Offline
      P Offline
      patbob
      wrote on last edited by
      #24

      Kevin Marois wrote:

      I've seen code from MS that leaves me scratching my head and wondering WTF was this guy thinkin?

      That just means that he should be reading your code :)

      We can program with only 1's, but if all you've got are zeros, you've got nothing.

      1 Reply Last reply
      0
      • D Duncan Edwards Jones

        There's a lot of the .NET world that is now open source (Roslyn code compilers, Entity Framework)...I'd say reading through how they organise their code would be somewhat informative.

        S Offline
        S Offline
        SeattleC
        wrote on last edited by
        #25

        If you're the person who wants to drive a humvee or a unimog, then microsoft code is for you. It's ugly. It's functional. It's uninspired. It's very durable. I have never seen microsoft code that was in any way elegant or subtle. It's ok code to learn on, but will never inspire you with beauty.

        1 Reply Last reply
        0
        • K kdmote

          Come on, OG. I expected this from some of the others, but not from _you_! Would you advise an auto-designer not to study a Lamborghini? Would a growing architect gain nothing from a study of the Burj Al Arab, or the One World Trade Center? Can an aspiring composer learn nothing from analyzing the techniques Beethoven, Bach, and Bublé? The same argument about "the final product" could be made about each of those fields, but it wouldn't hold up. Of course I would love to study the personal notes of Tolkien where he divulges all his inner grapplings with plot twist connundrums, but in lieu of that I am still a much better author having merely _read_ LOTR three times. All I am saying, is that when it comes to code, it is much more difficult (for me, anyways) to find the open source code that is worthy of being studied. So I am simply asking for recommendations. Have you ever read a program -- perhaps in a completely different field than your own -- which made you say, "Wow, that was put together well. It's intuitive, clean, elegant, and robust." I think somebody needs to start compiling a list of such masterpieces for the rest of us to study and admire.

          S Offline
          S Offline
          SeattleC
          wrote on last edited by
          #26

          kdmote wrote:

          Would you advise an auto-designer not to study a Lamborghini?

          It's easy to spot a lamborghini by its smooth lines and the sound its motor makes. With code, you have to get it into your head before discovering if it's a lamborghini or a rusty Yugo with 100,000 miles on it. For every epic software poem, there are 10,000 drab tomes of uninspired code.

          K 1 Reply Last reply
          0
          • K kdmote

            [I hope this doesn't cross the line of what I _shouldn't_ post about here...] I was just reminded of the oft-given advice that to improve your coding skills you should "read lots of code". This made me wonder: _What_ code should I read? If I were a painting instructor, I would advise my students to study the masters: Michelangelo, VanGogh, Norman Rockwell, Bill Watterson. But what about coders? What are some of the classic code-bases that every aspiring software developer should read at least once in his/her life? Alas, some of the best are doubtless locked up behind proprietary firewalls, but of the code that is publicly available, which programs would you suggest are worthy of studying or even emulating?

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #27

            Anything with 101 samples... Official Visual Studio 2010 Samples for C# 4.0 in C#, VB.NET, C++[^] 101 LINQ Samples in C#[^]

            K 1 Reply Last reply
            0
            • S SeattleC

              kdmote wrote:

              Would you advise an auto-designer not to study a Lamborghini?

              It's easy to spot a lamborghini by its smooth lines and the sound its motor makes. With code, you have to get it into your head before discovering if it's a lamborghini or a rusty Yugo with 100,000 miles on it. For every epic software poem, there are 10,000 drab tomes of uninspired code.

              K Offline
              K Offline
              kdmote
              wrote on last edited by
              #28

              EXACTLY. Which is why I'm asking for recommendations. I'd like somebody to start compiling a list of the epics, so we can all benefit from studying them.

              S 1 Reply Last reply
              0
              • L Lost User

                Anything with 101 samples... Official Visual Studio 2010 Samples for C# 4.0 in C#, VB.NET, C++[^] 101 LINQ Samples in C#[^]

                K Offline
                K Offline
                kdmote
                wrote on last edited by
                #29

                Love it! Thanks!

                1 Reply Last reply
                0
                • K Kevin Marois

                  I dunno... I've seen code from MS that leaves me scratching my head and wondering :omg: :omg: :omg: :confused::confused::confused: WTF was this guy thinkin?

                  If it's not broken, fix it until it is

                  H Offline
                  H Offline
                  Herbie Mountjoy
                  wrote on last edited by
                  #30

                  You mean those "example code" sections that presume you have reached the page after having read the preceding twenty, when really all you did was search straight to this one? I may not last forever but the mess I leave behind certainly will.

                  1 Reply Last reply
                  0
                  • K kdmote

                    EXACTLY. Which is why I'm asking for recommendations. I'd like somebody to start compiling a list of the epics, so we can all benefit from studying them.

                    S Offline
                    S Offline
                    SeattleC
                    wrote on last edited by
                    #31

                    I've never looked at it in total to be sure, but Stepanov's original Standard Template Library is probably brilliant. Unfortunately, the version that comes with Visual Studio has been messed up with non-core stuff and compiler dependencies, so it's quite hard to understand.

                    1 Reply Last reply
                    0
                    • K kdmote

                      [I hope this doesn't cross the line of what I _shouldn't_ post about here...] I was just reminded of the oft-given advice that to improve your coding skills you should "read lots of code". This made me wonder: _What_ code should I read? If I were a painting instructor, I would advise my students to study the masters: Michelangelo, VanGogh, Norman Rockwell, Bill Watterson. But what about coders? What are some of the classic code-bases that every aspiring software developer should read at least once in his/her life? Alas, some of the best are doubtless locked up behind proprietary firewalls, but of the code that is publicly available, which programs would you suggest are worthy of studying or even emulating?

                      A Offline
                      A Offline
                      AndrewJacksonZA
                      wrote on last edited by
                      #32

                      kdmote wrote:

                      If I were a painting instructor, I would advise my students to study the masters: ... Bill Watterson

                      I agree!

                      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