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. MS STL

MS STL

Scheduled Pinned Locked Moved The Lounge
31 Posts 15 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.
  • J Offline
    J Offline
    Jim Crafton
    wrote on last edited by
    #1

    Just wondering outloud, (and partially ranting, so be warned) Why on earth is the STL that comes with VC (the PJ Plaugher code) so completely unreadable? I am pretty sure that at any job I have ever had I would have been fired on the spot for writing such spunk. Seriously, if you guys were code reviewing someone who wrote something like that what would you do? Or do people just figure that, hey I'll never have to step through any of that cause it just works. I would think that with todays compilers we could afford variable names a bit longer that "_xT" or "_P". I am just utterly amazed that the code is published in the form that it is. X|

    T C N B I 7 Replies Last reply
    0
    • J Jim Crafton

      Just wondering outloud, (and partially ranting, so be warned) Why on earth is the STL that comes with VC (the PJ Plaugher code) so completely unreadable? I am pretty sure that at any job I have ever had I would have been fired on the spot for writing such spunk. Seriously, if you guys were code reviewing someone who wrote something like that what would you do? Or do people just figure that, hey I'll never have to step through any of that cause it just works. I would think that with todays compilers we could afford variable names a bit longer that "_xT" or "_P". I am just utterly amazed that the code is published in the form that it is. X|

      T Offline
      T Offline
      Tim Smith
      wrote on last edited by
      #2

      Heh, it just isn't MS. Lots of that code came directly from the source. Tim Smith Descartes Systems Sciences, Inc.

      J 1 Reply Last reply
      0
      • J Jim Crafton

        Just wondering outloud, (and partially ranting, so be warned) Why on earth is the STL that comes with VC (the PJ Plaugher code) so completely unreadable? I am pretty sure that at any job I have ever had I would have been fired on the spot for writing such spunk. Seriously, if you guys were code reviewing someone who wrote something like that what would you do? Or do people just figure that, hey I'll never have to step through any of that cause it just works. I would think that with todays compilers we could afford variable names a bit longer that "_xT" or "_P". I am just utterly amazed that the code is published in the form that it is. X|

        C Offline
        C Offline
        CodeGuy
        wrote on last edited by
        #3

        Actually, the source code doesn't bother me as much as the documentation. Total lack of effort ... ugh. CodeGuy The WTL newsgroup: 940 members and growing ... http://groups.yahoo.com/group/wtl

        D 1 Reply Last reply
        0
        • J Jim Crafton

          Just wondering outloud, (and partially ranting, so be warned) Why on earth is the STL that comes with VC (the PJ Plaugher code) so completely unreadable? I am pretty sure that at any job I have ever had I would have been fired on the spot for writing such spunk. Seriously, if you guys were code reviewing someone who wrote something like that what would you do? Or do people just figure that, hey I'll never have to step through any of that cause it just works. I would think that with todays compilers we could afford variable names a bit longer that "_xT" or "_P". I am just utterly amazed that the code is published in the form that it is. X|

          N Offline
          N Offline
          Nick Hodapp
          wrote on last edited by
          #4

          Jim, The STL that will ship with VC++ .NET is *slightly* more readable. Whereas I don't believe there were any variable names longer than 2 letters in the 6.0 source, the 7.0-level source, at least, uses names like "_First" and "_Last" (iterator code...) :) Also, the documentation for STL has been brought inline with the rest of the VS.NET documentation, and should be much more helpful. Regards, Nick Hodapp This posting is provided “AS IS” with no warranties, and confers no rights. You assume all risk for your use. © 2001 Microsoft Corporation. All rights reserved.

          T 1 Reply Last reply
          0
          • T Tim Smith

            Heh, it just isn't MS. Lots of that code came directly from the source. Tim Smith Descartes Systems Sciences, Inc.

            J Offline
            J Offline
            Jim Crafton
            wrote on last edited by
            #5

            Well actually I'm not blaming MS at all. If there is anyone to blame I guess it would be PJ or whatever the guys name is who actually wrote the code. I am just continually amazed at how unreadable it is - how would you even debug something like that ? What a nightmare

            T 1 Reply Last reply
            0
            • J Jim Crafton

              Well actually I'm not blaming MS at all. If there is anyone to blame I guess it would be PJ or whatever the guys name is who actually wrote the code. I am just continually amazed at how unreadable it is - how would you even debug something like that ? What a nightmare

              T Offline
              T Offline
              Tim Smith
              wrote on last edited by
              #6

              No argument from me. That stuff is a nightmare. People need to learn what the spacebar is for and how to comment code. Self documenting code is a myth! Tim Smith Descartes Systems Sciences, Inc.

              J 1 Reply Last reply
              0
              • C CodeGuy

                Actually, the source code doesn't bother me as much as the documentation. Total lack of effort ... ugh. CodeGuy The WTL newsgroup: 940 members and growing ... http://groups.yahoo.com/group/wtl

                D Offline
                D Offline
                Derek Lakin
                wrote on last edited by
                #7

                I have to admit I'm with you on this one. I have dabbled in STL a couple of times, but haven't got much further than simple use of lists and strings because the documentation is so bad. I suppose I should buy a book and learn that way, but I am put off by the poor doc.s Derek Lakin. Salamander Software Ltd.

                C M 2 Replies Last reply
                0
                • J Jim Crafton

                  Just wondering outloud, (and partially ranting, so be warned) Why on earth is the STL that comes with VC (the PJ Plaugher code) so completely unreadable? I am pretty sure that at any job I have ever had I would have been fired on the spot for writing such spunk. Seriously, if you guys were code reviewing someone who wrote something like that what would you do? Or do people just figure that, hey I'll never have to step through any of that cause it just works. I would think that with todays compilers we could afford variable names a bit longer that "_xT" or "_P". I am just utterly amazed that the code is published in the form that it is. X|

                  B Offline
                  B Offline
                  Bob Moore
                  wrote on last edited by
                  #8

                  Hi, A good book to get started on STL (and general C++ too) is "Practical C++", published by QUE and written by Rob McGregor. Even I could follow it and write programs in it. Actually STL is not bad at all - the MS docs ARE rubbish. I wonder why, I wonder why, I wonder why I wonderI wonder why, I wonder why, I wonder why I wonder ...

                  J 1 Reply Last reply
                  0
                  • B Bob Moore

                    Hi, A good book to get started on STL (and general C++ too) is "Practical C++", published by QUE and written by Rob McGregor. Even I could follow it and write programs in it. Actually STL is not bad at all - the MS docs ARE rubbish. I wonder why, I wonder why, I wonder why I wonderI wonder why, I wonder why, I wonder why I wonder ...

                    J Offline
                    J Offline
                    Jim Crafton
                    wrote on last edited by
                    #9

                    Actually I know STL really well, and I'm quite comfortable with it, my problem is wanting to know how someone could publish such horrid, unreadable garbage! Oh well, such is life I suppose !

                    T 1 Reply Last reply
                    0
                    • N Nick Hodapp

                      Jim, The STL that will ship with VC++ .NET is *slightly* more readable. Whereas I don't believe there were any variable names longer than 2 letters in the 6.0 source, the 7.0-level source, at least, uses names like "_First" and "_Last" (iterator code...) :) Also, the documentation for STL has been brought inline with the rest of the VS.NET documentation, and should be much more helpful. Regards, Nick Hodapp This posting is provided “AS IS” with no warranties, and confers no rights. You assume all risk for your use. © 2001 Microsoft Corporation. All rights reserved.

                      T Offline
                      T Offline
                      Tomasz Sowinski
                      wrote on last edited by
                      #10

                      the 7.0-level source, at least, uses names like "_First" and "_Last" (iterator code...) Wow! That's what we call 'progress'! ;P BTW: any debug checks a'la STLPort in STL shipping with VC++.NET? Tomasz Sowinski -- http://www.shooltz.com

                      1 Reply Last reply
                      0
                      • T Tim Smith

                        No argument from me. That stuff is a nightmare. People need to learn what the spacebar is for and how to comment code. Self documenting code is a myth! Tim Smith Descartes Systems Sciences, Inc.

                        J Offline
                        J Offline
                        Jim Crafton
                        wrote on last edited by
                        #11

                        Yeah, what is mind boggling to me, is it almost seems as if someone went out of their way to make it impossible to read or debug. What would you do if someone working for you wrote somethign like this ? Personally I'd lobby for their being fired cause it is so irresponsible.

                        C 1 Reply Last reply
                        0
                        • J Jim Crafton

                          Actually I know STL really well, and I'm quite comfortable with it, my problem is wanting to know how someone could publish such horrid, unreadable garbage! Oh well, such is life I suppose !

                          T Offline
                          T Offline
                          Tomasz Sowinski
                          wrote on last edited by
                          #12

                          Maybe this PJ guy wanted to compile this source on 2-bit compiler running within 1KB memory space. You know, some embedded stuff :-D Tomasz Sowinski -- http://www.shooltz.com

                          1 Reply Last reply
                          0
                          • J Jim Crafton

                            Just wondering outloud, (and partially ranting, so be warned) Why on earth is the STL that comes with VC (the PJ Plaugher code) so completely unreadable? I am pretty sure that at any job I have ever had I would have been fired on the spot for writing such spunk. Seriously, if you guys were code reviewing someone who wrote something like that what would you do? Or do people just figure that, hey I'll never have to step through any of that cause it just works. I would think that with todays compilers we could afford variable names a bit longer that "_xT" or "_P". I am just utterly amazed that the code is published in the form that it is. X|

                            I Offline
                            I Offline
                            Igor Proskuriakov
                            wrote on last edited by
                            #13

                            It was one of the reasons why many people decided to switch to better STL, especially STLPort X| Igor Proskuriakov

                            T 1 Reply Last reply
                            0
                            • I Igor Proskuriakov

                              It was one of the reasons why many people decided to switch to better STL, especially STLPort X| Igor Proskuriakov

                              T Offline
                              T Offline
                              Tim Smith
                              wrote on last edited by
                              #14

                              A lot has been done to improve the code base over the years. I use STLPort too. :) Tim Smith Descartes Systems Sciences, Inc.

                              J 1 Reply Last reply
                              0
                              • D Derek Lakin

                                I have to admit I'm with you on this one. I have dabbled in STL a couple of times, but haven't got much further than simple use of lists and strings because the documentation is so bad. I suppose I should buy a book and learn that way, but I am put off by the poor doc.s Derek Lakin. Salamander Software Ltd.

                                C Offline
                                C Offline
                                CodeGuy
                                wrote on last edited by
                                #15

                                I highly recommend The C++ Standard Library by Josuittis. But VC++ is so poor on compliance you'll end up pulling your hair out even with simple examples. (Some that come to mind are multimap, mem_fun and bitset). STLPort is a little better with it, but not great. CodeGuy The WTL newsgroup: 940 members and growing ... http://groups.yahoo.com/group/wtl

                                1 Reply Last reply
                                0
                                • J Jim Crafton

                                  Yeah, what is mind boggling to me, is it almost seems as if someone went out of their way to make it impossible to read or debug. What would you do if someone working for you wrote somethign like this ? Personally I'd lobby for their being fired cause it is so irresponsible.

                                  C Offline
                                  C Offline
                                  Chris Losinger
                                  wrote on last edited by
                                  #16

                                  is it almost seems as if someone went out of their way to make it impossible to read or debug you are 100% correct. it is done on purpose. the purpose being: since it's not your code to maintain (or steal from, depending on your point of view), you have no business even looking at it. it's a way of 1. protecting intellectual property and 2. preventing you from changing the STL (because you don't know what you're changing) -c ------------------------------ Smaller Animals Software, Inc. http://www.smalleranimals.com

                                  T J 2 Replies Last reply
                                  0
                                  • C Chris Losinger

                                    is it almost seems as if someone went out of their way to make it impossible to read or debug you are 100% correct. it is done on purpose. the purpose being: since it's not your code to maintain (or steal from, depending on your point of view), you have no business even looking at it. it's a way of 1. protecting intellectual property and 2. preventing you from changing the STL (because you don't know what you're changing) -c ------------------------------ Smaller Animals Software, Inc. http://www.smalleranimals.com

                                    T Offline
                                    T Offline
                                    Tim Smith
                                    wrote on last edited by
                                    #17

                                    In Microsoft's case, that argument just doesn't hold water since ATL and WTL are reasonably readable. I would nearly bet that the only reason that many versions of STL are unreadable is that the original author or the HP group liked that style of coding. (God help HP...) Tim Smith Descartes Systems Sciences, Inc.

                                    R 1 Reply Last reply
                                    0
                                    • T Tim Smith

                                      In Microsoft's case, that argument just doesn't hold water since ATL and WTL are reasonably readable. I would nearly bet that the only reason that many versions of STL are unreadable is that the original author or the HP group liked that style of coding. (God help HP...) Tim Smith Descartes Systems Sciences, Inc.

                                      R Offline
                                      R Offline
                                      realJSOP
                                      wrote on last edited by
                                      #18

                                      We're using HP's STL code...

                                      T J C 3 Replies Last reply
                                      0
                                      • R realJSOP

                                        We're using HP's STL code...

                                        T Offline
                                        T Offline
                                        Tim Smith
                                        wrote on last edited by
                                        #19

                                        How much did MS bastardize their version? I have never seen the actual HP code but have seen all the HP copyright statements in MS-STL. I have been using STLPort for a while. I like it. (mostly because it works with Windows CE) Tim Smith Descartes Systems Sciences, Inc.

                                        1 Reply Last reply
                                        0
                                        • R realJSOP

                                          We're using HP's STL code...

                                          J Offline
                                          J Offline
                                          Jim Crafton
                                          wrote on last edited by
                                          #20

                                          you kind of left us hangin there...:) Is that bad ? Is it as ugly as the MS stuff ?

                                          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