Do I need a course on data structures?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
For being a good web programmer, is a course on data structures
important? It seems php already has built-in functions for what they
teach in a data structures course. On the other hand all universities
seem to teach this class. I tried taking one but just found it too
boring and irrelevant for what I was doing. What are your thoughts?

Re: Do I need a course on data structures?

On 9 Aug 2005 11:14:31 -0700, wrote:

Quoted text here. Click to load it

 A good data structures course should teach you to think about what structure
is appropriate for particular usages, rather than just focus on the

 PHP's sorted associative array type is very flexible and can be used to
construct numerous data structures, but despite PHP giving you the facilities
to set up many sorts of structure, you still need to decide yourself what is
actually the best way to arrange the data storage for the application.

 So in short: yes, I think it's important.

< Space: disk usage analysis tool

Re: Do I need a course on data structures? wrote:
Quoted text here. Click to load it

I guess it depends on the kind of work you plan to do. If you think
someday you might want to write code for Google, IBM, Yahoo, or any of
the guys that deal with thousands of hits per minute, then knowing a
little bit about the trade-offs between speed, memory use, fast access,
and security are important.

I think there are a lot of situations where a web programmer would want
to be able to hold up their end of discussions about whether to use a
given PHP array in a particular situation as a stack or as a queue, or
whether to pay the extra overhead of using its hash indexing

I think at least reading up on data structure theory would be a good
idea for anyone doing web programming.

Re: Do I need a course on data structures?

Nah, in web-programming you rarely encounter the sort of complex data
structures that they teach in school. You most unlikely will never
implement a linked-list or a hash table in PHP. The language, in fact,
can't handle very complex structure. Circular references have a way of
tripping up the garbage collection code, for instance.

On the other hand, good web-programmers are usually good system
programmers as well. And a good knowledge of data structures is
essential for lower level languages like C/C++.

Re: Do I need a course on data structures?

Kimmo Laine wrote:
Quoted text here. Click to load it

Unless next_page.php generates PHP, the script with this include will
only get HTML.

Quoted text here. Click to load it


    if (isset($_GET['foo'])) {
      echo '<?php echo $_GET[\'foo\']; ?>';
    } else {
      echo '<?php echo \'Not available\'; ?>';

File not found: (R)esume, (R)etry, (R)erun, (R)eturn, (R)eboot

Re: Do I need a course on data structures? wrote:
Quoted text here. Click to load it

An understanding of data structures is important to write good code in any  
language.  Normally there are many ways to represent complex data - and no one  
"best" way.  Rather, there are trade offs between the different ways.

An overly simplistic PHP example - you need to track name/userid/password for  
the current user.  You can keep the info in three different variables, an array  
or a class object.  Which way is best is often determined by need to use the  
data.  And as the data become more complex, so do the available options.

Do you need to take a course on it?  Well, if it's part of a curriculum you're  
already taking, I'd say go ahead and take it.  Otherwise, a good book or two  
would be an inexpensive alternative.

As for it being boring and irrelevant.  I suspect you found it boring because  
you felt it was irrelevant (the instructor might have something to do with that,  
also :-)).  But this is the type of course which doesn't necessarily have  
obvious immediate benefits.  A better way to look at things is to figure out how  
you can apply what you're learning to your current and recent work.  If you're  
doing any type of complex data handling at all you should see how the course  
material applies.  You may find out you're already doing things in the most  
optimal way.  Or you may find you could make some improvements.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Site Timeline