Ruby tips from me, your idol

I feel like I’ve been in the ruby community for a while now and I’ve learned a lot along the way. Taking a step back and looking at what I did right and wrong was interesting. Most of the “wrong” I had to learn the hard way, and it would have been nice to have someone tell me: “Ben, you’re dumb, stop doing that, and go put on your helmet”. So I decided to go ahead and throw together a few tips and share them on my blog. Whether you agree or disagree, hopefully this saves you some time, or at least gets you thinking about some things. Afterall, I am your idol, so you are probably going to agree with me.
(more…)

Need some help: Searchlogic 2.0

Searchlogic was the first gem I built. I learned A LOT along the way and I continued to learn after releasing it. As such, there are some things I would do differently now. I would say the #1 lesson I learned is don’t release a complicated gem as your first gem. For example, my first gem should have been Settingslogic. What makes Searchlogic complicated is NOT idea behind it, its the integration with ActiveRecord, and the influence ActiveRecord had on the library design. I’m not sure if you’ve ever peaked in the ActiveRecord internals, but it’s by far one of the most complicated libraries I’ve ever had to deal with. I feel like I know my way around ruby pretty well, and there are still some things in ActiveRecord that kick my ass. I’m sure ActiveRecord is in the same boat as Searchlogic, if DHH or the rails team had to start from scratch, I’m sure there are some things they would do differently. Writing an ORM library is no easy task, and ActiveRecord is an excellent solution. Probably much better than anything I could do myself.

(more…)

Authlogic generators? All of the cool kids are doing it.

peer_pressureLately I’ve been getting a lot of pressure to add a generator to Authlogic. One of the big things I “tout” about Authlogic is the fact that is does not need generators, not anymore than any other RESTful controller you create. Authlogic can pull this off because it’s intuitive, it works just like every other model you have in your application. Unless you want to customize how it works, there’s no learning curve. If you know how to set up a RESTful controller for an ORM model, then you know how to set up a RESTful controller for an Authlogic model.

(more…)

Resourcelogic, what do you think?

I recently released the beta to a library I have been working on: Resourcelogic.

I’m really excited to release this because it’s my favorite “personal” library. I’ve been waiting to release it because I wanted to give it a thorough test drive on an app I am developing. I can say, without a doubt, that because of this library, the app is the cleanest app I’ve written to date. I love it.

The reason I am writing this post is because I want to see what you think. Before I officially announce it, clean up the documentation, add in my tests, and take it out of beta, I wanted to get some feedback on it. So if you have a minute, take a look at it and let me know what you think.

Oh, and I’d like to give a lot of credit to James Golick. This project spawned out of his resource_controller plugin, which is an excellent plugin.