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. Data structures?

Data structures?

Scheduled Pinned Locked Moved The Lounge
c++helpquestion
10 Posts 6 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.
  • C Offline
    C Offline
    Code Druid
    wrote on last edited by
    #1

    Anyone see the need for articles covering data structures on Code Project? Quite frankly, STL is great, but it's promoting a whole new generation of "data structure unaware" programmers. Tell me what you think. "Assumptions are the mother of all screwups" - My esteemed colleague, Bug Druid.

    T M T N 4 Replies Last reply
    0
    • C Code Druid

      Anyone see the need for articles covering data structures on Code Project? Quite frankly, STL is great, but it's promoting a whole new generation of "data structure unaware" programmers. Tell me what you think. "Assumptions are the mother of all screwups" - My esteemed colleague, Bug Druid.

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

      I don't think the STL is responsible for newbies not understanding data structures. There's always a group of "programmers" that really don't have a clue. I wouldn't blame their cluelessness on STL.

      1 Reply Last reply
      0
      • C Code Druid

        Anyone see the need for articles covering data structures on Code Project? Quite frankly, STL is great, but it's promoting a whole new generation of "data structure unaware" programmers. Tell me what you think. "Assumptions are the mother of all screwups" - My esteemed colleague, Bug Druid.

        M Offline
        M Offline
        Mike Burston
        wrote on last edited by
        #3

        "data structure unaware" programmers. If you want to write an article that details the the differences and advantages/disadvantages of vectors/lists/maps/etc the I think that's a good idea. A strong understanding o the nature of different data structures (whether it's STL, MFC or some other structure) is a good thing. If you want to write an article about "how to implement data structures", then I think this is of far less value - it's not that it's 'bad', it's just that there are so many good libraries (like STL) around now that it's unlikely that you'll need to roll your own, so learning 'how' is just an exercise in programming. That doesn't make it bad, but I can think of many other ways of practicing design/programming skills. ----------------------- The sermon on the mount... Man 1 : Hear that? Blessed are the greek. Man 2 : The greek? Man 1 : Well apparently, he's going to inherit the earth. Man 2 : Did anyone catch his name?

        C 1 Reply Last reply
        0
        • C Code Druid

          Anyone see the need for articles covering data structures on Code Project? Quite frankly, STL is great, but it's promoting a whole new generation of "data structure unaware" programmers. Tell me what you think. "Assumptions are the mother of all screwups" - My esteemed colleague, Bug Druid.

          T Offline
          T Offline
          tonyschr
          wrote on last edited by
          #4

          No more data unaware than the developers that seem to think that everything needs to be either 1) in an array, or 2) in an XML DOM (as the data structure). STL was shunned, and God forbid you build a generic templated linked list class and use it where it's more appropriate than an array. (If you can't tell, I'm venting. Grrr...) --CoolDev :cool:

          C 1 Reply Last reply
          0
          • M Mike Burston

            "data structure unaware" programmers. If you want to write an article that details the the differences and advantages/disadvantages of vectors/lists/maps/etc the I think that's a good idea. A strong understanding o the nature of different data structures (whether it's STL, MFC or some other structure) is a good thing. If you want to write an article about "how to implement data structures", then I think this is of far less value - it's not that it's 'bad', it's just that there are so many good libraries (like STL) around now that it's unlikely that you'll need to roll your own, so learning 'how' is just an exercise in programming. That doesn't make it bad, but I can think of many other ways of practicing design/programming skills. ----------------------- The sermon on the mount... Man 1 : Hear that? Blessed are the greek. Man 2 : The greek? Man 1 : Well apparently, he's going to inherit the earth. Man 2 : Did anyone catch his name?

            C Offline
            C Offline
            Code Druid
            wrote on last edited by
            #5

            Thanks for the thoughts! But I beg to differ on your point regarding it's of 'far' less value. If so, why does every computer science course place a major emphasis on data structures? Data structures teach much more than routine programming-one also needs to analyze the solutions in terms of efficiency, etc. This will undoubtedly bolster analytical skills in your everyday programming-even when you use STL. Besides, there will come a time when the STL may *not* cut it for a certain type of structure-hash tables come to mind. Here's a thought: using STL over your own data structures might be good and is akin to class abstraction (you 'insulate' yourself). Unfortunately, excessive abstraction can be a bad thing too-you know it works-but not *why*. My 2 cents. :suss: "Assumptions are the mother of all screwups"

            M 1 Reply Last reply
            0
            • T tonyschr

              No more data unaware than the developers that seem to think that everything needs to be either 1) in an array, or 2) in an XML DOM (as the data structure). STL was shunned, and God forbid you build a generic templated linked list class and use it where it's more appropriate than an array. (If you can't tell, I'm venting. Grrr...) --CoolDev :cool:

              C Offline
              C Offline
              Code Druid
              wrote on last edited by
              #6

              Ah...nicely put. I empathize with you...come to think of it, STL code is so gobble-de-gook (for obvious 'copyright' reasons). Ugh. Thank God MFC wasn't mangled. :suss: "Assumptions are the mother of all screwups" - My esteemed colleague, Bug Druid.

              A 1 Reply Last reply
              0
              • C Code Druid

                Thanks for the thoughts! But I beg to differ on your point regarding it's of 'far' less value. If so, why does every computer science course place a major emphasis on data structures? Data structures teach much more than routine programming-one also needs to analyze the solutions in terms of efficiency, etc. This will undoubtedly bolster analytical skills in your everyday programming-even when you use STL. Besides, there will come a time when the STL may *not* cut it for a certain type of structure-hash tables come to mind. Here's a thought: using STL over your own data structures might be good and is akin to class abstraction (you 'insulate' yourself). Unfortunately, excessive abstraction can be a bad thing too-you know it works-but not *why*. My 2 cents. :suss: "Assumptions are the mother of all screwups"

                M Offline
                M Offline
                Mike Burston
                wrote on last edited by
                #7

                If so, why does every computer science course place a major emphasis on data structures? These are the same courses that (generally) used to emphasize Pascal, and have now moved to Java, right? The answer is that (a) until the advent of the STL there was NO widespread container (data structures) implementation available for C++, so it was necessary to teach programmers how to write them; (b) they DO provide a clear and clean initial lesson in design and programming; and (c) universities are ALWAYS playing catch up - the lecturer teaches what he knows, and when did he learn it? Five or ten years ago! This is just the nature of the beast. To sum up, I believe that Unis teach data structures because they have not yet realised it is no longer a cornerstone of the skillset - old habits die hard. Data structures teach much more than routine programming I agree - my point is that there are other topics that teach these lessons just as well, or better, and are more practical (that is, of real world use). For instance, designing a set of custom manipulators for iostream use that can read/write XML - detailed, involves lots of decisions and tradeoffs in implementation, and does NOT replicate an existing part of the standard C++ library. Or building a set of 'smart pointer' classes that trade off the various strengths and weaknesses of the smart pointer concepts - this can then be used as a substitute for the default 'auto_ptr'. Besides, there will come a time when the STL may *not* cut it for a certain type of structure-hash tables come to mind Yes, hash tables are an option for an article. STL does not have a standard hash table, although most STL implementains offer at least one 'non-standard' hash table. My 'far less useful' would be in relation to any artile that was describing the gory details of how to build vectors, lists, maps, sets, trees, etc. ----------------------- The sermon on the mount... Man 1 : Hear that? Blessed are the greek. Man 2 : The greek? Man 1 : Well apparently, he's going to inherit the earth. Man 2 : Did anyone catch his name?

                1 Reply Last reply
                0
                • C Code Druid

                  Anyone see the need for articles covering data structures on Code Project? Quite frankly, STL is great, but it's promoting a whole new generation of "data structure unaware" programmers. Tell me what you think. "Assumptions are the mother of all screwups" - My esteemed colleague, Bug Druid.

                  N Offline
                  N Offline
                  Nish Nishant
                  wrote on last edited by
                  #8

                  when they taught us data structures in college I said, "yuck, why would anyone want to make circular queues and n-trees or whatever" now that I have realized why, its too late.... wish i had paid attention then would have made things a lot easier whats funny is lots of advanced level MFC programmers would probably have a lot of trouble of they were asked to implement a doubly linked list in plain c++ Nish

                  A 1 Reply Last reply
                  0
                  • N Nish Nishant

                    when they taught us data structures in college I said, "yuck, why would anyone want to make circular queues and n-trees or whatever" now that I have realized why, its too late.... wish i had paid attention then would have made things a lot easier whats funny is lots of advanced level MFC programmers would probably have a lot of trouble of they were asked to implement a doubly linked list in plain c++ Nish

                    A Offline
                    A Offline
                    Anna Jayne Metcalfe
                    wrote on last edited by
                    #9

                    whats funny is lots of advanced level MFC programmers would probably have a lot of trouble of they were asked to implement a doubly linked list in plain c++ IMHO only if they hadn't figured out pointers yet (and yes, I've worked with C++ programmers who haven't. It was painful). More advanced data structures require some theory, so if you haven't studied them before, you have some learning to do - but I don't think it's difficult (no more abstract than visualising class hierarchies anyway). I remember writing doubly linked list and search routines in JRT Pascal (pre-OOP) on a Z-80 in about 1985, and I'm glad those days are long past. :) Andy Metcalfe - Sonardyne International Ltd
                    (andy.metcalfe@lineone.net)
                    http://www.resorg.co.uk

                    "I'm just another 'S' bend in the internet. A ton of stuff goes through my system, and some of the hairer, stickier and lumpier stuff sticks." - Chris Maunder (I just couldn't let that one past ;))

                    1 Reply Last reply
                    0
                    • C Code Druid

                      Ah...nicely put. I empathize with you...come to think of it, STL code is so gobble-de-gook (for obvious 'copyright' reasons). Ugh. Thank God MFC wasn't mangled. :suss: "Assumptions are the mother of all screwups" - My esteemed colleague, Bug Druid.

                      A Offline
                      A Offline
                      Anna Jayne Metcalfe
                      wrote on last edited by
                      #10

                      Ah...nicely put. I empathize with you...come to think of it, STL code is so gobble-de-gook (for obvious 'copyright' reasons). Ugh. Thank God MFC wasn't mangled. Every time I look at the STL code I feel like punching someone. Whilst I understand the reasons, the authors aren't doing themselves any favours - it just makes STL harder to use. The crap documentation doesn't help either - but at least that's supposed to be better in VS.NET. :) Come to think about it, can anybody confirm that it is? Andy Metcalfe - Sonardyne International Ltd
                      (andy.metcalfe@lineone.net)
                      http://www.resorg.co.uk

                      "I'm just another 'S' bend in the internet. A ton of stuff goes through my system, and some of the hairer, stickier and lumpier stuff sticks." - Chris Maunder (I just couldn't let that one past ;))

                      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