• Left Brains.

  • Right Brains.

  • Brand Soul.

Monthly Archives: January 2012


Knowledge Nuggets

Posted on January 20, 2012 by Christian

Anyone who has done development, design, or IT knows that over the course of working on a project, you collect various "nuggets" of knowledge that you ever learn or find. Here I'm going to share some of what I've discovered that may be able to help you in your own projects. I have cited the original source of the information if I have that available. If there is something that I've left out, feel free to add it in the comments.

"Fatal error: Out of memory..." occurring when PHP and Apache memory limits seem fine

This problem drove me crazy for a little while. I did everything that I thought I needed to do, I changed the php.ini file to increase the php memory available until I ran across this link which provided the answer. We are using WiredTree as our hosting provider, for their servers, the problem was fixed by simply adding: RLimitMem 128000000 to the .htaccess file in the www root directory. After doing this, it fixed everything.

I keep getting Notice: Undefined offset: 1 in views_block_view() in Drupal 7

After doing a bunch of operations during prototyping a Drupal 7 site we kept this error. There wasn't anything that we seemed to be able to do to eliminate it from the Drupal administrative interface. After searching the web for quite some time I came across this page: http://objitsu.com/node/29 which gave me all of the information I need. From the article:

It's caused by stale records in the block table that then fail to resolve. There's plenty of reading material out there and suggested fixes etc. that I am sure work but once I knew what the problem was I applied *my process* for all Drupal problems like this.

  1. Find the code that issues the message..
  2. Trap the code and drupal_set_message() the offending item
  3. Use that information to fix-up the database / code as required.

Here's how the fix works for this particular problem. In my case I edited views.module, line 569, here's the code that was causing the notice to be show:

list($name, $display_id) = explode('-', $delta);

and here is what I added to the code to find out what the duff delta in question was...

if (count(explode('-',$delta)) == 1) {
list($name, $display_id) = explode('-', $delta);

All I did then was refresh the page, take a note of hash value that was displayed and then cutting-and-pasting it into a command line MySQL session I issued this query:

mysql> delete from block where delta = 'd98a0bfa5a33e7d8bab0fc0670bdc9fd';
Query OK, 4 rows affected (0.01 sec)

Which took out all four problem pages at once.

What are the command line commands for git?

We use git for source control of our iOS projects. I found a great cheat sheet of git commands here:
Git Cheat Sheet.


Blogging Anxiety

Posted on January 6, 2012 by jstratton

You've been there, you set yourself goals for how often you will blog, maybe it's even a New Year's resolution.  Yet it never fails that the time in between each post sneaks up on you  - "Oh No, has it been a week already?".  I've been there, and this is from someone who would much rather strike up a conversation with a stranger than to type out what my brain is thinking.  So here are my top 3 nuggets of wisdom on how to keep the blogging passion alive.

First - "Start lots of drafts".  I have found that it is much easier for me to jot down lots of 1-3 sentence draft blogs first.  Then, as my deadline draws near, the completion of any one of my drafts is much easier.  Plus, you don't have the added stress that comes with a deadline without a starting point in sight.  This also helps me grab those ideas as they come up. Sometimes you will attempt to finish them only to find out they where horrible ideas - Just hit Delete.  It's all part of the process.

Second - "Start a Motto", mine is "I could write a blog about that".  Once I started saying it to myself, then I had too many ideas.  It took me about 10 days to fine tune my motto, but it truly made me more aware of daily great stories to talk about.  And yes, some are work related and some are not, some are good ideas and some are not.

Third - "Talk in your own voice".  Too often I read blogs written in a manner that doesn't seem to fit the author.  Of course you need to fix the typo's but don't let yourself blog in the a voice that is not your own.  For more on this see my other blog "Whats Your Voice?".

I hope this helps you overcome the impending stress of that next blog.  Make 2012 your best blog year ever and if you have a routine or something that helps you hit those blog deadlines, we'd love to hear them.  Just comment on this post or email them to me.  Happy Blogging from Force 5.


Second Visit Treats!

Posted on January 6, 2012 by jstratton

One Sunday last month, I started my day off with a vente iced vanilla latte with soy and double shot at 7:45am.  Yes it’s true; I am the only farm boy I know that loves Starbucks and all things gold card. To my surprise, the cashier asked if I had heard about “our Treat Receipt?”.  The bottom of my receipt read “Your cold grande drink for $2! Show this receipt after 2 p.m. and get any cold grande drink for $2 (+ tax if applicable.) Participating stories.  Same day only.)” So of course I took them up on the offer at 2:15pm for a second wind caffeine fix.  The Sunday to do list practically checked itself off with that much caffeine in my system.

Bottom line, Starbucks got $2.00 more out of me because of the treats.  Just imagine if you could get the same customer inside your location twice in one day or twice in one week or even twice in one month. How much would it cost you to invite them back? How much incremental revenue could you gain?  How much do you stand to lose over the lifetime of a customer who feels un-welcomed in your location?

The idea is simple, but developing and implementing the plan can be a challenge.  In this case, the cashier knew the program, engaged me by asking “Have you heard about our (fill in the blank with your treat).” and most importantly, she took ownership with a smile.  I was already a Starbucks lover and now it’s gone to the next level.  If you would like a partner to help you develop and implement your “treat”, you know who to call - Force 5.