From: Dave Aronson Date: 2011-10-17T03:50:38+09:00 Subject: Re: What does this snippet mean? On Fri, Oct 14, 2011 at 13:15, Junayeed Ahnaf Nirjhor wrote: > Here’s a code snippet. What it actually does? > > def rewind(f) >  f.seek(0, IO::SEEK_SET) > end Jeremy already gave you that answer, but I'll help you find many more yourself. When trying to figure out what something does, a great way to find out is to Google together as many of the significant words as you can. In this case, if you Google seek and IO::SEEK_SET, the very first hit is http://rubylearning.com/satishtalim/read_write_files.html which explains all about reading and writing text files -- in Ruby. If you omit the IO part, you wind up first with hits about other languages -- but at least you would probably be able to figure out the general idea of what Ruby's "seek" *probably* does. (And even that's without including Ruby as a search term. Googling seek, SEEK_SET, *and Ruby*, gets you Satish's site again.) Google-Fu is a very important skill to develop.... -Dave -- LOOKING FOR WORK! What: Ruby (on/off Rails), Python, other modern languages. Where: Northern Virginia, Washington DC (near Orange Line), and remote work. davearonson.com (main) * codosaur.us (programing) * dare2xl.com (excellence) Specialization is for insects. (Heinlein) - Have Pun, Will Babble! (Aronson)