Can I be part of the future, please?

I think the first exposure I ever had to programming in any sense was from XKCD comics strips. I was just finishing college, with a not-quite-useless-but-close degree in Business Administration. The subject of the strip was related to computer science about half the time, but I would have to google punchlines before I could even understand the jokes. To be honest, learning a little aout programming was just a side effect of trying to understand the refences the comic made. But it worked. I still remember looking up Richard Stallman because XKCD had depicted him as a katana-weilding ninja, fighting copyright law. Humor is definitely the way to my heart, and I slowly started getting  sucked into the world of computers without even realizing it.

At this time I was also really starting to realize the value of an intellectually stimulating job. I had worked as a fry cook and a housekeeper at a hospital, and now I was working as a cashier at Publix (a grocery store chain in the southeast). It was the least mentally challenging job I’d ever had, and I swear that I could feel my mind slowing down. It felt like I was devolving into some kind of lower lifeform that stayed rooted to the ground like a polyp, only my hands moving, saying the same things over and over again. All I was missing was the ability to filter-feed nutrients from the air around me. It was less than ideal, and I was made very aware that once you leave school, nobody cares whether you keep learning or growing as a person anymore. That’s on you now.

Meanwhile, the world was computerizing at an impossible rate, and it seemed that all of the most interesting things that were happening were happening in tech. Facebook was considering putting wifi balloons into the sky, uber and airbnb were undercutting traditional business models, hackers and hacktivists were having real impact on politics, and so on. It felt like living in the 21st century without knowing how to program was like living in Viking times without knowing how to sail, or in Mongol times without knowing how to ride a horse. It was a prerequisite for the best adventures of the age. As I moved into my 20s, it seemed like if there was a time to jump on this bus, this was it.

So I started trying to learn how to program. I found codecademy, the “Hard Way” series by Ed Shaw and a slew of other resources. When I got stuck with one of them, I would just switch to another until I got stuck there, and then switch back. The fisrt thing I ever finished was the python class at codecademy. It was SO hard. I’m sure I’d probably laugh at it now, but I felt a huge sense of accomplishment finishing it.

The thing that really insipred me about programming was the fact that, seemingly, you could learn this amazing skill for free, assuming you had a computer to start with. I had messed around a little with electronics, and quickly learned that every project required cash to complete. Breadboards and multimeters cost money. They’re physical. There’s no open-source resistor. The real power of programming is that we can do so much with so little. A laptop, some electricity, and off you go.

Man, it’s nice to reflect on why I’m doing this. Haha, I’m all jazzed up now. Time to go study!

Check the Facts: my first CLI scraper

Welp, there it is. My Snopes CLI is up and running! Not gonna lie, that was a tough nut to crack. The cool thing about projects like this is that it takes you out of the Learn bubble and gives you a little push out into the scary, unending, bottomless sea that is development and lets you stay out there for a second, panicking, before you manage to clamber back onto shore.

I guess what I’m mostly referring to there is Nokogiri and XML, which I definitely still don’t really understand, but I’m way more comfortable with it now. I went into my project confident that I had chosen a website that was perfect for scraping and that I probably wouldn’t hit any major obstacles.

I found out how wrong I was when I realized that certain text elements I wanted to scrape didn’t have any unique selectors, and neither did their parents, but their CHILDREN did. No I tried to figure out how to select an element’s parent using CSS and it turns out… that CSS doesn’t have a parent selector. Bum bum baaaaah!

On one hand, bummer. On the other hand, it was a very interesting find; I love seeing debate in the development community about stuff like this.It reminds me how much this field is constantly evolving. CSS-tricks had a whole article about this issue, and apparently a bunch of programmers have proposed different potential syntaxes for a parent selector, but it was left out of CSS3 due to the potential for overuse. I wondered if I would have to scrap the project.

BUT! Guess what DOES have a parent selector? XM friggin’ L. It took me a minute, but after learning a bit about XML, nodes, and all that jazz, I was able to get what I wanted. Definitely useful and definitely an area for me to explore more later.

Other than that, things went more or less smoothly. Had a period of time where I kept recieving 404s from the scraper, but that kind of just went away by itself somehow. That’s  a little frustrating, not knowing why, but at least I got past it. I have to say though, I’m glad I chose Snopes for this project. It was fun working on something where I would occasionaly also see confirmation that Cracker Barrel is not, in fact, changing its name to ‘Caucasian Barrel’ under pressure from liberals.