The Caboteria / Tech Web / TechNotes / InterviewQuestions (08 Dec 2010, TobyCabot)

Linux

What's the difference between touch file and echo -n > file and rm file?
Hint: what happens if someone else has the file open, for example, a logfile?

Ruby

Why does this happen?

$ irb
ruby-1.8.7-p302 > i = 1.2 - 0.1
 => 1.1 
ruby-1.8.7-p302 > i == 1.1
 => false 

Hint: what happens when you do the same thing in python or perl?

What's the difference between proc, Proc.new, and lambda?

Edit | Attach | Print version | History: r1 | Backlinks | Raw View | Raw edit | More topic actions
Copyright © 2008-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding The Caboteria? Send feedback