|
|
Log in / Subscribe / Register

Quote of the week

I will, in fact, claim that the difference between a bad programmer and a good one is whether he considers his code or his data structures more important. Bad programmers worry about the code. Good programmers worry about data structures and their relationships.

-- Linus Torvalds


to post comments

Quote of the week

Posted Aug 3, 2006 2:03 UTC (Thu) by vputz (guest, #5639) [Link] (3 responses)

Ah, and Fred Brooks continues to be a classic, after more than 20 years: "Show me your [code] and conceal your [data structures], and I shall continue to be mystified. Show me your [data structures], and I won't usually need your [code]; it'll be obvious.''

Quote of the week

Posted Aug 3, 2006 8:58 UTC (Thu) by dvrabel (guest, #9500) [Link]

The quote loses its impact if you edit the key words in the quote.
"Show me your flowcharts and conceal your tables, and I shall continue to be mystified. Show me your tables, and I won't usually need your flowcharts; they'll be obvious." -- Fred Brooks.

Quote of the week

Posted Aug 3, 2006 12:05 UTC (Thu) by alfille (subscriber, #1631) [Link]

30 years, describing systems 40 years old. And still pertainant to every open source project.

Quote of the week

Posted Aug 3, 2006 16:35 UTC (Thu) by AJWM (guest, #15888) [Link]

Or as the title of my CS 201 textbook (way back in the dark ages) put it, "Algorithms + Data Structures = Programs" (by Nicklaus Wirth). No mention of code in there anyware. Indeed, the entire course was taught using a programming language that didn't exist (a Pascal-like language called Moltex (molto expressivo)), we actually implemented our projects in PL/I. (Told you it was a long time ago).

Quote of the week

Posted Aug 3, 2006 14:53 UTC (Thu) by egoforth (subscriber, #2351) [Link]

Whether you consider yourself a programmer or a software engineer, if you want to be good, read this. Read it again. This is *the* *key*. If you don't understand this, you will never be more than a hack (and, no, I didn't mean hacker).

IMHO, of course. But I've yet to see this test fail.

This is why Haskell is so great...

Posted Aug 3, 2006 17:07 UTC (Thu) by droundy (guest, #4559) [Link] (2 responses)

One can make data structures in Haskell ever so much more expressive than in any other language I know. In Haskell it's considered reasonable (albeit not usually with Haskell 98) to expect that data types should enforce correct code...

This is why Haskell is so great...

Posted Aug 3, 2006 20:16 UTC (Thu) by dlang (guest, #313) [Link] (1 responses)

a data structure should be independant of the language used to access it.

it may be convienient when describing a datastructure to refer to elements by type definitions from a particular language (assuming it's widely known), but that's just shorthand.

This is why Haskell is so great...

Posted Aug 4, 2006 0:52 UTC (Fri) by giraffedata (guest, #1954) [Link]

a data structure should be independant of the language used to access it.

It's not the language used to access the data structure -- that's the code, which we're all saying is not the most important part of a program. It's the language used to describe the data structure.

it may be convienient when describing a datastructure to refer to elements by type definitions from a particular language (assuming it's widely known), but that's just shorthand.

The convenience of expressing the definition of a data structure in a language is everything -- it's what determines whether it's hard or easy to write the program, hard or easy to read it, and how likely the program is to be correct.

In assembler, you can completely describe your data structures in English comments (and you should). A high level language lets you express some of that in language elements, which a machine (the compiler) can understand. The more you can express that way, the higher level the language.

The ideal of a declarative programming language is that you do nothing but describe the data structures, and the compiler generates a program that computes the information you described.

I've never seen Haskell, but it sounds good.

Programming is more than datastructures and algorithms.

Posted Aug 7, 2006 12:33 UTC (Mon) by bjornen (guest, #38874) [Link] (2 responses)

The last ten years (or so) of programming has shown "Algorithms + Data
Structures = Programs" to be *false*.

Code-modules and classes should represent ideas and concepts. Wrapping
ever so carefully thoughout datastructures with Get()ers and Set()ers is
not good programming.

Programming is more than datastructures and algorithms.

Posted Aug 7, 2006 12:47 UTC (Mon) by bjornen (guest, #38874) [Link]

s/thoughout/thought out/

Programming is more than datastructures and algorithms.

Posted Aug 7, 2006 13:09 UTC (Mon) by jzbiciak (guest, #5246) [Link]

I think they mean high-level data structure, not low level details such as "this hash's buckets are implemented with linked lists."

Quote of the week

Posted Aug 9, 2006 2:41 UTC (Wed) by bluefoxicy (guest, #25366) [Link]

Good programmers worry about making good programs. You design the program so that it's flexible and workable, not so that you have to change the structures and internal data representations every time you fix a bug or add a feature.

At the same time, don't write horrible code. You really have to write good code to write good programs.

The real mark of a good programmer is good pacing. You start by designing the program, figuring out what it's going to do and how; then you describe the data structures needed for that. Then describe the APIs needed to expose the data structures. Then you worry about implementing those APIs and writing your code around them (that way you're only messing with the data structures in one place). This is radically different than "diving straight in and trying to write good code," which won't work.

So Linus is almost right. Good programmers worry about data structures FIRST; and get to the code when they know what they're supposed to do with it.


Copyright © 2006, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds