Start Now

Want to get where you're going? Don't wait, start now!

Clinton is rooted in PHP, MySQL, jQuery and web development standards. He is a rare bread of web development professional that focuses on back end and front end development; specializing in dynamic content such as internal pipeline (intranet) tools and user driven content.

He has experience with performance optimization, scalablity, accessibly semantic code and utilizes PHP/MySQL server side technology complimented by non-obtrusive DOM manipulation with jQuery to make the magic happen.

HTML5 Please - Use the new and shiny responsibly

Published:

Great site put together by the masterminds of the HTML5 Please community. Find out what elements you can use now and how much caution you should use for each element in various browsers

Use the new and shiny responsibly.

Look up HTML5, CSS3, etc features, know if they are ready for use, and if so find out how you should use them – with polyfills, fallbacks or as they are

http://html5please.us/

The Singleton Design Pattern In Javascript

Published:

Let’s be clear, I’m a back end developer with a fondness for front end cross over.  I primarily focus on PHP/MySQL development, but there are many times where I need to use advance JavaScript (and/or AJAX) to make something cool happen.  When it comes to Javascript, implementing complex objects isn’t something I’ve loved to do in the past, but I’m gaining a wicked appreciation and fondness for the task and skill.

The Singleton Design pattern is pretty cool (despite the controversy surrounding it), but implementing it in javascript is a task I’ve never taken on.  Based on my last post, I was reading up more on Front-end Code Standards & Best Practices today and got into the section entitled “JavaScript Libraries - General Coding Principles”.  Good stuff here, even for back end guys like myself.  The gist of it is:

This singleton pattern, despite the controversy surrounding it, is definitely one of the most popular GoF patterns. While I agree that using singletons to make global variables look like OOP is bad, the pattern actually has quite a few “real” uses.

In order to obtain a reference to the singleton instance, you’d just use the global variable singleton.

For singletons to work in JavaScript, I needed a way to do private constructors and both private and public static members, two concepts that JavaScript doesn’t natively support. As ever so often, the solution was to use a closure to make the instance attribute and the constructor private.

Just another programming knowledge nugget I felt that I needed to pass along.  Hope it helps you out somewhere along the line!

http://kaijaeger.com/articles/the-singleton-design-pattern-in-javascript.html

Tags

12 Steps to Writing Better Web Code

Published:

I’ve been doing revision control via GIT for a couple of years now.  I’ve been relying on the good peeps over at beanstalkapp.com to help me with deployments (yay Capistrano!) since all of my stuff is on a shared hosting environment.  This blog post isn’t an advertisement for them, but if you’ve never heard of them I highly recommend you check them out.  

Beanstalk is run by the good crew over at Wildbitt, LLC (who also bring you the goodness of Postmark) and one of my biggest kudos to them is the engagement of their development team.  The dev team is constantly chattering on twitter (@beanstalkapp), sharing API tricks, and spreading the magic on their blog.

A few days ago they shared a good article on the blog entitle “12 Steps to Writing Better Web Code” and it reminded me of the Joel Spolsky test as well as a new gem they offer from Kelly Sutton.  Both of these are fine reminders of what it means to write good code, and both will give you several talking points in your next interview (whether you’re giving or receiving).  However, there were a few points in Kelly’s article that I wasn’t quite sure I agreed with, so I wanted to share the 12 points with you and see what you thought:

  1. Do you only deploy from one branch?
  2. Do you have a bootstrap script?
  3. Do all employees deploy code on their first day?
  4. Does each bug get a failing test?
  5. Is your bus factor greater than n/2, where n is the number of engineers?
  6. Can you spin up ad-hoc development and staging environments with one command?
  7. Does your team work around features, and not around sprints?
  8. Does all work get done on a branch?
  9. Do you actively remove deprecated code?
  10. Do bugs only exist in one place?
  11. Do you discourage the use of IDEs?
  12. Are discrepancies in process addressed before more code is written?

http://blog.beanstalkapp.com/post/12887092196/12-steps-to-writing-better-web-code

Tags

Front-end Code Standards & Best Practices

Published:

I’ve been diving more into development standards lately, in particular the HTML5 Boilerplate and it’s integration into CodeIgniter via IgniterPlate.  All of those Paul Irish videos and articles turned me onto this gem on best practices for front end development.  Hope you enjoy the read as much as I did!

http://na.isobar.com/standards/

Tags

FX Has The Movies

Published:

It’s been awhile since I’ve posted and it’s because I’ve been crazy busy.  I just finished up a pretty fun social integration project for the FX Network in conjunction with the fine folks at BLITZ Agency.  If you’re a fan of movies, GetGlue, Facebook, or the internet in general you should check it out!

http://blog.getglue.com/?p=9646

Tags

What makes a Senior developer a Senior developer?

Published:

I’ve been programming in PHP/MySQL since early 2006 (that’s over 5 years experience) and have had the privilege of working at startups and at some very established big brand/recognition environments (check my resume for more).   I’ve always been a go-getter with a serious ‘can-do’ attitude.  I’ve been a team player, a leader, and driver of technology.  So naturally I felt I was a Senior/Lead developer.

Recently I started exploring the job market and found myself wondering,  what makes a Senior developer a Senior developer?  I did some searching around, but it’s harder to find a concrete answer than I thought.  I looked through wikipedia, salary.com, monster.com, and several other job related websites with no avail.  So, where are the descriptions of the levels of programmer and how do I fit on the spectrum?  I finally found a great answer over at stackoverflow in an article titled  What is your definition of a Entry Level/Junior/Mid/Senior Developer?

Senior:

Someone who knows a wide range of the business arena or is a specialist in an area. Expert in language. Can work on most levels of code unsupervised and requires minimal guidance. Can guide lower grades. Interested in furthering product and practices as well as ‘doing the job’. Uses initiative.

Team Leader:

For those wanting to branch out into management and leave the coal-face behind.

I was finding that a lot of the interviews I was getting were with companies that not only wanted me to be a rockstar programmer, team leader, and driver of technology they also wanted me to be an algorithm theorist, a systems operations master, and a technology strategy guru.  

I was rocking the coding exams and personality screenings but found myself behind the curve in systems architecture and technology strategy implementation.  Which DB engine should we use?  How about which data caching strategy to apply?  Should we use Hadoop, Redis, Doctrine?  The simple answer is, I’m not sure!  I’ve looked at all of these technologies, but have never implemented any of them in practice!  What it boils down to is that in all of my industry experience I’ve always had a head of technology or a CTO person driving these decisions.  

I’m a PHP/MySQL guy at heart and the sysops decisions have never really been in my wheelhouse.  Command of the language (check), ability to develop large projects (check), deal with with customers and ability to guide others (check).  I realized that in reality, I should be marketing/labeling myself as more of a ‘Mid-Senior’ level developer than a Senior.

Mid-Level->Senior

This one is the difficult one - the person must show command of the language, be able to develop larger projects, deal with customers and be starting to guide others. In simple terms, this person is showing signs of being a guru. Senior level is an elite status.

I’ve never been one for titles, heck call me Janitor if want, as long as I’m filling a role that help a team move forward.  I excel in mentoring to others, writing bullet proof PHP/MySQL, and working on large scale projects.  I guess I’m more of a Mid-Senior talent (with lead experience) than a Senior developer.  Where do you fall on the spectrum?

Tags

Hacker Chat: Pinboard Creator Maciej Ceglowski Talks About Why Boring Architecture is Good, and More

Published:

I think many developers (myself included) are easily seduced by new technology and are willing to burn a lot of time rigging it together just for the joy of tinkering. So nowadays we see a lot of fairly uninteresting web apps with very technically sweet implementations. In designing Pinboard, I tried to steer clear of this temptation by picking very familiar, vanilla tools wherever possible so I would have no excuse for architectural wank.

The other reason I like the approach is that the tried-and-true stuff is extensively debugged and documented. The chances of you finding a bug in MySQL or PHP as the author of a mid-sized website are microscopic. That’s not the case for newer infrastructure like NoSQL or the various web frameworks.

http://www.readwriteweb.com/hack/2011/02/pinboard-creator-maciej-ceglow.php

Tags

Snippets of Code: Adding syntax highlighting into Tumblr

Published:

As a developer, it’s hard to not do posts without including code snippets.  You know, the gems that really make a post great!  Running on a framework like Tumblr limits your options a bit, but I stumbled into this gem the other day and had to re-blog.  Thanks for the leg work guys, I’m standing on the shoulder’s of giants.

snippets-of-code:

After much googling around, I found two popular ways to add syntax highlighting into Tumblr:

  1. Alex Gorbachev’s Syntax Highlighter
  2. Google’s Prettify

I tried the Syntax Highlighter at first and spent a really long time trying to get it to work. When it finally did, it slowed the loading…

http://snippets-of-code.tumblr.com/post/6027484416

Tags

Zend_Config_Ini > PHP parse_ini_file?

Published:

Being relatively new to Zend Framework, I’ve been exploring it’s intricacies for about 7 months now, I’ll be the first to admit that I didn’t fully understand some of the power that comes along with the tool.   It’s like when you get your first car and all you want to do is drag main with it.  Sure, it’s fun, you feel cool, and the chicks dig it.  However, you’re not getting the most out of what you’ve got.  Later in life you discover that you can do other cool stuff with cars like roadtrips, adding your own stereo and spending all Saturday giving it a fresh coat of wax. I digress … the point being that Zend is cool and I’m about to give you an example of why.

I’m overhauling a site that was built in Zend Framework.  Being built in Zend Framework isn’t the reason it needs overhauled, poor architecture is the reason it needs overhauled.  However, I discovered in my journey that I was going to have to migrate some data from a poorly constructed .ini file over to a fully functioning MySQL database.  I wrote the script the same way I write many data manipulation scripts, to run from the command line.  I spent my 2 hours, checked and double checked that everything was right, and then gave it a run to see how it worked.  I was immediately reminded that Zend_Config_Ini will not function from the command line unless you also have Zend Platform configured and running on your local machine. Booooooooooooooo

I took a quick look at the documentation on Zend_Config_Ini and realized that it was really just a glorified wrapper for the native PHP function parse_ini_file().  Great I thought!  The kicker is (wait for it) that Zend_Config_Ini has some AWESOME built in functionality built in that let’s you not only navigate down a config file, but you can also find out what a node is inherited from.  In other words, there is a quick mechanism to determine where the node came from.  Since I didn’t have access to this functionality, I was forced to write it myself.  Not complicated, but it did take a couple minutes and it definitely made me appreciate the nice built in functionality that came built in.  What can I say, they don’t make em’ like they used to …. they make em’ a whole lot easier to use.

Looking for more information?

  1. Check out the manual on the Zend_Config_Ini function: 
    http://framework.zend.com/manual/en/zend.config.adapters.ini.html
  2. Check out the PHP manual on parse_ini():
    http://us2.php.net/parse_ini_file

Tags

Zend PHP Certification Exam

Published:

I’ve been meaning to take the Zend PHP certification exam for quite some time.  So long in fact that when I first decided that I wanted to take it, PHP 5.3 wasn’t even formally released yet!  My former employer, Apollo Interactive, was gracious enough to provide the exam study materials a couple years back and I set to get started.

Like many good study sessions do, time had a way of getting away from me.  Days turned to weeks, weeks turned to months, and months turned to years.  I kept making bursts of study effort, but honestly I felt pretty good about the ten all topics that are include on the exam:

  1. PHP Basics
  2. Functions
  3. Data Formats & Types
  4. Web Features
  5. Object Oriented Programming
  6. Security
  7. I/O
  8. Strings & Patterns
  9. Databases
  10. Arrays

I felt good about them not only because I understood the concepts, but also because I’ve worked long enough in the field to have had to learn, and fail at least once, with all of them.

When I started my current role as Sr./Lead Software Engineer at ConsumerTrack, Inc. back in January I was pleasantly surprised to see that several of the other developers were in the midst of studying and implementing a plan to take the formal exam.  It was nice to finally have some friendly competition and accountability brewing on the horizon!

After 3 months of reviewing the material, quizing each other, and giving a couple presentations the moment of truth finally landed today.  The exam was difficult, although not as bad as I was expecting.  Of course the topics that I felt least prepared for were randomly selected to be on the exam, Murphy’s Law clearly applies to the world of exams.  I made my first pass through the questions, filling out all of the gimme answers, flagging some that would take more thought, and skipping those that seemed outside of my expertise.  With plenty of time left after my first pass, I circled back and tackled the brain busters.  The final pass was left to the constructive guessing and cross checking (never know when you accidentally hit that wrong button on the gimme question!).

At the end of the day, it was a great experience!  I’m grateful for my new friends at ConsumerTrack, Inc who helped prepare me and challenge me for the exam and even better, I’ll be even more excited to take it again next year when it’s time to knock the dust off the cover again!

Looking for more information on the Zend PHP 5 Certification?

http://www.zend.com/services/certification/php-5-certification/

Tags

Digging through someone else's code

Published:

You have to start somewhere. All programmers cut their teeth by being put on a maintenance team or by being the Jr. guy in charge of fixing stuff. No doubt, I’ve learned plenty of tricks by looking at the mess that others have made before me. “wow, how big of a mess is this code?!”, “jeesh, whoever did this had NO idea what they were doing”, and “sweet, I never would have thought to do it that way!”

The awesome part about being a developer is that you are charged with solving problems and making decisions every minute of every day. For better or worse, you get to analyze a problem, devise a solution, and put it to work.

Today I had the chance to dig through a doozy. This particular gem is written in Zend Framework, which up until about six months ago I had little or no experience with. Let me first off say that Zend does a lot of awesome stuff (as do all MVC frameworks). It provides simple processing of forms, DB abstraction layers, result set pagination, etc… In my application I was looking to review how a form was being processed and the underlying DB logic associated. First off, the form was AJAX driven, the jQuery applied to the view from the Controller (aren’t views supposed to handle view related things like unobtrusive JavaScript?). Next was a chain of classes begotten by classes extended from static classes. It started to feel a bit like reading the King James translation of Exodus, sorry if you’re not a religious person it’s like trying to make heads or tails out of the NFl labor dispute (confusing at best). After an hour of tracing PHP family trees I finally came to a place where I could determine my relationship to My(crazy uncle)SQL.

Altering this setup certainly won’t be easy, but having an understanding of where you come from can really give you an identity ion where you are and how you got there. My advice, start now (you never know how long it will take to figure it out) and be sure to lookup your aunt Sandy for cookies when you get there.

Tags

Zend Paginator

Published:

Just start. Even if you don’t know how to do it.

Do not let what you cannot do interfere with what you can do.

-John Wooden

I’ll be the first to admit that before today, I had absolutely no idea how Zend Paginator worked.  I’ve done custom pagination before and used the PEAR Pager (which is pretty cool), but never Zend.  To compound maters I was being expected to integrate it into a model/class that was was pulling results sets “hither, thither, and yon” (as my CS professor Brenda Sonderegger user to say).  Just start …

I read up on the Zend Paginator documentation, doesn’t look so bad I thought.  Checked out a sample from a legacy implementation I had laying around (a huge bonus) and my confidence was starting to rise.  The sticky stuff starting rolling in when I took a look at how the class I was expected to use was interfacing to the DB and returning the result set (which Zend Paginator needs to do it’s magic).

Not to be deterred, I started applying TAO (Test, Analyze, Optimize).  

First, I took inventory of what I was dealing with:

  • An abstract class/model driver that extends Zend_DB_Table_Abstract
  • Several children classes that extend the parent abstract
  • Each child would potentially need to be able to utilize pagination
  • Each child has a method to return a set of data.  Some of them return a valid Zend_Db_Table_Rowset, others iterate the Zend_Db_Table_Rowset and return a modified associative array.

Second, I started looking at ways to make the magic happen:

  1. Modify the parent abstract to include a variable that would hold the paginator object. Allowing extensions of the Abstract (and all methods within each) to effectively utilize a single paginator object.  Instantiated one time (__construct() or elsewhere) the paginator was now accessible everywhere I needed it
  2. Allow each child/extension do it’s own DB query and run the result.  Returning the result set to the controller where the Pagination object would process.
  3. Allow the controller to feed the paginated display back to the view.

Analyze

  • How is this working what’s the analysis?  I discovered that for large queries (one was 80k+) I was still returning the ENTIRE result set.  
  • The Paginator was effectively ‘slicing’ the window it wanted.  
  • Result, fast page load times (smaller set begin fed to the view) but larger queries were still exhausting memory.

Optimize

  • Back to the drawing board review the Zend_Paginator documentation to see if could pass the query in instead of a result set.
  • Modify all child/extension methods to return a Zend_Select object instead of the Zend_Db_Table_Rowset
  • Result, success!  Quick queries, quick page loads

Tags

Don't wait, start now

Published:

I’ve been trying to get a personal blog going for quite some time now. Strange considering that I’m a professional web developer who builds other people’s blogs for a living. I feel a little guilty, especially since I read other people’s blogs all the time looking for answers to what vexes me.

Don’t think it’s because I didn’t have the best intentions. I post helpful Facebook posts to my company facebook page several times a week, I’m an active contributor on LinkedIn groups, Meetup.com groups, several twitter feeds, and various other technical communities and creative outlets.

I setup a WordPress blog a couple years back, and got one post in. I setup a Blogspot blog earlier this year, and got one post in. Then I read Jason Fried’s book “Rework”, I’m enlightened. It’s time and the only way to get where you’re going is to start now.

Tags