Recently we saw an advertisement for a Rails Developer contract job in one famous Rails website. The potential client posted a small puzzle in Ruby and asked the potential candidates to solve and apply for it.
We thought we would reply to them in their style itself. 😉
The below code was the email attachment we sent to them. Oops!.. Are we sharing lots of internal secrets. 😀
#Small puzzle given by client
qualities = [“bXVzdCBiZSBhbiBhd2Vzb21l”, “YXBwIGVuZ2luZWVy”, “ZXhwZXJpZW5jZWQgaW4gcnVieS4=”]
uptake_job = qualities.inject([“You”]) do |quality, result|
quality << Base64.decode64(result) end return uptake_job.join(' ') end #Spritle's answer def is_interested return Base64.decode64("WWVzIGFuZCBXZSBhcmUgaW50ZXJlc3RlZA==") end def is_skilled puts "We holds skills on:" puts "Ruby, ROR, TDD/BDD, Amazon EC2 & S3, SVN, GIT, Linux, Web 2.0, J2EE, Enterprise Java, Maven and related stacks \n\n" return true end def is_agile puts "We practice Agile \n\n" return true end def is_blogging puts "We blog at https://www.spritle.com/blogs \n\n" return true end def is_contributing_opensource puts "Yes. We made two open source and we gonna make few more soon. \n\n" return true end def is_awareof_ejb_spring_hibernate_maven_stacks puts "A big YES. That is our foundation. Our founder is Agile Java Architect with 8 years experience. \n\n" return true end def is_ready_for_interview puts "Yes. Reach us at Skype: 'balajidl23'. Lets talk... \n\n" return true end end class TC_MyTest < Test::Unit::TestCase def setup @application_form = Application_Form.new end # def teardown # end def test_a_interested puts "You said: " + @application_form.uptake_problem assert(@application_form.is_interested == "Yes and We are interested", "Interest not shown") puts "We say: " + "Yes and We are interested \n\n" end def test_b_agile puts "is_agile?" assert(@application_form.is_agile == true, "Nah. Agile check failed") end def test_c_is_skilled puts "is_skilled?" assert(@application_form.is_skilled == true, "Nah. Skill check failed") end def test_d_is_blogging puts "is_blogging?" assert(@application_form.is_blogging == true, "Nah. Not sharing knowledge") end def test_e_is_contributing_opensource puts "is contributing opensource?" assert(@application_form.is_contributing_opensource == true, "Shame. They dont dare to show their code to public") end def test_f_is_awareof_ejb_spring_hibernate_maven_stacks puts "is aware of ejb, spring, hibernate, maven stacks?" assert(@application_form.is_awareof_ejb_spring_hibernate_maven_stacks == true, "Darn.. They dont know Java.") end def test_g_is_ready_for_interview puts "is ready for interview?" assert(@application_form.is_ready_for_interview == true, "No. They are naive") return true end end [/source]