Update Nov. 2017: Took these ideas and created a gem Ensurance Been plowing through a massive refactoring of a legacy Rails app. One of the things I find myself doing all the time now is ensuring. It’s a handy little concern that works like this: In the old days, we’d do this: class […]
I wanted to take a date range and iterate over it to produce results by day, but when I went to check the results, there were results by second. def my_date_thing(a_range) a_range.each do |date| # something interesting by date end end my_date_thing(10.days.ago .. 0.days.ago) Turns out, that by default those cool days.ago methods return […]
This photo is available in my Instacanvas gallery at: http://instacanv.as/bsharpe A post shared by Ben Sharpe (@bsharpe) on Jul 26, 2012 at 7:35am PDT I have loved green-fielding apps in Rails for years. I think my first Rails app, a timesheet for my wife’s employees, was in sub 1.0 Rails. I ended up migrating that […]
One of the most common mistakes in programming is typos. Your brain wants to type one thing and your fingers another. In Corona (and Lua in general), variables aren’t declared explicitly before you use them. When Lua sees a variable name that you haven’t declared as local, it starts looking up the chain of […]
[Update May 15, 2013 – Fixed launcher for osx and windows] I’ve recently been trying out different editors as I can see the end of the road for TextMate from where I’m sitting. I really wanted to be super-awesome and finally learn vi or emacs, but despite several attempts, my brain hasn’t really latched […]
Build the app using File > Build > Amazon/Kindle… On the Fire, go to Settings and tap More Tap Device Turn ON “Allow Installation of Applications — from unknown sources” Plug in a Micro-B usb cable into the Fire and the other into your computer (in this case a MacBook Air) The Kindle should be […]
Update: Dejay was correct, you have to try and open the file to know for sure if it’s there or not. Want to know if a file exists before you use it? Lately, I’ve been wanting something a little more dynamic in my projects for opening various Scenes (think Director, but not). I needed […]
Update April 2011: I now use the Heroku Plus gem to manage these accounts.
Getting your development environment setup just the way you like it takes some time. I’ve done it several times recently and this is the setup I feel most productive with.