tdg5

  • 60 Bash-tastic Git Aliases

    60 Bash-tastic Git Aliases

    After spending the last 3.5 years using git for version control, I can't imagine going back to a life without it. I won't even start with the plethora of reasons why you should use a source control management (SCM) tool like git, but if you don't, suffice it to say...
    tco_method

    Introducing the tco_method gem

    Earlier this week I published a gem intended to help simplify the process of compiling Ruby code with tail call optimization enabled in MRI Ruby. The gem, tco_method, builds on my recent research into the internals of Ruby's implementation of tail call optimization and the ideas presented in Nithin Bekal's...
  • I'm going to continue never washing this cheek again

    Eager Boolean Operators: A Pattern to Continue Never Using

    In relaying the story of eager Boolean operators, it is best to begin with their more ubiquitous siblings, short-circuiting logical Boolean operators. This is perhaps best achieved with an example: true || Seriously(this(is(valid(Ruby!)))) # => true false && 0/0 # => false In Ruby, and many other common programming languages,1...
    Meditation Cairn Atop Rippling Waters

    On the Road From Ruby Journeyman to Ruby Master

    Mind-blowingly awful are really the only words that come to mind to describe my first bunch of Ruby scripts.1 Sure, this is probably unfair and over-critical given that Ruby, algorithms, and the whole shebang were all new to me at the time, but damn. There are so many decisions I...
  • Module Factory Assembly Line

    Dependency and Load-Order Management Using the Module Factory Pattern

    At last year's RubyConf in San Diego, Craig Buchek gave a presentation entitled Ruby Idioms You're Not Using Yet focusing on some of Ruby's under-utilized and emerging idioms. In this post we'll discuss one of those idioms, an idiom Craig appropriately calls Module Factory. In particular, we'll explore the using...
    Tail Call Optimization in Ruby: Deep Dive

    Tail Call Optimization in Ruby: Deep Dive

    In my last post, I began an exploration of tail call optimization in Ruby with some background on tail call optimization and its little known existence and usage in Ruby. In this post, we'll continue that exploration at a much lower level, moving out of the Ruby layer and descending...
  • Recursive Guinea Pigs

    Tail Call Optimization in Ruby: Background

    Back in November, care of /r/ruby, I came across a blog post by Nithin Bekal, Tail Call Optimization in Ruby, demonstrating Ruby's built-in support for tail call optimization and I have to admit, my mind was a little blown. It's not that I have a specific need for tail call...
    Tuning dd block size

    Tuning dd block size

    Though I wouldn't call myself a dd expert, I have had my fair share of occasions to yield the might that is dd. From my first job after college using KNOPPIX and dd to rescue NFL game footage from dying HDDs on behalf of NFL video coordinators, to using dd...