Will Read's blog



Will ReadWill Read
Standup 3.18.2011: Rails Bridge
edit Posted by Will Read on Friday March 18, 2011 at 10:04AM

Interesting Things

  • Rails Bridge is hosting an event here at Pivotal Labs to teach people how to develop Rails applications (including TDD and source control!). The students are designers, bootstrapping startups and those who are just curious. THIS EVENT NEEDS VOLUNTEERS! Come teach their well-laid out lesson plan, OR if you're not up for teaching, come and help out with the install-fest Friday night. The dates are March 25th for the install-fest and March 26 for the actual class. Here's the deets on Meetup Here's the volunteer page

Ask for Help

"How do I show the 80 character line guide in RubyMine?"

Search your RM preferences, it's in there.

Interesting Things

  • Autosave doesn't work when you have a has_many :through relationship in your model. The POST gets rewritten as a PUT and doesn't work as expected. See an example here.

  • Got multiple log files? Want to join those log entries across a specific request? LumberJack is for you! It adds metadata to each log - things like:

    • severity - The severity recorded for the message.
    • time - The time at which the message was recorded.
    • program name - The name of the program logging the message. This can be either set for all messages or customized with each message.
    • process id - The process id (pid) of the process that logged the message.
    • unit of work id - The unique 12 byte hexadecimal number generated for a unit of work.

Ask for Help

"Is there a way to have multiple ssh.config files or include other ssh type configurations in your main ssh.config?"

Still searching for an answer here.

"What's the best way to share cap recipes across multiple internal git repos?"

Git submodules will work, but also think about using a shared gem. The shared gem approach will enable you to keep your server configuration in one place as opposed to scattered across multiple repos that define their own server list.

Interesting Things

Will ReadWill Read
Standup 2011.01.07: Pivots Make Gems
edit Posted by Will Read on Monday January 10, 2011 at 09:16AM

Interesting Things

  • Check out the new gem from Tim, benchmark-timed_each. This handy gem lets you find out how long it takes to process each item in a collection.

Will ReadWill Read
Standup 2010.12.23: Heroku Loves Resque
edit Posted by Will Read on Thursday December 23, 2010 at 01:27PM

Interesting Things

  • Auto scaling of Resque workers on Heroku works great! Look for some factored code to come in the future to make setup even easier.
  • Be aware of what you name your queues in Resque - there is an implicit alpha-ordering when workers come looking for work. This isn't an issue if your workers and queues are 1:1, but if you venture off the path, then this might affect your ops.
  • sunspot_matchers have been gemified. "The goal of these matchers are to make it easier to unit test search logic without having to construct the individual fixture scenarios inside of Solr and then actually perform a search against Solr." Happy sunspot testing!

ctrl+z

And of course, Happy Holidays from Pivotal Labs!

Will ReadWill Read
Standup 2010.12.22: Heroku Improvements, IE Memory leaks, and GPL
edit Posted by Will Read on Wednesday December 22, 2010 at 10:17AM

Ask for Help

"What tools can one use to track down JS memory leaks in IE 7/8?"

Interesting Things

  • Heroku no longer has the "ouchie guy" when the site is down. You now get a much more plain, less "comic-sans" response page. You can also customize your error page.
  • Heroku also appears to have done some work around setting your site in maintenance mode. Hopefully these changes will make going in to maintenance mode more robust than previous experiences.
  • Juicer, a tool used for compiling/compressing JS, has a dependency on cmdparse which is currently under GPL. The author of cmdparse is awaiting response from all the committers so that he can release it under a more flexible license.

Will ReadWill Read
Standup 2010-12-06:No Limit Gradients
edit Posted by Will Read on Monday December 06, 2010 at 07:46PM

Ask for Help

"How do I turn off auto-complete in RubyMine? It can be a road block on bigger code bases."

You can crank up the delay so it doesn't auto-complete as vigorously.

Interesting Things

  • When consuming the Twitter streaming API (aka "The Fire Hose") if you're not seeing any rate limiting response messages it means you're getting all the tweets possible for your query. No limit!
  • Got IE6? Need gradient action? There's a CSS gradient filter that's been supported in IE since 1997.
  • Amazon just announced a DNS service, and who doesn't love a good DNS with an API to boot?

Will ReadWill Read
Standup 2010-09-17: Why Aren't You at GoGaRuCo Edition
edit Posted by Will Read on Friday September 17, 2010 at 09:46AM

Ask for Help

"How do I upgrade Passenger on the EngineYard Cloud with a unsupported account?"

Jump in to EY's IRC to get 'er done.

"Using the Vimeo gem, uploading fails with 'Unknown upload error'"

No answer, but the gem hasn't been updated in a while and the working theory is that it isn't compatible with the new OAuth authentication. Suggestions included using HTTP Scoop to see what the traffic is doing and get more info.

"Ngnix 0.6 + Rails 3 isn't sending the Content-Length header for 201 responses"

Since there's no content length specified, some browsers grab on to the keep-alive and appear to take a very long time to load the page. In Rails 2.x the Content-Length is supplied. Does anyone know if this was an intentional choice in Ngnix/Rails 3?

Will ReadWill Read
Standup 2010-08-20: Database Woes and Eval Nuances
edit Posted by Will Read on Sunday August 22, 2010 at 10:09PM

Help!

A Pivot is working on a project where 1,500 records living in a CSV are iterated over (loaded in to ActiveRecord objects) and loaded in to a Postgres database... or at least that was the intention. The database just crashed on him in a repeatable way. Anyone seen anything like this before?

On another project, there's a has_many association on a table with 40,000 records in MySQL. It seems that pulling these in through standard ActiveRecord means is not releasing memory (you can watch the memory grow as it executes). The work around was to use ActiveRecord::Base.connection.select_all(), but it would be nice to know why GC didn't kick in and clean up house. Maybe AR is holding on to object references somewhere outside of scope?

Interesting Things

Speaking of scope, there's a subtle difference in Ruby 1.9.2 that a pivot ran into - previously you could set variables inside a call to eval() and have that variable defined in the same scope as the call. That is no longer the case in 1.9.2 where eval has its own scope inside the call.

And lastly, on this day in 19..(mumble mumble), NASA launched the Voyager 2. Later in its career, Voyager was given it's own drama series and a female captain to command the vessel.

Interesting Things

Checkout http://meriline.com and/or monoprice.com for a much more economical cable adapter solution. DVI to mini-display port adapters will only set you back about 1/3 the cost.

And today, standup was ended on a humorous note.

Other articles: