I never realized just how many of my friends from high school and college could be classed as “liberals” until the last election.  Maybe it’s just my sensitivity to the subject matter over the last few years, but it seems that I can’t go a day without at least 3 “outrage” articles about Republican politicians coming across my Facebook feed.

Usually, I can tune them out.  I see them all the time.  I may label myself a Republican, but certainly don’t fall within the mainstream or core of the party.  Just the way I am.  Some might even call me a RINO.  In my business, expressing your political views is generally frowned upon, and can even lead to lost business.  But regardless, I’m not the stereotypical Republican.  I typically don’t care for a lot of the views of the Tea Party faction or the “Religious Right” (not being overly religious myself).

But one such article posted today riled me up.  Here’s a link to the article – http://minnesota.cbslocal.com/2014/03/11/rep-bachmann-gay-communities-are-the-real-bullies/.  The “outrage” over what Rep Bachmann said.  I hadn’t even read the article, but my friend’s commentary prompted me to post something just as scathing  about the “liberal left”.

But then I took a second and read the article.  The content isn’t so bad.  I tend to agree to a certain extent with her comments that the LGBT community is beginning to look like bullies.  (whether they are or not is a different matter)  Between the outrage just a few months ago regarding the comments made by Phil Robertson and his “discipline” from A&E over said comments, the Chick-fil-A boycott, and everything else, the LGBT community is putting itself in a bad light.

But stepping back from that, what bugs me most about the current political climate these days is that people seem to focus on the delivery than the content of the message.  I won’t deny there’s been quite a few politicians the last few years who have stepped in it.  That goes without saying.  But automatically, one side or the other “drinks the kool-aid” of their party and automatically writes off whatever the opposition says, usually in the most provocative and insulting manner possible.  I’ve said similar before – it’s become a matter of fitting the most attention-grabbing thing possible into 140 characters or less than about real issues.  The first step to negotiation and compromise is seeking to understand the other’s viewpoint.  We’re not doing that anymore.

Maybe it was this way during the 1850’s/1860’s and 1950’s/1960’s (minimizing the message to the most galvanizing/polarizing thing possible), or maybe it wasn’t.  But I can’t help but think that if we don’t stop focusing on the tone (and let’s face it, we color the tone with our own perceptions) and start focusing on the message, the war of words will eventually escalate into a fistfight, or worse.

Guilford County GOP SS

Guilford County GOP SS

About:

Another project that spawned from Paul Norcross.  You may recall that High Point has run a separate committee from the main of Guilford County for awhile.  Guilford County is the more established of the two (it’s a weird dynamic around here, what can I say?).  I was approached by Paul and Michael Picarelli at the beginning of the year to take a look at the Guilford GOP site currently in place and make a recommendation about how to make it better.

The previous webmaster used Drupal.  Not a bad system, but from my research, it’s really a “developer’s CMS” – very friendly to hack away on, but not very friendly for the average end-user.  Case in point, the site hadn’t been updated in over three months when I took over.  Calendaring was handled by a Google Calendar feed in a simple agenda format (and sent users off-site for more).  There was no events management/registration, limited social media, etc.  The real impetus for the change was offering online payment/registration for the County Convention in March 2014 and the ability to offer candidates some “limited” advertising (in the sense that GCGOP has them on the twitter feed).

The re-design was moved to WordPress fairly easily (thank goodness for CMS to CMS compatibility with RSS feeds).  There really wasn’t too much in terms of content to move.  Like on RPofHP, I feature an RSS news feed from the State and National Committees, but unlike High Point, I’m not having them re-post to the site.   The calendar was imported from Google Calendar and now features optional registration for events.  The calendar also features category color coding, Google Maps integration, and iCal subscriptions.

Multiple forms abound on the site – Newsletter subscription, volunteer form, routed contact forms, event registration.  I’ve even managed to create a few extras so that folks could purchase advertising in the convention brochure.

Address:

http://www.guilfordgop.org

Features:

  • Home page news slider
  • Photo Galleries
  • Twitter feeds from multiple accounts
  • Social broadcasting/posting
  • Localized calendar with event registration as necessary
  • RSS News feed imports
  • Link library
  • Committee chairperson directory
  • Responsive (mobile-friendly) design

Phoenix Academy SS

Phoenix Academy SS

About:

The Phoenix Academy site was the second site I worked on through my association with Paul Norcross (from the High Point Republican Party).  He and his wife, Kim (also the superintendent), founded Phoenix as a charter school in 2000, one of the Triad’s first.  Phoenix has been in a major expansion the last year or so, expanding beyond their initial building into one which will eventually house the entirety of the lower program (Elementary and Middle) and embarking on the final steps to begin to offer a complete K-12 experience.  Phoenix had been working with another local developer to manage their web presence and Paul and Kim decided that it was time to move in a different direction.

The main focus of Phoenix’s online presence was an application piece (charter schools require parents to apply for entrance).  The previous developer had created his own system to handle this, and one of my sticking points about taking on the design was that I would be unable to support this type of development.  I researched several commercial options available, and ultimately, Kim and her staff settled on SchoolAdmin.

With that out of the way, it fell on me to port the existing content into a WordPress installation and come up with a more modern (and as always, mobile-friendly) design.  One of the big drawbacks, in my opinion, was that the old design focused too much on the staff at Phoenix to save files and FTP them into the site.  From an SEO standpoint, that’s not really the best thing in the world.  There were also problems in that the staff had started to upload scans of everything as TIFF files, which aren’t exactly web-browser friendly.

Now, all of the new items to Phoenix are posted using regular posts or custom post types.  Pictures can be inserted for easy viewing.  The calendar now offers parents and staff the ability to subscribe via an iCal feed.

Some of the graphics/logos were already in place, but I’ve been working with Paul and Kim to continually build out a standardized branding presence including new logos for the anticipated tracks of study in the high school (and even the elementary and middle schools).

Address:

http://www.pahp.com

Features:

  • Full localized calendar (via CalPress) with iCal subscriptions, categories, and multiple views
  • Alert notifications via Custom Post Type
  • Weekly newsletters via Custom Post Type (had been via printed copies sent home with students)
  • Multiple contact forms with database storage (via Gravity Forms)
  • RSS subscription
  • Font-icons for menus
  • Mobile-friendly (responsive) design

On one of my projects, I’ve made heavy use of the Custom Post Type of WordPress.  I’ve seen a lot of folks refer to it as good business if you’re into turning the majority of site maintenance/publishing over to the client.  In fact, to be honest, all of my recent projects bar one have been using custom post types in some way, shape, or fashion.

The problem I have with this one project is that the custom post types have to be read inside of the regular “posts loop”.  Most WP sites recommend that you add a filter to the theme functions (or plugin file, if you’re going that route) that makes sure that CPT’s are injected into the loop query.  That looks something like this:

/*
 * Get CPT to show in category listings
 * 
 */

function add_custom_types_to_tax( $query ) {
if( is_category() || is_tag() && is_main_query()  ) {

// Get all your post types
$post_types = get_post_types();

$query->set( 'post_type', $post_types );
return $query;
}
}
add_filter( 'pre_get_posts', 'add_custom_types_to_tax' );

While that’s all fine and good.  I ran into an issue with the Phoenix Site.  I use 3 custom post types (technically two I created and two that are loaded via plugin).  The two that I created are one to control an image slider (as part of the theme, make it easier to swap out images) and a CPT to handle the weekly newsletters and keep them separate from the regular blog/news posts.  The other two are “Fiat Alert” (for flashing a box on the page) and of course, the calendar.

I tried modifying the above function by changing around the “$query->set (‘post_type’, $post_types )” line, but always seemed to create more headaches and not a workable solution.

The issue popped up when trying to view the Category archives for the newsletters.  I didn’t create a custom taxonomy just for the newsletters, instead, letting them pull into the “main” categories.  Silly me, I know.  What happened, is that because Fiat Alert queried the database “the right way” (using new WP_Query), I was getting one of the newsletters popping up in the alert div, then of course, repeating in the regular loop.  Try as I might, I couldn’t get it to work correctly.

But then a funny thing happened.  I noticed that I wasn’t getting the same issue with the query that I used on my slides.  I finally realized that I had written the slider query in the “wrong” way using query_posts.  So, quick re-write of the code, and it’s fixed.

Just an FYI, I didn’t edit the plugin itself, but basically re-created the entire plugin inside of my own custom-post types calls and made the edits there.  Given the simplicity of the Fiat Alert plugin, it wasn’t too bad.

So, here’s the original query from Fiat Alert –

function fiatalert_func( $content ) {
	$args = array( 'post_type' => 'fiat_alert', 'posts_per_page' => 1 );
	$loop = new WP_Query( $args );
	while ( $loop->have_posts() ) : $loop->the_post();
	echo '<div class="fiat-alert">';
	echo '<button type="button" class="close" data-dismiss="alert" style="padding: 20px 15px 0 0;">&times;</button>';
	the_content();
	echo '</div>';
	endwhile;
}

And here’s my “bastardized” or “wrong way” –

if ( ! function_exists('fiatalert_func') ) {
	function fiatalert_func( $content ) {
		query_posts('post_type=fiat_alert&posts_per_page=1');
		if(have_posts()):
			echo '<div class="fiat-alert">';
			echo '<button type="button" class="close" data-dismiss="alert" style="padding: 20px 15px 0 0;">&times;</button>';
		while(have_posts()): the_post();
		the_content();
			echo '</div>';
		endwhile;
		endif;
	}
}

Near as I can tell, the original problem lies in the fact that WP_Query can be “hooked” into (like it was), which is a normally a good thing.  Sometimes, I guess, you just don’t need to be worrying about the hooks so much.

The rollout of the Healthcare site last week should serve as a lesson to aspiring developers everywhere of a few different but equally important tenets… chief among those –

  1. If you’re going to expect a lot of hits, load test your hardware
  2. If load testing fails, upgrade your hardware
  3. If load testing STILL fails – check your code

Below is a screenshot of a “waterfall” showing the loading of the signup page (I should note that I didn’t take the initial SS, and I’m not sure who did). It makes a grand total of 94 HTTP requests for assets (images, JS, HTML, etc.).  Notice how nearly every one of them is for “www.healthcare.gov”.  Most of those items being loaded are “stock” jQuery assets – which could easily be offloaded to Google’s CDN, Cloudfront, etc.  Static images could be moved to another CDN.  I highly doubt they’ve customized any of the default JS files for the site.

Point being, some of the hangups of the site could have been reduced from day one by an offload.  I’m not saying that loading all these files from other sourced would have reduced the glitches, but it would have reduced the HTTP requests against whatever hardware is powering this site (and I’m sure it’s quite beefy).  But when you throw enough HTTP requests at Apache, it eventually clogs up and says “I give up!”

11 CSS files, 56 JS files, no caching on those… Pretty sure a shared hosting provider by now would have suspended the account.  😉   I’m also giggling a bit because I just checked the source code, and they commented out the “Google Fonts” in the header, thinking that it would help with load.

healthcare.gov waterfall

healthcare.gov waterfall