Asset Packager - Rails 3 / Ruby 1.9 Compatible 3

Posted by sbecker Sun, 21 Mar 2010 19:56:00 GMT

Hello! Here is a long overdue update to Asset Packager, which now makes the main branch Rails 3 and Ruby 1.9 compatible. Thanks to all those on Github who sent me patches with these fixes.

Updates
  • Fix thread safety issue.
  • JSMin compatibility fix for Ruby 1.9.1 – Fixnum#ord
  • Rails >= 2.3 test compatibility
  • Rails 3 deprecations – change RAILS_ROOT to Rails.root, change RAILS_ENV to Rails.env, move tasks to lib dir

All About Sammy

Posted by sbecker Thu, 23 Jul 2009 06:52:00 GMT

Got another quick presentation for ya. I discovered Sammy yesterday. I gave a quick talk about it today. That’s how easy it is to understand!

Sammy is a tiny, client-side JavaScript framework, created by the obviously brilliant Aaron Quint, built on jQuery, and inspired by the server-side Ruby framework Sinatra. It’s the minimalist’s framework for RIAs. You know, those uber rich internet applications. Single page, no refresh apps. Like Gmail. Except without all those kilobytes you may or may not ever need. Sammy is 7kb, minified. And gzipped? You won’t even know you downloaded it.

Watch the preso for more…

If you want to learn more about Sammy, check out Aaron’s blog post which has a nice introduction and screencast.

Agile JavaScript Testing

Posted by sbecker Thu, 16 Jul 2009 07:55:00 GMT

A couple weeks ago, I gave a talk at the Open Source Bridge conference in Portland Oregon on Agile JavaScript Testing.

In this presentation, I first gave an overview of Test Driven Development for those front-end JS developers who might not have heard of it yet (!) and then the difference of TDD vs. Behavior Driven Development.

I then walked through some tools:

  • Screw.Unit, a nice BDD framework for JS that is quite similar to RSpec in Ruby land.
  • Blue Ridge, a plugin for rails that integrates Screw-Unit with Rhino and Env.js and some rake tasks to create a command-line driven headless (no-browser == fast) testing workflow.
  • JS Test Driver, a project that mounts one or more browsers as slaves, and a command-line tool which notifies all the listening browsers to run tests and aggregates the results. Very cool!

In the actual presentation I even did some live coding examples of Blue Ridge and JS Test Driver, and they worked perfectly. Here are the slides from the talk:

Open Source Bridge

Posted by sbecker Tue, 31 Mar 2009 21:56:00 GMT

I submitted a proposal for Open Source Bridge, an ambitious, community-driven conference happening in Portland, Oregon from June 17th to the 19th. The deadline for submissions is today!

I'm submitting a talk to Open Source Bridge - June 17–19, 2009 - Portland, OR

SproutCore Slides 3

Posted by sbecker Mon, 09 Feb 2009 17:48:00 GMT

Here are the slides for the presentation I gave the other week at the Portland JavaScript Admirers meeting: SproutCore – A Next Generation JavaScript Framework. It is an overview of some of the key features I think make SproutCore unique and very useful. There was also video recorded which should hopefully appear online soon. I plan to do another SproutCore focused talk with a walkthrough of a full backend-connected application.

Starting Fresh, Without the Big Rewrite 2

Posted by sbecker Mon, 12 Jan 2009 07:08:00 GMT

If you’re working on a project with a couple years of code under it’s belt, you may have moments of desire to completely throw the whole thing out and start anew. But, if you’re working for someone else, you know that your boss or client probably won’t like that. After all, he’s paying you to finish feature A! But, you lament, feature A builds on top of feature B that already exists but is written in a terribly unidiomatic, pre-TDD, pre-REST way, way before you or someone else learned the dark arts of coding mastery. Legacy code, argh!

So what should you do? What are your options? A) Ignore the problem and build the new feature on top of the existing badly written code. Watch things get even worse. B) Try to quickly fix the badly written code in-place so you can get on with it. Trigger cascading test failures, and palm your face. C) Start over and rewrite the entire project, get fired for being 6 months late on your estimate. None of these sound any good!

I think I may have found a solution that works for me, especially with Rails.

Start a fresh Rails project. Boom! It’s fresh and clean. Now you have room to work. The beauty of Rails is how quick it is to get started. Choose the aspect of the project you want to work on. Got some legacy code thats bugging you? TDD/BDD it from scratch, the Right Way. The idiomatic, Rails Way. Once you get it to the point where it’s working correctly and passing all tests, you can merge the new code into the main project, replacing the older, ugly, what-were-they-thinking legacy code that was getting in the way.

Now you can work in a clean environment and just focus on the problem at hand. This allows you to make progress quickly, and get rid of the old crap without having to completely start from scratch.

New Years resolutions 1

Posted by sbecker Fri, 26 Dec 2008 10:59:00 GMT

Christmas is over, and I’m already thinking about New Years resolutions.

So, for 2009:

take more risks
don’t play it as safe
there are some limits:
don’t be stupid
do acts of good

talk more, write more, read more
put yourself out there
hold yourself accountable to your goals
by publicly stating them

do things in small steps,
incremental goals towards the future
stay focused
be disciplined

aim to be early
be consistent
but consistently seek to randomize
live life fuller

plan more trips
reach out more often to friends
get in touch with old ones
keep current ones current

remember more birthdays
screw going to sleep on time
make more music
try new food

get closer to stream of consciousness
self moderate less
edit revise rework
go to bed already

AssetPackager update 3

Posted by sbecker Sun, 30 Nov 2008 10:11:00 GMT

A long overdue update of AssetPackager is finally here:

  • Rails 2.2 compatibility fixes
  • Packages generated on demand in production mode. Running the asset:packager:build_all rake task no longer necessary.
  • Now compatible with Git, and any other revision control system since revision numbers are no longer used.
  • No more mucking with internal Rails functions, which means:
    • Return to use of query-string timestamps. Greatly simplifies things.
    • Multiple asset-hosts supported
    • Filenames with ”.”’s in them, such as “jquery-x.x.x” are supported.

Get the latest at http://github.com/sbecker/asset_packager

Thanks to the many forkers for ideas and solutions.

GitHub Theme for TextMate 11

Posted by sbecker Wed, 28 May 2008 20:26:00 GMT

PJ Hyett asked for it on Twitter, so I created it. Announcing:

The Github Theme for TextMate!

Hosted on, GitHub! (what else?) The basics are defined, but I’m sure it could be improved. In which case, you know what to do.

AssetPackager Tracker 2

Posted by sbecker Thu, 13 Dec 2007 23:26:00 GMT

Asset Packager now has a tracker where you can submit tickets. You can find it here.

If you have a bug to report, and/or a patch for Asset Packager, this is the place.

Older posts: 1 2 3 ... 6