Buzz Worthy?

February 11th, 2010

No, this is not another review of Google’s new Buzz offering. It’s still a little premature to comment on it though I have begun to formulate my opinion on the product. In this post I’m going to talk about technology Buzz Words and why you should listen to Public Enemy’s advise, “Don’t Believe The Hype”.

Let’s start with “Augmented Reality”. If you were to glance at the blogosphere (a buzz word if there ever was one) you’d think that Augmented Reality was the second coming of Twitter and that nothing like it had ever been done before. Spin up any jet fighter game and you’ll quickly realize that Augmented Reality is simply a glorified Heads Up Display. I’m not saying that people aren’t doing impressive things with it, nor am I saying that it can’t be used to create exciting applications for the masses. What I am saying is that people need to stop jumping on the new technology advocacy bandwagon. If you think your application needs Augmented Reality, but can’t articulate why, you need to reevaluate your product’s purpose. Augmented Reality can be a nice way to added something to your application (especially when coupled with good content) however it’s being treated like it’s the Astrodome when in reality it’s a construction crane or maybe wet drying concrete (remarkable achievements in their own right).

Before using technology buzz words in a sales pitch you should understand, in detail, what the technology does and does not do. You should also be able to describe what the technology builds upon. My favorite example to hate on is “Web 2.0″. I can’t tell you how many people use this term with me but can’t explain to me the difference between Web 2.0 and the seemingly non-existent Web 1.0. These buzz words for technology concepts sound great and can get the potential client to sign the dotted line but unless you manage expectations and educate the population on what exactly these technological advances are they’re going to be disappointed with their final product or worse they’ll continue to promote an irresponsible use of a buzz word.

Facebook and Twitter both fall under the “Social Media” buzz word but are very different. Telling everyone that they need a social media outlet but not explaining the pros, cons and differences between a public directory and a status messaging service isn’t wise. You also shouldn’t be able to get away with saying you use Social Media when all you’ve done is create a basic Fan Page and a barely used Twitter account. Trust me there are plenty of business owners who are very proud of themselves for having a Twitter account but sadly aren’t properly leveraging it to drive sales. I doubt the builders of the Empire State Building would have been as proud of their construction techniques if they hadn’t built anything with them. Final summation, don’t treat the tools of your trade like they are the final product.

Dynamic SQL Querys in PHP

January 16th, 2010

I recently was working on a project that required a variable amount of SQL queries to be performed on a variable table for variable fields. Didn’t seem like a hard concept at first. I constructed the queries with PHP variables and presto I had everything I needed. The only problem came when I actually wanted to work with the data I had cleverly extracted.

Since the field name could have been anything I didn’t know how to access the data from within the mysqli row object. I knew that the table name was stored in another mysqli object because I had used it to create the query in the first place. In the name of self deprecation, here was my initial “God let it be this easy” attempt.

$tableQuery = "SELECT table_name, field_name FROM TABLES  WHERE id = ".$tid;
$tableResult = $con->query($tableQuery);
while($tables = $tableResult->fetch_object()){
     //The Wrong Way
     $dataQuery = "SELECT ".$tables->field_name." FROM ".$tables->table_name." WHERE id=".$did;
     $dataResult = $con->query($dataQuery);
     while($data = $dataResult->fetch_object()){
          echo $data->$tables->field_name; //Worth a shot right? Nice try, but no.
     }
}

Yeah, I thought I was pretty clever too. Not to worry though. If you run into this situation remember that MySQL allows you to define a field name via the AS keyword. This way no matter what fields you’re searching for they will always be saved under the same name in the mysqli object. Below is the corrected code. Instead of copying the whole thing I just provided the code inside the while loop.

//The Right Way
$dataQuery = "SELECT ".$tables->field_name." AS constant_field_name FROM ".$tables->table_name." WHERE id=".$did; //Note the AS
$dataResult = $con->query($dataQuery);
while($data = $dataResult->fetch_object()){
     echo $data->constant_field_name; //Much better
}

Cloud Bursting Keeps Me Focused

January 14th, 2010

I’ve been on the Rackspace Cloud now for over a year and it’s been a terrific boon. I can’t say enough about the service (personal bias of having been a former Mosso support intern aside) and the quality of the product keeps getting better (though my account is in the seemingly more stable SAT data center). If you can afford the high buy in value ($100/month) it’d definitely the way to go if you’re a small startup or a freelancer. If you don’t trust yourself to deploy and maintain your website server then you can’t beat the fact that the Cloud handles all updates and provisioning for you and scales to your needs. Having worked on the inside does give me some insight as to how this all comes together and how to leverage the technology platform my websites sit on but between a robust knowledge base and a super helpful support staff anyone who wants to dive in can optimize their site for the could which leads to both better performance and an improved bottom line.

The use of compute cycles as a metric was brand spanking new concept when they began to roll it out last summer and we had to field a lot of calls on what exactly it was that was being measured and what people could expect to be charged. The measurement is an attempt to calculate computing resource usage. At first the company attempted to charge by file hits. This though would lead to sites with a lot of pictures causing more hits than a text site. Clients looking to game the system would figure out ways to combine images and resources to reduce file hits without necessarily reducing resource usage. The compute cycle algorithm (which is proprietary and classified above my position at the time) looks at CPU cycles, memory usage and Disk I/O amongst other things to determine how much computing power a site is taking to load. The good news is that most people don’t have to worry about it. Most accounts I saw were well under the 10,000 allotted cycles (estimated compute cycles used by a fully utilized dedicated server in a month) and many of those accounts had plenty of websites using resources.

If you’re interested and would like a $25 discount off your first month sign up for Cloud Sites at https://www.rackspacecloud.com/signup and use this discount code REF-BOXOROX. Also check out the Cloud Files and Cloud Server offerings (I’ll have more on those some other day).

Way Of The Jedi

January 9th, 2010

In taking my first steps into a larger world I’d like to start by saying thanks to all the people how have given me a chance to get here and to move forward in my professional career. I’m looking forward to this whole freelancing thing. The problems are new and challenging and it will give me a chance to improve and add to my skill set. It’ll be a big day when I get to add the first piece to my portfolio but until then please pardon the dust as I work on improving this site.