why should I use a framework?

I’m a huge proponent of using frameworks when developing sites.  The biggest advantage of using a frameworks is that code is generally developed in an organized and structured way.  It makes bad developers conform to one uniform developing method instead of coming up with some crazy cockamamie structure (and let me tell you, i’ve seen some crazy ass stuff).  Of course you shouldn’t be hiring bad developers, but that’s another blog post in itself!

When picking a framework, I would recommend using a framework that is documented to death.  By picking up the framework documentation, another developer can figure out where the code is and instantly get started on working on the code because all the code is placed into specific agreed-upon areas.

In addition to good documentation, the framework should be highly object oriented.  While some of the .NET guys reading this think ‘wtf are you talking about… everything is OO’, not all PHP frameworks that i’ve seen are OO.  Object oriented frameworks are beautiful.  They allow multiple developers to work on the same object without stepping on each other’s feet (using svn, of course).  Without a nicely patterned OO framework, the code becomes an unmanageable spaghetti mess!

I would also urge you to use an open source framework.  In my experience, a popular open source framework has been poked at by thousands of developers and has stood the test of time.  While this may not be the case all the time, it generally is.  The benefit is having a support community that can help you answer questions on how to do things.  Also, there may be some community developed plugin that you can use instead of building something from scratch.

An argument that i’ve encountered in the past is ‘frameworks are slow’.  While they do add overhead, I find that time-to-market is much more important to a business than is scalability at day zero.  All frameworks can be tweaked for performance increases.  In the end, if on framework can serve 10 more pages than another, it doesn’t really matter that much.  Cloud computing is so easy to do nowadays, it’s trivial to launch another instance of your web server.

This isn’t to say your code shouldn’t be optimized.  You framework should be customizable enough to allow different database configurations (read/write or sharding) as well as customizable enough to output static html if need be for lighthttpd setups for front end servers.

Some PHP frameworks that i’ve used and that I’m a huge fan of are:  Symfony, CodeIgnitor, CakePHP (in this order).

Again, feel free if you want to argue/dispute this in the comments, or if you have some questions feel free to email me.

WordPress Amazon Plugin: Amazon Product Ads

Found a great wordpress plugin that I started using:  http://wordpress.org/extend/plugins/amazon-product-ads/

It’s great because it allows you to display amazon products that are associated to some of the content you are writing about.  If you look on the right hand side of the page, you’ll see that I posted a wordpress book in relation to this content (you know in case you want to learn more about wordpress).

Anyway, it should be important to note that I did have to modify some of the code on line 183 of the amazon-product-ads.php.  The products weren’t dislaying for me for some reason.  So I just copied my own amazon affiliate tags in there and replaced the one that the plugin came with.  If you have questions about what I did, feel free to email me!

drobo v. lacie v. raid

There have been a couple of requests to talk about what the difference is between the drobo, a lacie, and a raid machine.  First, let me talk about the things they generally have in common.

The drobo, lacie and raid, are all generally external drives that you can connect via a firewire, usb, and sometimes even a network connection.  They usually act as additional drives that you can store massive amounts of media on for backup, storage, or portable storage.

The lacie drives are generally good for media files that you dont really care about losing.  The reason I say this is because if the drive in the lacie dies, you’re pretty much SOL (shit outta luck!).  There’s no redundancy, meaning, the content is all stored on one drive and not backed up on another drive.  If it dies, you’re poopooed (that’s the technical term :) ).

With a RAID drive and lacie drive, there’s a difference.  The content is usually spread across multiple drives so that you if one drive fails, the other drives have some data in reference to that drive so you can restore the content when you buy a new drive for it.  This is called data striping.   The drobo uses proprietary software to handle this and RAID systems use the RAID data striping algorithms to handle this (RAID 5, 6, 10).

So why do I prefer Drobo over RAID?  Well the biggest reason I love my drobo is because I can use different size drives in my drobo.  This is the biggest benefit to using a Drobo over RAID.  Most RAID system require you to have 5 drives (or 6) of the same size.  So once you run outta space, you have to figure out what to do with the data on your drives while you’re upgrading drives.  This is typically a massive pain in the ass.  With the drobo, all you need to do is strip out a drive, then replace it with a new one of a bigger size.  That’s it.  I even started with drives of varying sizes.  It’s not the most optimal use of the drive space, but the point was that I could use all my drives without having to buy drives of all the same size.

In the end I would recommend this product over a RAID system or a Lacie drive.  It’s just that much simpler to use.  It is a bit pricey at about $360, but I haven’t had any issue with my data, and I feel pretty comfortable using it alone as my backup.  Feel free to email if you have any questions!

Future of interactive ads – layered interaction

So the prototype experience got me thinking about the future of interactive ads.  I believe that the new model, because of Facebook Connect (and Google Connect),  will start to create a layered interaction model.  What this means is now you’ll not only get your standard ad, you’ll get another ‘state’ where you can have a deeper interaction that is personalized.

I imagine something simple where you’ll see the a typical flash ad.  Once the first run finishes, you’ll be able to login to facebook connect, and the ad would download some information about you, and create a customized experience just for you, something similar to the prototype experience.  Imagine an an orbitz gum commercial appear, after the ad, it asks if you’d like to login to facebook, where you can rate the clean smiles of your friends.

This will also help you start to identify the consumers of your product who really are the techno-mavens that will really spread your message online.  You can begin to track the effectiveness of your ads, not only by CPM’s anymore, but by virality as well.

INIT: Id "x" respawning too fast : disabled for 5 minutes.

Ok, some of you might be experience this issue when you create an image.  I’m not exactly sure why these errors happen.  I think they may have something to do with actual console screens? (someone correct me if im wrong, please!)

Anyway, what i did in my /etc/inittab is just shut them off intead of respawning them:

# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:off:/sbin/mingetty tty2
3:2345:off:/sbin/mingetty tty3
4:2345:off:/sbin/mingetty tty4
5:2345:off:/sbin/mingetty tty5
6:2345:off:/sbin/mingetty tty6

I’d like to note that I’m not linux admin guru by any means and i have no idea wtf this will do later on.  It’s just helped me remove these annoying messages from my /var/log/messages.