Ruby on HackerRank

I chose to burn through the Ruby track in HackerRank today.

Recent exploration into plugins for Jekyll impressed upon me the need to brush up on and extend my knowledge with Ruby.

I feel like Neo in Matrix when he exclaimed “I know Kung Fu!!” I completed the entire track with the exception of one “Medium” level challenge. Of course, this doesn’t make me an immediate Ruby expert. But this certainly filled in the gaps with regards to syntax and such. I’ll be much more able to read and digest Jekyll plugins.

For Jekyll, I next need to read up on Liquid… and tear into exactly how Jekyll does what it does.

I’ll finish the final Ruby challenge tomorrow. It’s an exercise with Prime Palindromes. What IS it about programming tests and tutorials and this fixation on palindromes? I get it that it helps reinforce concepts of control flow and optimization. But sheesh.

In any case, I’ll rough up my plan here before I attack it tomorrow:

  • Earlier in the track I created a primality tester. I need to enhance that to keep it’s store of primes as a memory so as not to keep recreating it.
  • Next, I’ll try to take the path of iterating through all palindromes of given length and then test for prime rather than iterate through primes and check palindrome.

EDIT: It’s tomorrow.

Chuckle… some days are busier than others with plain ole’ life. Yesterday I could focus on Ruby. Today I couldn’t even get around to this till late evening.

In any case, I knocked out that final Ruby challenge!


© 2017. All rights reserved.