Looking for more to read? Check out the Archives!

Recent Blog Posts

Ruby Quick Tip: Compare and Combine Arrays

Given two Ruby arrays, how would you quickly compare or combine the elements?

In Ruby, this is really simple. Let’s say we have two arrays, representing members of a volleyball team and a softball team:

volleyball_team = ["Alex", "Karen", "Pete", "Alicia"]
softball_team = ["Karen", "Dante", "Pete"]

To see who is on both teams, we can use the ‘&’ operator and assign it to ‘both_teams’:

both_teams = volleyball_team & softball_team
Continue reading...

An Introduction to Emacs Lisp

Harry R. Schwartz has a great introductory blog post about Emacs, complete with links to other resources and a video of his 2014 talk at the New York Emacs Meetup, in 2014.

I’ve written a couple posts about Emacs, as well:

  1. Emacs: My Editor of Choice: Reading this again, I wonder if it came off a bit too strongly worded. I really don’t care what editor or IDE anyone uses. In fact, I also provided some great Vim resources.
  2. KCRuby Emacs Demo: These notes are based on a talk I was scheduled to give at KCRuby, but there wasn’t enough time.

I’ve been thinking it might be interesting to start an Emacs meetup in Seattle. If you’re interested, please contact me, and let me what day(s) of the week would be most convenient. If I set it up, it would probably be once a month, unless there was more of a demand.


Using Docker For Rails Development →

Laura Frank at Codeship:

One important thing to remember is that Docker != containers, and in fact there are other ways to use containers than with Docker. But since Docker makes it so easy, it’s almost a no-brainer to use their tools.

Her post includes links to the video, slides, and code. It’s well worth a read.


Announcing Scenic Versioned Database Views For Rails →

Derek Prior, outlining the benefits of Scenic, Thoughtbot’s open-source database view implementation for Rails:

With all of that in place, our N+1 query is gone and we’ve significantly decreased garbage collection pressure. A benchmark of both methods with production data shows that the previously existing Ruby implementation is 85 times slower than our new implementation that makes use of the view.

This looks like a great way to improve query performance, by moving views to the database level. I’m definitely going to look at using this for my next Rails project.


Five Ruby Methods You Should Be Using →

Ben Lewis:

It’s so much easier to write expressive code when you know more methods. I hope that this collection of curiosities helped expand your Ruby vocabulary.

The more Ruby you learn, the more expressive and elegant your code becomes. There are always different (and arguably better) ways to solve problems. There’s so much I still have to learn. For example, I wasn’t very familiar with the Object#tap method.

I think many people prefer not to write plain html because there comes a point where you can’t really improve it, so it feels like it’s getting in the way of what you’re trying to accomplish. But using a language like Ruby is a creative endeavor, and it rewards practice and experimentation. Repetitive tasks should be automated, to allow more time for complex or creative pursuits.


Linklogs with Jekyll

Mike Buss has a great tip on how to easily set up ‘linklog’ functionality in a Jekyll blog. That, along with documentation from Octopress and Jekyll, helped me though the process.

I often encounter useful links and tips, that don’t necessarily require a lot of elaboration. I’ll still write longer blog posts, but this will allow me to curate more information for others, as well as for my own reference. Links that go to external sites will have a different color (currently light gray), and they’ll have a right arrow to the right of the title. Also, I’ve added a permalink to every article (the ‘infinity’ sign to the right of the date on the Blog index page).


2015 was a Great Year

I have been very busy over the past few months, working on projects, networking, and getting settled in Seattle again. I have also been lending my talents as a Rails developer to a local startup, which is going to launch soon. Not only have I learned a lot, but it feels good to work on a project that could really help people. I will have more information on that in the near future.

Seattle has a very active tech community, and I dived in as soon as I got here. In addition to the many ongoing Ruby, JS, and technical meetups I attend several times a week, I attended a few very useful presentations…

Continue reading...

Rails Quick Tip: Temporarily Disable Spring

Here’s a quick Ruby on Rails development tip. Last night, after setting up Bcrypt for a project, I got a strange error when I ran my test suite:

22:57:29 - INFO - Running all specs You don't have bcrypt installed in your application. Please add it to your Gemfile and run bundle install failing-test-10262015

Continue reading...

HackerNest

Two nights ago (Tuesday, October 20, 2015), I attended the Seattle HackerNest Tech Social. Because I had some free time, I decided to volunteer, and I had a blast! I found out about it through meetup.com, which I’ve mentioned before. Apparently, there had been a local group before, but they’d stopped meeting for a while, so this was a relaunch.

Continue reading...

Thoughts on PHP

I left Seattle, for Japan, on September 4, 2003. Almost 12 years year, my wife and I returned, back in August. A lot has changed here in those years, but it’s been a pretty comfortable process. Not long after I got here, I jumped into a project, helping an old friend, with a legacy web application that was part .NET (.aspx), part PHP 5, and part WordPress. It was quite a challenge. She’d worked with several developers, and the project had stalled out. I helped her get the project back on track, fixed some issues, documented all of the files and functions in the code, and helped her interview and hire a competent development team.

Continue reading...