サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
iPhone 16
www.railstips.org
RailsTips One man, lazily posting some of the things he learns. subscribe » First off, did you pronounce the title of this article like a sheep? That was definitely the intent. Anyway, onward to the purpose of this here text. One of the things I have learned the hard way is that booleans are bad. Just to be clear, I do not mean that true/false is bad, but rather that using true/false for state is
RailsTips One man, lazily posting some of the things he learns. subscribe » I have been thinking a lot about isolation, dependencies and clean code of late. I know there is a lot of disagreement with people vehemently standing in both camps. I certainly will not say either side is right or wrong, but what follows is what I feel has improved my code. I post it here to formalize some recent thoughts
RailsTips One man, lazily posting some of the things he learns. subscribe » A few weeks back, we publicly released the Gauges API. Despite building Gauges from the ground up as an API, it was a lot of work. You really have to cross your t’s and dot your i’s when releasing an API. 1. Document as You Build We made the mistake of documenting after most of the build was done. The problem is documentin
RailsTips One man, lazily posting some of the things he learns. subscribe » I have been working on Words With Friends, a high traffic app, for over six months. Talk about trial by fire. I never knew what scale was. Suffice to say that I have learned a lot. Keeping an application performant is all about finding bottlenecks and fixing them. The problem is each bottleneck you fix leads to more usage
RailsTips One man, lazily posting some of the things he learns. subscribe » There are several things I have learned building object mappers that I now take for granted. Last week while pairing with Jason, I was explaining a trick and he said I should blog about it, so here goes nothing. Let’s say you are building a new object mapper named TacoMapper. A sensible place to start is with attribute acc
RailsTips One man, lazily posting some of the things he learns. subscribe » Last Wednesday I was invited to present on MongoDB and MongoMapper at the Indianapolis ruby group. I promised them I would post the slides so they could get to the links and such. Slides The slides are very similar to my Grand Rapids presentation on MongoDB. but the actual talk was different. Audio On top of the slides, th
RailsTips One man, lazily posting some of the things he learns. subscribe » Strong statement, eh? The more I work with Mongo the more I am coming around to this way of thinking. I tell no lie when I say that I now approach Mongo with the same kind of excitement I first felt using Rails. For some, that may be enough, but for others, you probably require more than a feeling to check out a new techno
RailsTips One man, lazily posting some of the things he learns. subscribe » A few weeks back we (Steve and I) added multiple asset upload to Harmony using Uploadify. If you are thinking that sounds easy, you would be sorely mistaken. Uploadify uses flash to send the files to Rails. This isn’t a big deal except that we are using cookie sessions on Harmony and flash wasn’t sending the session inform
RailsTips One man, lazily posting some of the things he learns. subscribe » A few weeks ago, I wrote about Mongo and how awesome it is. Towards the end of the article (and in the slideshow) I mentioned MongoMapper, a project I’ve been working on. Over the past few weeks my buddies at Squeejee and Collective Idea have started using MongoMapper and they’ve helped me squash a few bugs and add a few f
RailsTips One man, lazily posting some of the things he learns. subscribe » I’m writing an application right now that is really JSON heavy. Some of the functional tests are cucumber and some of them are just rails functional tests using shoulda. I hit a point today where I wanted to verify that the JSON getting output was generally what I want. I could have just JSON parsed the response body and c
RailsTips One man, lazily posting some of the things he learns. subscribe » Last night, the folks from the Grand Rapids ruby group were kind enough to allow me to present on MongoDB. The talk went great. I’ve been excited about Mongo for a couple weeks now, so it was cool to see that it wasn’t just me. The funny thing is, at nearly the same time, Wynn Netherland presented on MongoDB to the Dallas
RailsTips One man, lazily posting some of the things he learns. subscribe » Twitter recently announced OAuth support and that eventually they will be deprecating HTTP Basic Authentication in favor of OAuth. Knowing this, I figured it was about time to get familiar with OAuth and update the Twitter gem to use it. Let me start by explaining my history with OAuth. I have none. There that was fast. I
RailsTips One man, lazily posting some of the things he learns. subscribe » Now that we know the difference between an instance method and a class method, let’s cover the difference between include and extend in regards to modules. Include is for adding methods to an instance of a class and extend is for adding class methods. Let’s take a look at a small example. module Foo def foo puts 'heyyyyooo
RailsTips One man, lazily posting some of the things he learns. subscribe » Figure #1: Example Directory StructureSinatra is a DSL for quickly creating web-applications in Ruby with minimal effort, as quoted from the Sinatra website. It is great for really simple, really fast services and in general is fun to make apps with. Since I showed how to deploy your Rails apps on Dreamhost, I thought I wo
RailsTips One man, lazily posting some of the things he learns. subscribe » Google has a weather api that is dead simple to use. Just discovered that tonight so I whipped together a wrapper using HTTParty. I decided to try out Jeweler, a project by Josh Nichols, that makes creating gems a snap and it delivered. I used shoulda and fakeweb for the tests. Holy crap has making a gem that wraps a web s
RailsTips One man, lazily posting some of the things he learns. subscribe » An astute reader will remember that a while back, HTTParty divorced both ActiveSupport and the JSON gem in order to make it easier to use all around. With the JSON gem went the last gem dependency, which was kind of cool. A few days back, it occurred to me that the parsing of XML and JSON that HTTParty used might be handy
RailsTips One man, lazily posting some of the things he learns. subscribe » Just a little bit ago I twittered: I’ve been using shoulda with rspec for past week. Now trying it on fresh rails project and liking it ok thus far. To which Brandon Keepers replied with: @jnunemaker what do you like about it? I started to send a tweet back and realized it would make an ok post here. History I remember ask
RailsTips One man, lazily posting some of the things he learns. subscribe » There is a great gist called “Note to Self” which was, I think, originally started by John Barnette (jbarnette on Twitter and GitHub). I am sharing it here as I thought it was pretty interesting. I added links below to more information, where applicable, and renamed it The Rails Beatitudes since each principle starts with
RailsTips One man, lazily posting some of the things he learns. subscribe »
RailsTips One man, lazily posting some of the things he learns. subscribe » As much as I write about XML, you would swear it is all I do, but I promise it is not. In fact, I do not really use XML that often, but I will admit that I am intrigued by it. A while back, you may remember, I posted about ROXML, a ruby object to xml mapping library. I liked the idea but not the implementation. Soon after,
RailsTips One man, lazily posting some of the things he learns. subscribe » Update: Atmos has written a far better tutorial than me on this and shows the “proper” way to test. Please check that out instead of reading my post. :) I think web hooks are sweet. The idea of making micro apps that take the pain out of typically painful things and allow for ridiculous re-use is really intriguing to me. I
RailsTips One man, lazily posting some of the things he learns. subscribe » The number one article suggestion thus far is how to receive email in a rails app. Ask and you shall receive. What I am about to present is just a first run at it and I am not going to promise that it scales. :) That said, I fooled around with it a bit and found it relatively easy. I will post more on the topic as I play m
RailsTips One man, lazily posting some of the things he learns. subscribe » So I’ve made a boatload of gems that consume web services (twitter, lastfm, magnolia, delicious, google reader, google analytics). Each time I get a bit better at it and learn something new. I pretty much am only interested in consuming restful api’s and over time I’ve started to see a pattern. The other day I thought, wou
RailsTips One man, lazily posting some of the things he learns. subscribe » Doesn’t it stink that google analytics doesn’t have an API? Yeah, I know. It seems nearly every post I mention conductor nowadays so I’ll bring it up again. We have about 15 sites live in conductor and darn it if I’m not interested in how they are doing traffic-wise. The Original Sin What I thought would be handy, is one s
RailsTips One man, lazily posting some of the things he learns. subscribe » Update (6/13/2008): I posted a bit more on the topic with example uses in the wild. First, let me preface this article with a fact: I’m new to Ruby, however, new is relative in that statement. I’ve been toying with Ruby for over a year but only in the last two months have I really started to code in Ruby and Rails. Ruby is
このページを最初にブックマークしてみませんか?
『Home // RailsTips by John Nunemaker』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く