Question

I came across this File parsing programming challenge today and found it quite interesting. I also went for an interview about 6ish months back where also I was given a txt file which had to be parsed with logic to get the desired results. I want to find more of these kind of problems.

What are some good resources for ruby interview type questions/puzzles?

Was it helpful?

Solution

Hmm. I don't know of any specifically oriented towards file parsing. But here are some suggestions:

  • Ruby Kickstart is a project I'm currently working on to teach Ruby. One aspect is a series of challenges that come with test suites to see whether you did them correctly. You might download the code and try your hand at them. Once you have the code, run rake 1:1 to run the test for session1, problem1.

  • Ruby Koans is similarly a series of tests, the goal being to explore how Ruby works. I really enjoyed going through this material. There's a sort of zen you get into, almost a rhythm of solving and running tests (assuming you already know Ruby).

  • Meta Koans is also a series of tests, put forth on Ruby Quiz, the goal being to to use metaprogramming to write code similar to attr_accessor. I found this unexpectedly challenging.

  • Puzzle Node is a project from Ruby Mendicant University to challenge people. I tried several problems, and didn't really feel they were very Rubyish, they seemed to me more general CSish in nature. The input formats made me assume they were taken from elsewhere.

  • Ruby Warrior is an AI programming challenge from Ryan Bates (of Railscasts). It's much more abstract than the other things here, you could think of it like "write a robot that can navigate mazes and fight / flee from opponents). Unfortunately it doesn't look like he's done much with it since he wrote it, so IDK if it's still any good.


Also, I think it is a mistake to classify that as a "File parsing programming challenge". That the input (a sequence of characters) happens to be given in a file does not make it a problem about reading / parsing files. It is actually an algorithmic problem.

Furthermore, you can solve those challenges with any languages, including Ruby, which I have done and can be seen here.

OTHER TIPS

This question offers a lot of options for programming puzzles:

https://softwareengineering.stackexchange.com/questions/756/programming-puzzles

If you're looking for something that specifically targets Ruby, then I recommend RubyQuiz:

http://www.rubyquiz.com/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top