Day 27

So I went later than I wanted to tonight, but I was on a roll. I would have finished much earlier but I spent 2.5 hours today at a developer meetup. It was interesting as I’ve only been to one other so far. It was good to meet some people and start putting real people to the dev community in Nashville. I did find out that basically nobody is learning/using Ruby (at least at this meetup). The largest language according to the people today is .NET because of all the healthcare companies. I showed a lab to a guy who’s 4 months in at Nashville Software School and he was impressed with the TDD and seeing how it worked. He said he never sees tests like that and doesn’t know anything about writing them. I assured him I didn’t know much about writing tests either but I did read them all day long.

The big announcement is … I FINISHED MY CLI GEM PROJECT! Now, I haven’t done my review with my instructor and passed yet but it’s done. I’m currently working through my Travis CI tests and getting those to pass. I expect that to be passing soon and then I’ll update my gem. It’s already live on! I’ll have a new version pushed up when I get my Travis passing.

So I had a few hang-ups along the way but most of it had to do with scraping. I figured it out though by trial and error. From what I understand scraping is mostly trial and error so there isn’t much to pass along knowledge wise. I did run into the problem of trying to turn this: "7\n" + "\n" + "\n" + "Paddlers\n" + "\n" + "going" into this: "7 Paddlers going". When I did gsub("\n", "") it returned 7Paddlersgoing and gsub("\n", " ") returned "7 Paddlers going" with too many spaces. I was thinking I was going to have to split the string into an array, filter out the \n and then join the array. Then I thought, “Why not Google turning multiple spaces into a single space.” That seems like a problem someone would have solved already. Guess what? They have. So I ended up with row.css("div.attendee-count").text.strip.gsub("\n", " ").gsub(/\s+/, ' '). Called gsub on a string that had already been changed.

I just realized that Travis is never going to pass because I don’t have any tests in my gem. Whoops! So I’ll remove that integration for now. It’ll be a nice future project to write tests for the gem.

To explain my project, in brief, you run the program from the command line, it asks you to input a zip code to see meetups from, if you enter less or more than 5 digits or not 5 digits, say 5 letter, it tells you to input 5 numbers. Then it asks for a radius to search in, I limited the radius to <100 miles. Then it returns a list of all the meetups scheduled for today. If there are none it tells you such. It then asks you if you’d like to search again. I’m proud as well as ready to move on to SQL.

Time spent today: 7:24
Time spent total: 118:21
Lessons completed today: 1
Lessons completed total: 286