Blog

  • How Do You Explain WordPress? Use Ruby Metaphors!

    Last night I went to the WordPress Meetup at the Automattic office on Pier 38. I was late, but thank goodness that their sponsors had free booze and pizza.

    What struck me about this meetup was how folks explained WordPress and how to do production pushes with it.

    They had to use Ruby best practices metaphors.

    This is a dramatic change from 5 or 6 years ago when the opposite was the case.

    How do you push to production? “It’s like using Capistrano.”

    How does WordPress.com push code to production? “We use SVN with no branches. It’s like git without the merging.”

    What if you wanted to do RSpec / TDD? “Use something like Simpletest to exercise the user tables?”

    There was no automated solution for what to do with serialized data, and pushing that serialized data from dev to stage to prod if said data contained a different FQDN for each environment.

  • 5 Ways to Reduce Twitter Spam

    I’ve been working on reducing the amount of twitter spam.

    To me Twitter Spam is any sort of @ reply or DM that links to a site that tries to hack you back, and it can do so more than you care for.

    Here are 5 ways that work for reducing twitter spam:

    1. The silent cannot be spammed. If you stay quiet for a few days the amount of folks who will spam you goes down.
    2. Make your account private.
    3. Prune your account of the spam-like and spam vectors. For me this means removing folks that follow more than have followers or act like bots (because they probably are). This also means using Echofon on the iPhone. Echofon is helpful in that it shows the vector a spammer used to get to me. In this case I might get spammed an at reply every time a certain user “ats” me back. Echofon makes this very obvious.
    4. Actively block spammers and report them as spam.
    5. Avoid using terms that spammers like. You know the one’s I mean. I’d mention it here but it would ruin my blog’s ranking. 😀
  • EmpireAvenue.com is Addictive

    {EAV_BLOG_VER:b09730a5ab0973e6}
    I’m currently hooked on this virtual stockmarket for Social Media: empireavenue.com.

  • Fake User Wins Instagram Contest

    What’s a fake user? What’s fake?

    On Instagram, the photo-sharing social network for the iPhone, I caught eye of a drama that’s unfolding right now over who is a fake user and a real user – not to mention the distinction between fake photo and real photo.

    Here’s the blow by blow.

    • User @sunshinepeyton starts posting pics that are not her.
    • User @chicago has a contest which the fake account won.
    • Other folks start getting accused of being fake, e.g. @jakec223 , and starts the #iamnotfake tag.
    • @chicago calls out the faker. See below.
    • Users start posting photos of themselves with text to try and show they’re not fake, e.g. “My name is Jake @jakec223. I am not fake.”

  • Quora’s Troll Proof Trade Off

    I wrote an answer to a question using scientifically backed up data on Quora.

    The result? My answer is totally at the bottom. Who’s on top? The Internet Famous.

    Quora does a good job of giving you troll-proofed answers, but after Scoble burst onto Quora’s scene it’s not obvious that troll-proofing comes at the expense of a decent well-thought out answer with backed up data and a reputable reference.

    So what is quora good for, or rather what’s in it for me? If I want a well-thought out, quotable sound byte that has to come from someone famous, this place is pretty much it. But if truth should, God forbid, come from someone like me still trying to make a name for himself, then ya, Convore is the place to be.

  • I lost 7 pounds in 2 weeks with the 4 Hour Body Slow Carb Diet

    At the end of the LA marathon, I was a healthy 165, but my foot was busted. There’s a stress fracture on my 4th metatarsal on my left foot and I’ve got to keep it flat in a wooden boot until it heals. I can’t even swim, since the water would flex my foot.

    At SxSW, I went to Tim Ferriss’ talk on his new book, The Four Hour Body. I didn’t feel I really needed the book, but when I ballooned to 172 in less than a week, that gave me pause.

    Weight on 3/28: 172
    Weight on 4/08: 165

    I didn’t work out except for doing some squats. On cheat days, which is Saturday for me, you can eat whatever and as much as you want: chocolate croissants, pringles, ABB Carboforce, protein drinks, steaks, ice cream. I love Saturdays.

    Here’s the diet I followed and each meal except for the sardines and carrots made me full. I spent about $50 on groceries and $50 on lunch per week. $100 / week isn’t bad on a mostly protein diet.

    3/28 - Monday
    Breakfast: steak, 3 eggs, spinach
    Lunch: chipotle bowl - no frills
    Dinner: Chicken, Mixed veggies, Black Beans, Yogurt (nono)
    
    3/29 - Tuesday
    Breakfast: steak, 3 eggs, spinach, glass of milk (nono)
    Lunch: chipotle bowl - sour cream and cheese (nono)
    Dinner: swordfish steak, mixed veggies, black beans, yogurt (nono)
    
    3/30 - Wednesday
    Breakfast: 3 eggs, spinach, swordfish steak
    Lunch: chipotle bowl with salsa and avocado
    Dinner: chicken, mixed veggies, black beeans
    
    3/31 - Thursday
    Breakfast: 3 eggs, beef steak, spinach
    Lunch: tofu, asparagus, veggie chili, brocoli
    2nd lunch: carrots, sardines
    Dinner: red wine (free), swordfish, mixed veggies
    
    4/1 - Friday
    Breakfast: spinach, swordfish
    Lunch: chipotle bowl with salsa and avocado
    2nd lunch: carrots, sardines
    Dinner: red wine, steak, mixed veggies
    
    4/2 - Saturday
    Went nuts and ate all day
    
    4/3 - Sunday
    Breakfast: 3 eggs, chicken breast
    Lunch: steak chipotle bowl - salsa, lettuce & guac
    Dinner: lentils, chicken breast
    
    4/4 - Monday
    Breakfast: 3 eggs, chicken breast
    Lunch: steak chipotle bowl - salsa, lettuce & guac
    Dinner: lentils, chicken breast
    
    
    4/5 - Tuesday
    Breakfast: 3 eggs, lentils, chicken
    Lunch: steak chipotle bowl - salsa, lettuce & guac
    Dinner: salmon, asparagus, beans , redwine
    
    4/6 - Wednesday
    Breakfast: lentils, spinach, chicken
    Lunch: barbacoa chipotle bowl - salsa, lettuce & guac
    Dinner: blackbeans, mixed veggies, steak
    
    
    4/7 - Thursday
    Breakfast: spinach, lentils, steak
    Lunch: steak chipotle bowl - salsa, lettuce & guac
    Dinner: steak, blackbeans, mixed veggies
    
    4/8 - Friday
    Breakfast: steak
    Lunch: salmon, asparagus, beans , redwine
    Dinner: steak, blackbeans, mixed veggies
    

    I lost a surprising 4 lbs. the first week, but only lost 3 lbs. the second week. I’m pretty sure the 3 lbs. was due to not having the 2nd lunch as recommended. I also measured my body fat with calipers: 24% – 20% body fat.

    The first week was pretty difficult but the 2nd week it’s been no problem at all. I can also tell when I’m in ketosis because there’s a slight metallic taste to my mouth and my breathe seems sweeter to the nose.

  • 4 Tech Tools for Marathon Training

    I finished the LA Marathon on Sunday in 6 hours and 30 minutes. Walking the whole thing straight would’ve been faster, and I was on track for a 5 hour and 45 minute marathon, but my foot blew out in the last 4 miles. There were lots of things that almost derailed this marathon, but I’m glad I did it. All the hard work paid off this time.

    Hopefully, it’s nothing more than a muscle injury and not a fracture. I’ll find out soon.

    There are 4 tools that really helped me out. I’ve tried a dozen tools but these 4 turned out to be the best of the lot.

    Runkeeper was by far the best for daily use. I’ve tried different apps and even got a GPS enabled watch, but Runkeeper proved itself to be quite a bargain at around $10 USD .

    Next up is the free Marathon Coach app by Running Method. It’s free but shouldn’t be used as a stand alone since it’s GPS features are quite buggy. However, the synergy you get when used with Runkeeper is excellent.

    Tim Ferriss’ book, The Four Hour Body, really helped me out a bit. I experimented one week by reducing the amount mileage by 75% of my midweek run and replaced it with sprint work. This sprint work was provided by AccelerateSF at Kezar Stadium. These guys are great and train you for $5 / session by experienced marathoners and track runners. The result was a fast (for me) weekend run where I ran 10 miles in 2 hours and 5 minutes vs. a previous 2 hours and 10 minutes. What’s more is that this speed gain pretty much remained with me throughout training.

    Rapid carbohydrate loading after a short bout of near maximal-intensity exercise is the last piece of technology that helped me. I didn’t hit the wall at all during the LA Marathon by following this program.

    There were a few mistakes I made during training:

    • Be sure to keep your nutrition levels up. I had a zinc deficiency that led to an infection. I did not eat enough protein or consume enough calcium in the beginning. The requirements for these double during training.
    • I think the reason I got injured was because I didn’t have the year of running that is required as a base prior to any marathon training.

    Marathon training is quite the commitment but I’m glad I did it!

    (I also raised money for the American Heart Association as part of my marathon participation.)

  • Jim Barcelona, Ruby Rockstar

    The term “rockstar” is much maligned in tech circles when applied to job descriptions.

    Another sentiment told with utter sarcasm:

    Any job description which contains the word, “rockstar,” must also disclose the salary offer.

    -Steve

    @jangosteve
    And to round things out:
    There’s nothing more ridiculous than job ads requesting a Ruby rock star. — Giles Bowkett
    Since the term is so maligned, I’ve decided to take it. Like a day trader attracted to something at it’s lowest buy point, I’m attracted to the term, “Rockstar.”
    My guitar skills aren’t that great. If anybody should be worthy of the term of Ruby rockstar it should be Zed Shaw for meeting the terms figuratively and literally. He plays guitar in an awesome way in the streets and he’s a great coder.
    I wrote an email to the SF Ruby Meetup List in jest that was written in the alter ego of a Ruby rockstar. I was poking fun of a combination of stereotypes dealing with coders with egos and rockstars with egos.
    The businessman in me thinks it’s such a shame that folks don’t own up to the moniker. Since others won’t; I will. I’m Jim Barcelona, Ruby rockstar.
  • Upgrading To Rails 3

    Here’s how I upgraded Sitebeagle.net to Rails 3.

    1. Go into your site’s Rails directory and install rails_upgrade:

    script/plugin install git://github.com/rails/rails_upgrade.git

    Run the following commands and follow the instructions:

    rake rails:upgrade:check
    rake rails:upgrade:backup
    rake rails:upgrade:routes
    rake rails:upgrade:gems
    rake rails:upgrade:configuration

    2. Make sure that your version of Ruby 1.9+ has iconv working.

    Mine didn’t, so I went through this process:

    rvm package install readline
    rvm package install iconv
    rvm remove 1.9.2
    rvm install –trace 1.9.2 -C –with-iconv-dir=$HOME/.rvm/usr

    to test:
    irb
    require ‘iconv’ # should return true

    3. Upgrade to Rails 3: gem install rails

    4. Start migrating to Rails 3: I branched my site using git and went into my Rails root directory and typed:

    rails `pwd`

    Use your best judgment on what can and cannot be over-written. Here’s my list:

    * let rails overwrite?
    * overwrite rake file
    * overwrite application_controller.rb? yes but copy
    * application_helper.rb ? yes
    * routes.rb ? yes but copy
    * environment.rb ?
    * make new initializer for contants
    * config.gem? copy and put into a Gemfile
    * application.js ? only if confident in js
    * scripts? overwrite all

    5. See if stuff works:

    rails server

    Twitter-auth broke for me, so I had to update it to work on Rails 3 using this guide:

    https://github.com/benders/twitter-auth/compare/master…rails_3

    How’s your upgrade to Rails 3 go? Let me know in the comments below.

    Update (14 January 2011):

    Chris Laco wrote up this great guide to upgrading Rails 3 on Dreamhost. It solves path problem issues with gems.

  • 4 Cool Things That Happened at Super Happy Dev House LA

    On Saturday, November 6th, a little less than a score of coders gathered to geek out at Collecta.

    Here are 4 cool things that happened:

    1. The Gowalla guys stopped by. I learned this from @dthompson.
    2. Somebody made a really addicting game based off of Wikipedia called The WikiGame, and shared it with us.
    3. Node.js is really cool and @twonds has a cool project called Noylitics but he’s focused on Erlang now. I had a fun time hacking on it.
    4. Pizza with the bagel crust was great. It was from Abbot’s Pizza.

    I’m hoping there are more events like this in the future. Were you there? What did you like about Super Happy Dev House LA? Any suggestions fora future event?