Just some scribbles and jots. These are just a few
of the notes, videos, and screencasts taken by the team at Envy Labs.
You're welcome to join in and contribute to our experiments.
A few weeks ago at Railsconf I approached Ilya Grigorik about recording his awesome talk in the same style that I captured John Athadye and Joe Damato’s talk. He recommended I grab him at OSCON to redo the talk as it would be a little more polished by then, so i did!
In the talk he discusses the state of the Ruby VM and why we should standardize an asynchronous Ruby stack which takes advantage of Ruby 1.9, Fibers, and non-blocking database drivers to make Ruby (and Rails) more scalable.
This week Nate, Jacob, Thomas and I are at OSCON where we taught our Rails 3 tutorial on Tuesday. Yesterday at the conference I was interviewed in the OSCON booth, the results of which you can see below:
I know many people — including myself — use Bash aliases for common command line tasks. Some popular examples would be: ss short for script/server, sc for script/console, and sg for script/generate.
These are setup by putting the following code in a Bash configuration file — such as ~/.bash_login:
alias ss='script/server'
alias sc='script/console'
alias sg='script/generate'
That works great, until you switch to Rails 3; all of these script files have been removed, and you use the rails command in their place: rails server instead of script/server, rails console instead of script/console, etc. Rails 3 provides shortcuts for the common commands: rails s is short for rails server, rails c is short for rails console, and so on. Some have suggested aliasing the rails command to just r, allowing you to use r s to start a server.
These shortcuts are nice, and is much less typing. But, I don’t want to have to remember when I’m in a Rails 2 app to use ss and then when I’m in a Rails 3 app to use r s; I want ss to just work in every project. Unfortunately, you cannot use a Bash alias to solve this problem; you can however use a Bash function! The following is a drop in replacement for the old alias ss=... stuff in your Bash configuration file:
function ss {
if [ -e script/rails ]; then
script/rails server $@
else
script/server $@
fi
}
function sc {
if [ -e script/rails ]; then
script/rails console $@
else
script/console $@
fi
}
function sg {
if [ -e script/rails ]; then
script/rails generate $@
else
script/generate $@
fi
}
They work by checking for the existence of a script/rails file, which is new to Rails 3; if the file exists use it, otherwise fall back to using the Rails 2 version of the command; any arguments given to the function are passed along to the script, which is the $@ bit above.
I’ve contributed these changes to the Terminal project by Pigment, which includes similar shortcuts for many other common tasks.
Are you still hitting the refresh button every time you change some code / stylesheet? If yes, you may want to watch the following video and learn about LiveReload by Mikhail Gusarov.
Yes, I know there are already a few other tools out there that do this, but I don’t think I’ve seen any that actually reload the CSS or Javascript without even reloading the page. I also forgot to mention in the video that it works in both Safari AND Chrome.
This morning on the Ruby5 podcast, we announced the release of Ruby Tracker. Ruby Tracker is our newest community support project which monitors and reports on library dependencies in your Ruby software and was primarily spearheaded by myself and Mr. Jacob Swanner.
“A dependency tracker… What the h*ll does that mean?”
Well, thanks for the unsolicited question, good sir. The simplest explanation is this: We examine your project repositories and determine what gems – specifically what versions of each gem – you use and then let you know when one of them is updated.
At Railsconf a few weeks ago I managed to get two of my favorite talks on video. Two weeks ago I published John Athayde’s talk on Beautiful Markup, and today I’m happy to publish Joe Damato’s talk on Garbage Collection & the Ruby Heap. If you really want to learn how to finely tune your Ruby interpreter and find memory leaks, then you’ll want to pay close attention to his talk. If you’re looking for additional information about Scaling Ruby, you may want to grab the EnvyCast I produced on the topic.
In case you missed the tweets, Envy Labs is looking to currently fill two positions, a Senior Graphic Designer and a Project Manager. If you know anyone who might be interested in the position please send them our way. Including me, Envy Labs currently employs 11 people! Damn!
I put together a short video to show people around the place, which I thought I’d share here:
One of the best talks at Railsconf was given by John Athayde on Curing Div-itis with Semantic Html, CSS, and Presenters. John was nice enough to redo his talk for me at the conference so I could properly capture it and share it with you. In his talk he goes through several techniques they employ at InfoEther to create beautiful markup in their web applications.
This is the third year I ran the Ruby Hero Awards, and last Tuesday at Railsconf 2010 I gave away 6 more trophies to people in our community who deserved a little extra recognition. This year the awards went to José Valim, Nick Quaranto, Aaron Patterson, Wayne Seguin, Gregory Brown, and Xavier Noria. Here’s a video of the award ceremony at Railsconf if you want to learn more about each of these guys and see how it went:
This evening at Railsconf I announced the release of the Rails 3 screencasts I’ve been working on for the past few months. Here at Railsconf Envy Labs ran a three hour Rails 3 tutorial (which received fantastic feedback). These screencasts basically cover the same content we presented in the tutorial (without the labs).