Riddle Me This

Ok, for Friday I thought I would post a few riddles to help me wind down from the week.

After a very long day of work, a man goes to bed. Before he went to bed he wound his clock and set the alarm for noon the next day. If he went to sleep at 10 pm, and fell asleep immediately, how many hours of sleep did he get?

What occurs once in every minute, twice in every moment, yet never in a thousand years?

A man without eyes saw plums on a tree. He neither took plums, nor left plums, how can this be?

A man pushes his car to a hotel and loses his fortune. What happened?

A woman and her husband are together. The woman shoots him, then drowns him, then hangs him. Five minutes later they walk out the front door to grab dinner and catch a play. Can you explain this?

An island is in the middle of a lake. The lake is old and in a remote part of the country. Bridges to the island, there have been none. There is a tractor on this island. This tractor provides hay rides around the island. The tractor was not transported to the lake by plane or boat, so how did it get there?

And if you have a good riddle to add, please share.

Everywhere and Nowhere

The Desert
Courtesy of Ducklips Photography

Ever get the feeling that the internet is everywhere and nowhere? Have you ever tried visiting the Internet in person? How many people have achieved this goal, (besides anyone from the Matrix)? In reality, the internet is just a long set of cables, switches, routers, firewalls, etc. Not too exciting of a place to go. The “location” of the internet is not as important as your location. And this can mean you as a person, you as a company representative, you as a salesperson, you as leader. Each facet has its own little niche of things that can happen. Last night, I saw a new Pepsi commercial. A lady was on the beach and there was a very long line to the drink vendor/cabana. So she quickly got on the phone and put in her location (actually a little off of where she was) and that she just saw David Beckham at the beach. Everyone from this line gets the updates on their phones and run to try and find him, clearing the line so she could get her Diet Pepsi. Not all location check ins will have this affect, obviously. But as either an entity or person providing services/products, you can strive for that.

Two major events happened this past week, (actually three – the Royal Wedding, but that is not covered here), Osama bin Laden was killed and a local inadvertently tweeted the whole event; and Facebook and Assange are fighting over whether or not Facebook has let the government in the backdoor to spy on the Facebook community. Each one has a lesson for location services.

Continue reading Everywhere and Nowhere

I am Not All Alone In the World

Chicken - Ducklips Photography
Courtesy of Ducklips Photography

As I scour the web and read, I come across many different articles. One thing that has been in the news for some time now is the unrest in the Arab world, and the different demonstrations, and subsequent backlash from those events. But it is not just about politics, it is about using the social media to be more than a way to play Farmville or Angry Birds. I love the social media outlets just as much as the next person. It is fun, I love joking around with my friends. The Hirdweb Facebook page is another extension of this blog, and I use it to suit my needs. However, many businesses set up a page, then let it flounder after a few months. It is not enough to just set up a social campaign, or page, or feed, the company must keep it going. And that can be easier said than done.

Doing any type of campaign, whether it is a traditional spot, or a new social campaign, there needs to be some type of sustainable presence and interaction. Whatever the product or service, if you want the people to keep coming back, it has to be more than just “Here is my product/service! Hope you enjoy” type of message. Some campaigns do not provide products or services, they provide messages, movement, and reshaping ideas. No matter what the message is, no matter what the end result target may be, a sustained drive will lead to better success than a quick one hit and bail.

Continue reading I am Not All Alone In the World

You Did What?

Today’s topic is kind of short, but a very important one. If you are not living under a rock, then you know about Sony’s problem with their Playstation online services getting hacked and being down for some time. A new concern now is that this has exposed the credit card numbers of the membership. Something that can definitely cost some good will and trust. However, Sony is a major corporation, and can recover from this. Can your business, if something like this were to happen?

I still see multiple instances of applications (And not just PHP applications) where carelessness has overtaken common sense. The web is no longer just a set of reading materials. It is now more than that with interactive applications and a flow of data that travels in all directions. So why is it that a huge problem is a lack of security for this interaction? The biggest thing I still see is with forms. Multiple sites ask to sign up for something, like a list, and email notification, account to get in to the site, etc. And one of the most powerful things today is information. And this does not mean just credit cards and government identification numbers. These can include names, emails, addresses, cities, passwords, secret phrases for confirmation, etc. Harvesting this can lead to identity fraud, selling to spam lists, etc. Secure your forms! It does not take much time, and can pay off, especially for the small businesses who will not have the money or name recognition of the larger corporations.

Easier said than done, I suspect some are saying. Well, yes and no. This should not be an after thought it should be first. In the PHP language, functions exist to help in this. Some ideas for securing forms: mysql_real_escape_string, pg_escape_string. In fact, if you are using PHP, then make sure to understand the different options available for your database.

That is not all though. You should also use a parametrized approach for inserts and updates. A quick example of this:

$sql = "UPDATE sometable SET somefield = ? WHERE value=?";
$parameters = array($_POST['data1'], $_POST['data2']); 
$dbo->query($sql, $parameters);

Now that was not too hard was it? However, security is not something to pass over. You should understand what data you are collecting, and validate the data, and then securely save the data. Validating it can be as easy as making sure it is an integer value, email, certain number of characters. Items like that can go a long way to verify what you are getting is what you need, and will not harm your application. For example, if a form had a field for first name, last name, country, email address, you can safely validate those fields. First name, last name should only be characters. Those fields should not have special characters, numbers, etc. Email address should be validated against a regular formed email address. You can even go one step further to verify it is a valid email address and exists somewhere out in the cloud.

Big lesson though, secure the data. Secure your application. Do not let a shortcut become your Sony Playstation meltdown.

Measured for Success

Keeping in the theme from last week, every day will have a specific theme, and I will keep the same ideas of last week. So without adieu, here is this weeks plan:

Monday – Measured for Success; Planning ideas and thoughts
Tuesday – You Did What?; focusing on coding
Wednesday – I am Not All Alone In the World; ideas and code segments for people like me, social lepers
Thursday – Everywhere and Nowhere; examinations on location services, social integration and strategy
Friday – Riddle Me This; fun stuff to finish up the week

Birds Fighting Over Food
Image courtesy of Ducklips Photography

And today’s topic is figuring out what is the measure for success. If we look at last week and my posts, I wanted to have a post every day of last week, and I got through Thursday. I missed Friday, and that should have been the easiest one to do. So based on my own goals, was last week a success? I would have to say no. I put a goal of 5 posts in 5 days. I did 4 posts in 5 days, so I fell short. And that is what is important to understand when trying to plan a new application: what is the measurement for success, and can it actually be measured. When planning for an application, it is important to understand what will define the success of the application. It is much like a goal. It should be conceivable, achievable, measurable, and desirable (others do exist, but these are important when planning on gathering statistics). Another important part of this measurement is the fault tolerance allowance. This includes the level of error, or missing the set goal, that you are willing to accept. For this, let’s examine two different scenarios.

Continue reading Measured for Success

Focus on the Locus

Locus Curve
Locus Curve

Location services, good or bad? Well that depends on how it is used. If you you it to stalk other people, then it could be bad. It could also be a better way to stay engaged. Locus, defined as:
1. a place; locality.
2. a center or source, as of activities or power: locus of control.
3. Mathematics. the set of all points, lines, or surfaces that satisfy a given requirement.

In each of those definitions, it can apply to how individuals and companies react in the social sphere. Even extending the Math definition could help. Starting on the first definition, a place or locality, we can look at recent events to see how this plays out. Protests in the Middle East have been widely reported. Some countries shut down Facebook and Twitter and other sites because they do not want information getting out. By Tweeting or posting an update on Facebook, the people add locations and the world is able to see the events. The storms that swept the south of the United States and wiped out community after community. And location services played a role in re-uniting people, and being able to let others know outside of that area status updates. In the aftermath of the Japan quake, Google provided location services so people could be found and updated. Information flowing, connecting people is just one part of location services.

But it is not just about extreme conditions, or emergency services, it can be used for businesses. We can examine the hotel chains as a prime example. Their business model is to allow people to stay in a place away from home, and be comfortable (hopefully). Hotels needs to have rooms filled in order to make money. If rooms go empty, then it is hard for a hotel to make money. Hotels in larger cities are plentiful and more competition exists to fill those rooms. A new app available on the Apple line of mobile products, HotelsTonight provides a great service that some hotels have taken great advantage. This provides a way for people to get last minute deals on hotels in the city they are currently in. Imagine being in a city and having to stay over night because of a meeting that ran long, flight canceled, out for a night on the town, etc, and you need a place to stay. By using this app, it will provide different hotels with deals on empty rooms. If you ran a hotel in one of these cities, why not use this type of service?

And it extends more. At first, Twitter and Foursquare seemed like the perfect apps for college age friends to meet up, find out what is going on. I have friends in different cities across the United States, and it is funny to see them check in to different places and become “mayor”s of certain places. It is almost like a game of “King of the mountain” that we can play being in different cities, to see who can become mayor of most places. Foursquare provides more information as well. While traveling, we stopped in a restaurant. I checked in to to restaurant and found special deals for this place, and suggestions made by others who had been there before. Some places even offer discounts on the food when you check in at their location. We got a free appetizer for checking in at a local Greek restaurant. All we had to do was show them our iPhone with the check in.

lighthouse
Lighthouse

So why should this matter to anyone? It will not if you do not care about technology. Like it or not, we are becoming an increasingly connected global society. Location services, whether by a mobile application, or by web app, can help. It can help in times of needs, in times of trouble, in times for fun, in times for business. it your place, your locality. Use it for a center or source of activities, provide knowledge of your product. It can be used to help promote your product/service as the solution for the potential customers’ set of requirements at that location. When we start to look at the location services as more than a mere annoyance, and another method to engage and build customer relationships, it can become a powerful tool.

Ideas for the Social Leper

What
image courtesy of Ducklips Photo

Social networking, check-ins, friending, linking-in, and other items have made for an interesting world. Some people may see this as a purely consumer/individual niche, with only the younger crowd getting into this new fangled technology. The internet has been around for a while and people sometimes have a hard time seeing how these new social areas can have any meaning to the world. Good or Bad, these items are here to stay, and eventually evolve. Today we know of things like Foursquare, Facebook, LinkedIn, Twitter, StumbleUpon, and others to help us keep in touch with everyone, even people who are not really our friends.

But how can businesses take advantage of this? Some have tried, some have succeeded, some have failed. And still some, are reluctant to try this. One of the cases I saw with this I could not believe they were using social media this way to do a marketing campaign. As I always say, I am no marketing genius, but I do feel I know technology. This company had a product that they would market. They had a specific site set up for this product, and would try to highlight the different parts of this product. When it came to social media, the message was always the same. No matter which portion of this product was being showcased, the same message was being done on the social media outlets. And I am not talking about the same idea being conveyed, or the same thought. I am saying the exact same verbiage, for each time it hit the social sphere would be the same. I equated that to social spamming.

All Alone
image courtesy of Ducklips Photo

Imagine being around a person who said the same thing every time you saw this person. No matter what the conversation was, no matter what events were happening, this person would say the exact same thing every time you were around this person. Would you be excited to see this person? Would you start to ignore this person? And that is what one really needs to ask in these situations. I am sure we all have our “friends” (using Facebook) that we read their posts and just think, “I should hide their posts because they are annoying”. Or they just get thrown into the friend dumpster.

But this group looked at social media as another billboard, another TV spot, another magazine ad. And is that what social media is really is? Of course not. It is a chance that businesses can actually interact with their consumers. Years ago, the big push was to create sort of a “symbiotic” relationship with the supply chain, including distributors, suppliers, retailers, etc. This even extended to a certain extent for competition. Now businesses have a way to create that same relationship with the people who actually pay for the goods and services. And some companies would prefer to just treat this avenue as another billboard. Why would they think that would engage the targeted audience? Does anyone, besides children, get excited to see tons of pretty colors and the same message constantly? It is time to start interacting with the consumers to build those relationships. It is possible, and no matter what the product is, it can be done.

The Pet Rock
(image from wikipedia)

Anyone remember the pet rock? It was a freakin rock! Something you can pick up in the backyard. Yet people would buy these things. It was the way it was marketed. I am sure they did not just market it by promoting a purchase of an ordinary rock from the ground. It was marketed as a real pet, filled with funny play on words and relating it to a real pet. It came with a full instruction manual, and a box that looked like a pet carrier. But at the heart of the product, it was a rock. Most products have a lot more functionality than a rock, and fail. It is the message. Using social media should be the same. Interact with the consumers, build that relationship, and have them interact with the company. Sure, some people will be rude, and even try to degrade the company. Build the positive voice, and keep the engagement alive!

Have Your Cake and Eat It Too

CakePHP is one of those frameworks where it is easy to set up and get an application running in a minimal amount of time. It provides different securities, helps, and functions in the framework so that your application can run smoothly and be safe. As with all applications, the level of security and functionality depends on the developer, not the code, not the language, not the database. An application is only as secure, functional and reliable as the person/team who is coding it. One of the reasons I do like Cake is that the built in security and helpers offer a developer a great way to secure data, validate it, and display it. And that can also be one of the more trickier parts of getting the application to work correctly, finding the data to do something with it.

CakePHP
CakePHP

CakePHP provides some functionality for finding the data, this is done using the “find” method. You can read more about this at the Cookbook. Using this, one can grab data from many different tables if needed, or just one table. For this exercise, I am going to use dummy data to show how to find data, using simplistic finds, and using joins, and sub-queries. So first lets examine the data tables. Not all of these are going to be connected. This is a very simplistic, quickly drawn up solution to a lending library

Sample Tables
Sample Tables

Continue reading Have Your Cake and Eat It Too

Whats the plan, Stan

After nearly a month off, I believe it is time for me to institute a new way I am going to blog. Topics range from a ton of different items, and I think we should have a specific way of what I am doing. So, starting today, and hopefully I will have enough time with this, I will be doing a post every day of the week. Some will be longer than others, and some with be short. But every day, there is a theme that will be followed. The format will be as follows:

Monday – Whats the plan, Stan; Planning ideas and thoughts
Tuesday – Have your Cake and eat it too; focusing on coding
Wednesday – Coding for the Social Leper, ideas and code segments for people like me, social lepers
Thursday – Focus on the Locus; examinations on location services, social integration and strategy
Friday – Fun Stuff to Knock Your Socks Off; fun stuff to finish up the week

Now, the next question ought to be, what makes me such an expert on any of these topics? Well, here is the answer, nothing, I am not an expert. These are my musing and experiences in these areas. I may be right on some of my endeavors, and I may bomb. I will share both with you. I figure one of the best ways to learn and grow is to share experiences with each other. And this is what I am intending to do, share my experiences with anyone who cares to read.

So lets get on with the post for today – Planning. This goes with any thing you want to do. Whether that is code, a social media strategy, or marketing campaign, heck, even mowing the lawn. I will share with you some of the things I do before writing any code for an application. There must always be a start to everything, so lets start with the basics. This will be a very high level overview into some of these items, and will get more detailed as the weeks go on.

What is really needed for the project at hand? Do we know what the goal is, how it should act, behave, grow? Has any research been done. In code, one of the things I like doing is understanding how an end user is wanting to use an application, what they expect. I go through interviews, process flows, and even user stories. This can be applied to almost everything else. We need to understand what it is that needs to be accomplished, and why it needs to be accomplished.

Next is to understand what success and failure metrics for this project. What needs to be tracked, and why. What is important to business groups and why would it be important. What is the success boundaries, and what consists a failure? I like to understand each of these items so I know what to plan for in the code, in the campaign, in the project. Statistics can be a real bugger if it is done at the very end. And it may affect how an application is coded, a project assigned out, or a campaign run.

Once we have these ideas in place, we can start with the next phase of planning, and that involves the documentation, the project write up, and the use cases, mock ups, design sketches, etc. Which can be very time consuming. This is what makes it hard to go this route for many companies. Time means money on a lot of ventures. Not just the money of paying people to do this, but the residuals that involve this as well, electricity to power laptops, internet connections, travel, focus groups, phone charges, etc. This phase can have a lot of monetary impact while yielding very little ROI. So it is finding the right combination of events to maximize those events, and get into the actual work quickly.

Planning is essential though. And it should not be passed over or taken lightly. Think of some of the major applications, or ads, or products out there. Each one of them required a ton of planning, and it paid off. The Old Spice commercials are amazing, and that could not have been slopped together quickly. Most online applications are ones that are well planned, and you can really tell the difference between the ones that are and are not. Companies that are successful plan. But a final word of caution on planning: Do not let it consume you to the point of where you lose focus on the final product. You can plan things to death. Find that perfect balance that works for you, and run with it.

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?