So a little over a year ago, I said “I currently run Windows XP. Next year, I plan to buy a Mac laptop when the Intel versions come out, and our server setups will all be *nix based. By the time Vista rolls around, I plan to be completely devoid of Microsoft products.”
Well, it’s been a year. I bought a Macbook Pro about six months ago and today Steve bought his own, which makes all two of us here at Electro Mac users. Our servers run on Linux. I still have one Windows desktop machine which will probably stick around so we can interface with the rest of the Windows world when needed.
Now if I can just get my own cinema display. (damn you Steve!)
Comments Off on We have completed the switch
JDiskReport is a cool disk usage analyzer that helps you see where all the space is going on your hard drive. Find big un-used files, and delete them! It’s got a cool interface, it’s cross platform, and it’s free!
Comments Off on Re-claim your space
In Scott Raymond’s latest post, he discusses refactoring IconBuffet.com and following the latest DHH Rails dogma – REST-style resources. He manages to simplify IconBuffet from 10 controllers & 76 actions to 13 controllers and 58 actions total, without removing or adding any features. Thats about 20 less actions. Needless to say, following the recommended REST-style pattern can simplify your work a lot.
“Cutting actions is great, but even more significant is that the remaining ones are almost completely uniform. There are seven standard Rails actions: index, new, create, show, edit, update, and destroy. Everything else—oddball actions—are usually a clue that you’re doing RPC. In the old version, there were forty oddball actions; now there are only five (and four of those are essentially static pages in the about controller.) The upshot is that the controllers are very uniform, which makes the entire application conceptually simpler, and thus easier to maintain, test, and extend.”
Check out more at his site.
Comments Off on Sit back and REST
Great Article: Self Control is the Key to Success
Thinking back, this makes lot of sense. 🙂 When I was disciplined at enforcing self-control, I acheived great things. (Graduating college, completing recordings of albums, quiting smoking early on, buying a house, getting my current project done) and well, everything else. When it comes to finishing something, it all comes down to self-control.
Comments Off on Self Control
RailsConf was great. Tons of new ideas. People using their brains. Outlines of most of the talks at RailsConf can be found here and here.
Now I’m just hanging out at my g/f’s dad’s house in suburbs outside Chicago for a day before we go back to Florida. Gotta hang with the fam. Hopefully we’ll get to hang out IN Chicago a bit tomorrow before the plane.
Comments Off on RailsConf
Asset Packager has been released! (Formerly known as MergeJS) New features include:
- support for css files
- versioning of individual packages
- use of more meaningful subversion revision numbers (if available) (thanks Chris Van Pelt!)
- namespaced rake tasks
- no more revision numbers in the yaml file
- lotsa refactoring
- unit tests
- more intuitive names for everything!
Go here to check it out: AssetPackager
Comments Off on AssetPackager released!
I’m working on an even better version of MergeJS, to be renamed AssetPackager, which will include:
- support for css files
- versioning of individual packages
- use of more meaningful subversion revision numbers (if available) (thanks Chris Van Pelt!)
- namespaced rake tasks
- lotsa refactoring
stay tuned!
Comments Off on MergeJS to become AssetPackager
After reading Cal Henderson’s article on Vitamin Serving Javascript Fast I was immediately inspired to create a plugin to easily facilitate this in Ruby on Rails. I whipped up most of it right then, and finally got around to polishing it up for release today.
Here you go: Merge JS: Easily merge, compress, cache, and version your javascript with Ruby on Rails
Comments Off on New Plugin: MergeJS – Easily merge, compress, cache, and version your javascript with Ruby on Rails
Dreamhost has apparently upgraded Ruby on Rails to 1.1 on their servers. Too bad someone was asleep (har har) when they did it, because it’s all broken. Various gems didn’t get installed correctly and none of the rails commands work right. Hopefully this entry will soon look dated.
As documented by others, there is a way around this – get the rails 1.0 gems and unpack them into /vendor/rails in your rails apps.
Or if like me and you have multiple apps, make a centralized “resources” directory and put the rails gems in there, then symlink them to all of your apps vendor directories.
mkdir /home/username/resources
svn export "http://dev.rubyonrails.org/svn/rails/tags/rel_1-0-0" /home/username/resources/rails
ln -s /home/username/resources/rails /home/username/rails_app/vendor/rails
It’s the reason this blog is up and running right now.
It’s a good idea to always freeze gems on your apps if your running on a shared host, otherwise you’re vulnerable to breakage whenever they upgrade.
Comments Off on Rails 1.1, keep dreaming
So, I don’t have a Mac yet (its on the way), so in the meantime, I use jEdit, the unsung hero of the non-Mac Rails programmer world. It’s a super fast, highly extensible editor. Having now read a few articles and installed some additional plugins, I found I can get most of the whiz-bang Textmate editor features, for free, on all platforms!
I thought I’d “give a little back to the community” and whip up some SuperAbbrev files for ruby and rhtml that mimic all of the Textmate Rails bundle snippets.
Note: This was totally inspired by Textmate and the syncPEOPLE Rails plugin for Textmate. So thanks to you guys for being awesome. I just thought I’d see how close I could get.
And why not, lets take it a little beyond the Textmate rails snippets, and throw in a few more that seem useful and obvious.
Basically, on the RHTML side, there is a TON of additional useful snippets.
Now this doesn’t include the other neat syncPeople commands, but if someone wants to help out with writing some jEdit macros, that would be dope.
So please, try it out, let me know if it works, add more snippets, etc.
Update: Matt Torok alerted me on the Rails mailing list that SuperAbbrevs only works with jEdit versions >=4.2final and <=4.3pre2. If you’re using the latest beta release, 4.3pre3, it’ll go wacky when you try to hit tab to switch between the fields.
What are snippets?
Snippets are small capsules of code that are activated by a key sequence followed by [CTRL-Enter]. For example, mct[CTRL-Enter] will activate the Migration Create Table snippet. The SuperAbbrevs plugin makes this possible.
Download:
Instructions:
- Install jEdit 4.2 if you haven’t already. (Note: Apparently SuperAbbrevs isn’t currently compatible with 4.3pre3)
- Install the SuperAbbrevs plugin (use the built in plug in manager to install it).
- Configure a keyboard shortcut for SuperAbbrevs expansion – mine is set to CTRL-Enter. Learn how to do this here.
- The files in the archive are SuperAbbrevs setting files. Extract them into {userhome}/.jedit/SuperAbbrevs/
On windows, that’ll be something like:
C:\Documents and Settings\username\.jedit\SuperAbbrevs\
- Restart jEdit and go to Plugins > Plugin Options > SuperAbbrevs. Under the Abbrev Set dropdown, select either Ruby or Rhtml to get a list of all the shortcuts.
- The best way to learn these is to go through the reference guide (below) while running jEdit and just try each one out. You’ll catch on quick. The naming scheme is really simple and follows a pattern – first letter of each word. bt becomes belong_to, ho becomes has_one, ist becomes image_submit_tag, etc.
Documentation / Reference Guide
Comments Off on jEdit Snippets for Ruby on Rails