1. Weekend Science Project (Rails After Time Away)

    We need to do a documentation inventory at work. We’ve added a lot to the docs over the past year, and we’ve got a few things lurking around in there that need to be flagged for QA or revalidation. The stock answer is “put all the pages in a spreadsheet and start clicking/scrolling and annotating the list,” but I’ve been pining to fiddle around with a tool for a little while, and spreadsheets suck, so I decided to see how quickly I could put something together to make the job a little easier for the team (and reviewers down the road).

    I started out with a Padrino app, which was a great way to do a proof of concept on what I was after:

    • Find all the Markdown files in the docs repo.
    • Use the filenames to compose the live URLs of each document.
    • Pull the HTML in from the server and store it for fast retrieval/decomposition
    • Identify all the elements of interest on each page and store them with a checksum.

    For that last, “elements of interest” became “ordered lists and things inside pre tags.” They represent the step-by-step instructions in the docs; either in “do this, then this, then this” form, or in “start typing this stuff on the command line” form. They’re the things people gravitate to and start following, and we know that the average technical user is prone to looking for just those things and not looking at the surrounding text.

    Putting a checksum on each of them will provide a way to do reports that show when an element appears on multiple pages, and across multiple versions of the docs. You kind of expect things like ordered lists to change a little over time. If one has persisted over four or five releases without changing, you might want to look at it and make sure it hasn’t been overlooked.

    So after four or so hours of work, my Padrino app could do all that stuff, wrapped up in Bootstrap. I could fire up the app, get a list of all the documentation pages by product version, and use some widgets to do a few useful things:

    • See all the elements of interest in their own tab.
    • Preview a docs page, then click a button to show only the headings, pre blocks, and ordered lists.

    That seemed pretty useful just as a way to help someone rip through a collection of pages and look for just the things most likely to cause a user pain, then maybe enter them in a log.

    Once I was home for the weekend, though, I realized that I wasn’t as familiar with Padrino as I once had been with Rails, so I decided to do a quick port. Since I’d used ActiveRecord for the original app, and since I was happy with my db schema, it was pretty simple to set up the models, re-run the migrations, and reuse the importer scripts to repopulate my development db with content.

    I spent a few hours on Saturday and a big chunk of Sunday trying to see how far I could get before, well, having enough time to blog about it before ending the long weekend and going to bed. I didn’t want to put any more time in on it at work, because if I ran into a dead end and couldn’t make what I wanted, I didn’t want to feel obligated to try using it.

    I had to relearn a few things about Rails that have changed since I last used it much (during v2 times), and I had to learn some new things about jQuery that I’ve never dealt with before. Still, I’m pretty happy with where it’s at now:

    First, I implemented flags. For now, all you can do is flag a page if you see something you think might be a problem that needs further review. I’ve got a few ideas about how to flag individual elements. One way is super simple, but doesn’t allow you to flag them in the context of the text. The other is tougher and I’m still working on relearning Rails’ AJAXy stuff to figure out a way to flag an element in place, store it, then have it highlighted as flagged next time you visit that page.

    Next, I added a working user authentication model with Devise, so flags can belong to individual people. For now, it just means that if two people look at the same page, they don’t have to agree on its flaggability. Down the road, it’ll mean there’s a way to share the tool with all our technical reviewers so that they can flag things and we can capture all the flag data from them. I’d like to add a way to enter a comment, too, but one thing at a time.

    Finally, I got thiiiiis close to making the flag button truly dynamic. All the AJAX stuff I knew from when I built my last Rails app has changed, and I couldn’t figure it all out in time, so for now I just force a page refresh when the user clicks the flag button to get it to change its state from “flag this” to “unflag this.”

    There are a few more things I’d like to get to:

    • Report pages, naturally: Every flagged page, how many flags it has. That won’t take much.
    • Flaggable elements (ol, pre): I can already do this the easy way, but I’d love to do it the hard way.
    • Comments to go with flags, with design to accommodate a running list of flag comments down the side of a page preview.
    • Dynamic page import. Right now, we get the map of all the files then suck in their HTML and store it. The advantage is that it’s pretty fast. The disadvantage is that the content will drift from reality over the course of a release cycle. Way better to either suck it in each time the page is viewed or offer a “re-import the HTML” button people can hit.
    • Links straight to the files in the Github repo, so people can quickly fix things from the app if they spot something.

    It’s in a place where I knock most of that stuff off with another leisure-time sprint, then see about hosting it somewhere relatively secure where I can put it in front of a few people for real feedback.

    It also reminds me of all the stuff I wish I knew more about, like testing. I guess if I can get it into a useable state for other people, I can use it as a sandbox for learning about that stuff.

    Anyhow, here it is. Hope you had a good Presidents Day weekend. Good night.

    #docs_decomposer #rails #ruby #work

    Keep reading →
  2. Ben says we need to bathe the hermit crabs quarterly, so okay.

  3. On the Quicksilver (and the curious marketing conceit "RV resort")

    We took our new Quicksilver trailer out on its inaugural camping trip this weekend. A few notes on the whole thing:

    We’ve got a Livin’ Lite Quicksilver 8.0. It’s a tent trailer, not a pop-top, so when it folds out it’s sort of like having an old-school canvas tent with a bimini frame sitting up off the ground on a big aluminum box.

    Not being a pop-top, and being made of aluminum, it only weighs about 850 pounds, which is well under our Toyota Matrix’s 1,500-pound towing capacity. Driving it out to Mt. Hood this weekend was pretty easy. It was very quiet, and the main thing I noticed about it was how it affected braking: I definitely needed to give myself more time to slow down.

    Setting it up is very easy: It has a vinyl cover you unsnap and roll up, a set of four aluminum struts that hold up the bed ends when it’s unfolded, and a bunch of snaps, velcro and bungie loops to hold the tent top in place. Ideally, you’ll want to deploy it with two people, but I’ve managed to put it up and take it down on my own. With two people, it takes well under 10 minutes to get from “completely closed up” to “fully deployed.”

    Setup on the inside, once the tent is up, is pretty easy, too. The galley top (with a sink and a cabinet) can be lifted into place by one person. It has a folding table and removable seat cushions that stand up in a minute or two. There are also little light/fan combination units that clip onto the bars next to each bed end and plug in to 12-volt power sockets.

    As RVs go, it’s a pretty simple affair.

    Each end of the tent has a double mattress. It’s also possible to collapse the dining table and lay it between the two dinette seats, then put their cushions down to sleep two more people. The mattresses on the beds are a little thin, so next time I think we’ll bring along our Therm-a-Rest pads.

    It has an electrical system with three standard household outlets and a 12v adapter. You can run it off its own 12v deep-cycle battery, or you can connect it to shore power. It also has a small sink with a faucet that can either work with city water connected from the outside, or pump water from a plastic, 7-gallon tank in the galley base. It was pretty nice being able to wake up and start the water for the French press with an electric kettle. There’s no built-in stove, but there’s enough counter space to use the two-burner camp stove our dealer threw in. Alternately, there’s a small aluminum table you can mount outside the trailer to use for cooking.

    It’s got pretty decent storage. The galley offers three small cabinets with plenty of space to stow cables, hoses, the camp stove, and first aid kit. There’s another cabinet by the door that can hold a few things you might want to grab out even before the trailer is fully deployed. The dinette seats also offer storage compartments. For travel, you can slide a few things under the dining table when it’s folded and placed over the edges of the dinette seats. We were able to fit everything for our trip into the trailer itself (including cooler and folding chairs), and didn’t have anything in the car with us.

    We had good weather for our trip. It got down to the low 40s overnight, and we used a small ceramic space heater running off the electrical system to keep the trailer warm. I slept in an unzipped sleeping bag and stayed pretty comfortable.

    I can’t name many downsides. Sleeping with a heater in such cool weather did cause some condensation. We toweled a lot of it off before we packed the tent back down, and since it was sunny and in the high 50s this afternoon when we got home, we just set it back up again to air out and dry out a little more.

    The city water pressure from our hookup was a little high and caused a small leak around one of the pipes. We spotted that happening pretty quickly. One of the nice things about the all-aluminum body is that it wasn’t a huge deal to towel up the water without fear of rot setting in.

    All in all, though, it’s mainly a big tent on wheels, with plenty of space to sit around if the weather turns (or if you just feel like hanging out in there). It definitely changes your outlook about the weather when you know you’re sleeping four feet off the ground under a waterproof vinyl top. Because it’s a little more weatherproof than a tent, and because it’s easy to heat if need be, it extends our camping season quite a bit. Because it’s a little more comfortable to sleep in than a tent, it also extends our range. We’ll probably do a few more trips to some of the regional parks like Oxbow and Stub Stewart, just to make sure we’ve got the hang of driving a trailer around the metro area, but we’ve already got a spot reserved at Crater Lake this summer, and I’d like to figure out a longer trip somewhere further out before next year.

    Where We Stayed

    When we bought the trailer, the dealer included a year’s membership in an RV park network. We can stay in any of the parks in the Pacific NW for free for up to 30 nights this year.

    We stayed at Mt. Hood Village. Since our trailer is just 16’ when fully deployed, we opted to stay in what you might call the “rustic” section of the facilities: Dirt sites with water and electricity (but no sewer or cable t.v.)

    That was probably for the best: We had the entire area to ourselves. The premium area was packed pretty tightly with really big RVs. Yeah, they had a shorter walk to the (indoor) swimming pool and hot tub, but they also had to deal with all the hooting and yammering of people out under their awnings, drunk on Coors Light and the novelty of just-a-hoodie weather in January.

    The vibe was pretty friendly. Our family did get the side-eye from a dude with a pony tail and the most gigantic owl tattoo I have ever seen: It spanned his chest and its eyes encompassed his pecs. He seemed a little miffed we were in the hot tub (which was huge … it could have easily seated 10 people), maybe because he was hoping to maul his girlfriend in there. Al & Ben left to go swimming, and he did get a little nasty with the towel-off once he and his girlfriend decided to climb out. Another couple in the corner looked to be completely fucked up on something that made them squint into the far distance and occasionally slur giggling observations. Oh, and Ben & I shared a sauna with a guy who’d bark “shut-it-shut-it-shut-it-the-heat-the-heat-the-heat” when people came in or out. He was also super worked up about a missing flashlight, and he snarled recriminations at one of his children through the steamed glass.

    Still, people did smile and say “hi,” so friendly enough; but I think we’d have been okay just sitting by the fire, too. I also think that perhaps “RV resort” is one of the more interesting bits of branding nomenclature I’ve encountered in a while if that place is an average specimen. Your average state park is doing what it can to make the sites feel a little isolated from each other, and what you lose in the way of a hot tub, gift shop and swimming pool you make up for in relative quiet, hiking trails, twilight ranger shows at a rustic amphitheater, and fewer opportunities to see some dude with a ginormous owl tattoo toweling his lady off all nasty.

    The membership is free for a year, though, so really we can live in both worlds if we choose.

    Multimedia

    This video is 14 minutes of camper setup competency that I find a little hypnotic. It helps that the Livin’ Lite company is located in Northern Indiana, and so I’m hearing the voice of my people (more or less: I’m about two years more “from Oregon” than I am “from Indiana,” at this point).

    Which reminds me of another thing that I enjoyed this weekend:

    I worked at an RV plant the summer after I graduated from high school. I was really, really bad at it, but I learned a lot: I installed air conditioners, manufactured step-well covers, routed and secured fiberglass sheets to partition walls, undercoated vans, and did a bit of finishing work here and there.

    Sitting at the table enjoying my coffee this morning, knowing the trailer was made in the same town where I helped put together RVs, it was pretty easy to see bits and pieces that looked like things I’d made or assembled that summer. You might see some of that stuff and not think twice about it, assuming a machine did it, but I spotted a few things: A small nick on the crimp on an otherwise perfect aluminum cover; and the thumbnail impression of a screw that had gone in a little off, then got pulled back out a bit and tightened back down a tiny fraction of an inch the other direction. For a second, I could smell routed fiberglass and rolls of carpet in a hot warehouse.

    #camping

    Keep reading →