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!

SB Apprenticeship: Day 42

Hack hacky hack hack

Hack hacky hack hack

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

So I spent several hours on that problem I mentioned yesterday, where I couldn’t figure out a way to make Capybara-Webkit acknowledge that a modal happened, before I asked Derek for help, and he told me to just force it to return true and call it a day. Sigh. This is another of those times when I shouldn’t have waited so long to ask for help. Ah well. I did manage to finish that feature file and started to move on to the next one, but my head started to hurt and so I read some of The Clean Coder instead. I gave up soda this past weekend, and have been having intermittent headaches since. Caffeine’s tough, man.

Today I am going to tackle the book index page feature for the bookstore. It keeps getting hung up when I tell it to create books, and I got frustrated with it yesterday and put it aside, but today’s the day to figure out what’s going on. I think I’ll also read some more of the Clean Coder, I’ve fallen behind on the books we’re supposed to read.

I expect to learn that I’m probably forgetting something simple with the create method in my code. This feature also requires sorting, pagination and searching. I’ve worked some with sorting and searching, but never with paginating, so hopefully that won’t be too hard.

SB Apprenticeship: Day 41

Today is voting day for municipal primaries! If you're in NC, check the Board of Elections to see if there's one going on in your town!

Today is voting day for municipal primaries! If you’re in NC, check the Board of Elections to see if there’s one going on in your town!

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

Yesterday I learned that apparently it’s impossible to confirm that a modal dialogue exists using Capybara-Webkit. When I look online, I find ways to accept or dismiss the alert, which in theory ought to work also: if you can confirm an alert than the alert obviously exists, but when I try I just get Unable to find modal dialog (Capybara::ModalNotFound). I was originally supposed to use Selenium for this, but Brandon suggested Webkit instead, and I’m beginning to think he did it solely to troll me. Of course, when he gets in and I manage to corner him for help, it’s going to be like three words that he just knows off the top of his head. *sigh* I’m getting a lot of use out of the ¯\_(ツ)_/¯ emoji lately.

Today I am going to fight with this stupid JavaScript stuff some more. After I get that working, there’s only one more Scenario in the Administration feature, so that’ll be a nice accomplishment. I just realized that I never actually did the blog kata that I was supposed to work on, so I may take time this afternoon and work on that instead.

With any luck I’ll learn that I was looking in the wrong place for the answers to my Webkit problems, and Brandon will show me a magical resource that will answer all my questions, leaving me content and happy at my keyboard. What do we think the chances of that actually happening are?

SB Apprenticeship: Day 40

Hurricane Joaquin made this weekend wet, but fortunately not exciting.

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

I really need to start remembering to write these up on Friday so I don’t have all weekend to forget what I did. Let’s see…Friday I worked on my bookstore app basically all day, with a break for a Smashing Labs update and a Cucumber lunch ‘n Learn. I’m definitely understanding stuff more, although I still make stupid mistakes. “Why isn’t my database showing up?” “Well, did you make a database?” “Uhhhhh…..” And it seems like it’s always like that. Ah well. At least I’m seeing improvement, right?

Today is more bookstore! The next part of the cucumber tests involve JavaScript, so I’ll have to brush off those skills.

I expect to learn more about how to make this bookstore work!

SB Apprenticeship: Day 39

My coworkers have a Minecraft world they play in, so I finally got motivated to try it out. Four hours later, this is my house!

My coworkers have a Minecraft world they play in, so I finally got motivated to try it out. Four hours later, this is my house!

I’m not a gamer. I never have been, for a lot of reasons — I never played as a kid, I don’t have any consoles, I’m kind of super ADD, I never really knew what to play, so many games have a reputation for being horrifically sexist…etc. The games I’ve enjoyed have all been puzzle games, like Portal or Braid or Thomas Was Alone. I’ve been curious about sandbox games like Minecraft or The Sims for a while now, but I know myself — it’s all or nothing. Like last night, for instance, I started playing and the next thing I know it’s midnight and I really ought to be getting ready for bed — but I just finished smelting all this glass, I need to make my house have windows! I didn’t manage to get anything I meant to do last night done, so the poor kitties will have to live with a dirty litterbox until tonight. Anyone have any tips on how to prevent losing hours and hours to a video game?

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

So, aside from learning that Minecraft is dangerously addictive, I learned that, despite all being organized into neat little files, Cucumber tests all run together. It goes through all the step files when I run the tests, so when I solve And I click the "Login" button in the Account Creation steps, Admin Authentication can also use it when those steps run. For some reason it took Brandon three times explaining this for me to really grasp it. But! I think I have it now! The thing that was confusing me was that I would run my tests and one would fail that wasn’t actually in my list, which would throw me off.

I also learned that Github doesn’t count commits that are made to a branch in my little contributions map until the branch is merged into master. I set myself the goal of making at least one commit a day for the month of October, but it looks like I failed on the very first day! Booooo. Of course, I had planned to do a chapter of the Rails Tutorial when I got home, until Minecraft ate my evening.

Current streak: 0 days. *sob*

Current streak: 0 days. *sob* 

I need some kind of clever name for this goal. Commit October? Git October? Codetober? Some sort of horror movie reference about being committed (like to a mental institution?) Maybe that’s ableist. I’ve never been great at coming up with names. Any great ideas out there?

Today is labs day! This never actually means much to me since I mostly just continue whatever I was working on during the week, but there are more distractions. Derek, one of the previous apprentices who is now a junior dev is hosting a lunch and learn on Cucumber that I plan on attending, so hopefully I’ll learn more about how Cucumber and Capybara work. I’m working on the Admin Authentication tests, so I think that means I’m going to actually write some code and get the bookstore app really started.

Wouldn’t it be cool if I emerge from today an expert in Cucumber? Flying through my tests and crafting beautiful code and totally being a successful junior dev. Ahh.

SB Apprenticeship: Day 38

Ignore the mess, isn't my cat cute?

Ignore the mess, isn’t my cat cute?

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

Yesterday I managed to finish one of the Cucumber feature tests, felt awesome, started another and immediately felt lost again. Sigh. I should really have been more proactive with the TDD in code school. Hindsight! Still, I learned a lot about Cucumber and what it expects. I also put in my first real pull request for this assignment, and making the corrections that were requested also helped. I’m learning a lot every day, but it’s not really localized. Yesterday I learned a little about Cucumber, regex, pull requests, merging and Rails.

Today I’m pairing with Brandon again and probably working on the bookstore app. The feature set I’m working on in Cucumber is all about the book index store page, so I’m guessing that will involve writing the books controller and fiddling with the database.

I’m still a little confused when it comes to knowing exactly what an app requires me to write. For instance, right now, I wrote a test that makes a new book, then creates a new user and logs into the bookstore. I got this insane error message when I ran the tests, and I’m pretty sure that undefined method `create' for # (NoMethodError) means that I need to make a create method in my books controller. But then I look at David’s code, and he doesn’t have one. So I’m not sure if that means that for whatever reason his github isn’t up to date, or if he did something fancy that I don’t know. I should probably err on the side of doing what I know, even if it is less professional; that’s what refactoring is for, right? 🙂 This is what I mean when I say that I’m constantly second-guessing myself when it comes to knowing what to do. Maybe I just need to be more aggressive.

SB Apprenticeship: Day 37

Cucumber tests!

Cucumber tests!

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

Yesterday I worked through a bunch of Cucumber tests. They’re kind of weird, sometimes the answer is dead simple, but other times it’s super complicated. It still takes me some time to figure out which is called for in each individual test, I spent like half an hour on the click one yesterday.

Simple, not so simple

Simple, not so simple

I’m also still not sure how complete the Cucumber tests are supposed to be. Is this like when we did Battleship at TIY, once all the tests are passing I’ll have a finished app? Brandon mentioned that I’ll need to have some Rspec tests in there too (that I’ll write myself), but I’m not sure what they’ll cover? I haven’t actually written any real code for this app yet, it’s all been installing gems and making tests pass. I guess it’ll all get clearer as I go, though.

Today I’m going to read more of the Cucumber book and then work on the bookstore app. I keep meaning to ask Kevin to explain scoring in bowling to me so I can work on the kata, but I always forget by the time I get home. I feel like I’m not accomplishing anything during my days, and that’s stressing me out. I think sometimes I have a hard time actually beginning projects — like, I have this feeling that if I just read this one more thing, or do that one more tutorial all of a sudden everything will fall into place and I’ll be the brilliant coder that everyone seems to think I can be. Unfortunately I don’t think that’s how it works, though. I don’t know. It’s really hard for me to get started, I never really feel like I have any idea what’s going on. Sometimes I ask too many questions about things that are actually easy and other times I feel like something’s got to be simple and waste hours trying to figure out a solution before asking someone. Yesterday I spent way too long trying to figure out how David knew to use ActionMailer in something, and when I finally asked it turned out that he had just installed a gem. Although honestly, I wouldn’t have even known that I needed ActionMailer if I hadn’t peeked at his code in the first place. Do you just learn this stuff as you go? Is there some intuition that I’m missing? I really like this job, and Brandon told me that I’m progressing at a good pace, but I feel like I’m behind and my stupid brain immediately goes to “you’re going to fail and they’ll never hire you and you’ll never get a job and you’re a miserable failure why do you even try anything new.” Which isn’t exactly useful in any sense. I’ve gotten better at shutting that off, but it’s hard when I’m sitting in front of my computer feeling stupid.

Sigh. I kind of feel like Rumsfeld’s 2002 beat poem:

“There are known knowns; there are things we know we know. We also know there are known unknowns; that is to say we know there are some things we do not know. But there are also unknown unknowns – the ones we don’t know we don’t know.”

I know there are things I don’t know, but what about all the things I don’t know that I don’t know yet?

I have no idea what I expect to learn today.

SB Apprenticeship: Day 36

I have blue hair, a red panda skirt and a job that doesn't care at all about either. I'm definitely adulting right.

I have blue hair, a red panda skirt and a job that doesn’t care at all about either. I’m definitely adulting right.

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

Why am I still having problems with Github? I’m ok with creating a new repo on the site, and I’m ok once I get it linked up to my laptop, but the process of connecting the two is fraught with indecision for me. I have to either look it up or ask every time. Sigh. It’s like everything involving me and coding: once I get started I’m generally ok, but getting started is always a big pain. I wonder how long it takes for that to go away?

Yesterday Brandon and I set up my project, got Devise installed and passed a whole bunch of the Cucumber tests. I didn’t realize that this was going to be similar to the Battleship project at TIY; they wrote all the tests and I have to make them pass. It’s still a lot of work, but there’s some guidance, and that makes me feel better. I still can’t really imagine *working* as a coder, like coming in in the morning and sitting down to program. Just knowing what to do. I guess that’s where Agile and meetings and stuff come in, but it’s all still a bit foreign to me. Devise is pretty cool, there’s a lot going on under the hood there and I think it’s going to make my life a lot easier. It was also easier to set up than I thought; there were a lot of steps, but the readme was clear and there was never a part where I felt lost or confused.

Today I’m going to read up on Capybara and work more on the bookstore, at least in between meetings. I signed up for the blogging task force, and there’s the initial meeting for that at 11, then at noon there’s a lunch and learn about the new HR policies. I’ll at least have the whole afternoon to work, though. I’m looking forward to being on the blogging task force, I’ve been enjoying writing here every day. I’m still not sure if I should be putting all that behind me and focusing solely on coding, but I guess I’ll figure all that out.

I expect to learn more about how Capybara works with Cucumber. The test suite I’m working on now is all the account creation stuff, so I think it will be fairly familiar.

SB Apprenticeship: Day 35

Turns out you shouldn't leave your water on the floor unaccompanied when there's a dog around. :)

Turns out you shouldn’t leave your water on the floor unaccompanied when there’s a dog around. 🙂

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

Monday! I’ve never been one of those Garfield people, but I will admit to dragging this morning. Blerg.

Friday I didn’t end up pairing with Brandon because I signed up to help out with a labs project that ended up taking more time than I anticipated. I was able to make a lucidchart to diagram out the bookstore project, which made it look a lot less involved than I thought, but that was about the extent of the work I managed to get done on Friday.

Relationship chart for my bookstore app.

Relationship chart for my bookstore app.

Today I’m going to work on the bowling kata in the morning and pair with Brandon at 1 to start working on the bookstore app. He said he would help me with the initial Devise stuff, which I think will be helpful. I don’t think Devise is hard, there’s just a lot of moving parts, and having someone who knows it really well will help. I’m still a little nervous about this app, I feel very unprepared, but I’m sure it’ll be fine and I’m just being paranoid.

What do I expect to learn…I think that there is probably some best practice that I’m not doing when it comes to starting new projects, and Brandon is great for showing those. Hopefully I’ll learn Devise to the point where I can use it again and not have to be walked through it. And I think today is the day I start figuring out Cucumber and Capybara. Moar testing frameworks!