Joe MooreJoe Moore
Standup 07/09/2010: Jumbo Edition
edit Posted by Joe Moore on Friday July 09, 2010 at 07:50PM

HELP!

"Any recommendations for a recurring-payment system that has to support charge amounts that change?"

Check out Active Merchant, PayPal API, Chargify, or simply rolling your own and charging the credit cards directly.

"I'm having a hard time debugging jQuery live events..."

Check out FireQuery. You can also look at the data attributes attached to the target DOM elements.

"Sometimes our S3 assets download incompletely when using Net::HTTP."

Things to try include:

  • Save a checksum for all assets and compare that after download to detect incomplete downloads.
  • Check the Content-Length header against the actual content length of the asset.
  • Did you set the Content-Type header? Maybe Net::HTTP is confused.
  • Try witching from Net::HTTP to the S3 gem.

"How can we prevent users from printing the web page?"

Though nothing can prevent users from making a screen shot, deterrents might include:

"Our Solr commits have sloooooooooooooooowed doooooooooooooooooooooooown."

As Solr commits increase the warmers might take longer to spin up. You might need to add more servers or space our your commits.

Interesting Things

  irb> "Mr.\tBob\tSmith".split("\t")
  => ["Mr.", "Bob", "Smith"]
  irb> "Prince\t\t".split("\t")
  => ["Prince"]

Comments

  1. Joseph Palermo Joseph Palermo on July 09, 2010 at 11:31PM

    With regards to split, it takes a second parameter that limits the number of fields returned.

    If the second parameter is negative, there is no limit to the number of fields returned, and it won't eat trailing white space at the end.

    irb> "Prince\t\t".split("\t", -1)
    => ["Prince", "", ""]
    
  2. Joseph Palermo Joseph Palermo on July 09, 2010 at 11:49PM

    With regards to Solr commits being slow. If you are using a library that does a commit after every save/delete, I've found it best to turn this behavior off because the commitcall is done as a blocking call which will kill your app's performance.

    You can then rely on the autoCommit config option for all of your commits so they don't block your app.

    You may still need to manually force a commit from your app in rare situations where the user is performing an update/delete and being redirect back to search results where they would expect the results to be updated.

  3. Benjamin Curtis Benjamin Curtis on July 10, 2010 at 07:44AM

    Regarding a recurring billing system that can charge amounts that change... the SaaS Rails Kit (http://railskits.com/saas/) does exactly that. :)

Add a Comment (MarkDown available)