Archive

Posts Tagged ‘Ruby’

Imran on interviewing programmers

March 8th, 2007 Buu Nguyen 4 comments

Read this to see how Imran tests his interviewees.  Couldn’t help throwing out some code. (And it turned out that the time for me to look up the method collect() was the most.)  Not sure if the senior developers interviewed by Imran have anything to do with the MCSD.NET folks who were interviewed by Gojko Adzic which I blogged about before.

 

# long version
(1..100).each { |n|
	if (n % 15 == 0)
		print "FizzBuzz ";
	elsif (n % 3 == 0)
		print "Fizz "
	elsif (n % 5 == 0)
		print "Buzz "
	else
		print n.to_s + " ";
	end
}

# short version
p ((1..100).to_a.collect{|n|(n%15==0?"FizzBuzz":n%3==0?"Fizz":n%5==0?"Buzz":n.to_s) + " "; }).to_s;
  • Share/Bookmark
Categories: Ruby Tags: ,

Steve Yegge on the Next Big Language

February 13th, 2007 Buu Nguyen No comments

What Steve Yegge considers the Next Big Language.  Sound like

  • Ruby + (Java || C# 1.x/2.0)
  • (JRuby || Groovy || Ruby.NET) + good_tools (esp. IDE)
  • C# 3.0 && dynamic_typing (not just type inference) && more_syntactic_sugar (return multiple values, object-literal syntax for hashmap etc.)
  • Share/Bookmark