How To Use Bash Aliases
I am awesome.
I'll let Yehuda explain the whole deal to you, how Rails 3 and Merb 2 will be the same. Why? Well, he's also doing it and I'm a nice guy dude, give credit where it is due.
What does that mean though?
I'll quote qwantz here, "like ants combining to form the shape of a giant ant"
I hope everyone feels as positively as I do about this.
I've always wanted this
So I got myself a tumblr. It's at http://batsysid.tumblr.com
I'm sorry if this appears twice in your RSS feed, fucking Mac blogger widget is being such a bitch.
Rails 2.2 thread safe. This is big fucking news, I shit you not.
Rails 2.2 thread safe.
Oh man, this should be awesome.
Of course it only helps in certain situations, this will not guarantee your app running on steroids.
Shit like MERB might though.
Peppy CSS Selectors
Faster than a speeding bullet.
More cross-browser than Superman?
This idea is sufficiently plausible in an attempt to account
For the phenomenon
The sickness and the sentence of blood.
I could no longer strubble,
Every moment threatened to be the last - there was pain,
Dizziness and profuse bleeding at the pores,
How is this possible
The transmission was transfusing
In a moment the sober eye of reason would detect a vibration in the flesh.
Creeping, incoherent,
Bearing no mark of a human hand
The vision comes and goes,
But tonight I saw very clearly.
The vision comes and goes,
But tonight I saw very clearly.
Very deeply.
In my efforts to further make my blog prettier, I'm trying out this plugin called SyntaxHighlighter It's all Javascript and CSS and a little flash, but that's ok.
traits.each {|trait| trait.spread_awesome}There's a nice how to use SyntaxHighlighter to post code to blogger and wordpress here.
Electric Sheep is bloody awesome
Electric Sheep seriously rocks my socks. I wish I was on a Mac, cuz I've seen how pretty it is on that, but on my sweet little Dell on Windows, it's still pretty awesome.
I wonder why they called it that though.
Weird.
"Mother,
Tell your children not to walk my way"
Danzig - Mother.
Danzig
Her Black Wings
Devil's Plaything
777
Going Down To Die
"See she comes,
Blacker than pitch"
Danzig - Her Black Wings
My new feed
I switched to feedburner. Because I feel really important this way, when I know how many people are stalking me.
Awesome cool ask the manowar fan feed
Pimp the Moto Rokr E8
So if it's news to you that I bought a Moto Rokr E8, then dude, you don't know me at all now do you?!
Apps I can't do without:
1. GMail mobile app. Dude, that shit is fast!
2. Opera Mini. Dude, that is seriously fast! Can't do without Facebook now can I?
3. Google Maps. I get lost a lot.
4. Flickr uploader. For all the photos you take!
I will update that list with more as I discover them!
Everyone in the whole wide world should use the new Opera mini browser on their cellphones.
Why? Because it's super fast, super-cool, speed dial bookmarks rule! And it's actually really really fast for some reason.
No, I mean it man.
I haven't tried flash on it yet, but so far kickass!
Opera mini = Jack Bauer = Chuck Norris.
"There're millions of lives at stake, and millions of people will die if you don't do what I say, NOW! Dammit, NOW!"
Jack Bauer - Every single episode of 24
Rails before_save and validations
In Rails you ought to look at before_save as your slightly bad ass friend, who you won't give control of your assets to.
You might think that's a bad analogy. When in fact it's not. Bear with me.
Truth/Sane part of analogy:
Don't modify your objects in an before_save hook. In any way, small string manipulation, prepend a dollar sign. Any of that, in any way. Of course, this argument is only valid if you're going to add validations on that object on those fields.
Example:
class Thing
before_save :underscore_most_special
private
def underscore_most_special
name.gsub!(/[-_/]/, '_')
end
end
This is all cool right, well let's say now you throw in a validation.
class Thing
before_save :underscore_most_special
validates_uniqueness_of :name
private
def underscore_most_special
name.gsub!(/[-_/]/, '_')
end
end
class ThingTest
def test_name_should_be_unique
Thing.create!(:name=>"rambo")
assert_equal false, Thing.new(:name=>"rambo").valid?
end
end
Of course this test will pass, what test won't pass on the other hand which I didn't write on the first go is.
def test_name_should_be_unique
Thing.create!(:name=>"rambo-the-dude")
assert_equal false, Thing.new(:name=>"rambo-the-dude").valid?
end
Any guesses why?
The thing that's saved is saved with underscores, and the thing that's wants to get saved is being compared with hyphens. Later on get's saved with underscores. And you end up with duplicates.
So what's the solution. Don't use those AR hooks? Hell no, hooks are awesome! Use before_validates.
By making videos:
About Perl.
About bad Rubyists.
About Zed Shaw.
"I kissed a girl and I liked it"
Katy Price - I kissed a girl
"Barring a sharp blow to the head, as you stand here today you are as dumb as you'll ever be."
Quote from Design Patterns in Ruby explaining why solving a problem you haven't encountered yet (eg: internationalizing your application without the real need for it) is risky because you're betting you can solve it right, and you can solve it right now.
Further ...
"Whenever you put in a feature before
you really need it, you are guilty of programming while stupid; if you wait until you
really need the thing, you are likely to have a better understanding of what you need
to do and how you should go about doing it."
Outlander is going to be slightly close to the best movie ever
Guilty Pleasures
I usually absolutely hate chick flicks ... upto the extent of really rather wanting to die in a void of entertainment so total and entire it would make simple pimple boredom look like The George Carlin show (God bless his soul).
But my point is.
I like just two of them. I promise, just these two. The Holiday and Stranger Than Fiction.
I know that Stranger Than Fiction might not be classified as a chick flick. But shit man, no one dies, there's no blood, there's no monster, there's no crazy awesome siege, there's no mutants, there's no superhumans, there's no post modern apocalyptic-reality, and there's no prophecy.
So that's my guilt pleasure. Only two ... so Far.
"Body movin'
Body movin'
with the a-1 sound sound so soothing"
Beastie Boys - Body moving
Bashfully yours gemdocs
That is setting up your bash to give you gemdocs with like ... one line. Or that's kicking your ass.
PS: I had to replace open with firefox for it to work with my Ubuntu box. You might find that helpful.
Peace and love,
The Sid Sid man.