Time to Learn Something New!

I’ve taken it upon myself to start learning a new programming language and leaving my happy little LAMP (or preferably LNMP) comfort zone. I love PHP and how easy it is to get up and running. Its pretty simple and gets the job done quick. PHP unfortunately lacks a lot of the “grace” and modern nuances that a more modern platform such as Ruby on Rails provides.

Now, before the pitchforks start coming out I already know that I’m kind of comparing Apples to Apple Pie. PHP is a language with a ton of community support and Ruby on Rails is a framework. I get it, but there’s a lot to be desired in PHP land. PHP has some good frameworks as well – CakePHP, Zend, CodeIgniter, Yii, etc. – but the sheer variety creates a lot of discontinuity in the community and a lot of the frameworks out there are just Ruby on Rails wannabe’s anyways. More importantly besides any of that, PHP is getting a little boring and I want to learn something new 🙂 So, I’m starting to learn Ruby, Sinatra and eventually Ruby on Rails and share my learning here.

Continue reading “Time to Learn Something New!”

2 New WordPress Plugins – OOP Plugin Boilerplate and MU Utility Plugin

I’ve done a lot of WordPress plugin development lately and thought I’d share some of the great little tools that I’ve used during creation. To start giving back to the community, I’ve decided to make public my OOP WordPress plugin boilerplate and my Utility Functions MU plugin – both valuable tools that I use whenever I’m building a new masterpiece with WordPress.

Continue reading “2 New WordPress Plugins – OOP Plugin Boilerplate and MU Utility Plugin”

Pure LNMP stack

So, in an effort to save a little cash on hosting I’ve moved my stack on this server to a pure LNMP stack – no Apache, no Varnish. I’ve also introduced a new third-party caching solution called CloudFlare to see if we can take even more traffic off the server. With W3 Total Cache running as well the site is extremely fast, and this only on a 256MB box. Granted, I get about as much traffic as the 395 in the middle of the Mojave, but its fun running at this speed anyways.

Zen Development

One thing that I’ve found helped me out a lot with development snags is perspective. I know it sounds a little hippy and existential, but it really helps. It always used to frustrate the hell out of me when I’d encounter a bug in my code, but I realized that it was only frustrating me because I was taking it personally – “why the heck isn’t this working! I know I programmed it right!”. Once I realized that this was happening I began taking a different perspective – learning.

I know that I’m going to write some code that will break. I know that something might break because I made changes elsewhere. Knowing this, I take every bug now as an opportunity to learn. So, instead of getting frustrated and pissed at my IDE (Aptana) or my PHP because it isn’t doing what I told it to, I just start from nothing. I assume nothing, and start building up what I can know for sure. I begin throwing a bunch of debug,  exits and echos all over the place and starting from the very beginning I try to discover where it might have gone wrong, establishing a base for what I can be sure of. From that base I can discover what went wrong and learn from it because I’m not distracted by my frustration.

Treat every bug like a puzzle to unravel and a chance to learn something new. In becoming a learning opportunity, it looses its power to piss you off 🙂

WordCamp San Diego 2011 (#wcsd)

WordCamp San Diego 2011 is done! Looks like the state of the Word is going well with active WordPress installations up above 50,000,000 (30,000,000 wordpress.org and 20,000,000 wordpress.com sites according to Automattic’s numbers). This is an impressive figure that is pretty exciting to be a part of.

The panels for the camp were pretty good, although I was really hoping for a little more detail and breadth in the topics, but hey this is San Diego’s first WordCamp and really when it all boils down to it: we’re no San Francisco. Regardless of that, the atmosphere was great and the people were all excited to learn a few new things and be a part of the WordPress community.

Continue reading “WordCamp San Diego 2011 (#wcsd)”

Welcome to Rackspace!

Just finished setting the site up on a new server of my own on Rackspace’s Cloud. The site is much speedier now (sorry Media Temple, but your Grid Server system really is too slow for my tastes). Now I’m running on a new stack for super speedy response time:

  • Ubuntu 10.04LTS
  • Apache 2.2 running PHP 5.3.2 via mod_php
  • MySQL 5.1.41
  • A basic Varnish caching layer running in front of Apache
  • nginx reverse proxy running in front of Varnish
Since I am also running both PHP 5.3.x and MySQL 5.1.x I am also running the latest version of WordPress (3.2 RC1 as of this posting). In conjunction with W3 Total Cache handling object, database, page caching and Varnish purging, the site is blazing fast!
So, now that I’ve got a working environment here that actually has some guts, I might be able to do something with it!

Image Upload MIME type handling and IE

I was recently writing a script to handle image uploads from users to an Amazon S3 bucket and discovered one of those great IE quirks. Normally when writing an upload script you check for MIME type validity to make sure that the file that a user is uploading is uploading the correct type of file you are expecting to process. Now, I know that MIME types can be spoofed, but it’s still good to check against them to determine file type and prevent a user from accidentally uploading the wrong type of file. In writing the MIME type validation script though, I ran across a problem where versions of IE less than 9 would not detect my MIME type properly.

Continue reading “Image Upload MIME type handling and IE”

Disable Plugins on a Single Post/Page in WordPress

So, one of the biggest flaws with WordPress is that, unless the author has written their plugin well, it will load on every single post or page on your website. This is often overkill as there will be some plugins that only apply to a specific section of your website. In an effort to provide greater control, lighten memory load and increase page load times I have written a very simple plugin to control what plugins load where.

Continue reading “Disable Plugins on a Single Post/Page in WordPress”

Synergy FTW

 

Just got a new laptop – a massive upgrade over the desktop unit I had. Oddly enough for the industry I’m in and what I love doing, this is the first laptop I’ve ever owned. I purchased this laptop primarily to replace my desktop, but also to be a tool for my work. Since I bring my laptop into the office, I thought I’d take a look at a feature I had seen a few of my Mac buddies using with their Powerbooks – Synergy.

Continue reading “Synergy FTW”

Hello world!

Hello world indeed! It’s been a long time since I’ve had any sort of personal web presence to speak of, but I’ve finally re-acquired my domain name from the squatters over at GoDaddy and I’m back!

There isn’t much here yet, but you can look forward to posts and articles sharing my knowledge and experience as a web developer and whatever else I think worthy of posting here. In the meantime, go checkout my about page if you’re interested in who I am or my projects section for work I’ve done and projects I’ve helped develop.