DEV Community

Discussion on: Solving a Job Application Code Challenge

Collapse
 
rpalo profile image
Ryan Palo

Do you have the big long string of text? You've got me hooked and I want to solve it, but it seems like it would be more fun to actually get the secret word at the end :)

Collapse
 
bengreenberg profile image
Ben Greenberg • Edited

Hey Ryan,

Not sure why, but my paste of the long string in this comment did not come in correctly as was mentioned below. You can find it on repl.it at repl.it/MivX.

Enjoy! :)

Ben

Collapse
 
rpalo profile image
Ryan Palo

Victory! I found an interesting performance quirk, at least for Ruby. Thanks for a great puzzle and write-up!

Thread Thread
 
bengreenberg profile image
Ben Greenberg • Edited

Your solution in Ruby is awesome. I also love the dedication to benchmarking your two different variations and very interesting results on .count and it's optimization. I didn't know that before. Overall, Ruby is just plain awesome.

Thread Thread
 
rpalo profile image
Ryan Palo

Thanks! Yeah, I was super sure the way you did it would be faster. Ruby is one of my favorite things!

Collapse
 
ripsup profile image
Richard Orelup

Running against the blob above it seems the answer is a word followed by some misc character (the last 4 almost spelling out an f-bomb). Did I get the right answer or is something off? I did a codepen with your code and it seems to give the same answer.

Thread Thread
 
bengreenberg profile image
Ben Greenberg • Edited

For those interested, I put this up on repl.it. I'm not sure why but my paste in the comment above of the very long string did not paste correctly. The repl.it has the correct long string: repl.it/MivX