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. Motivation for Data Structures

Motivation for Data Structures

Scheduled Pinned Locked Moved The Lounge
designquestioncareer
23 Posts 13 Posters 3 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.
  • T TheOnlyRealTodd

    I'll be honest. One of the things that attracts me to crafting software is the end-product. I also am not always the most patient guy in the world (except for with computers, surprisingly, lol). In any event, I'm not super into data structures, although I try desperately hard to be because I know how fundamental they are and I know how important to even just landing a nice job they can be. But nevertheless, I'd rather spend 5 hours coding and have something to show, rather than re-create an intangible data structure that already exists in the standard library, just for the sake of it (or erm... class). Right now, the data structures are not my strong point and I've been getting a little turned off to programming by spending so many hours on such primitive parts. Surely there must be others who have suffered this? Do you have any tips on keeping motivated to give up production code time to study data structures for a while? I'd much rather write unit tests and design patterns!

    W Offline
    W Offline
    W Balboos GHB
    wrote on last edited by
    #12

    They make life so much more pleasant. I would often model them, at least to begin with, after a table row in a database. It's a handy place to move and store the data around the system as a unit. Also, if you add or removed columns from said tables, you only need to change the definition of the structure to accommodate this (and, of course, handle the new data) - but all their data transport throughout your code still works as before without a change. And you can build structures of structures - and move major blocks of data about (should the need arise) - yet have each component neatly wrapped by a recognizable name. Maybe you'd like them better if you thought of them a bit like a record in a table.

    Ravings en masse^

    "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

    "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

    1 Reply Last reply
    0
    • D den2k88

      They should, even if processing power seems unlimited at the moment - after all 640kB of ram should be enough for anybody! :D To stay on the consumer side, videogames are processing and memory hogs and they are a growing industry. Enter the Enterprise (not THAT Enterprise, the other) and you'll find yourself with barely the processing time to do anything beyond the basics, especially if on-the-fly analysis are to be taken on real time systems. Of course these are fields of which the usual QA-abusing developer used to clunky messes of frameworks and interpret-virtualiz-clouding thingies ignore the very existance. And rookies, of course, but that's not their fault, it still takes 10 years to make 10 years of experience.

      DURA LEX, SED LEX GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++*      Weapons extension: ma- k++ F+2 X If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani

      N Offline
      N Offline
      Nelek
      wrote on last edited by
      #13

      den2k88 wrote:

      after all 640kB of ram should be enough for anybody!

      I am not that old... I already had 1024 Kb :-D :-D But still had to deal with 64 Kb DataBlocks and 1-byte counters for sequence steps (max 255 of whatever). Edit: this[^] is the new version of my favorite one. I have used the previous model for some years and still 1 Mb RAM

      den2k88 wrote:

      To stay on the consumer side, videogames are processing and memory hogs and they are a growing industry.

      Mostly due to graphics, special effects. Not necessarily due to careless programming.

      den2k88 wrote:

      you'll find yourself with barely the processing time to do anything beyond the basics, especially if on-the-fly analysis are to be taken on real time systems.

      You know... C and C++ are obsolete :rolleyes: :rolleyes:

      den2k88 wrote:

      the usual QA-abusing developer

      QA-abusing... what? Are you calling them developers? if you mean the !"%$"§(/&% morons wannabe programers (we are in the lounge, not the soapbox) visiting the QA section... they will need 100 years to have 10 years experience.

      M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

      D 1 Reply Last reply
      0
      • N Nelek

        den2k88 wrote:

        after all 640kB of ram should be enough for anybody!

        I am not that old... I already had 1024 Kb :-D :-D But still had to deal with 64 Kb DataBlocks and 1-byte counters for sequence steps (max 255 of whatever). Edit: this[^] is the new version of my favorite one. I have used the previous model for some years and still 1 Mb RAM

        den2k88 wrote:

        To stay on the consumer side, videogames are processing and memory hogs and they are a growing industry.

        Mostly due to graphics, special effects. Not necessarily due to careless programming.

        den2k88 wrote:

        you'll find yourself with barely the processing time to do anything beyond the basics, especially if on-the-fly analysis are to be taken on real time systems.

        You know... C and C++ are obsolete :rolleyes: :rolleyes:

        den2k88 wrote:

        the usual QA-abusing developer

        QA-abusing... what? Are you calling them developers? if you mean the !"%$"§(/&% morons wannabe programers (we are in the lounge, not the soapbox) visiting the QA section... they will need 100 years to have 10 years experience.

        M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

        D Offline
        D Offline
        den2k88
        wrote on last edited by
        #14

        Nelek wrote:

        Mostly due to graphics, special effects.

        Physics, actually. Ballistic trajectories (and still many weapons are hitscan), obstacles interference, walking/jumping/running/swimming/flying calculations for NPCs and players. Then there is the AI and the generation/keeping in readily accessible memory huge sets of relevant environment variables and decision made by the player to adjust the entire world reactions. I'm using as examples big open sandbox games like The Elder Scrolls, Fallout and The Witcher series, but even highly compartimented games like Mass Effect and Deus Ex have a lot of computations to make that aren't graphically related.

        Quote:

        Not necessarily due to careless programming.

        I never said that, in fact gaming industry is one of the most demanding out there and careless developers usually last for very very short times. Still some games are careless developed / designed, in my mind Crysis series and the first The Witcher were excessively demanding despite being about the same quality of much less onerous games.

        DURA LEX, SED LEX GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++*      Weapons extension: ma- k++ F+2 X If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani

        1 Reply Last reply
        0
        • T TheOnlyRealTodd

          I'll be honest. One of the things that attracts me to crafting software is the end-product. I also am not always the most patient guy in the world (except for with computers, surprisingly, lol). In any event, I'm not super into data structures, although I try desperately hard to be because I know how fundamental they are and I know how important to even just landing a nice job they can be. But nevertheless, I'd rather spend 5 hours coding and have something to show, rather than re-create an intangible data structure that already exists in the standard library, just for the sake of it (or erm... class). Right now, the data structures are not my strong point and I've been getting a little turned off to programming by spending so many hours on such primitive parts. Surely there must be others who have suffered this? Do you have any tips on keeping motivated to give up production code time to study data structures for a while? I'd much rather write unit tests and design patterns!

          M Offline
          M Offline
          Marc Clifton
          wrote on last edited by
          #15

          TheOnlyRealTodd wrote:

          I'd rather spend 5 hours coding and have something to show, rather than re-create an intangible data structure that already exists in the standard library, just for the sake of it (or erm... class).

          I think the point of the exercise (or at least would be, if I were teaching a class on data structures) is several. Data structures can be complicated, you have to handle edge cases, consider where your performance issues are, often in tradeoffs between a performant search vs. a performant insert/delete, how do you test not just the simple operations and edge cases, but how do you test performance and memory utilization, etc. In other words, it's a good exercise to bring to consciousness things that we rarely think about because, as you said, these things already exist, so why rewrite them? But the lessons learned are applicable in general programming, and that's important, IMO. I also think one of the more fun things about data structures is using (or creating) the right structure for the particular task. When I was working on a multi-threaded solution to solve a complex end-of-life analysis of the switch ring topology in communication satellites, I realized there were times when a canned data structure was great, and other places where I needed a custom data structure of the same information, just organized differently. While maintaining both data structures took more memory, that was irrelevant (the memory usage was not the issue here) but what was relevant was the significant performance improvement by using the right data structure for the particular algorithm. Marc

          Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802

          1 Reply Last reply
          0
          • T TheOnlyRealTodd

            I'll be honest. One of the things that attracts me to crafting software is the end-product. I also am not always the most patient guy in the world (except for with computers, surprisingly, lol). In any event, I'm not super into data structures, although I try desperately hard to be because I know how fundamental they are and I know how important to even just landing a nice job they can be. But nevertheless, I'd rather spend 5 hours coding and have something to show, rather than re-create an intangible data structure that already exists in the standard library, just for the sake of it (or erm... class). Right now, the data structures are not my strong point and I've been getting a little turned off to programming by spending so many hours on such primitive parts. Surely there must be others who have suffered this? Do you have any tips on keeping motivated to give up production code time to study data structures for a while? I'd much rather write unit tests and design patterns!

            N Offline
            N Offline
            Nemanja Trifunovic
            wrote on last edited by
            #16

            TheOnlyRealTodd wrote:

            I'd much rather write unit tests and design patterns!

            You lost me there...

            utf8-cpp

            1 Reply Last reply
            0
            • T TheOnlyRealTodd

              I'll be honest. One of the things that attracts me to crafting software is the end-product. I also am not always the most patient guy in the world (except for with computers, surprisingly, lol). In any event, I'm not super into data structures, although I try desperately hard to be because I know how fundamental they are and I know how important to even just landing a nice job they can be. But nevertheless, I'd rather spend 5 hours coding and have something to show, rather than re-create an intangible data structure that already exists in the standard library, just for the sake of it (or erm... class). Right now, the data structures are not my strong point and I've been getting a little turned off to programming by spending so many hours on such primitive parts. Surely there must be others who have suffered this? Do you have any tips on keeping motivated to give up production code time to study data structures for a while? I'd much rather write unit tests and design patterns!

              E Offline
              E Offline
              Eytukan
              wrote on last edited by
              #17

              First thing, don't feel so guilty about not knowing in-depth knowledge about data structures. :) Just see where you fit in and do what is needed. But it doesn't hurt to keep learning the fundamentals again. (Which most never learnt in the first place) "Data structure" - Right from pointers , arrays to advanced DS used in complex requirements everything is Data structures. Which end feels difficult for you? If you say Pointers & arrays, then :|. I think you intend to say "DS & Algorithms"? Software development falls over a vast spectrum of requirements. If you are going to develop a typical DB application (like _SOME_ management System), you'd most probably never have a need to do something on your own. I've met these people who share their proud-full moment of implementing singleton design pattern. Their aspirations are different. They go "UP" the technlogy stack. They'd be consumers of latest buzz words. The other kind, go "DOWN"- wards. learning the fundamentals more strongly and live with it. Quite a bunch of my friends know nothing other than C & Assembly. People who live down the abyss , usually create the tools we consume! Can you develop a compiler just with a shallow knowledge on DS & Algo? Different needs, different answers! btw, "Design pattern" is a generic thing. It's everywhere even when you do a compiler development :) So you were pointing to singleton again? hehe :)

              Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.

              D T 2 Replies Last reply
              0
              • E Eytukan

                First thing, don't feel so guilty about not knowing in-depth knowledge about data structures. :) Just see where you fit in and do what is needed. But it doesn't hurt to keep learning the fundamentals again. (Which most never learnt in the first place) "Data structure" - Right from pointers , arrays to advanced DS used in complex requirements everything is Data structures. Which end feels difficult for you? If you say Pointers & arrays, then :|. I think you intend to say "DS & Algorithms"? Software development falls over a vast spectrum of requirements. If you are going to develop a typical DB application (like _SOME_ management System), you'd most probably never have a need to do something on your own. I've met these people who share their proud-full moment of implementing singleton design pattern. Their aspirations are different. They go "UP" the technlogy stack. They'd be consumers of latest buzz words. The other kind, go "DOWN"- wards. learning the fundamentals more strongly and live with it. Quite a bunch of my friends know nothing other than C & Assembly. People who live down the abyss , usually create the tools we consume! Can you develop a compiler just with a shallow knowledge on DS & Algo? Different needs, different answers! btw, "Design pattern" is a generic thing. It's everywhere even when you do a compiler development :) So you were pointing to singleton again? hehe :)

                Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.

                D Offline
                D Offline
                den2k88
                wrote on last edited by
                #18

                I love being at the bottom of the abyss :D

                DURA LEX, SED LEX GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++*      Weapons extension: ma- k++ F+2 X If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani

                E 1 Reply Last reply
                0
                • D den2k88

                  I love being at the bottom of the abyss :D

                  DURA LEX, SED LEX GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++*      Weapons extension: ma- k++ F+2 X If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani

                  E Offline
                  E Offline
                  Eytukan
                  wrote on last edited by
                  #19

                  Yeah, it's a much better place to dwell! :)

                  Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.

                  1 Reply Last reply
                  0
                  • E Eytukan

                    First thing, don't feel so guilty about not knowing in-depth knowledge about data structures. :) Just see where you fit in and do what is needed. But it doesn't hurt to keep learning the fundamentals again. (Which most never learnt in the first place) "Data structure" - Right from pointers , arrays to advanced DS used in complex requirements everything is Data structures. Which end feels difficult for you? If you say Pointers & arrays, then :|. I think you intend to say "DS & Algorithms"? Software development falls over a vast spectrum of requirements. If you are going to develop a typical DB application (like _SOME_ management System), you'd most probably never have a need to do something on your own. I've met these people who share their proud-full moment of implementing singleton design pattern. Their aspirations are different. They go "UP" the technlogy stack. They'd be consumers of latest buzz words. The other kind, go "DOWN"- wards. learning the fundamentals more strongly and live with it. Quite a bunch of my friends know nothing other than C & Assembly. People who live down the abyss , usually create the tools we consume! Can you develop a compiler just with a shallow knowledge on DS & Algo? Different needs, different answers! btw, "Design pattern" is a generic thing. It's everywhere even when you do a compiler development :) So you were pointing to singleton again? hehe :)

                    Starting to think people post kid pics in their profiles because that was the last time they were cute - Jeremy.

                    T Offline
                    T Offline
                    TheOnlyRealTodd
                    wrote on last edited by
                    #20

                    Vunic wrote:

                    Quite a bunch of my friends know nothing other than C & Assembly.

                    I need to make friends like this. Seriously. I've had quite a struggle meeting these types of programmers versus web devs. Web dev stuff is everywhere, not so much lower-level. I feel I could learn a lot from these people. In any event, thanks so much for your insight, it was very helpful! And yes, I meant to say "DS & Algorithms" . My course is simply called Data Structures & Performance, but that is what is really is. Also, Big O and asymptotic notation, and even most of the math I get (and enjoy) pretty well... Its just doing things like crafting up routines to add/remove/replace etc... Data from a structure that can seem a little dry at times. I think it's just a matter of time, but honestly, the advice here has helped a lot and I want to thank everyone for replying!

                    1 Reply Last reply
                    0
                    • R Rajesh R Subramanian

                      I'd expect a software developer to know what data structure to use in which situation. I've known people who will "just use a vector" with no due consideration to anything else. I think it sucks to work with such careless/lazy people. If someone doesn't have the common sense to choose an appropriate data structure, they'll not like working with me. If someone didn't know as much to make the right choice from a vector, unordered set, queue, stack, list, etc. then they need to urgently educate themselves. In short, you don't need to implement every kind of data structure, but you should at least know which one to pick from the standard library.

                      T Offline
                      T Offline
                      TheOnlyRealTodd
                      wrote on last edited by
                      #21

                      Awesome. I think I just needed to find the right instruction source and implementation. I found a book that is now working for me and I'm finding it much more interesting/fun to implement the data structures in C++ than C# or Java, mainly due to how pointers work.

                      R 1 Reply Last reply
                      0
                      • T TheOnlyRealTodd

                        Awesome. I think I just needed to find the right instruction source and implementation. I found a book that is now working for me and I'm finding it much more interesting/fun to implement the data structures in C++ than C# or Java, mainly due to how pointers work.

                        R Offline
                        R Offline
                        Rajesh R Subramanian
                        wrote on last edited by
                        #22

                        Good on you for accepting critical feedback and working on it! I don't come across people like you ever so often. :) :thumbsup:

                        T 1 Reply Last reply
                        0
                        • R Rajesh R Subramanian

                          Good on you for accepting critical feedback and working on it! I don't come across people like you ever so often. :) :thumbsup:

                          T Offline
                          T Offline
                          TheOnlyRealTodd
                          wrote on last edited by
                          #23

                          Thanks. And I appreciate your post. Sometimes I need a kick in the right direction, which is also why I ask these types of questions. I try to follow this advice:

                          I am the smartest man in Athens because I know that I know nothing. - Socrates

                          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