February 2012
1 post
2 tags
Rails Generator Options
I wanted to add/handle options passed to a Ruby on Rails generator I was writing. I looked at the guide, but couldn’t find anything there. I looked at the docs and couldn’t find it there. I looked at the Thor wiki which suggests a “method_options” method, but when I tried to use it I got a NoMethodError. It turned out that I needed to use the “class_option”...
January 2012
1 post
I oppose SOPA/PIPA
More about it here: What is SOPA?
November 2011
6 posts
4 tags
For SpineJS With Rails Use spine-rails
I’ve been learning how to use spinejs with rails. When I’m learning I like to forgo code generators as much as possible and write the necessary code myself. I’ve done that with the past few projects I’ve posted here.
However, for most of my future projects I’m going to use the spine-rails gem. The gem is written by Alex MacCaw, the author of spinejs which is much nicer than the situation of...
6 tags
Rails With SpineJS and Google Maps
I wanted to create a simple project that used ruby on rails, spinejs, and google maps together. I came up with the following features:
Dragging a marker icon from outside of a map onto a map creates a marker on the map and in the database
Dragging a marker from one position to another updates the marker on the map and updates its position in the database
Right-clicking on a map marker removes...
3 tags
Backbonejs with Coffeescript Book
A friend of mine, Chris Smith, is writing a book about using coffeescript with backbone. He’s given me a sneak peek and I have to tell you: it’s going to be awesome. You can sign up here to get early access to sample chapters and more.
6 tags
Formatting Coffeescript For Tumblr
I’ve been trying to figure out a good way to format my code examples. There are plenty of options for Ruby, but nothing good for Coffeescript, especially if you’re using a hosted blog system like tumblr.
I’ve settled on using github’s gist embedding:
It isn’t as convenient as having the code inline, but it works well.
4 tags
SpineJS With Rails Screencast Transcribed
I transcribed the “Spine and Rails” screencast by Alex MacCaw and put it together with the source code on github.
5 tags
When Textmate Can't Find Coffeescript
When you try to use the textmate coffeescript bundle you may get the error: coffee: command not found. As the coffeescript bundle’s README points out, textmate doesn’t inherit your regular PATH. You need to go into textmate’s preferences (Preferences > Advanced tab > PATH variable) and add the path to coffeescript.
You need to figure out where coffeescript is with the...
October 2011
2 posts
9 tags
Simple SpineJS and Ruby on Rails Integration
I’ve recently been learning an MVC javascript framework called Spine. It is similar to backbone (hence the name), but I’ve found it to be a bit more rails friendly and closer to what I’m familiar with. The source is also written in coffeescript, which I think has a better syntax.
What’s the first step when learning something new? “Hello World!” of course!...
3 tags
February 2011
1 post
Apple's Three Laws of Developers
yourhead:
A developer may not injure Apple or, through inaction, allow Apple to come to harm.
A developer must obey any orders given to it by Apple, except where such orders would conflict with the First Law.
A developer must protect its own existence as long as such protection does not conflict with the First or Second Law.
— I. Developer
January 2011
4 posts
RT @blowmage: Having a hard time thinking of something more coupled than rails’ database rake tasks. http://bit.ly/hP6Sb6
Filling up the tub for my son to take a bath and ask him to check the water level for me. He returns: “it’s still loading” #geekparenting
Okay, I’m finally using the
{foo: bar}
ruby hash form
son: Dad, can I have your Yoshi? me: sure *me gives yoshi* *son uses yoshi to swallow me* *son uses yoshi to spit me in a hole* #parenting
December 2010
12 posts
RT @rubythreads: O HAI. U LIKE SHIRTS? US 2! http://www.rubythreads.com/ U BUY NOU!
RT @joeyschoblaska: HaikuLeaks automatically locates haiku structures in WikiLeaks cables and outputs them as poetry - http://is.gd/jJezg
I find it satisfying that “database”, “username” and “password” all have eight letters and, therefore, align vertically in my code #toogeeky
I am now automatically saving my Twitter favorites to Diigo! http://bit.ly/hGqPFK
Finding an alternative to del.icio.us; looking at @diigo
opensource fonts: http://www.theleagueofmoveabletype.com/
can’t ever remember which postgresql gem to use or all of the flags and such :p
8 tags
Installing a ruby gem for postgresql
I do it infrequently so I can never remember which gem to install or all of the how’s. I figured I would document it so I can remember next time.
For my purposes, the postgres installer was fine, which I found here: http://www.postgresql.org/download/macosx (I’m installing on OS X, obviously)
After I installed the database, I searched for a gem. There are a few to choose from, but...
Only 7 days left to pay what you want for the Humble Indie Bundle! http://t.co/ZEI6z0k via @Humble
RT @marksuman: Busting out last year’s 8bit Christmas. It’s awesome. http://www.8bitchristmas.com/
JMeter is both awful and awesome; currently leaning towards awful.
How Karl Malone Toyota Lost My Business (and Mark...
Recently I was unemployed. During that time I received a letter from Karl Malone Toyota (where my wife and I had purchased our mini-van) saying that they were eager to buy back our vehicle and would pay “top dollar” for it. My wife and I talked it over and decided that it would be easier on our finances if we didn’t have a car payment for a while, so we took our van in. While...
October 2010
13 posts
OH kids playing, daughter: “oh no! zombies are attacking our house!”, son: “I’ll go get my gun!” #parenting #zombieapocalypsesurvivalskills
“Delivering Power” http://bit.ly/cAYCob #ElectricBox2
Hello, meslo, you’re a nice font: http://ln-s.net/7pwx
multiplayer asteroids written in javascript: http://dan.utahjs.com:9000/GAME/roids/index.html // nice job @ujsug
Best library in Utah Valley for wifi: Lehi. The rest are pretty lame.
wanted to like the mensch font: http://ln-s.net/7pVb, but can’t get over overly large <> that are slightly off center, take a look at “>-“
RT @alenp: I think I ate too many dried apricots. I know this only because it was hard getting the last 2 or 3 to go down.
Looks like the set up a parking lot where I-15 used to be.
RT @bryanl: psst. hey developer.. yeah you. why aren’t you using mensch as your coding font yet? http://bit.ly/bdrCKo
http://ln-s.net/7nyL The “mad computer science” area needs to step it up. C’mon people!
http://ln-s.net/7n7K newscast → youtube → autotuned → metal cover → fretted for FoF → youtube //well played internet, well played
RT @ghewgill: Put #Haskell on your resume even if you don’t know it. When asked, say your resume is lazy and you’ll learn it when result …
just created an “s” rails project in my current rails project with “rails s” again. Time to add the name of current gemset to my prompt?
September 2010
9 posts
My Clockwords Word List
My strategy was to find words that used all of the chambers. It seems like the chambers tended to fill in with different letters rather than repeat letters. I decided to find a 8-different-letter combination that was relatively powerful and started a lot of words:
counterpane
counterpanes
counterpart
counterparts
counterplan
counterplans
counterplay
counterplays
counterplea
...
RT @blowmage: @phaedryx Don’t give up. Its always darkest before the storm destroys your home, or something like that.
Hey universe: I’m sorry. Can we be friends again?
Every once in a while I’ll get curious and check out digg; I’m always disappointed.
RT @timbray: Do you hate software patents? If so, you have until Monday to tell the USPTO: http://goo.gl/V7lg Please RT!
Okay, I’m completely sold on BDD/TDD.
design agency sites on the iphone: http://www.narrowdesign.com/future/
“ruby inherits from smalltalk and includes perl” — @patmaddox #rubywebconf
http://en.wikipedia.org/wiki/Shu-ha-ri #rubywebconf
August 2010
12 posts
Marconi plays the mamba. Listen to the radio! Don’t you remember? #instructure