walls.corpus

By Nathan L. Walls

  • Duck, Duck Duck, Goose/Raleigh
  • Product/Raleigh
  • No Hand King/Raleigh
  • Welcome, Spring/Raleigh

Reading and Learning: April 20, 2015

For some background on what’s going on here, see the first tool sharpening post

Oh goodness, this is a big one. I can explain. Work has been busier and I’ve spent more time of late really wanting to not do things manually. Witness all of the TextExpander work I’ve done in previous editions of “Tool Sharpening.”

I simply refused to keep a list of articles read manually, so I waited until I wrote a tool to pull the contents of an RSS feed from Instapaper and write it out as a Markdown file. After completing another home project last week, I had time to write the first iteration of that tool, and so, I was able to quickly pull things I’ve read for the last few weeks easily.

As the tool expands, I expect to be able to make these sorts of posts more frequent and, as such, more digestible.

Articles and books

I read the following:

We’ve been paying closer attention lately to how we use design patterns in our Ruby on Rails work. Decorators have emerged as one pattern that’s helped us keep…

Since leaving SocialChorus I have been doing an odd combination of management consulting and on the ground software design consulting. I have been doing what I…

Rome wasn’t built in a day is one of those adages freely dispensed by motivational posters and chatty grandparents, which makes it just as easy to freely…

Last year in one of my conference talks, I mentioned that I have kids. After my talk, a woman came up to me and asked me how I do it. How I have a full-time job…

My hands were shaking…I could barely breathe I had just finished the first one-one-one coding assessment in my six-month coding bootcamp and it had not gone as…

Let’s say you want to delete a method foo that seems to be dead code. You use a tool like grep to find callers of foo, and there are no results. It’s tempting…

On March 27 The following message was posted on the official GitHub blog: We are currently experiencing the largest DDoS (distributed denial of service) attack…

I’d been meaning to write this up for a while, and now Nat Pryce has written up the 140 character version . I “write” a Call Option when I sell someone the…

Let’s say you have some code whose intent is clear to you but you can see a world where someone else may be confused. Often after writing such code, you realize…

Were software engineer a profession like doctor or lawyer, we’d have a strong and binding set of ethics. I note that the ACM publishes a code of ethics. Here’s…

Brent Simmons has a good post today on ethics for programmers: Were software engineer a profession like doctor or lawyer, we’d have a strong and binding set of…

This checklist is comprised of 48 items you can use to gauge the maturity of your software delivery competency, and form a baseline to measure your future…

I am lucky enough to work with a small team of fantastic engineers who truly care about their customers. If you are not that lucky, this letter is for you to…

The hardest part of advising Ph.D. students is teaching them how to write. Fortunately, I’ve seen patterns emerge over the past couple years. So, I’ve decided…

If you’re using Git, you’re probably using pull requests. They’ve been around in some form or other since the dawn of DVCS. Back before Bitbucket and GitHub…

Screencasts and presentations

I watched or attended the following:

Podcasts

I listened to the following:

fin

Tool Sharpening: March 11, 2015

I’m presenting Intermediate Git on March 31. It’s a one-day, hands-on workshop to build skills from beginner to intermediate with Git on the command line. Cost: $449. You can register here.

Environment + Process tweaks

I separated “Reading and Learning” posts from “Tool Sharpening” posts, as I mentioned I was going to do. These are separate concerns and they’ll be easier to make both types of post separately. My expectation is I’ll have roughly twice as many Reading and Learning posts as Tool Sharpening posts.

Also, with my new gig, I’m a lot more comfortable working on a Pull Request model. Even if I’m the only person working on a project, it’s still good process reinforcement. I’m also using a rebase model. I’ve never cared for merge commits. Conversely, reducing a feature branch to one or two very descriptive commits feels pretty good. I’ll use small commits in the moment when I’m taking small steps to implement a feature. Once I finish the feature, those small steps lose their utility. They become noise. The Pull Request model lets me strip away that noise and tell the larger story about what the commit is doing and why its there.

I also:

  • Adjusted the TextExpander shortcuts I use to generate much of each podcast line to account for wording changes I’ve made
  • Refactored my TextExpander shortcuts for podcasts to create the Markdown link for podcasts with a predictable URL structure, which thankfully, is most of the ones I listen to
    • A further refactoring to do is to transition to a single TextExpander shortcut that calls a Ruby script with which I could retrieve the show notes page and grab the episode title
    • This would allow me to more quickly scrobble the podcasts I listen to, even though there’s not a direct way to get the information out of Overcast.
  • Created some TextExpander shortcuts for fitness and exercise
  • I added some additional Composure shell commands for Git
    • grbc is git rebase --continue
      • Useful for resolving conflicts on a merge or, more likely with the way I work, a rebase before a merge
    • gmt is git mergetool
      • Get me into merge conflict resolution as quickly as possible
    • fbc is git push origin :$1 && git branch -d $1 and allows me to clean-up a feature branch after I’ve merged it to master
      • E.g. fbc nlw-new-feature
      • fbc stands for feature branch cleanup
    • gsu is git branch --set-upstream-to=origin/$1 $1
      • Useful for when I’m working with another developer on a feature branch I started and pushed, but now need to pull changes the other develoer made on the feature branch

Project work

  • Moved Accomplished over to GitHub and fixed up the initial batch of tests
  • Set-up a new Digital Ocean server ($10 credit for using the link) that this blog will eventually be migrated to. Outside of the initial machine creation and user addition, I’ll be doing as much of the set-up and management that I can through Ansible

For some more background on what’s going on here, see the first tool sharpening post.

Reading and Learning: Feb. 24, 2015

For some background on what’s going on here, see the first tool sharpening post

Alright, I let this one go too long. The articles list is incomplete, but to help clear a giant backlog….

Articles and books read

Screencasts and presentations watched

Podcasts listed to

New year, new gig

Ralph/Raleigh

I announced on Twitter last week that I wrapped up my time at WebAssign and started at thoughtbot’s Raleigh office.

WebAssign is working on some amazing ways to help both instructors and students in STEM courses be more effective. The team I just left is a great bunch of fellows. I wish them and the company well.

The new gig takes me away from the environment tooling and automation that I was working on and more toward straight application development. After spending the last three years on operations-focused development, I’ll be building applications that help developers and designers at thoughtbot and for our clients.

I spent a fair amount of time researching thoughtbot ahead-of-time and, as good as things looked from what I could see from the outside, after about a week working there, it looks even better on the inside. I’ll be writing more about my experience onboarding with the company over at the Giant Robots Smashing into Other Giant Robots blog soon. But, here’s a key thing that’s excited me. This past Monday, my second day, I started head down on a usability enhancement for an internal tool. On Wednesday, the feature was live in production.

I know there are shops where the first day is pushing something to production, which is legit. There are a lot of shops that don’t have that kind of pipeline worked out, or it takes a lot longer. This was three days for me to write a small but meaningful addition to this product, iterate on it through a pull request code review and ship. I’m really happy about that.

There’s another facet I thought about today on my team’s daily coffee walk. In The Passionate Programmer, Chad Fowler writes:

Legendary jazz guitarist Pat Metheny has a stock piece of advice for young musicians, which is, “Always be the worst guy in every band you’re in.”

A big part of what I’m looking for is being that “worst player” again and learning to play and perform differently and better. It’s a different experience, a little bit strange and it feels pretty good. Onward.

Tool Sharpening: Jan 1, 2015

For some background on what’s going on here, see the first tool sharpening post

Environment + Process tweaks

I added several zsh aliases for some Git actions that are becoming more common for me, when working on feature branches

alias gsl='git stash list'
alias gssv='git stash save'
alias gss='git stash show'
alias gssp='git stash show -p'
alias gsp='git stash pop'

These are particularly useful when I’m in the middle of work on a repository and I want to do anything else, like run a git bisect or examine another branch.

Another use case I have is searching, with find or with ag, then opening resulting files in BBEdit.

A typical case looks like this:

ag -l foo -print0 | xargs bbedit

In this example, any file in the current directory or below containing the term ‘foo’ will be opened in BBEdit. The find version is very similar for cases when I want to open all files with a name containing ‘foo’.

find . -name '2014*' -print | xargs bbedit

Rather than type these commands out every time, I want to type a much shorter command and the search string, like so:

bbf foobar

or

bbg foobar

It would be easiest for me, by experience, to implement each of these in Ruby or Perl. Instead, I chose to implement these as zsh shell functions. I used Erich Smith’s Composure shell library to build the functions. The resulting code looks like this:

# author, about, param, example and group are Composure functions
# ag is the Silver Searcher (brew install ag)
bbf () {
    author 'Nathan L. Walls'
    about 'Function to find files matching a term and open them in BBEdit'
    param '1: Term to search for via `find . -name`'
    example 'bbf 2014*'
    group 'utility'

    find . -name '$*' -print | to_bbedit
}

bbg () {
    author 'Nathan L. Walls'
    about 'Func. to open files containing a term in BBEdit'
    param '1: Term to search for via `ag -l`'
    example 'bbg foo'
    group 'utility'

    ag -l $* -print0 | to_bbedit
}

to_bbedit () {
    author 'Nathan L. Walls'
    about 'Func. to open files in BBEdit through xargs, via a pipe'
    param 'None, implied to come through xargs'
    example 'ls | to_bbedit'
    group 'utility'

    xargs bbedit
}

One other use case I have for this sort of thing doesn’t even require opening files, necessarily, and that’s seeing what files I have that have the word “focus” within them, except spec_helper.rb, in my Ruby projects. This way, I can keep from committing code with focus: true in place and save myself the step of rerunning tests and amending a commit. That looks like this:

alias foc='ag -l focus --ignore spec_helper.rb

Or, at least it did until I thought about it a little more and wanted to make it a function as well. Now, it looks like this, instead:

foc () {
    author 'Nathan L. Walls'
    about "Find errant 'focus: true' statements before committing"
    param 'None'
    example 'foc'
    group 'testing'

    ag -l 'focus: true' --ignore spec_helper.rb
}

Why not use an alias here? Partly because I’m enjoying using Composure and partly because I believe I might make further use of this foc () function elsewhere.

There’s still a bit more I could do with these functions, namely adding some error checking, but these will get the job done for me well enough.

I also:

  • Tweaked BBEdit 11 settings to limit the scope of clippings used for given languages, which keeps me from getting cross-language clipping pollution. In my case, there was a large set of PHP clippings coming up when I was looking for Ruby clippings. And now, I’m not
  • Found a way to Save All open documents in BBEdit, Cmd-Opt-S
  • Added TextExpander shortcuts related to writing Git commit messages
  • Updated my work machine to the dotfiles set-up I highlighted in the previous tool-sharpening entry
  • Created a Cider profile to get my Homebrew set-up into source control
  • Updated Git to address a Mac OS X vulnerability

Project work

  • No project work since the last entry

Skill improvements

See above regarding working with Composure to write shell functions. Overall, I’m finding Composure a really nice little framework for iterating over commands quickly and making them understandable later. It was starting to write these commands and then trying to remember Smith’s presentation at Triangle Ruby Brigade back in August 2014 about Composure that led to my coworker Steve finding Smith’s lightning talk.

← Previous