At the Dance

When I was a younger kid, I would watch different shows with my parents. A couple of these shows had a similar gag. The Muppet Show had a segment called “At the Dance”, which was similar (a homage maybe?) to Rowan and Martin’s Laugh-In cocktail party segments. These segments were great for the one liners, quick jokes, and rapid sequence of conversations. This was great for a viewer and for a kid, well at least for me as a kid, it was funny and interesting.

Muppets: At the Dance
Image from Muppet Wiki

As all young children do, I grew a little taller and started to age through the elementary years until I got to the junior high stage in life. It was the first real time I would be able to participate in a “At the Ball” segment in real life. My friends and I thought this was going to be so much fun. Then we arrived at the dance. The horror set in that we would have to dance with a girl, which up until recently in my life at that stage, had been “icky”. We saw one of our friends dancing with another young lady and when the dance was over, he came back to “our side of the wall” and then got it. Everyone over in our area started to tease him, recite the silly childhood chants of “kissing” and ending in baby carriages. This just made me more unlikely to dance with anyone else. And soon, I found myself in the reality of being smack dab in the middle of a Muppet like segment where I watched others have conversations. I would occasionally say something if I was close by, but it was awkward and usually ignored. At times it did feel like I was left out, and the fear of being ridiculed was too much for me to break free.

Luckily I was able to play football to help me ignore those moments. But junior high soon ended, and high school began. It did not get any better. During the freshman years, many of my friends soon had “others” they would rather hang out with. Their conversations revolved around these type of activities. Ones which I was rarely involved in. Dances were no longer the only times that seemed like the Muppet segment. Now it was in regular times in-between classes, before school, and after school. I would say something. Some times, it seemed like the “parrot” of the group, saying the same things over and over, or repeating what others had said. Sometimes it was witty, and the group would laugh, maybe focus on that for a few minutes, then go on discussing the different events of the past weekend and the upcoming weekend. I knew I could no longer be the social leper of the group.

Punch Out
Do your comments result in this?

It was not just being able to say odd things, or random thoughts in the social circles I traveled with. That usually resulted in a not too pleasant backlash. OK, maybe not as harsh as the picture indicates, but simply saying anything was not enough. Being witty was not enough. Being a joker was not enough. This did not sustain meaningful conversations, and my ultimate goal: being able to take a girl out on a date, maybe even to a dance. High school brought many opportunities for that. Some people may have thought it a waste of time, or remained scared of what others would say. That was not my fear. My fear was being shot down. I no longer wanted to be on the peripheral of the conversation, I wanted to be able to participate and drive it. This led to many other things, as I saw my friends who did this, they always seemed to have dates (and bum money off me). I wanted that.

I had to break out of my shell. I needed to understand that sometimes, I will strike out. Some girls may say no to me (and they did often). I was tired of watching “At the Dance”, I wanted to be part of it. I hung around my friends, I knew the different things they did, I wanted to be a part of that. Too many of my friends got a head start on me, and I had to play catch up. It was possible, all I had to do was understand that I would not always be the center of attention. But I could contribute to this. If I offered something of interest and was able to interact with others, it did not matter if I brought up the topic, or just participated. I was no longer just throwing out random thoughts in a crowded room, I was getting involved with others. Soon my social circle grew, and more people knew who I was. I was no longer the “odd shy one over against the wall”, I was a human being human with other humans. I learned from them, got to understand them, and they understood me. This led to more dates, and more dances.

I was finally not just watching “At the Dance”, I was part of it. I was able to interact. Instead of talking to other people, I talked with them. Instead of just spewing out random items, or saying the same thing all the time, I was able to interact and understand others. Sure I made mistakes along the way, I am sure everyone does. But in my social circle, people knew and understood me, as I did them. When I did stumble, I did not cry over it, and let despair sink in. Pick yourself up, dust yourself off, and get back in the game. it was more enjoyable when I actively engaged others, rather than just watch their conversations go by.

Sometimes, companies experience the same thing when approaching social media. Is just being “At the Dance” enough, conversations whizzing by, maybe mentions of the company or its products, and the occasional shout out to the noise in the room?

Update to comments

Just a quick note, and then maybe another post later today. I changed around the comments of this site to use Livefyre. Having two comment systems (Intrinsic WP comments and the Facebook comment plugin) was just a little too much. If you had comments in older posts and now they do not appear, this would be why. All comments now go thru Livefyre. Hopefully this will help the interaction of the site grow a little more.

Data Model Relationships – CakePHP’s HABTM

For today, lets dive back into some code, well data modeling at least. When you set up an application that connects to a database, you need to understand the data that will be working in the application. This is the data that will be edited, added, read and even scrutinized int he application. When looking at the application data, one could easily put all data in a table and make it as flat as possible. We could normalize it until the cows come home as well. What is the best choice? My vote is always plan for what is best for the application, and the future of the application. When it comes to data, a more normalized data layout is always going to provide better performance and better ability to scale in the future. In our little example application, we are going to model the data for an online movie rental inventory. We will take an example film: Gran Torino to help the example model.

The data we need for this application includes some basic information: movie title, genre(s), stars, directors, writers, story information, rating, release year, rent price. We can include a lot more data if we really needed to, but for the purpose of this, we will keep it a little simple. A possible way of modeling this data is to create a table that stores all of this information, and have one table in the database. But now when we need to add something else, we have to add columns to the table. For example, in a few months the company decided to add related titles, sequels and sets, etc. It would require a refactor of the data in order to handle this, as well as refactor of the code. So lets split this out.

In the image below, I divided the content based on a few things: Title data, Talent Data, Genre Data, Rating Data

Starting the data model design
Starting the data model design

I now have the four main tables, but we need to figure out how these are related. First lets tackle the Rating Data, as that will be a simple design. I am linking to the IMDB so you can look at the data. The ratings available in the United States, at least the ones we will include, are: G (General Audiences), PG (Parental Guidance suggested), PG-13 (Parents strongly cautioned) and R (Restricted, no one under 17 allowed without a parent, or as I call it, PG-17). So each rating will be housed in this table. We will need an identifier, the rating, the explanation, and some data to track creation and modification. We do not need those last two, but it is just good practice to include those if there is ever going to modification on data. Using our example film, it is rated “R”. And since any film title object (Titles) will ever only have one rating (for the sake of this example) there is an easy relation of a hasOne relation to the Ratings table. We need to add a foreign key to the Titles table and connect these.

hasOne Relation to Ratings
Title hasOne Rating

Easy to connect those. Now, we need to tackle the Genres. This is a little more complicated, but we can get through this. The Genres table will house the genres we need to display. This list can be as big or small as needed. Our example movie is in the “Drama” genre according to IMDB. However, in our application, the business has decided the movie is classified as Drama and Action. So now a title is going to have many genres. And a genre can belong to many titles. The “Drama” genre may belong to multiple titles. So we can not just add a new column to the Titles table, as that will not satisfy the requirements. We need to add a connecting table, and according to the naming convention of CakePHP, the name of the connector table is the alphabetical order of the two tables it is connecting.

So we need to add a table titled “Genre_Titles”. It will have an ID, and foreign keys to both tables.

HABTM Genres
Connecting the Genre and Title tables

Now we are almost done with the HABTM set up. We made it through one of them, and that was a good thing. See it was not so difficult. Now, we need to finish this up, and connect the talent table to the title. Talent can be anything. Since the company wants to display the stars of the show, the directors and writers, we need to be able to connect these. And again, this will require a a HABTM relationship. An actor can be in many titles, just like Clint Eastwood, as he was not just in Gran Torino. So he may be listed in many titles. And, with this movie, he not only stars in it, he directed it. So now we not only need to match up this talent, we have to identify it correctly. So this adds a little complexity to this, but we can do this.

As you know from the previous example, we need to create a connecting table. The name would be “Talent_Titles”. But that still will not solve the issue of identifying Clint Eastwood as an actor and director in the title. We can add a new table “Talent_Types”. This will be a “lookup table” that houses Star, Director, Writer as values. We can then connect that to the connecting table. This relationship will be a hasMany to Talent_Titles, as a star may have many entries in the Talent_Title table.

HABTM Talent and Title
HABTM Talent and Title

And that is the HABTM design. Using the Bake method, you can now bake this up, and set up the model. The thing to remember about the HABTM, it is not something to fear. Usually, if a connecting table is needed, you have a HABTM design. Remember to think in human terms when examining the data model. What does this belong to, what does it have. In this, the Title will have many actors, directors, etc. And the actors, directors, etc will belong to many titles.

Online Identity

I got to this link from my Twitter feed, following @AdamSinger: 4chan founder: Mark Zuckerberg is “totally wrong” about online identity. Before I get into the meat of the article, for those who do not know what 4Chan is (and I am assuming that everyone knows Facebook): 4Chan is an image based bulletin board. Users do not need to register and can comment and participate anonymously in any topic. There are global rules that are enforced, and following those rules, you can participate while keeping a relatively anonymous profile. Some topics can get quickly out of the NSFW arena and has led to 4Chan being very controversial.

The article examines comments made by 4Chan founder Christopher Poole at SXSW. He gave his vision for an online community. This is in stark contrast to Zuckerberg’s (Facebook) vision of online communities. Zuckerberg believes in one identity everywhere online to encourage honest and authentic interaction. Poole’s idea is completely the opposite, he believes in more of a anonymous format that allows for a more raw, untarnished interaction. When people do not know your entire history, you are more likely to experiment and not worried about failing and having that follow you around on the web.

Both parties have an interesting point. So what is the middle on this? I am not sure. On one hand, I am very much for accountability online, and having that sense of online citizenship. When people are anonymous, they tend to be more quick to anger, and quicker to lose values and morals when discussing anything. It is like everyone becomes the Incredible Hulk online when someone disagrees with them. If they had to display their true identity, would they continue to act that way?

But anonymity does allow others to start over. if they screwed up in the past, no history follows them around. They are free to start over. It also allows them to take a few chances. It helps heal old wounds they may have sustained from other internet spots. Content, uploads, images, etc all can be redone in a different fashion.

So what is the best way to do this? I am not sure, but I am sure it is somewhere in-between what Zuckerberg believes and what Poole believes. In social marketing, it is key to not let a “human” moment cause a ton of problem. When creating new social content, be courageous, experiment and take calculated risks. If you mess up, take it lightly, and do not get too upset. Do not immediately turn into a raging green monster, but instead take a turn to laugh at yourself. Remember the Red Cross Twitter flap? They handled a “human” moment well, laughed at themselves, and moved on.

What do you think is the better approach, anonymity or exposed identity?

Social Media and Crisis

With the recent events of the 8.9 earthquake in Japan, news traveled fast, and it was just not second or third hand accounts. it was live, it was real, and it brought you into the middle crisis. I do not post this to take away from the real horror and tragedy of the people who are personally in the middle of this, because this is not the intent. I was up doing some work and then on my Twitter stream I get notification of an earthquake happening. Soon, images came of the event, then the video. Then the tsunami images and video. I thought about what was actually happening, and the fear and shock of the people. I did not have to think too hard on this either. I saw it in their faces. The cameras caught all the action, all the emotion. And social media is bringing this out to the world. As the people in North America started to wake, it spread. Some people on the West Coast were already preparing to head for higher ground before the alerts sounded and the authorities started to evacuate the seaside towns.

Google snapped into action using their Person Finder again:
http://www.google.com/crisisresponse/japanquake2011.html
This can help people locate each other, or provide information of people they do know. On this page, they even have a YouTube video of how the quake affected a couple of local residents.

Wikipedia already has a page on the disaster. This includes information about the quake, the resulting tsunami and the international response.

With Twitter, you can see the timeline for the hashtag #japan, #Sendai and others. Providing images like this, news, information and location of others. Facebook is another area to get more information from the various pages and people.

This does not include the cell phone images and video people are taking, posting to YouTube, TwitPic, and others. Social Media is connecting the world right now. People can see the horrific devastation up front.

There are many ways to help, and if you know of any, please let em know. The Red Cross address is below:
http://newsroom.redcross.org/2011/03/11/disaster-alert-earthquake-in-japan-tsunami-warnings/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+RedCrossOnlineNewsroom+%28American+Red+Cross+Online+Newsroom%29

For all my friends and colleagues and readers in Japan, know that out thoughts and prayers are with you.

Facebook Social Plugins

So I was doing something for work the other day where I was incorporating some Facebook social plugins. They wanted the Facepile, the Like button, the Activity Feed. All are very easy to implement. They do not require any type of Application for the generic install of the plugin. Facebook makes it even easier for one to add these because on the site, they provide a very nice interface to enter all the data in, and get the code. Those links are below:
Facepile – http://developers.facebook.com/docs/reference/plugins/facepile/
Like Button – http://developers.facebook.com/docs/reference/plugins/like/
Activity Feed – http://developers.facebook.com/docs/reference/plugins/activity/

Each item listed above is easy to integrate, and can be extended in its own way. if all you need is a quick implementation of this, then just go to the Facebook site, enter the data, grab the code and paste on the site. And you are done. Each item is a little different in how you can modify the plugin. A couple of examples I have created are found at:
http://www.hirdweb.com/examples/items.php

Really quick overview of the three:
Facepile
This one does not have a lot of other options available. This will show only your friends who have liked the same page/URL. It will not show all people, only your friends. If you do have an Application registered to Facebook, then you can enter the application ID to show who has connected to the application. The same principles apply, but the message displayed is a little different: “Friend Y has connected to Application Z”.

Like Button
This is the button, not the box, where you can have the Like or Recommend displayed. The nice thing about this button is that it can also be localized by passing the proper language locale set in the code.

<script src="http://connect.facebook.net/de_DE/all.js#xfbml=1"></script>
<fb:like href="http://www.facebook.com/pages/Hirdweb/140356864345" layout="button_count" show_faces="true" width="450" action="recommend" font=""></fb:like>

And from my own experience, only one language can be displayed on the page. In the example, I created iframes for each button using the XFBML on each page. And to maximize the effectiveness of the Like button, make sure to complete the Open Graph Tags to help tag the site. In my example, all are pointing to the Hirdweb Facebook Page. Using the Open Graph will also help when the user shares the page, add comments when they like the page, etc. It can also help to grab data on the page, and make sure to read up on the Open Graph API.

Using the XFBML you can also do some other items when a user clicks the button, using the JS API. In my example, I am just using as very simple pop up alert box. To do this, you must be using the Javascript SDK/XFBML implementation of the Like button. This is captured by the Event.subscribe method, passing the param of edge.create.

<script>
FB.Event.subscribe('edge.create', function(response) {
  // do something now that they like the page
  alert("Thank You for liking this page"); 
});
</script>

Activity Box
Much like the Facepile, this one is easy to implement, using XFBML or iframe. Like all other social plugins, this one can be modified for the locale if you add the correct language locale in the code.

script src="http://connect.facebook.net/sv_SE/all.js#xfbml=1"

. This plugin also has the ability to track what plugin generated the activity on your site. By adding the ref variable in the FB tag, it will track this.

And just in case you forgot, here is the link to the examples:
http://www.hirdweb.com/examples/items.php

Thinking of the site

So as I am sitting here trying to get caught up on the StephenHird site, I am thinking a little more about it. It seems like it is just a huge issue right now and am not able to complete what I really want to complete on the site. So I may make an executive decision to abandon the code (not destroy it, but abandon it and store it safely if I want to use it again), start over from scratch, again using CakePHP, and the Facebook Graph API. This would be a little less intense, and would contain an easier example of how to get some data out there, and still include the Graph API in order to show examples of how to do this.

I still think the idea of the resume integrated with the API is a good one to show an example, but I am finding myself with less time to do a full blown app for it. And I figure, if I do a small example, that should be enough, and there is always the documentation available at Facebook for this. So if you have been following the Graph API integration, it still will happen, just in a different form.

Facebook and Personal Data

As I was perusing the web, one of my favorites spots is Mashable. They had an article titled “Facebook Will Continue To Share User Addresses & Numbers“. The article covers the announcement on January 14th, and the follow up on January 18, by Facebook that they will now allow 3rd party applications to access contact information like cell numbers, addresses, etc. Following an uproar by certain groups, and some Congressional leaders, Facebook has put this enhancement on hold, but not killed it. As part of the response, Facebook has even made their own privacy policy more user friendly and understandable by the non lawyer people. This has not stopped certain groups from decrying this and claiming that Facebook is not protecting privacy of its users.

I beg to differ. Facebook is providing a free service to half a billion people. This service has provided a valuable avenue for businesses, entertainment and non profits, among others. But nowhere in any part of this did I ever read that people are forced to share their information. It is about some common sense when going about browsing on the web, whether it is on a social network or not. If you do not want to have applications know your address or cell phone, then do not put it out there for them to grab. When a 3rd party application is asking to use your Facebook account to connect, you do not need to share your data. Never rely on other applications to protect your data.

And on the flip side of this, the 3rd parties building a Facebook engaged site/application, be open and upfront about what information they are wanting to collect and why. Establishing a good bond and trust with the consumer base is huge. And if you want to access their Facebook data, then let them know what you are going to collect and why you are going to collect it. Usually it is not a huge deal, and many people will allow it. Obviously if you are phishing their data to sell the contact information to telemarketers and other mail marketing streams, then you will not be allowed to have your Facebook application for long. 3rd party application builders have to live by certain standards established by Facebook. So if you want to build one of these applications, then follow the rules, and remember the customer.

After reading this article on Mashable, I can see why people may be concerned, but I think it is a hollow concern. Be aware of what you are doing, do not enter your contact information if you do not want to share it, and just use common sense. If someone really wants to get your address and cell phone number, it is really not that hard to get it.