My Point of View
technology, programming, and rants (not necessarily in that order)
Introducing jqtal, my tiny jQuery plugin that provides a different way of doing client side HTML templating.
jqtal is different because it is a part of and lives alongside the HTML itself. An example might help:
The plugin uses HTML5 data- attributes to embed data necessary for content insertion. Whereas in a normal template language, you might have something like:<input name="first_name" value="{{ person.first_name }}"/>...in jqtal, you do this instead:<input name="first_name" data-val="
Hey friends, I wanted to let you know I will be giving a presentation on Backbone.js at the next TulsaWebDevs meet-up.
For any of you using more than the tiniest amount of JavaScript in your web-based applications, Backbone.js may be something to consider. Backbone brings structure and organization to the client-side that we've long had in MVC frameworks on the server. Here are some benefits:Stores data in specialized data "models" instead of directly on the DOM.
Red Dirt Ruby Conference in nearby Oklahoma City was even better this year than last year, and that’s saying a lot.
The format of RDRC is unlike any other conference I’ve attended. The key difference: each speaker (excepting keynote speakers) only talks for 18 minutes and that’s it.
Speakers are grouped, four at a time, into a theme. This year’s themes (for day one, which is all I was able to attend) were Ruby Implementations, Rails 3 Extensions, Rails Redux, and JavaScript.
I won’t bother explaining to my regular readers what these two things are. If you need this, then you know… ;-)
I know that both SASS and Compass can be setup to “watch” a directory and auto-compile when files are changed, but it seemed a waste to me to have another thing I have to remember to launch.
This hack piggybacks on Jammit’s include_stylesheets helper method and compiles and .scss files in the public/stylesheets directory if they’ve changed since last time.
Just got done watching this excellent discussion of Ruby hashes, associative arrays, testing, and Ruby culture.Link. James is an excellent force of enlightenment and encouragement in our little community, and I'm proud that he's also an Okie. Go watch this video.
Never attribute to malice that which is adequately explained by stupidity.wikipedia.org/wiki/Hanlon's_razor
I created a free micro instance on Amazon EC2 a few weeks ago. Today I remembered it and thought I would tinker around a little, only to find out that when I logged into AWS console, I had to "re-activate" my account using a phone number. Hmmm, that's weird. I distinctly remember doing that two weeks ago. So I jumped through the hoops and got logged in again to discover that my instance was gone, my security group was gone, and my elastic ip was gone.
If you're running a Linux desktop in an otherwise Windows environment, winexe may be something you'll enjoy.Winexe allows you to execute commands from a Linux machine on a remote Windows machine, as if you're sitting at the Windows command prompt. Think of the possibilities!
Recently, I found a way to get it to compile on my beloved Ubuntu Maverick (it broke when I dist-upgraded for some reason), and I thought I'd share.
Today, my small patch to Rails was applied by the core team. This is only my second contribution to Rails, so I’m fairly stoked about it being accepted.
This will allow you to pass a block to the default_scope method in ActiveRecord. It doesn’t sound like much, but opens up some wonderful possibilities.
First, a review of what default_scope does:
The first call to Person.all applies the default scope and adds a where clause that returns only non-deleted folks.
I tend to use rsync when others would typically use a simple cp for copying files. A few reasons:
It can be canceled in the middle, and resumed later. It can show a progress bar that (while not perfect) is great for large files or lots of files. It will only copy the changed files and won’t clobber already existing directories of files at the target. rsync is available on Linux, Mac, and there’s a binary somewhere on teh intarwebs for Windows.