Well, it’s been more than 7 years since I’ve blogged, but I’ve collected a pretty large list of topics. But first, some people and and projects deserve credit for my fancy new site. Stay tuned for actual content.
Hugo I’ve been doing a fair amount of work with go lately, primarily due to increasing use of Kubernetes. Since Hugo is written in go and we’re using it for our website at Olark, I thought it would be a good excuse to check it out.
Motivations I spent some time hacking around in Chrome the other day because I have been extremely frustrated with the behavior of the downloads bar in the Mac version of Chrome. When the user initiates a download, it appends the downloads bar to the bottom of your current window, causing your window to grow by the height of the download bar.
This behavior really bothers me, since I have my window set up with about 10px of padding around all sides so I can easily see my IM window and other things that I have docked to the top/side of my desktop.
John Roos of Roos Roast designed an excellent blend of coffee for Great Lakes Ruby Bash. John started Roos Roast while selling cars at Dunning Subaru. I met him there when I bought my WRX, when he gave me a free pound of coffee with my car. Not long after that, he quit selling cars and started roasting coffee full-time.
We have enough coffee to make 300 cups during the conference, plus we have 6 half-pound bags of coffee to raffle off for the attendees.
Ruby’s Array has 2 methods for sorting: sort and sort_by. Both methods sort your array (obviously) but they do it in slightly different ways.
Background This article is based on a talk I gave at the Ann Arbor Ruby Brigade in August. The idea for this talk was conjured up at eRubyCon during a discussion between Gayle Craig and me. We decided we would each give a brief talk about the differences between sort and sort_by at our next user group meetings.
Introduction In a duck-typed language like Ruby, it’s very important that you actually use duck typing. This is especially important when you’re designing a library or other code that could interact with objects that you don’t control. I have come across a few libraries lately that don’t follow duck typing conventions and have caused unexpected behavior when I’ve used them.
In this article, I’m going to pick on Shoulda. Thoughtbots, please do not take offense!
Recently I was adding new user registration to tasteb.in and I wanted my users to be automatically logged in as soon as they created their account. I’m using merb for tasteb.in, and consequently merb-auth for authentication. It turns out it’s really easy to implement, but it took me a while to get it right. All you need to do is add the following to your action that creates the new user:
I had a bit of trouble with Disqus where it would only display a link saying “Discuss this topic on Disqus” instead of displaying an actual comment form. It turns out that this problem was caused by a mismatch between the URL configured in Disqus and the url where my blog was actually accessible. So if you’re missing a Disqus comment form, make sure that the URL listed under Settings -> Website URL in Disqus is the actual URL where your site resides.
I’ve been working on a Merb-based recipe paste site for the past couple weeks called tasteb.in. It’s extremely simple for now. It lets you paste recipes in a very simple format and they show up on the site. You can access your recipes and all recipes on the site. And that’s about it.
I’ll be going into more details about how tasteb.in is built and where I’d like to take the site, but for now, just play with it if you like.
I needed to test some code that reads and writes files on the filesystem. I got sick of manually setting up a scratch area for my test files and cleaning them up when I was done, so I created Sandbox to keep my tests DRY.
See the Sandbox readme for more information, but the basic idea is this:
# inside a test somewhere Sandbox.play do |path| file = File.join(path, 'foo') FileUtils.
UPDATE 4/20/2010: Well Grounded Rubyist is not prerelease anymore. Corrected.
UPDATE 6/30/2011: Fix links to _why’s poignant guide, since he vanished from the earth. Add a bit about finding live people to help you.
UPDATE 9/27/2015: Add udemy ruby guides. More updates coming soon, as many books have been updated since I originally posted this.
Several people have asked me for tutorials, books, and other resources to help them learn Ruby, so I’ve attempted to compile a list of resources I feel are particularly valuable for beginning Rubyists.