11.08.2017 Views

codebright

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Validation<br />

A few months ago I was getting really stressed out. Work was mounting for the release of Laravel 4,<br />

which meant designing and building the new site, responding to documentation alterations, along<br />

with the typical support role that any framework developer will have to assume. They were hard<br />

times. On top of all of that work, I also had the pressure of trying to build Code Bright into as much<br />

of a success as Code Happy was so that I could bring a bunch of new developers into the community.<br />

What I should have done is taken a short break at one of Phill’s Parks. You see, Phill’s Parks are a<br />

number of holiday parks located around the world that are holiday destinations for developers. They<br />

were originally opened by the CEO of Phill’s Parks, Phill Sparks, back in the year two thousand. The<br />

parks are now the only place that developers can go to unwind and feel comfortable in a bathing<br />

suit.<br />

Phill’s Parks offer a wide variety of activities for developers wishing to wind down after a hard year<br />

of work. These events include competitive FizzBuzz tournaments, tabs versus spaces debates, and<br />

neck-beard pageants.<br />

If I had known about Phill’s Parks, I would have been able to chill out and enjoy the weeks leading up<br />

to the Laravel four launch. Oh well, at least you know about them right? As a lucky reader of Code<br />

Bright, you have access to a coupon that will allow a 90% discount off entry to the parks. To take<br />

advantage of this deal, simply track down Phill Sparks on IRC, Twitter, E-Mail or in person, and<br />

quote coupon code ‘CODE_BRIGHT_TROLLS_YOU’. If he doesn’t respond right away, just keep<br />

spamming him with it. Sooner or later he will hook you up with a coding holiday.<br />

So what does this have to do with Validation?<br />

Well, when I started writing this chapter, I had a wonderful, magnificent plan in mind. Sadly, I have<br />

gotten completely distracted by the fun and games offered by Phill’s Parks and now I have no idea.<br />

I’ll just make something up. It’s turned out fine so far right?<br />

Phill’s Parks are a very special place for developers, and developers only. The problem with<br />

developers is that, without care an attention, they can be hard to determine from other roles within<br />

the web development industry. For example, designers.<br />

We don’t want designers sneaking into Phill’s Parks posing as developers. They will start judging<br />

the choice of decoration and complaining about the use of Comic Sans on the cafeteria menus. It<br />

will completely ruin the atmosphere! No, we don’t want them in the park at all. What we need is<br />

some way of validating our visitors to ensure that they are developers. See, I told you I could bring<br />

it back.<br />

What we validate is a set of attributes. Let’s think about some of the attributes of a park visitor. Oh,<br />

oh, I know. We can create a list! Lists are fun!

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!