tony spencer » Ruby on Rails http://www.tonyspencer.com It's Just Links Sat, 19 Oct 2013 14:31:31 +0000 http://wordpress.org/?v=2.9.1 hourly 1 Twitter is giving Rails a bad name http://www.tonyspencer.com/2008/06/05/twitter-is-giving-rails-a-bad-name/ http://www.tonyspencer.com/2008/06/05/twitter-is-giving-rails-a-bad-name/#comments Thu, 05 Jun 2008 19:24:51 +0000 tony http://www.tonyspencer.com/2008/06/05/twitter-is-giving-rails-a-bad-name/ twitterificUggh. Rebuild it already. Its only a few actions. It wasn’t built for this kind of app.

Python, C, Perl, whatever.

]]>
http://www.tonyspencer.com/2008/06/05/twitter-is-giving-rails-a-bad-name/feed/ 2
Easy Solution for Conflicting Rails Migration Version Numbering http://www.tonyspencer.com/2008/03/02/easy-solution-for-conflicting-rails-migration-version-numbering/ http://www.tonyspencer.com/2008/03/02/easy-solution-for-conflicting-rails-migration-version-numbering/#comments Sun, 02 Mar 2008 16:19:13 +0000 tony http://www.tonyspencer.com/2008/03/02/easy-solution-for-conflicting-rails-migration-version-numbering/ migrations numbers
Thats a crappy blog post title but the best I could come up with! You know the scenario: you are about to commit your latest Rails code to subversion and you perform an update first. Rats. Someone has committed a new migration with the same number as yours. So you mess around with SQL manually reversing changes, and rename files. Its a pain, and I think this single problem with Rails causes much stress because as Rails developers we are used to everything working so smoothly. We’ll Steve Purcell has solved this problem in a beautiful way.

Install his plugin ‘renumber_migrations’:
script/plugin install http://rails.sanityinc.com/plugins/renumber_migrations/

Next time you run into this migrations mess:
rake db:migrate:renumber

Problem solved!

One note: for some reason I couldn’t get it to work until I removed line 18:
raise "This task currently supports only subversion projects"

Don’t know why he added that line but once it was removed it worked perfectly. Thank you very much Steve! Now if someone will write a nice script to setup a bunch of common ignore properties (log/, schema.rb, tmp/) in SVN when first importing a new Rails project…. :)

]]>
http://www.tonyspencer.com/2008/03/02/easy-solution-for-conflicting-rails-migration-version-numbering/feed/ 1
Ad Blockers can Ruin Your Legitimate Web App that Isn’t Even Serving Ads http://www.tonyspencer.com/2007/11/21/ad-blockers-can-ruin-your-legitimate-web-app-that-isnt-even-serving-ads/ http://www.tonyspencer.com/2007/11/21/ad-blockers-can-ruin-your-legitimate-web-app-that-isnt-even-serving-ads/#comments Wed, 21 Nov 2007 19:17:34 +0000 tony http://www.tonyspencer.com/2007/11/21/ad-blockers-can-ruin-your-legitimate-web-app-that-isnt-even-serving-ads/ Since rebranding some of our old classifieds sites and relaunching the system as OhSoHandy.com in a newly built Ruby on Rails app we’ve received a handful of emails complaining about strange behavior that always involved links not appearing for the user.

How do you read the rest of the postings or see any pictures that were uploaded?!?! There are no links on the classifieds to keep reading them. Please help since I am new to the website.

At first I discounted this as user error. “These fools don’t know how to use the internets!” DELETE.

After getting several more of these I became concerned and managed to get a few users to send screenshots and HTML source. We were all stumped. The page was fully loaded except the links to the classified ads were missing. There were no errors in the logs.

Finally I posted the mystery to my fantastic local Ruby group and Chris Garrett (not the SEO one) had a fantastic suggestion:

I just came across something else in my hunting. It could be an
ad-blocking plugin. See if the users have some common plugin in their
browser that hides ads. Also, see if there is some pattern to the
links that are disappearing – e.g. some keyword or URL pattern.

Did a bit of Googling and sure enough Norton Internet Security takes a very heavy handed approach to blocking ads on sites:

Ad Blocking maintains a list of more than 200 HTML strings that are associated with advertisements…….

For example, Ad Blocking prevents Web pages whose URL includes www.ad.siemens.com from being displayed because the URL includes the HTML string “AD.”

ad block

And our URL’s are structured with the word ad in the URL:

/ad/128955-custom-home-in-historic-wake-forest

Created a page to test the theory and asked the most recent user to check it. He validated the test and confirmed that he did indeed have Norton Internet Security installed and running on his machine.

So be careful when naming your URL routes and avoid the use of the phrase “ad” or “banner”! Much, MUCH thanks to Chris Garrett for thinking outside of the box and to Curt Rabon of Blue Lizard Technologies for pointing out the problem and allowing me to use him for a guinea pig.

Lookout Googlebot. We’re going to be serving a LOT of 301 redirects shortly.

]]>
http://www.tonyspencer.com/2007/11/21/ad-blockers-can-ruin-your-legitimate-web-app-that-isnt-even-serving-ads/feed/ 2
Ruby runs on iPhone http://www.tonyspencer.com/2007/09/19/ruby-runs-on-iphone/ http://www.tonyspencer.com/2007/09/19/ruby-runs-on-iphone/#comments Wed, 19 Sep 2007 19:17:57 +0000 tony http://www.tonyspencer.com/2007/09/19/ruby-runs-on-iphone/ Peter Cooper pondered Ruby on iPhone?…. Giles has no iPhone, and nor do I, so we can’t test it,…”.

Yes it works:

And for any skeptics all doubt should be cleared up with this horrifically blurry, bad video I made with the only camera I had here at the office (iSight) :)

]]>
http://www.tonyspencer.com/2007/09/19/ruby-runs-on-iphone/feed/ 3
New columns not immediately available in migrations http://www.tonyspencer.com/2007/07/04/new-columns-not-immediately-available-in-migrations/ http://www.tonyspencer.com/2007/07/04/new-columns-not-immediately-available-in-migrations/#comments Wed, 04 Jul 2007 16:43:22 +0000 tony http://www.tonyspencer.com/2007/07/04/new-columns-not-immediately-available-in-migrations/ Sometimes you add a column to a table in a migration and then you want populate the new column with some data. Run your migration and while your column has been created in the database, your data does not populate. The problem is that those columns are not accessible via ActiveRecord and so you just need to tell it to update itself:

add_column :user, :favorite_beer, :string
User.reset_column_information  #<<<<<<<< Here is the ActiveRecord reload
tony = User.find_by_name "Tony Spencer"
tony.favorite_beer = "Terrapin Rye Pale Ale"
tony.save
]]>
http://www.tonyspencer.com/2007/07/04/new-columns-not-immediately-available-in-migrations/feed/ 4
Lighthouse Bug Tracking Review http://www.tonyspencer.com/2007/06/21/lighthouse-bug-tracking-review/ http://www.tonyspencer.com/2007/06/21/lighthouse-bug-tracking-review/#comments Thu, 21 Jun 2007 18:34:14 +0000 tony http://www.tonyspencer.com/2007/06/21/lighthouse-bug-tracking-review/ We’ve been using Basecamp for some time now to manage multiple projects and I have really enjoyed it except for the lack of integrated issue/bug tracking. I’ve tried hacking to-do lists and categorizing messages but I just can’t make Basecamp work for our issue tracking even though I don’t need fancy features. I just want to rapidly log/assign issues to team members, change status, and reassign back to me when the issue is completed.

For years I’ve been using Mantis and it works but its quirky and rather slow to work with as the interface isn’t designed all too well. There is also some stupid bug that makes it impossible for me to sort issues by different columns. I’ve just signed up for Lighthouse and here are a few pros and cons I’ve noticed immediately:

  • As a technical manager I like to be able to enter bugs/issues quickly w/out using the mouse. Basecamp to-do lists are very nice this way as I can quickly type, tab, and hit space bar to enter an item and assign it to someone. The create ticket feature forces me to pickup the mouse and click several places which slows things down. It would also be very nice if it tickets were created with AJAX as to-do items in BC are done so I can very quickly fill up peoples queue . (Hey my guys work fast so I have to enter bugs fast!)
    new issue
  • It’s not very apparent which project I’m currently managing. Only the small drop down on the right lets me know. I wish Lighthouse would make the current project name more prominent like in Basecamp. Also it would be quicker to bounce around between projects if they were a list of links rather than a select list.
  • There is no issue tracking in Basecamp which is why I am giving this nice looking app a try. However, I would continue to use Basecamp for other aspects of the project. It would be great if they could drop in my URL to a project in Basecamp when I create the project in Lighthouse so it could provide me that link in the right nav so I could jump back there.
  • I like the ability to add an avatar to users in Lighthouse. Helps to make it easier to see who did what and gives it a personal touch.
    avatars
  • The “feature updates” box is taking up too much of the real estate on every page and never goes away.
    new issue
  • The top header is a little too big and is wasting space above the fold hindering me from seeing more without scrolling.
  • I like the ability to pay with PayPal subscription which got me up and running very quickly
  • The ability to create a simple “Page” is nice. Currently we have a writeboard in one project in Basecamp that we keep all info about our server setup in such as gems to install, cron jobs, where files exist, and how to deploy. The problem with that is I can’t share it with everyone without adding everyone to that project and it really isn’t specific to that one project. Pages solves that in Lighthouse. I will now also add pages like coding best practices, and subversion how to’s.

I know I published a lot of negatives here but on the whole I’m liking this hosted app and would love to get away from stinking Mantis and managing my own bug tracking system. I’ll post more updates as we use it more.

Update to Lighthouse Issue Tracking

It looks like they removed the banner that was wasting space which is nice. However, one BIG problem I discovered:

I cannot use a “pre” tag to drop in HTML and not have it rendered by the browser which makes it very hard for me to show a designer or developer some html I want them to use.

Also I can now tab to the field where you select a user to assign a ticket to but I still cannot change that field without picking up the mouse and clicking on it.

Damn I wish there were a simple interface for entering bugs that looked something like this :)

issue

]]>
http://www.tonyspencer.com/2007/06/21/lighthouse-bug-tracking-review/feed/ 5
PHP vs. Ruby on Rails http://www.tonyspencer.com/2007/06/09/php-vs-ruby-on-rails/ http://www.tonyspencer.com/2007/06/09/php-vs-ruby-on-rails/#comments Sat, 09 Jun 2007 15:48:14 +0000 tony http://www.tonyspencer.com/2007/06/09/php-vs-ruby-on-rails/ Again, not funny if you are stuck in PHP land trying to sync up with your team’s latest database changes:

]]>
http://www.tonyspencer.com/2007/06/09/php-vs-ruby-on-rails/feed/ 3
Java vs. Ruby on Rails http://www.tonyspencer.com/2007/06/09/java-vs-ruby-on-rails/ http://www.tonyspencer.com/2007/06/09/java-vs-ruby-on-rails/#comments Sat, 09 Jun 2007 15:46:05 +0000 tony http://www.tonyspencer.com/2007/06/09/java-vs-ruby-on-rails/ These series of videos are hilarious (in a uber nerdy kind of way) but may not be so funny if you haven’t invested a small amount of time to learn ruby and are still stuck in java quicksand trying to figure out which jar is breaking your app. :)

]]>
http://www.tonyspencer.com/2007/06/09/java-vs-ruby-on-rails/feed/ 0
Refactor Christmas, Be Agile, and Be Happy http://www.tonyspencer.com/2007/03/28/refactor-christmas-be-agile-and-be-happy/ http://www.tonyspencer.com/2007/03/28/refactor-christmas-be-agile-and-be-happy/#comments Thu, 29 Mar 2007 01:56:31 +0000 tony http://www.tonyspencer.com/2007/03/28/refactor-christmas-be-agile-and-be-happy/ Here is a great story of Ruby on Rails being used for a great non-profit fundraiser idea that I can’t wait to buy into. This Christmas I was truly unhappy with the amount of gifts that flooded our family’s lives. Its just become too much and I feel like Heather and I need to take the lead by giving something truly meaningful like a half a day of a cancer researcher’s time, buy a week of landmine detection for a mere $55, or displace cocaine farms in Columbia by subsidizing coffee bean farms.

Well Bruce is fortunate enough to have an opportunity to build this with Rails. And the results have been phenomenal:

The founder considered Java for scalability and stability, but the early bids came back and the project looked too expensive and complex…. Our team built the initial version of the site at about one fifth of the projected cost of bids using other languages, and in about one sixth of the projected time. Rails has absolutely been critical to our productivity and success.

Be Agile and Be Happy

And I love Bruce’s take on agile programming. I really hadn’t taken the time to figure out what agile development really meant but its very close to where I find my method today:

* We focus our process around short, sharp one-week iterations. We deploy at least weekly.
* Instead of forcing quality through the funnel of a formal test cycle, we rely heavily on our developers to build test cases as we code.
* We are not afraid to refactor when it suits our business purposes. We refactor to improve code quality, address requirements, or improve flexibility.
* We manage minor requirements weekly, and major requirements monthly.
* We maintain tight communication with our business users through weekly demos, even though our team is distributed.
]]>
http://www.tonyspencer.com/2007/03/28/refactor-christmas-be-agile-and-be-happy/feed/ 0
Best Company Name of the Year, has_many: developers http://www.tonyspencer.com/2007/03/02/best-company-name-of-the-year-has_many-developers/ http://www.tonyspencer.com/2007/03/02/best-company-name-of-the-year-has_many-developers/#comments Fri, 02 Mar 2007 20:50:04 +0000 tony http://www.tonyspencer.com/2007/03/02/best-company-name-of-the-year-has_many-developers/ I just ran into these guys while stumbling upon sites and this has to be the best name of the year for a Ruby on Rails consulting firm.

]]>
http://www.tonyspencer.com/2007/03/02/best-company-name-of-the-year-has_many-developers/feed/ 2