So tonight I started my CLI Gem project. This one is going to be in my portfolio and has A LOT more to it. Okay, well maybe not a lot more but it’s the first time I’m starting from scratch to build something. Luckily, I’m not left out to dry and there is a how-to that’s over an hour long that Avi did. Of course it’s not exactly what I’ll need to do and I’ll run into problems along the way but it’s nice to have a good resource to start with.
yawn it’s been a long day. My 3 month old was up early today. Either way, I got my scraping project done tonight. Nokogiri can be quite particular about the things you use to select content. Turned out I was pretty much there and just needed to change how I was accessing the info I needed. Attended a Study Group tonight which taught me something very important. When using pry inside a loop when you enter exit into the pry prompt it runs the next loop.
So working on my scraping project. It’s hurting my head. Scraping is no fun to figure out. What I’m stuck on right now is iterating. When I have some time tomorrow I’m going to work on completely understanding iterating when scraping. Here’s what I’m looking at currently: <div class="social-icon-container"> <a href="https://twitter.com/empireofryan"><img class="social-icon" src="../assets/img/twitter-icon.png"></a> <a href="https://www.linkedin.com/in/ryan-johnson-321629ab"><img class="social-icon" src="../assets/img/linkedin-icon.png"></a> <a href="https://github.com/empireofryan"><img class="social-icon" src="../assets/img/github-icon.png"></a> <a href="https://www.youtube.com/watch?v=C22ufOqDyaE"><img class="social-icon" src="../assets/img/rss-icon.png"></a> </div> Then I’m doing (among other things above it):
About 10 minutes before I was suppose to get to my computer the power went out in my subdivision. I quickly realized that while I had setup flashlights in strategic locations in our apartment, when we moved into our house I never did the same. My wife and I both did not have our phones on us and it was DARK. Needless to say I closed the baby gate at the top of the stairs to keep the little ones safe and made my way to the kitchen where I knew a flashlight was.
Another productive project day means, not much to talk about! I got through all the tests that I needed to for my Tic-Tac-Toe with AI project. I started trying to build out my “AI” but didn’t get very far. I know I need to start simple so I decided to just attempt the computer making random moves. I tried to implement the following work flow: 1. Get the current board array (although this should be passed in by default).