[Tutor] Intermediate/advanced concepts

Alan Gauld alan.gauld at btinternet.com
Fri Nov 7 10:12:00 CET 2008


<btkuhn at email.unc.edu> wrote

> on more intermediate/advanced topics like linked lists, nodes, 
> trees, etc. However, it's kind of like reading a math textbook

Thats because these are abstract theoretical concepts
at the root of programming but not used much in practice in
high level languages like Python. If you were using a language
like C or Fortran or Pascal they would be highly relevant
because the language would not provide much support for
collections of data. But Python offers such a wealth of data
collections that these advanced topics are largely redundant;
just use a list or a dictionary or a set...

> any suggestions for learning about real world application of more 
> advanced concepts?

There are general rules about when different types apply but
the edges are blurred in Python. For example a linked list is
pretty much a Python list. A double linked list too can often be
faked in Python by using negative indexing. Trees are a bit
more valid and do have uses in applications like heirarchical
data storage such as found in file browsers, family trees,
organisational charts etc. They are also very powerful tools
for constructing searches of large data sets.

Things like bags and sets are just heterogenous collections
which Pythons native types mimic well. (Many of these
concepts grew out of early languages which only allowed
a single type of data in a collection)

OTOH there are cases for most of these data types where
there are arguments for constructing a dedicated implementation
in Python is valid, but they are rare.

If you have specific questions about specific types let us
know and we can offer more speciofic advice.

> Also, are there other concepts that I should focus on? Frankly, I'm 
> a bit bored because I've hit this ceiling, and I'm not really sure 
> where to go to next.

If you are interested in investigating the more advanced
aspects of programming I'd suggest digging into concepts like
closures, locking, semaphores, predicate and lambda calculus,
boolean algebra, relational data theory, functional programming,
aspect oriented programming, literate programming, provable
correctness (use of assertions for pre/post conditions and
invariance etc), meta data. These are all of more direct relevance
in higher level languages like Python.

HTH,

Alan G. 




More information about the Tutor mailing list