Forked Devise Gem

Devise is an awesome gem. I recently used it with an iPhone application that I'm building, but I found a limitation when making remote authentication requests via xml. So what is one to do?

Fork it and fix it!

The XML mappings as well as some of the core lib's did not account for new registrations via xml. I still have yet to finish it off by writing some tests, but I will do this soon and send a pull request to the maintainers.

In the mean time, if you have the need to do remote registrations via XML to the Devise gem, check out my github fork.

 

Getting Started With Toto, a Tiny WordPress Killer - Dmitry Fadeyev

Toto stores all your posts as text files. The engine is written in the Ruby programming language and so you can use Ruby throughout your template files to add extra functionality. Additionally, Toto works extremely well with Heroku, a Ruby cloud host, which makes deployment especially easy—you can actually get a new blog up and running in about 10 seconds.

Hacker News | HN Contractors: Add Yourself

Over the last few months, I've seen a lot of HN members talk about being contractors, and why - designing to bootstrap their business, building an iPhone practice, moving to China to work and live, etc.

I'm often on the other side of that transaction, where I need to hire contractors for one or more projects, and I'd like nothing more than to hire from this group of experts, but I don't remember to bookmark every talented and possibly hungry person. I'm sure there are many other people on both sides.

So here's a Google Spreadsheet for adding yourself and your expertise so that folks who need to hire have a quick way to find HN folks: include your contact info [if you want], etc.

Spreadsheet is at https://spreadsheets.google.com/ccc?key=0AlD_6iEb8Ed9dGs3clVJYi0yYVBka181Z0ZK..., I promise to leave it there and hope that nobody's a jerk about it.

(If someone has already done this, by all means let me know or add to this thread - I just want the list, not the credit.)

What I wish a Ruby programmer had told me one year ago.. » Ruby, Python, Django, Rails, Linux, Todo-app » Sirupsen's Blog

Ruby is indeed evil. So evil. Extremely evil. But why so evil? Because it’s so beautiful. The syntax is so elegant, everything are objects. Everything makes sense. The Ruby-way of doing things is so sexy.

I quickly headed over to #ruby and asked them what I should do to practise my all-so-awesome Ruby skills, and some guy recommended me coding a todo-app. It seemed it was the new semi-advanced-but-no-so-advanced hello world. So I did, and here’s the extremely awesome output (be prepared, it’s extremely bad code and you should NEVER do something like this in Ruby):

A few days ago I was set off to create my first RubyGem. There are many resources on how to do this, but it took me a good while to gather all the information I figured I’d need for my application, so I’ve decided to gather my bit of knowledge in this article.

This article’s goal is kick start the creation of your first Gem. To make this experience more enjoyable, I’ve chosen to use a gem called Jeweler.

Patterns of method missing

One of the more dynamic features of Ruby is method_missing, a way of intercepting method calls that would cause a NoMethodError if method_missing isn’t there. This feature is by no means unique to Ruby. It exists in Smalltalk, Python, Groovy, some JavaScripts, and even most CLOS extensions have it. But Ruby being what it is, for some reason this feature seem to have more heavily used in Ruby than anywhere else. It’s also a feature most Ruby developers seem to know about. Is this because Ruby people are power hungy, crazy monkey patchers? Maybe, but method_missing is also potentially very useful, if used correctly. But of course, it’s exceedingly easy to misuse. In almost all cases you think you need method_missing, you actually don’t.

The purposes of this post is to take a look at a few ways people are using method_missing in the wild, what the consequences are and what you can do to mitigate them. I’m bound to have missed a few use cases here, so please feel free to add more in the comments.

Deceiving Users with the Facebook Like Button

However, this simplicity has a cost: Users can be tricked into "Like"ing pages they're not at.

For example, try pressing this "Like" button below:




This is what happened to my Facebook feed when I pressed it:

Screen shot 2010-04-21 at 10.45.01 PM

I used BritneySpears.com as an example here to be work/family-safe; you're free to come up with examples of other sites you wouldn't want on your Facebook profile! :)

Important note: Removing the feed item from your newsfeed does not remove your like -- it stays in your profile. You have to click the button again to remove the "Like" relationship.

This works because the iframe lets me set up any URL I want. Due to the crossdomain browser security, the "Like Button" iframe really has no way to communicate with the website it's a part of. Facebook "Connect" system solved this using a crossdomain proxy, which requires uploading a file, etc. The new button trades off this security for convenience.

Announcing EventMachine CouchDB (em-couchdb)

I thought it will be a good idea to end the year with a bang.. So here is the announcement for an awesome client for CouchDB based on EventMachine.

People who follow me on twitter (@sai_venkat) know that I am crazy about things like EventMachine, node.js, eventlet and NoSql databases. This is one of my attempts to dive into the NoSql world.

I was looking for clients for CouchDB in Ruby and found most to be using Net/Http and blocking in nature. So I began my quest of writing an asynchronous non blocking awesome EventMachine based CouchDB client inspired by EventMachine::Redis client.

Here is a sample code to enjoy... It creates a database, saves a document inside it, reads the doc, deletes it and then deletes the database.

Getting Started - Making AJAX Applications Crawlable - Google Code

This document outlines the steps that are necessary in order to make your AJAX application crawlable. Once you have fully understood each of these steps, it should not take you very long to actually make your application crawlable! However, you do need to understand each of the steps involved, so we recommend reading this guide in its entirety.