Archive for July, 2009

Pro Tip: How to win the code sample game

Posted on: July 29th, 2009 by Rob Zienert

Right now there seems to be anything but a shortage of programming job applicants out there. For a company, that’s awesome, but for an applicant–it isn’t that wonderful of a situation. So I’m here for the first installation (and probably last) installation of: PRO TIPS: GET HIRED! In this episode, I will be covering how to win the game of code samples: because you will be asked for them.

When applying for a programming job, you will be asked to provide some sort of code sample. I’ve seen all kinds of code samples: some people send me like 20 lines of code whereas others send me full applications. So what do I look for? Probably the same as what everyone else asking for code samples looks for. Knowing these points will make you all the more prepared to potentially slay a code review.

  • Is it documented and to what extent? Good documentation is not always the what, but the why. Generally speaking, explaining that a conditional is checking for a function returning true or is equal to 42 is probably a waste of time. Explaining logic and your thought process so it can be followed and understood by yourself and others later on down the road is very important. Avoid situations like this.
  • Do you use the language’s tools properly? Show aptitude and depth of knowledge in the language you’re programming in. For example, in PHP, why write a regular expression for validating an email address when you could just use the filter_var function?
  • What’s your style? Is your code easy to read; could it be easily maintainable?
  • Is it straightforward and organized? Complex doesn’t have to be complicated. Do you abstract your code and break it down in a logical fashion?
  • How robust is it? Does the application expect and handle non-logical, idiotic conditions? The real world doesn’t care how your application is supposed to be used, it just does what it wants.
  • What are the programming interfaces? Is the code segmented well? Is it designed for reuse? Does it follow programming best practices?

Keep these in mind when you’re submitting your code wherever you apply and you’ll unquestionably be in a better place because of it. The functionality doesn’t necessarily need to be stunning, but showing that you know how to write good code will win the prize. Perhaps I will end up making a follow up post on how to win the interview game as well — or at least know how to come prepared for a typical (good) developer interview.

Now off to celebrate Mike Parler‘s birthday with a mid-week bar run.

Internationalizing websites

Posted on: July 24th, 2009 by Rob Zienert

Internationalized content is somewhat of a new business for me. Prior to joining the team here at PRPL, I had never done a project where translations or localization was necessary. Now, coming Monday, I will have developed 3 of PRPL’s 3 custom internationalized websites. Through that, I’ve learned a lot and thought I would share a bit. I don’t intend for this to be an end-all-be-all, just sweeping over a few points that I believe are important.

In hopes the wrath of Bobby or Aaron don’t strike me down, I’m going to expose a little our of sacred planning process. We spend careful time organizing client content into an inventory: Massive spreadsheet(s) with everything you can imagine to do with web site content. It’s a living, breathing set of documents that are born in planning and evolve throughout all stages of a project into and through maintenance. For shame, the one misfortune we had in the past is it’s inability to allow safe internationalized development.

Developing I18n-Safe Websites

First, it’s best to define what a i18n-safe website is, and what it is not. It is not a web site built on a framework with i18n and l10n (localization) components. That’s a good step, but it’s not ready. I18n-safe means that a website has been developed not necessarily with languages built-in, but that it is capable of adding them without code overhauls. This is done by making all content on the website readily available for translation. For example:

// Not i18n-safe:

echo 'Welcome back, ' . $username;

// I18n-safe:

echo $this->translate('WELCOME_BACK_1', $username);

That may not make a whole lot of sense: let me explain. "WELCOME_BACK_1" is the key for whatever is being used to translate. Why use a code instead of actual text? Well the preferences are on the developer; some people prefer verbose strings, short-code, a constant that generally gets the idea across of the content that it represents, which is what I favor.

The reason I choose this method is quite simply it leaves code readable and flexible for the inevitable client copy changes. The two following examples could be easily interchanged and would still make sense on the code side:

msgid "WELCOME_BACK_1"

msgstr "Welcome back, %1$s"

or

msgid "WELCOME_BACK_1"

msgstr "Hi, %1$s! Welcome back!"

Both accomplish the same thing: They are a greeting and allow placement of variables, like a person’s name. As you may already know, the fancy stuff "%1$s" is a placeholder for a variable. The importance of this isn’t just the copy change above but far more importantly, to allow different languages to sentence structure differently. Languages just simply aren’t structured the same and your internationalization plans need to account for that.

Aside from this basic example, here’s a few other quick points:

  • Find translators whose native language is what needs to be translated to. This is very important to avoid having your content sound strange to native speakers.
  • New features mean new translations. When quoting new work for an internationalized project, make sure to take into account the time for doing translations.
  • Provide context to the translators, if you provide a word or sentence alone, it may not be properly translated. Briefly explain the objective or business context of the copy.
  • Numbers, dates and economics are all localized differently. Thankfully, we have Zend_Locale in the Zend Framework to heavily assist PRPL in tackling this for custom projects.

Automate the Process

All things considered, if you have the application programmed properly, you still need to make the process of changes as easily as possible. No client wants to pay for you to sit there doing monkey data entry work, and neither do you. Standardizing the format your translators provide data to you will make your life all the easier. For example, you can drop a spreadsheet into a script which will generate the translation MO file for you (in this case, if you’re using GetText). In doing so, you reduce bugs from duplicate keys, typos or general apathy — because lets all admit it: data entry sucks.

Storing Translations of Dynamic Content

The last thing I’ll touch on is storing dynamic page content. It’s easy to store translation data in GetText for static content, but for things like page content in different languages, it just doesn’t make sense. A typical database page schema would have a title and content fields. Something like this, for example:

CREATE TABLE `pages` (

`id` int(11) unsigned auto_increment,

`slug` varchar(100) null,

`title` varchar(100) null,

`content` text null,

PRIMARY KEY (`id`),

KEY (`slug`) );

So. Where do you put the internationalized content? Certainly you wouldn’t do something as tragic as serializing an array and stuffing it into the content column, would you? First of all, gross and second of all, why retrieve more data than necessary? Instead, try something similar to the following:

CREATE TABLE `pages` (

`id` int(11) unsigned auto_increment,

`slug` varchar(100),

PRIMARY KEY (`id`),

KEY (`slug`) );

 

CREATE TABLE `page_content` (

`id` int(11) unsigned auto_increment,

`language_id` tinyint(2) unsigned default 1,

`page_id` int(11) unsigned default 0,

`title` varchar(100) null,

`content` text null, PRIMARY KEY (`id`),

KEY (`language_id`),

KEY (`page_id`) );

 

CREATE TABLE `languages` (

`id` tinyint(2) unsigned auto_increment,

`locale` varchar(6),

`title` varchar(40),

PRIMARY KEY (`id`),

KEY (`locale`) );

By doing so, you can have as many pages as you want. Translators aren’t super-human, though, many times a client will publish English content first then translations will slowly trickle in. This is to be expected, so you can still provide a seamless user experience by setting a default language, and just pull that as a fallback. Of course, using a Key/Value datastore like CouchDB would certainly make it less complex, but that’s for another day. I hope this helps you.

If you have your own style, I’d love to hear it.

Epic Battle: Eclipse vs NetBeans

Posted on: July 17th, 2009 by Rob Zienert

See Round Two of this battle: Eclipse vs NetBeans: Round 2. (It’s better)

It’s been an ongoing struggle between the developers at our company of what IDE is the best. We have had guys who swear by Eclipse, TextMate, NetBeans and vim. I originally started programming in e (a TextMate clone for Windows) and then moved onto Eclipse, where I have stayed for years. Just as soon as I thought I had won all developers over to Eclipse, Zach Wood goes and does this to me.

He was the last guy holding out on the war and religiously swore by TextMate and then last week decided he was going to jump to NetBeans (for whatever reason). Of course, this week he challenged me this week to trying it out. His main complaint, which I do not agree with, is that Eclipse is, "Too difficult to configure." Yeah, bogus.

At any rate, I’ve given it this week in development. There’s a few things that I really don’t like about it:

  1. It practically crashes my computer when I add pre-existing (and large) new projects.
  2. Features feel clunkier than Eclipse.
  3. Color profiles are super hard to configure. This inheritance crap screws up left and right.

Those are my biggest complaints. I haven’t had time to setup any plugins yet, but generally things are acceptable. I think I may enjoy using NetBeans, but I’m still holding my reserve on this one. I’ll include my color profile at a later date once I figure it out better. Perhaps if you know the secret to unlocking this mystical part of the application, you could help me out.

Orlando Museum of Art, “Best of Orlando 2009″

Posted on: July 16th, 2009 by Aaron Martin

The Orlando Museum of Art’s new brand identity and website has been awarded "Best of Orlando 2009" by the Orlando Weekly. The site redesign was the result of an enthusiastic collaboration between local agency Push, NY designer Renda Morton, and Purple, Rock, Scissors. The logo, designed by Push’s Forest Young, was included in 2008’s Logo Design, the most recent edition of Taschen’s annual collection of the world’s best logos.

View the project.

Read the article.

skmbt_c25009071614120

skmbt_c25009071614230

ZF Poster!

Posted on: July 13th, 2009 by Rob Zienert

Today, I received my planetary-sized* Zend Framework poster in the mail from Mayflower and Björn Schotte. Thanks a lot! It’s awesome, and massive.

*Below is a picture of the planetary-sized Zend Framework poster. Additionally, I have inserted an object to communicate relative size. (Done with Pixlr because I don’t have Photoshop on my work computer).

The ZF Poster is massive

The ZF Poster is massive

Full Sail University Recognizes Bobby Jones

Posted on: July 13th, 2009 by Aaron Martin

Prominent Central Florida Based Digital Agency, Purple, Rock, Scissors, Founded by Full Sail University Graduate

Full Sail University (www.fullsail.edu), an award-winning entertainment media institution located near Orlando, FL, is proud to recognize graduate, Bobby Jones, founder of the Orlando based digital agency, Purple, Rock, Scissors (www.purplerockscissors.com), which specializes in the areas of visual design, web development, and marketing strategy.

Winter Park, FL (PRWEB) June 13, 2009 — Full Sail University, an award-winning entertainment media institution located near Orlando, FL, is proud to recognize graduate, Bobby Jones, founder of the Orlando based digital agency, Purple, Rock, Scissors, which specializes in the areas of visual design, web development, and marketing strategy.

In 2002, Jones founded the agency Hydra Studio. The business began growing rapidly, not only in client base, but also in number of employees. Currently, the staff doubles in size each year and is primarily comprised of programmers and designers, with nearly half the staff made up of Full Sail graduates. This growth, along with the expansion of their services and current evolution of the industry, led to the rebranding of the company as Purple, Rock, Scissors.

As a local leader of web based solutions including: social media, visual design, interaction design, web development, search engine marketing (SEM), and motion graphics, Purple, Rock, Scissors strives to facilitate the growth of their clients online brand by infusing creativity with consumer compatibility. With this approach, they have built a clientele comprised of both local and national companies including: Coca Cola, Home Depot, EMI, Sony BMG, Orlando Museum of Art, and the award-winning Asbury Park, which received a national Gold Addy.

"During my time at Full Sail, I gained the education needed to build a successful business based on imaginative creativity and applied technical knowledge, which are fundamentals being taught in each of Full Sail’s degree programs," said Bobby Jones, Founder and CEO of Purple, Rock, Scissors. "Looking forward, I’m excited for the future of the agency, and as an employer, I’m eager to work with graduates of Full Sail’s Web Design and Development program to further our success in the Central Florida area and around the globe."

Read the entire article at Entrepreneur.com.

Tres Leches, Aniversario Feliz

Posted on: July 9th, 2009 by Aaron Martin

A happy 2 year anniversary to our allstar client-side engineer, Zachary Wood, whose skillful hands have developed sites like OMA and ForeLinksters. We’ve got a few questions for Zach; he’s got a few answers…

What are your favorite three projects you’ve worked on at PRPL?

  1. ForeLinksters.com
  2. PurpleRockScissors.com
  3. OMART.org

Which sites are you currently working on?

  1. Redesign of DowntownOrlando.com
  2. Redesign of HospiceoftheComforter.org

What is the coolest piece of technology to hit the street in the past 6 months?

iPhone 3.0 software. Well, this is super cool, too.

What is the longest span of time you’ve gone without using a computer? 3 or 4 days In the photos, you’re eating a Tres Leches cake. But what’s your favorite desert on earth?

mint chocolate chip ice cream

Visit Zach’s blog.

zach-1

zach-2

DowntownOrlando.com Redesign, Sneak Preview

Posted on: July 2nd, 2009 by Aaron Martin

Today, the Downtown Orlando Information Center hosted a "sneak preview" of the soon-to-launch redesign of www.DowntownOrlando.com. Purple, Rock, Scissors had the honor of showcasing the project to a standing room only crowd, consisting of Downtown’s key stakeholders. 

"We presented the ideology behind the redesign, the application of our process, and most importantly, a proof of concept that illustrates the specific benefits that Downtown businesses can expect from the website," says Aaron Harvey, COO.

The team also unveiled a mobile version of the website, which features a more focused, consolidated UI, strategically designed for use "on-the-go."

Bobby Jones, founder and CEO, states, "Our goal is to maximize the accessibility of the website to capitalize on trends in emerging media, as well as ensuring compliance with ADA guidelines."

The site is scheduled to launch this summer.

NetBeans Sunburst Color Theme

Posted on: July 1st, 2009 by Zach 16 Comments

sunburst

I’m a long time TextMate lover who might just be turning into a NetBeans user. In my in-between-editors state I’ve ported the Sunburst TextMate theme to NetBeans so I feel more at home. As you can see above, it’s a dark theme with a black background and some easter eggy colors mixed in for readability.

I’ve gone ahead and done HTML, CSS, PHP and JavaScript to the best of the syntax coloring abilities of Netbeans, so there’s still some stuff that may be janky. Grab it from my GitHub repo or just Download it here.