Why do you need a Code Review?

Why do you need a Code Review?

When your potential or current consumer browses your website, uses your application, submits an online form or completes a purchase with their credit or debit card, they have an expectation that their personal information is transferred and stored securely. Protecting your consumer begins with the foundation of your website or application...your code. Verifying that your code is secure safeguards your consumers and helps to ensure that your business is protected against cyber attacks.

Google Discontinues Free Version of Google Apps for Business

On Thursday (12/06/12), Google announced changes to their Google Apps for Business offering. They will no longer offer a free version of Google Apps for Business. As of 12/06/12, any company that wants to use Google Apps will need to sign up for the paid version which costs $50 per user, per year. If you are an existing Google Apps customer who is taking advantage of the free version, nothing changes. You are essentially grandfathered in and will not be charged the $50 per user, per year fee. Google is offering existing users an upgrade path to Google Apps for Business at the rate of $5 per user, per year.

I should also note that Google Apps for Education is still available as a free service for schools and universities.

Troy Web is an official Google Apps Reseller If you need assistance with setting up Google Apps for Business, let us know. We can help with everything from simple account setup, to full-scale migration from your existing service provider.

Dealing with Case Sensitivity of Database Table Names at the Persistance Layer with Hibernate

It's been a while since my last post so it's about time I got back to it since I'm backlogged with all sort of awesomeness. Recently, I took over a pretty big Spring project. Lucky for me, it was written largely in Spring 3.0 so my periodic upgrades to 3.1 haven't been too difficult. I'm the only developer on the project but it's not that bad (anymore) and it's given me a chance to really focus on my Spring skills.

Since I develop locally, I backed up the production database on the server and brought it down to my laptop. Before I could work on it, I needed to run the data through a conversion routine that migrates the database model and its data into the new and improved model for the next release.

The Problem

The problem is that the server is Linux and my computer is a Mac.

Why does this matter? It matters because each OS has different case sensitivity. The conversion routine uses Hibernate as the persistance provider and it's configured to use the DefaultComponentSafeNamingStrategy which maintains the same case as the managed entities. This is fine except that the application uses a custom naming strategy that converts everything to lower case and acts as a wrapper around the DefaultComponentSafeNamingStrategy. The only time this would ever cause a problem is when the operating system the application is run on is case sensitive. Linux is but Windows is not case sensitive and neither is Mac. I didn't know this. In fact, I was under the impression Mac was a good OS.

Any of my collegues reading this right now are smiling because I'm constantly listing the ways Windows is terrible and Macs are better as programming tools.

The Effect

This problem wasn't actually a problem on Windows or Mac. It manifested itself when I moved my converted data up to the server and restored it into the database. When I fired up the application, all the data was gone! Pretty sure a pink slip was in my future, I scrambled to figure out what happened. This was the first time the data was updated since my firm took over the project and they had put their faith in my ability to not blow the database away. I had just blown the database away, or so I thought. It took a while to figure out what happened.

As it turns out, the data was there but with camel casing but since the app uses a lowercase naming strategy, it wasn't able to find any of the tables.

For example, a table named MyWidgetTable was being looked for under the name mywidgettable.

Finding the Best Solution

This might seem like an easy fix, just update the naming strategy for the conversion routine. It's true, that's the best solution and the one I selected but, it's important to realize why it's the best solution.

For instance, another option would be to configure the database - in this case, MySQL - to use lowercase naming when creating objects. People do this. You can read more about that here

Although this is an option, I don't recommend it.  Doing so will more tightly couple the database implementation to the application and whenever possible we like to make each tier in an architecture as pluggable and removable as possible.  Changing databases has more side effects when you start introducing configurations that directly impact the design of a system.

In general, when you need to deal with filesystem objects, try to choose an implementation that will work across the big players to keep your code as portable as possible even when you think you're environment won't change. It will and in this field, crap changes every couple of days! The previous developer knew this and that's probably why he wrote the custom lower case strategy to begin with.

HTML5 & < Video>

Why Now?

At the crossroads of today's internet experience, we see a convergence of html5, social media, video and a multitude of web enabled devices. The day for all these elements has come  and they are all, equally affecting the web of tomorrow.

The internet has brought us a culture transformation, away from the world of "restrictive" business and social models. Think about real estate & media moguls - giants who monitized information via exclusive rights and limited access - these industries are nothing like they once were. Today, easy discovery, unlimited access and free distribution are the underlying principles of the "inclusive mindset" that closes the gap between content and audience.

HTML5 <video> tag brings a much needed standard to the web. But more importantly it is the opportunity for moving pictures to have it's heyday on the internet. The benefits?

  • A broader reach: 50%+ of all internet traffic is video; 60%+ of all mobile data is video. 
  • Mega-stickiness: video shows the full range of human emotion and context, the result of which is better communication & faster calls to action.
  • Better content, better context: relatedness via metadata and transparent content density improves the quality of discovery; "Deeper" content, faster and easier.
  • Viral distribution: Social media "pushes" make discovery easier - we no longer have to find content, it find us. Brightcove reports that it's 2nd biggest referrer of video content is Facebook.

Timing is everything. The success of social media,  the expectations of html5 standards, the proliferation of devices have converged at a time when a new, open mindset creates opportunity like never before. Video is ripe on the vine.


Creating and managing optimized video content is critical; Video content production is different than authoring text content. Social media goals are to raise awareness and leverage viral distribution. Core content is for engagement and information distribution. Managing metadata and creating "relatedness" are critical elements of a successful game plan.

Distribution strategy is multifaceted. Viral distribution is powerful yet uncontrollable. Managed syndication via MRSS or syndication partnerships improves reach even further and with more controls. Both vehicles improve inbound links and drive better SEO.

Often overlooked, Analytics is as important as any other part of your strategy. Without metrics for engagement, distribution, content and device support, you have no idea where your successes and failures reside.

Finally, player ubiquity is the most important technical piece of the strategic puzzle. <html5> brings us the hope of a future emerging standards. File formats (codecs) and device support is far from standardized. Much like the browser wars of 2001, 10 years later we are seeing the device wars play out, especially in the video space. Your technical solution must address all devices to fully leverage all that video has to offer.

Some interesting statistics:

  • The average web user watched 75% more video in 2010 than in 2008
  • By 30 seconds into an online video up to 33% of viewers have moved on; at 1 minute 44% have left (regardless of the clip’s length) and almost 60% have abandoned by the 2 minute mark. [source]
  • More than 16 Million mobile users in the U.S. watched TV or video on their mobile phone in Q2, 2011
  • Every second, 1 million minutes of video content will cross global IP networks in 2015. That would take a person 5 years to watch. [source]

Myth-busting html5 <video>

 The Promise

  • No fragmentation - higher success factor with scalable, manageable solutions
  • No need for plugins, 3rd party tools or proprietary solutions.
  • Better performance - native functionality
  • More culturally aligned with the web - open & free standards

The Reality

  • The functionality is standardized, the implementation isn't
  • War of the codec standards
  • Reliance on Plugins (Flash) for fallback


  • Make one version of your video in WebM (VP8+Vorbis)
  • Make another version in H.264 +AAC audio in an mp4 container
  • Make a third version in theora + Vorbis in an ogg container
  • <video> embed with a fallback on flash

Why Bother?

  • Devices. If you care at all about reaching the mobile marketplace, html5 video is a must.
  • Lead, don't follow -  be a part of setting the standard. The sooner you get started, the better off you'll be when it matures.
  • Potential - html5 <video> is where flash was 10 years ago - on the precipice of explosive growth.
  • It's worth it - any bumps are outweighed by video's extended reach.
  • SaaS Solutions - you don't have to DIY.


Example using VideoJS Plugin for wordpress:

All i had to do was add the code like this (it doesn't matter if you enter it in using visual or html mode, either way the plugin picks it up:

[ video mp4="" ogg="" webm="" poster="" preload="true" width="640" height="264" ]

[video mp4="" ogg="" webm="" poster="" preload="true" width="640" height="264"]