the { buckblogs :here }

It's been a good run, but my thrill for blogging has ebbed. Most of my online conversation occurs on Twitter these days, and my Buckblog has ...

Link: weblog.jamisbuck.org

  • Upsilon Mazes

    Buckblog: Upsilon Mazes

    weblog.jamisbuck.org 28 Nov '15, 9pm

    This article is adapted from material that I had originally written for my book, Mazes for Programmers @amazon | @b&n . It was intended to be the last section in chapter 8, “Exploring Other Grids”, following a discussion of hex and triangle grids. In order to trim the length of the bo...

  • Representing toroidal grids and mazes

    Buckblog: Representing a Toroidal Grid

    weblog.jamisbuck.org 22 Nov '15, 12am

    Toroidal grids share a lot with spherical grids (pg. 238 of my book), so some of this may sound very familiar if you’ve been through that. A spherical grid is basically a soup-can wrapper rolled so the east and west edges touch (and then with a bit of magic applied to the north and so...

  • Buckblog: Little Things: Refactoring with Hashes

    weblog.jamisbuck.org 22 Nov '15, 1am

    Right? And when I see a case statement being used simply to select between different values given some input, I find myself itching to rewrite it using a hash. Because, really, what is a hash, except a mapping that selects between different values, given some input?

  • Buckblog: The Dynamic Def

    weblog.jamisbuck.org 17 Oct '15, 8pm

    If you need justification for this, try a simple benchmark script. It turns out that using a nested def for memoization results in a memoized method that is about 30% faster…but honestly, that’s not saying much. Both techniques are pretty blazing fast. On my computer, 500k iterations ...

  • Buckblog

    weblog.jamisbuck.org 13 Sep '15, 2am

    This leads to a quirky (but oh, so useful!) little thing about heredocs: syntactically, the first delimiter represents the entire heredoc . That is to say, if you want to invoke a method on the string, you attach the method invocation to the first delimiter, not the last! Like this:

  • Buckblog: Bulk Inserts in ActiveRecord

    weblog.jamisbuck.org 10 Oct '15, 8pm

    Each item is added to the queue, and the whole is accumulated into a single insert at the end of the block. (For lots of rows, it might not actually be a single insert statement, though. Some backends, like SQLite, don’t like you to insert more than some number of rows at a time. For ...

  • Buckblog

    weblog.jamisbuck.org 19 Sep '15, 8pm

    Most of you will be familiar with “default scopes” in ActiveRecord, the feature that lets you apply conditions automatically to all queries on a given model. For example, suppose we have a system where a blog author can be deleted (perhaps to remove their access to the blog), while pr...

    1. Buckblog weblog.jamisbuck.org 19 Sep '15, 9pm
  • Buckblog: Changing the Channel

    weblog.jamisbuck.org 04 Oct '15, 2am

    Stuck? Try changing the channel. No, seriously. It’s like if you’re watching TV and you’re feeling uninspired by what you see, you change the channel. This doesn’t change the TV at all–you’re still staring at the same screen, in the same plastic chassis–but now you’re seeing something...


Riding Rails
has_many :through
The Rails Way -
Ruby Inside: The Ruby Blog
Ryan Daigle
RailsCasts: Ruby on Rails Screencasts
Nuby on Rails | Ruby on Rails for Newbies