Current Projects You Can Help With

September 26th, 2009 § 0

From time to time I am going to post about projects that are currently running. These are projects that are being managed by Reinforce Media or friends. Some you can contribute to, others are just plain fun. Check them out and as always, your feedback is appreciated.

How We Save

We are looking for people who are savers or who just got a really good deal.  Anyone who wants to post an article about how they saved money can. All you have to do is register for the blog and they you are eligible.  Be sure to include some information about yourself in your profile’s description box.  This way we can tell people about you at the end of your posts.

You can help other people out significantly by sharing the things you do to save money.

Launch Your Project

The idea of Launch Your Project is to help people get their project of the ground and to get more awareness for their projects.  The site is always free to use  This site is similar to How We Save in that anyone can register and create articles in the blog.

Odd Email

Odd Email is a site that will show the off-the-wall emails that come to the author via email.  This is a project that Reinforce Media is hosting, but does not necessarily take part in.  If you have an email that you want to show to the Odd Email crew in the hopes that it will be added to the site, please email them to suggest At oddemail.com.

Sphere: Related Content

I asked for names, now I need help deciding which to use!

September 25th, 2009 § 1

I got two names that stood out above the rest from my impromptu contest to name my RSS application.  The problem is that I am not sure which name to choose, which will in turn decide who is $100 richer.  I leave this up to you, but first I will give my 2-47 cents.

The names to choose from, in order I received the suggestions, are:

WINNER: Twindicate.com! More info here

Twitticate

FeedMeStuff

FeedMeThings

RSSCaster

Please tell me which one you like and why. This will help me figure out who the winner of my contest is!

These names were suggested by @barineau & @18percentgrey, respectively. Give them some Twitter love by following them, they are both great guys!

Twitter _ Jason Rowland_ @mbernier twindicate is better

Twitter _ Kevin Boulas_ @mbernier I like Twitticate

Sphere: Related Content

I need a name for my new app

September 24th, 2009 § 7

I have been working on an application for a couple months now. Recently, I just overhauled it and added a ton of new features to accommodate a potential client’s requests.

The product is solid and does exactly what I want it to do, the problem is that I do not have a name for it.  For some reason with this product I have writer’s block for domain names. Normally, I can come up with something and just run with it.

Now, you probably want to know what the product is. OK, this is the first time I am publishing anything about it online mostly because I am paranoid, but also because I was not ready to share it yet.  In order to get a quality name, knowing the features can help.

The product is an RSS to Twitter post application for enterprise users. Yes, RSS to Twitter has been done before. However, I provide specific features that help users to maximize the potential from posting their RSS feeds to their Twitter feed.  Also, if there was not competition for the guys who are out there right now, what would drive them to innovate?

What I need is a quality memorable name that will allow me to brand my application and give potential clients something to hang onto.  I am working on the product description documentation and some marketing materials, so I need a name to put at the top of the page.

Here is what I am looking for:

It needs to be available, as in as soon as I see the name I can register it.

It needs to be somewhat topical, or completely off the wall (in a good way)

Remember, I am going to use this name when I go to potential clients.

I am going to try to stay away from Tweet, Twitter, etc just in case.

If you have an idea, please DM me @mbernier or email it to me at name-ideas AT reinforcemedia.com with your Twitter account name if you have one.  If I choose to use your idea, I will send you $100 for helping me out and do a write up about you and how you helped me out.  If I do not choose your idea and it is appropriate, I will share the idea here and why it doesn’t fit with what I am looking for.

If you have questions or comments about what I am looking for, please leave them below.

I appreciate you reading this article and if you send an idea, I appreciate that as well.

I will announce the winner on this blog on the morning of Friday September 25th, and work out a way to pay them the $100 once they are announced.

Sphere: Related Content

Using the Twitter API with Zend Part 1: Setting up your environment

September 19th, 2009 § 2

I had a friend ask me recently about using the Twitter API with PHP and if I could show him a way to do it. So, this is the first post of my tutorial on how to use the Twitter API. The tutorial will show you how to get a list of your friends and followers, with their statuses. Also, this tutorial assumes you have an environment with Apache and PHP running.

I am making some specific decisions with these posts:

  • I am going to use the Zend_Service_Twitter class because it makes things easy
  • I am NOT going to put this in full MVC, because this is for beginners and because that is alot of overhead for what I am trying to do

The Twitter API is a fairly well featured API which is easy to use, especially when you have the right tools. One of the tools that I will often use, is the Zend Framework Twitter Service class. The reason that I do this and don’t write all the code myself is, “Why skin the cat again?” – it’s cruel and unusual punishment to skin the cat the first time…

First thing’s first though, we need to set up the environment so that we can both use the Twitter API and use the Zend Framework classes without having to do too much extra work.

The Zend_Framework is an OOPHP framework with a specific naming convention for its classes. Each of the names of the classes can be mapped straight to the folder path for those classes. If your class was called A_B_C the file path would be A/B/C.php. You can handle this string conversion in PHP this way:

$string = 'A_B_C';
  1. //replace the '_' with '/' in the class name
  2. $path = str_replace('_', '/', $string);

So, now that we know how to convert the string, we need to get the class names as they are instantiated.

A class in PHP is instantiated using the new operator like so:

  1. $classVariable = new Class_Name_Here($params);

Where:

  • $classVariable is ANY variable name, typically you will name this appropriately to the class name
  • ‘Class_Name_Here’ is the name of the class you are calling
  • $params are the parameters you want/need to pass to the class constructor. (Some classes don’t require this at all)

When a class is instantiated, PHP will do a couple things. First, it will look to see if there are any class definitions that are local to the current scope of the script that is being run. This will ONLY happen if the class file is included, or the class is defined in the current script. Second, PHP will look for the __autoload magic function. This function will receive the name of the class that is being called and will give the programmer a chance to include the script that has the class. This is why Zend names their classes the way they do. The __autoload function we will use is here (notice the code from above):

  1. function __autoload($className)
  2. {
  3.     $path = str_replace('_', '/', $string).'.php';
  4.     require_once $path;
  5. }

I used “require_once” here because you don’t want to include the same file multiple times, this can cause issues and is not worth the trouble or the time to troubleshoot. Also, note that I appended ‘.php’ to the end of the string, this is necessary as we are including a php script. The code above includes the class file and makes the class definition local to the current script so the object can be created. You will need this function available to every script that uses classes.

The last thing that we need in order to pull in classes dynamically as I have described above is a proper include path. The PHP include path is simply a base file path from which the server will look to see if files being included are found. So, in our example above where we have a class called “A_B_C” who has a file at path “A/B/C.php”, without an include path set the “A” directory would have to be in the same directory as the script you are running. When you are writing software you often want to compartmentalize (Read: Organize) your code into directories, which means that you will NOT have the “A” directory available and in the same directory as every script. This again, would be cruel and unusual punishment to you and anyone who works on your code after you. So, you define a place where you want to put ALL of your class files and then set up the include path to point to this location. The easiest way for a beginner to set the include path, is to pass it through a PHP system function called set_include_path. This will set the include path for the current run of the script you are using. This is what it will look like:

  1. //the root path of your server, to the execution directory for the server
  2. $rootPath = $_SERVER['DOCUMENT_ROOT'];
  3. //set the include path with the current include path and the path to your class files
  4. set_include_path(get_include_path() . PATH_SEPARATOR . realpath($rootPath.'/path/to/class/files/'));

You will find the document root of your server and set the include path by appending your class file path to your current include path. Now, whenever you include a file, PHP will look in your current directory, and any directories in the include path. The “realpath” function will cleanup any issues in the path like double slashes.

So, I know that this has been quite a lot and seems a little bit like “Seriously Matt, I just want to get information from Twitter, why are you telling me all this?”. I understand that this is true, but it is important to know WHY things work the same way that it is important to know THAT things work. I believe that when you know the why, you can understand what you are playing with and use it to its fullest potential instead of chalking it up to magic (PHP Magic functions excluded — nerd ?humor?).

Where has this gotten us? The following code is what you will need to have a PHP environment that is conducive to dynamically loading classes and using the Zend classes, so you don’t have to re-write all that code.

  1. //the root path of your server, to the execution directory for the server
  2. $rootPath = $_SERVER['DOCUMENT_ROOT'];
  3. //set the include path with the current include path and the path to your class files
  4. set_include_path(get_include_path() . PATH_SEPARATOR . realpath($rootPath.'/path/to/class/files/'));
  5.  
  6. /**
  7.  * Sets up the PHP functionality for dynamically loading classes based on class name
  8.  */
  9. function __autoload($className)
  10. {
  11.     $path = str_replace('_', '/', $string).'.php';
  12.     require_once $path;
  13. }

Having this code means that the next step is to use the Twitter API and avoid wasting time on skinning that damn cat.

Sphere: Related Content

How do you engage new people on Twitter?

August 30th, 2009 § 0

I have been working on ProbableFollow.com for a couple months now and recently it is starting to gain speed.  I really want to help it along by talking with those people who make the claims:

If you follow me, I’ll follow back

or

I always follow back

I want to engage these people, because they are the people who need to be called out or who would benefit from using Probable Follow.  They are essentially, exactly who I built the site for.

The problem is that I do not want to spam these people or send out hundreds of the same message to everyone with a keyword.  Not only is it annoying, it could get my account kicked off Twitter.

My question to you is: How would you go about engaging these people?

Sphere: Related Content

Brand Management and Customer Service

August 28th, 2009 § 0

IMG_0022

I am aware that what happens to me would not affect most people. However, I have been thinking about brand management quite a bit recently and this struck a chord with me.

Tonight I walked into Chipotle near my house to get dinner.  As I walked up to the counter the employees were all in the kitchen area talking and joking around.  When they finally saw me they said “One minute” or something similar that told me I had been put on hold live and in person.  The only thing worse is when you walk up and someone is talking on the phone and gives you the “just a minute” finger at the same time as they completely ignore you.

I brushed this interaction off because I was hungry and wanted a ‘dang quesa-dill-a’ with chicken.  After they made my food, I asked for the corn and pico to go with it, and asked for everything to go.  As I reached the register, the manager came out of no where to take my payment.  She told me the total, I handed my debit card over, and I started to get that paranoid feeling like I was paying too much.  The manager did not hand me my receipt, she set it on the counter next to the register. That little guy in charge of my paranoia started kicking my brain saying “PAY ATTENTION”. » Read the rest of this entry «

Sphere: Related Content

Why does WordPress say I have to use FTP to upgrade a plugin?

August 27th, 2009 § 0

This is a short post, enjoy.

I have found that there are usually two reasons why you will see the FTP screen when trying to upgrade a WordPress plugin:

  1. The user level owner of your scripts is higher than the user level of PHP.
    1. Example: scripts are all set to be owned by root
    2. Solution: Try setting the user to “apache”: chown -R apache ./
  2. The permissions of your files are set too low
    1. Solution: The files all need to be writable by the owner : chmod 755, or 666
      1. Remember: The lower permissions you can get away with, the better!

The last solution is to use One Click Plugin Updater: My WordPress Plugins won’t update and the FTP option doesn’t work

Sphere: Related Content

The Twitter API and Reinforce Media

August 25th, 2009 § 2

I have been using the Twitter API for some time and so I have seen the rise and fall of twitter connectivity.

It is frustrating at best, but we all know that Twitter is one of the most prevalent APIs out there. As such, I have learned to live with it and try to program around it.

As I account for the fact that on one request Twitter is responding and then the next request Twitter is gone, I realize the assumptions I made in my code.  My biggest mistake is the assumption that Twitter would be up and responding to my code. When I was writing the code Twitter was not crashing as often as it has been lately. I made a BIG MISTAKE.

I have been going through the code and trying to catch these issues anywhere I request for data from Twitter.  I suggest that if you are a Twitter programmer, that you do the same any place where you get a response (or don’t get a response) from Twitter.  The biggest reason? You don’t want crazy error code popping out to your users because Twitter went down.

Sphere: Related Content

Reinforce Media, LLC

August 10th, 2009 § 0

My goal for Reinforce Media is to create a company with the purpose of helping businesses excel through the use of their own websites and Social Media.

Reinforce Media will provide tools and services to meet this end including:

Social Media Tools

Contract Development

Website and Marketing consulting

Sphere: Related Content

FireStats icon Powered by FireStats