develooper Front page | perl.beginners | Postings from March 2011

Re: assigning hash to a scalar

Thread Previous | Thread Next
Shlomi Fish
March 26, 2011 19:15
Re: assigning hash to a scalar
Message ID:
Hi Chas, and Brian (and all),

On Saturday 26 Mar 2011 18:05:33 Brian Fraser wrote:
> Chas++
> I don't get to see Algorithms in college, so I doubly appreciate
> explanations like this, in the one language I sort of grok* :) You've made
> my morning, thank you!

Well, I've only skimmed Chas' response, but it seems to be very comrpehensive, 
and researched. So I agree it's well done. It's too bad you (= Brian) don't 
get to see such data structures in your college, because I think they are an 
essential knowledge for every half-serious software developer. To quote ESR 
(inspired by Fred Brooks from "The Mythical Man-Month") from "The Cathedral 
and the Bazaar" (also a must read for most enlightened programmers, IMO):

	Smart data structures and dumb code works a lot better than the 
	other way around.

Normally, it's more important to understand data structures and to know when 
to know the tradeoffs of each ones, than it is to be familiar with all the 
various algorithms in the literature.

I have studied about hashes during my Electrical Engineering (more like 
Computer Engineering in the United States) degree, and we were shown many 
variations on the theme of hash tables and there are more explanations about 
them here:



> Brian.
> *Also the reason I'm trying to hunt down a copy of Mastering Algorithms
> with Perl.

Well, Mastering Algorithms with Perl does not cover hashing unfortunately, but 
I remember it as an overall good book for when I read it (though far from 
perfect). It's a bit showing its age, though. You may wish to consider this 
book instead:


I've read it after I knew most of the material more formally, and was still 
impressed by it, and it takes a more accessible and down-to-earth approach 
than CLR/CLRS ( ) to 
say nothing of Knuth's "The Art of Computer Programming", which appears to be 
something that mere mortals cannot hope to understand. It primarily uses 
examples in C, though (possibly for a very good reason), but feels much 
fresher and more accurate than the "Mastering Algorithms with Perl" book. 

There have been other offline and online books about data structures and 
algorithms and you can find some in a web search. This seems OKish and it's 
online, under Creative Commons by-sa, and also a wikibook:



	Shlomi Fish

Shlomi Fish
Funny Anti-Terrorism Story -

I hope that you agree with me that 99.9218485921% of the users wouldn't bother
themselves with recompilation (or any other manual step for that matter) to
make their games run 1.27127529900685765% faster ;-) -- Nadav Har'El

Please reply to list if it's a mailing list post - .

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About