DigiThoughts

Computed Columns in SQL with ActiveRecord and Rails

September 17, 2009 by Dylan Vaughn

Consider the following scenario.  You have a blog application, which has users, who have many posts.  Posts, in turn, have many comments.  Comments must be approved by the post author, so therefore can be in one of the following states, 'pending', 'approved', or 'denied'.  In the admin interface, you would like to display a paginated list of users, sorted by the number of 'pending' comments are associated with their posts.  How can you ask Rails for this information?

Typically, when wanting to operate on roll-up counts of related objects, such as how many users are in a group, or how many comments belong to a post, Rails would suggest that you use the counter_cache option in the association:

class Comment < ActiveRecord::Base
  belongs_to :post, :counter_cache => true
end

Read full article

Turn Your Marketing Into A Product, Not Just A Process

September 10, 2009 by Dan Huss

 

Marketing as we know it is changing. Typically marketing has been focused on the sole task of promoting a product, with whatever end goal the marketer had in mind (i.e. generating awareness). To do this, marketers began distributing their messages via different media channels. Soon however, marketers found that their own message was getting lost among their competitors’ messages. This phenomenon became known as “clutter.”

To combat this, marketers attempted to break through the clutter by creating compelling messaging that caught our (the consumer's) attention.

In that sense, marketing added value to our lives through the entertainment it provided us. A wonderful example of this is the “Real Facts” located under the cap of a Snapple bottle. In addition to purchasing a cool, refreshing beverage, the consumer receives a small amount of joy from learning that, Giraffes can lick their own eyes.” Real Fact #214.

Read full article

Last Chance! Vote For Digitara At SXSW'10 (Unless You Hate Puppies, That Is)

September 03, 2009 by Reena Leone

Only 2 more days to vote for Digitaria to be at SXSW!!

This is Olive. Olive is quite an Internet savvy dog (Facebook page, Twitter account, etc), she knows what she is “talking” about. Typing isn’t really her strong point though. Since Olive’s lack of fingers prevents her from logging on to http://panelpicker.sxsw.com/ideas/index/interactive/q:Digitaria she wanted to make sure all of you vote!

Vote for Dan and Gilbert to speak at SXSW. If you don’t, it means that you don’t love puppies. And really, what kind of person doesn’t like puppies?

Read full article

Digitaria Moving Day Mayhem

September 02, 2009 by Adam Storr

 

If you stay in one spot for too long, the inspiration and creativity will more than likely wear out. Since they love to keep people's minds fresh, Digitaria likes to have a bi-annual moving day.

Today, I just happened to walk into this mini-mayhem of 85 people, 85 computers, 14 rooms, 2 floors and many speedy hands and feet. I thought I'd share a snippet of Digitaria's moving day with you through the eyes of my handy little iPhone. It certainly gave me a laugh!

Read full article