CLI Project Review day

Today is my CLI project review and I reserved my day to review for the last time my code and check that everything is working in my interface.

As soon as I opened the web page that I am scraping I noticed that they have changed their content. Glup! I checked to see if my code was still working….and…not, that new exhibition was not included in my list of exhibitions.

PANIC! I am nervous because is my first project review and I really don’t know how is going to be. And  now I found that some exhibitions were not included and… Oh! Wait, I found out that that web page has links to more pages. I should scrape those pages too to get a full list of the exhibitions and I don’t have much time.

I started to make all the changes to get everything working well. I was inspecting the page but I din’t see why my CSS selector was not working. It seems that only the recommended exhibitions are listed, when I wanted all of them. I tried like 20 different selectors and I can not get that new exhibition! I struggle with CSS selectors… I find them very difficult!

After 4 hours and with a mental speech to explain why my code is not working properly and I didn’t do anything to fix it I found out that I was looking to a different web page. I was looking to the archive page and not to the “whats on” page, the one I wanted…

OK, everything is fine after all!

But I want to share this experience. I have learnt a few new things like  how to get attribute info with a CSS selector in a Nokogiri document.

 

 

And finally I have learnt another important lesson like, when you are nervous and you don’t have much time left, don’t change your code. Don’t break everything in the last minute like I did. Keep calm and later explain what you have found and try to fix it, but not in a rush. Go for a walk, breath some fresh air and take it easy. Chocolate cookies help too.

Leave a Reply

Your email address will not be published. Required fields are marked *