I was thinking about my "Detecting number ranges" question and the various
answers to it; I was also reading Steve Yegge's old but excellent "five
essential phone-screen questions"
(http://steve.yegge.googlepages.com/five-essential-phone-screen-questions).
And I realized something: In my 30-odd years of programming, I never
learned the stuff I think of as "Computer Science".
In the very beginning, I was on a Commodore using BASIC or ML, so there was
no such thing as data structures or recursion or parsing. Naturally.
But unlike most folks who went on to C, C++, LISP and/or Java before coming
to Ruby, I spent most of the next 15 years in PL/1, working on a
ridiculously high-volume distributed system, using relatively slow CPUs,
that had to have sub-second response times.
So I never learned big-O notation. I mean, I know what it means, but I
couldn't tell you what data structures are logarithmic and what data
structures are exponential, because we had exactly four kinds of data
structures: arrays, short linked lists, hash tables and everything else.
And those ran at four speeds, respectively: instant, fast, fast and way too
slow.
Parsing was likewise out of the picture. Any data I munched on had to be
pre-formatted in a structure that precisely matched the in-memory structure
it was being loaded into. The operating system even provided a standard
tool to describe "field-value" style tables and compile them into a binary
data file of repeated structs. Any notions of "parse trees" were out of
the question; only towards the end did we finally get fast enough
processors to consider occasionally *scanning* long strings for tokens.
And without parsing, there's little use for recursion.
And now I've jumped headfirst into the world of Ruby and modern CPUs, where
an interpreted language can parse itself, and I don't even know where to
start learning everything I missed. I'm not about to go learn LISP, even
though I'm sure it would be a fun experience - I've seen enough LISP in my
emacs startup to know it's not for me.
Yet I know I have much to learn, because I approach too many problems with
an iterative, loop-based approach, when Ruby has such nice tools for
parsing and list-processing and analysis.
So - any recommended reading? What books will help me change the way I
think about data?
--
Jay Levitt |
Boston, MA | My character doesn't like it when they
Faster: jay at jay dot fm | cry or shout or hit.http://www.jay.fm | - Kristoffer