Jeff Geerling's blog

Running a Windows XP VM in Parallels (Mac) from a USB Flash Drive

I thought I'd post my experience here, for the benefit of others, because I couldn't find a whole lot of information about this specific use of an external USB flash drive.

I have a MacBook Air with a dainty 128GB SSD drive, so I try to keep large files that I rarely use on external drives. I have plenty of external USB and FireWire storage (over 6 TB), and running VMs in either Parallels or VMWare Fusion works great (very highly performant) off any of these external drives.

Moving Comments into a Block - Drupal 7

Most of the time, Drupal's convention of printing comments and the comment form inside the node template (node.tpl.php) is desirable, and doesn't cause any headaches.

However, I've had a few cases where I wanted to either put comments and the comment form in another place on the page, and in the most recent case, I asked around to see what people recommended for moving comments out of the normal rendering method. I found a few mentions of using Panels, and also noticed the Commentsblock module that does something like this using Views.

However, I just wanted to grab the normal comment information, and stick it directly into a block, and put that block somewhere else. I didn't want Views' overhead, or to have to re-theme and tweak things in Views, since I already have a firm grasp of comment rendering and form theming with the core comment display.

So, I set out to do something similar to this comment on drupal.org (which was also suggested by Jimajamma on Drupal Answers).

Sending emails to multiple receipients with Amazon SES

After reading through a ton of documentation posts and forum topics for Amazon SES about this issue, I finally found this post about the string list format that helped me be able to send an email with Amazon SES's sendmail API to multiple recipients.

Every way I tried getting this working, I was receiving errors like InvalidParameter for the sender, Unexpected list element termination for the error code, etc.

Using apachebench (ab) with Drupal 7 to load test site with authenticated users

apachebench is an excellent performance and load-testing tool for any website, and Drupal-based sites are no exception. A lot of Drupal sites, though, need to be measured not only under heavy anonymous traffic load (users who aren't logged in), but also under heavy authenticated-user load.

Drupal.org has some good tips for ab testing, but the details for using ab's '-C' option (notice the capital C... C is for Cookie) are lacking. Basically, if you pass the -C option with a valid session ID/cookie, Drupal will send ab the page as if ab were authenticated.

Instead of constantly going into the database and looking up session IDs and such nonsense, I have a simple script, which is quite revised from the 2008-era script originally from 2bits that worked with Drupal 5, which will give you the proper ab commands for stress-testing your Drupal site under authenticated user load. Simply copy the attached script (source pasted below) to your site's docroot, and run the command from the command line as follows:

Posting to Facebook: Use a service or DIY via the Open Graph API?

For a very long time, for my simple Catholic News Live fan page on Facebook, I was using RSS Graffiti to post new stories to Facebook (usually in batches of 3-5). RSS Graffiti is super-easy to set up, and it simply ties into your existing site's RSS feed to post new stories from your site to Facebook.

However, after I redesigned the Catholic News Live website in Drupal 7, I decided I'd take a few extra minutes to rework the site's social integration for Twitter and Facebook (I was using HootSuite for Twitter postings—a batch of 5 stories per hour maximum—and RSS Graffiti for Facebook.

People who followed both accounts weren't engaging, liking, or even sharing/retweeting stories too much. The twitter account was doing okay, because Twitter doesn't seem to hide tweets from other users as much as Facebook likes hiding certain posts (especially those from automated apps like RSS Graffiti).

Viral Facebook Reach Graph
Other graphs, like the shares, likes, etc. are similarly aligned.

Why I don't develop for Android first

I developed my first iOS app about a year and a half ago, and it has seen over 2,500 downloads (it's a free app, and pretty useful, albeit only for a certain portion of people living in St. Louis, MO).

I developed my second iOS app (a companion to a news aggregation website that's existed since 2009) in April 2011, and in the first month alone, it was purchased ($0.99) over 300 times. In the months that followed, the app has consistently sold over 50 copies, sometimes more than 100, without—literally—any marketing on my part. Just an occasional plug on Twitter or at a conference. That's it.

I then decided to finally take the plunge and try my hand at redeveloping the app for Android (my first Java/Android project), and worked very hard to make the app run as good, and sometimes even better on Android phones (anything running 2.2+...).

Sales per app marketplace
Translation: Why I won't develop for Android first (no matter the marketshare).

The first month of sales have been more than disappointing; after 8 sales on the first day—most to friends who I specifically asked to download the app and test it*—the app has sold maybe one or no copies each day since, and all in the U.S. (The app has four five star reviews, the market page, icon, etc. are all very good quality—I spent a lot of time on the text, design, icon, etc., even forming everything to Android Market/platform standards instead of reusing iOS resources).

Pages

Subscribe to RSS - Jeff Geerling's blog