[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Confession: I never learned CS

Jay Levitt

9/26/2007 9:07:00 PM

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...).
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://... | - Kristoffer
24 Answers

Wilson Bilkovich

9/26/2007 9:40:00 PM

0

On 9/26/07, Jay Levitt <jay+news@jay.fm> wrote:
> 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?
>

Big hunks of it are fundamentally unlike Ruby, but that's probably a
good thing for your brain.
This book is a work of genius that I think every 'serious' programmer
should own: http://www.info.ucl.ac.be/~pvr...
Sorry if that sounds too over-the-top. :)

ara.t.howard

9/26/2007 9:43:00 PM

0


On Sep 26, 2007, at 3:10 PM, Jay Levitt wrote:

> So - any recommended reading? What books will help me change the
> way I
> think about data?

http://www.amazon.com/Expert-Programming-Peter-van-Linden/dp/...

http://www.amazon.com/Design-Patterns-Object-Oriented-Addis...
Professional/dp/0201633612/ref=pd_bbs_sr_1/104-1681521-1481518?
ie=UTF8&s=books&qid=1190842864&sr=1-1

http://www.amazon.com/Reference-Manual-Samuel-P-Ha...
013089592X/ref=pd_sim_b_1_img/104-1681521-1481518

http://www.amazon.com/Introduction-Algorithms-Thomas-H-...
0262032937/ref=pd_bbs_2/104-1681521-1481518?
ie=UTF8&s=books&qid=1190842923&sr=1-2

books you cannot live without.

cheers.

a @ http://draw...
--
we can deny everything, except that we have the possibility of being
better. simply reflect on that.
h.h. the 14th dalai lama




John Joyce

9/26/2007 10:25:00 PM

0

It all depends. Learn what you need. You don't necessarily need all
those books.
They won't hurt you. (unless you try to carry more than 2 of them at
any time)
But you can learn a lot from other people's code and from browsing
used bookstores.
Many of the algorithms and design patterns covered don't change all
that much.
You don't have to know everything to do stuff.
Data structures tend to differ somewhat depending on the language
(and framework) you are using.
Probably the best thing to do for data structures is just run through
some C books. Then hit a C Data structures book. That will give you a
lot right there. But it all really depends on what you want or need
to do. Much of it you may never actually use.


David B. Williams

9/27/2007 1:32:00 AM

0

Jay Levitt wrote:
> So - any recommended reading? What books will help me change the way I
> think about data?

If you want a book that deals with Ruby and the fundamentals you would
learn in any introduction to data structures and algorithms course, try
this:

http://www.brpreiss.com/bo...

David B. Williams
http://www.cybersp...

--
Posted via http://www.ruby-....

Jeremy Hinegardner

9/27/2007 4:28:00 AM

0

On Thu, Sep 27, 2007 at 06:42:54AM +0900, ara.t.howard wrote:
>
> On Sep 26, 2007, at 3:10 PM, Jay Levitt wrote:
>
> >So - any recommended reading? What books will help me change the
> >way I
> >think about data?
>
> http://www.amazon.com/Expert-Programming-Peter-van-Linden/dp/...

This book is so much fun to read. I love the stories, I mean where else
are you going to learn about cron implemented in a lego brick.

enjoy,

-jeremy

--
========================================================================
Jeremy Hinegardner jeremy@hinegardner.org


John Joyce

9/27/2007 6:37:00 AM

0


On Sep 26, 2007, at 8:32 PM, David B. Williams wrote:

> Jay Levitt wrote:
>> So - any recommended reading? What books will help me change the
>> way I
>> think about data?
>
> If you want a book that deals with Ruby and the fundamentals you would
> learn in any introduction to data structures and algorithms course,
> try
> this:
>
> http://www.brpreiss.com/bo...
>
> David B. Williams
> http://www.cybersp...
>
> --
> Posted via http://www.ruby-....
>
Cool!
I'm reading that one starting.... now!

Alex Young

9/27/2007 6:38:00 AM

0

Jay Levitt wrote:
> 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?

It's worth going back to basics and watching the MIT SICP lectures.
They got a lot of ideas I thought I knew straight in my head, and a lot
of things that I thought were complicated turned out to be really
simple. There's also a free copy of the textbook that goes with it online.

The book: http://mitpress.mit...
The lectures:
http://swiss.csail.mit.edu/classes/6.001/abelson-sussman...

--
Alex

John Joyce

9/27/2007 2:47:00 PM

0


On Sep 27, 2007, at 1:38 AM, Alex Young wrote:

> Jay Levitt wrote:
>> 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?
>
> It's worth going back to basics and watching the MIT SICP lectures.
> They got a lot of ideas I thought I knew straight in my head, and a
> lot of things that I thought were complicated turned out to be
> really simple. There's also a free copy of the textbook that goes
> with it online.
>
> The book: http://mitpress.mit...
> The lectures: http://swiss.csail.mit.edu/classes/6.00...
> sussman-lectures/
>
> --
> Alex
>
Berkely and MIT both have huge numbers of classes available as free
podcasts, both through iTunes and through their own web sites. Some
as videos.
The recording quality has even improved to the point of being
listenable!

Ilmari Heikkinen

9/27/2007 2:57:00 PM

0

On 9/27/07, Jay Levitt <jay+news@jay.fm> wrote:

> So - any recommended reading? What books will help me change the way I
> think about data?

I'm currently "reading" (i.e. turning two pages now and then)
Programming Language Pragmatics, and it's a good look at
how programming languages work.

http://www.cs.rochester.edu/~scott/p...

Introduction to Algorithms was a great book too.
I heard Okasaki's Purely Functional Data Structures
recommended as well.

http://www.cs.cmu.edu/~rwh/theses/o...

HTH,
--
Ilmari Heikkinen
http://fhtr.bl...

Jay Levitt

9/27/2007 5:28:00 PM

0

On Thu, 27 Sep 2007 23:57:08 +0900, Ilmari Heikkinen wrote:

> On 9/27/07, Jay Levitt <jay+news@jay.fm> wrote:
>
>> So - any recommended reading? What books will help me change the way I
>> think about data?

Wow! Thanks for the many great recommendations, folks. Some comments:

* GoF: Yes, I have this one, and it's a classic; I've actually read both of
the Alexander books cover-to-cover while I was building a house. But I
also find that many of the GoF patterns are either unnecessary or greatly
simplified in Ruby. I know there's at least one project to codify the Ruby
equivalents, and I look forward to more work in that area.

* C programming books: I guess I didn't mention that I've got over a dozen
C and C++ books; I was following along on paper, I just never did much work
in those languages, and the books didn't really "change my thinking".
Great recommendation for someone who's truly jumped straight into Ruby,
though.

* Intro to Algorithms: I know it's the classic work, but I also see a huge
number of complaints on Amazon about the lack of provided solutions and
followup information; seems like it's intended more for a classroom setting
than as a self-study guide. I also admit a bias against older books;
technology writing has greatly improved as the field's expanded, and I find
it difficult to go back and read something like Date or K&R today. (Well,
Date was always tough.) Now, if Scott Meyers (Effective C++/STL) ever
wrote an algorithms book, *that* would be a best seller. Any thoughts?

* Data Structures and Algorithms (Preiss): I'm a little turned off by the
hard-to-read pixelated LaTex GIFs, the lack of a print version or even the
right to download it, the lack of a solutions manual, the web-0.5 FSF-style
page navigation, and the fact that the first "Ruby" code I saw defines its
own "abstract_method" declaration, which makes me think that the Ruby
"version" is more like a Babelfish translation of the Java version. (My
web site: Now in Senegalese!) OK, so I'm more than a little turned off.
Probably bears reading anyway, though.

* SICP, Programming Language Pragmatics (Scott), Purely Functional Data
Structures (Okasaki), Concepts, Techniques and Models (Van Roy, Haridi):
These look like must-reads!

--
Jay Levitt |
Boston, MA | My character doesn't like it when they
Faster: jay at jay dot fm | cry or shout or hit.
http://... | - Kristoffer