SB Apprenticeship: Day 44

The slackbot tells Rob to do pushups, Rob tells the slackbot to screw itself.

The exercise bot went over better than expected!

Oh man, the exercise bot was a total hit! Seven new people joined the health_fitness channel, and when I got in this morning someone asked me when I was going to start it up before I even got to my desk. So yay! Today during Labs time Brandon is going to help me put it on the office computer so no one has to rely on me being at work. I think it’s also made me a little more motivated to work out in general; I went to the Y yesterday after work and then walked to work this morning. The fall weather is perfect for walking, and I just started following the Welcome to Nightvale podcast, so I have like 70 episodes to listen to on the way, so it’s perfect!

  • What did you learn yesterday?
  • What are you going to do today?
  • What do you expect to learn?

Yesterday I learned how to integrate the Factory Girl, Faker and Kaminari gems in order to have fake data for my Cucumber tests to paginate. I’m not quite sure Kaminari is working right, but I’m also not quite sure that I’ve written the code right, so I’ll figure that out today.

Today Brandon and I are going to pair this afternoon. I think the plan is to put the Slackbot exercise bot on the SB computer and then work on the bookstore, but that could change. Kevin’s office is having a beer:30 thing this afternoon that he invited me to, apparently they have way too much alcoholic root beer left over from the recruiting event that they had earlier this week and need people to help them drink it down. See how selfless and giving I am? 🙂

I’m not sure how we’re going to put the exercise bot on the work computer, so I’m looking forward to figuring that out. I think it might involve SSHing into it? But maybe not because I don’t think it’s a server? Maybe VPN? Maybe I’m just throwing out initialisms in the hope of sounding intelligent? (Did it work?) Anyway, I expect to learn how that works today. It feels pretty cool to have a plan to do something during Labs time besides work on apprenticeship stuff. I’m contributing!

SB Apprenticeship: Day 43

Torturing my coworkers...bwa ha ha!

Torturing my coworkers…bwa ha ha!

So this is totally irrelevant to my apprenticeship, but earlier this week I read an article from a mobile design and development studio in LA about how they made a bot for the messaging app Slack that forced them to work out. It has five exercises that are easily done at your desk: pushups, planks, wall sit, chair dips and calf raises, and every 20 minutes or so it randomly chooses three people and an exercise. I thought it was fun, and posted the article in SB’s health_fitness Slack channel, kind of hoping that someone would take the initiative and add the bot, but, while people thought it was interesting, no one stepped up. Last night some friends had a hack night, and when I was debating what to work on, I thought — well, why not? It’d be a fun, somewhat easy project to get it running, and if they didn’t like it I could just turn it off. The instructions, posted on Brandon Shin’s github, are pretty clear, but this was my first foray into Python, so there were some extra steps that I had to go through. Kevin helped me make a shell script to make it easy to run it, and we were off! So far this morning the exercise bot has been into calf raises — it’s picked it three times, but, as a coworker said, true random will do that sometimes.

Everyone in the fitness channel seems enthusiastic about the bot; one person left the channel, saying he might be back when he’s less buried and grouchy. I think everyone has done the exercises so far. I read so much about how terrible sitting is for you, and I basically sit for like 22 hours a day, so I thought taking a minute or so every now and then to do some exercises could only help. In his blog post, Brandon Shin said that they’ve seen a lot of benefits from it:

Our productivity has been through the roof. It gives a great little breather when your focus is getting a little too narrow, a little extra circulation, and keeps you just a little more energized throughout the day.

We currently have 13 people in the channel — I’m hoping this motivates more people to join!

It was a weird process to decide to do it, there was definitely an aspect of both could and should I do it — I’m only an apprentice, I don’t want to annoy people, oh god this is Python, can I even get auth tokens from Slack since I’m not an admin user? Smashing Boxes encourages a kind of entrepreneurial spirit, though, that’s basically the entire point of Labs Day on Friday, and, well, as Adm. Hopper said, “It is better to beg forgiveness, than ask permission.” I’m not sure what I thought would go wrong, like maybe worst case would be I somehow screwed up Slack. That would be bad; we rely on Slack for everything from notifying people about code reviews to gathering groups to go to lunch. But I felt confident that, even if I did royally screw up Slack, the level of talent at SB would probably make it trivial to fix.

  • What did you learn yesterday?
  • What are you going to do today?
  • What do you expect to learn?

I did actually do work yesterday, despite the 500 words I just wrote about an exercise slackbot up there. 🙂 I figured out why my book index page was refusing to create books — I was using a gem that wasn’t on that branch since my admin branch hasn’t been merged into master yet. Ta daa! Usually my pull requests are taken care of pretty quickly, so I decided to work on the blog kata while I was waiting. There were a ton of pull requests yesterday, so I ended up finishing it. I had to go back and use a tutorial for a little bit since my database just refused to save posts and I couldn’t figure out why, but I did get it done. Still haven’t worked on the bowling kata, my head just refuses to grasp the scoring system, which makes it kind of impossible to program a thing to keep score.

Today I am going to hopefully merge my admin branch into master and work on the book index page. A friend suggested a gem that apparently makes pagination super easy, so I’m happy about that. It seemed to take David a long time to get that right, so hopefully Kaminari makes that a little less stressful for me.

I expect to learn how to set up my database to index, paginate and sort books! I think I may also get someone who knows Python to help me fiddle with the exercise bot a little; the last exercise it told us to do was a 55 second plank, which is kind of a long time for the first time it’s telling us to do it. I also need to remember to bring my old yoga mat in, we have cold concrete floors that are not good for exercising!