Learning to build

Last week in Capital News Service I learned tabletop js and became “mustache champ,” which stands for my initials and the Mustache language. I’ve been learning new tools every week for the wire service, stretching and improving my coding abilities.

I brainstormed with a reporter writing a story about media choosing not to use the name Washington Redskins. We decided I would make a database listing a few publications and their editorial policy. My editor happened to attend the Online News Association conference last weekend and learned about tabletop — so he suggested I use it.

Tabletop allows you to display Google spreadsheets on websites. It simplifies the process of creating a database, and this way you don’t need to use MySQL. When you need to update the database, you can just update the Google spreadsheet — simple as that.

Since it was my first experience with tabletop, I decided to do some research. There are some great guides out there, like “The Absurdly Illustrated Guide to Sortable, Searchable Online Data Tables,” by Lisa Williams, or “Some Thoughts After a Couple Months With Tabletop and Handlebars,” by Chris Keller.

My editor wanted to link a Google Form to the database so we could crowdsource. Did readers know another publication choosing to drop or use a different reference for the team name? They could submit it to us with the Google Form. But then responses were being entered directly into the database — and we wanted to have more control over possible spam. How would I keep some rows of the spreadsheet hidden while the rest showed up on the site?

When I started to get confused and muddled, I didn’t fret. A great thing about the coding community that I’m beginning to see is how open and welcoming everyone is. They want to help. They struggled and got stuck before — it happens to all coders, beginners to the advanced.

stuck coding try taking a break

I reached out to @ChrisLKeller on Twitter — a great tool for instantly getting in touch with coders around the nation and world. He suggested handlebars. While I ended up not using handlebars for this project (I’m excited to learn it next), I found a tabletop query string that enabled me to only show certain rows of the spreadsheet. Something like query: "approved = >1" and putting “2” in the rows I wanted to display. This gave me control over what data would appear on the page viewers see.

I love the trial and error method behind coding. You really have to break something before you build it. This can be terrifying, but also exhilarating. When I figure a problem out in coding, there is nothing else like that triumphant feeling. It’s different than seeing my name in print or online. I’ve built something. I’ve created.

Check out the database below. Let me know what you think!