Think about Loose Coupling | |
PerlMonks |
Re: Algorithms, Datastructures and syntaxby dragonchild (Archbishop) |
on Apr 04, 2003 at 15:41 UTC ( [id://248099]=note: print w/replies, xml ) | Need Help?? |
Using yours truly as an authoritative source will probably only win points with me and mine, but here goes:
Algorithms are processes that work upon very specific data structures. They are extremely dependent upon the data structure(s) that they are defined to work upon. A concrete example is the for-loop. In every language, it's defined to work on some list. For-loops don't work on hashes or trees or any other data structure. Data structures are, well, ways to structure data. They are independent of algorithms. Often, the same data structure will be used in numerous algorithms. The best example of this is the list, used in sorting, searching, iterating, etc. The pedagogical mistake made in most CS classes is to focus overly much on algorithms without enough focus on data structures, especially early on in the curriculum. Many students are left with a feeling that they have no idea how to think about their stuff, praying that the specific algorithm will work correctly, usually with much hand-waving. ------ Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement. Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
In Section
Meditations
|
|