Andrew Woods Seattle Web Developer

Karaoke and the Tour

Karaoke for me is a funny thing. While karaoke itself hasn’t changed much, my idea of it has changed dramatically over the years. In years past, I held a highly unfavorable opinion of karaoke and the people who did it. Back in the day (during my college years) I saw it as something that the talent-less did for entertainment. Every time I heard somebody do karaoke, they were awful. Even worse, they weren’t even playing instruments. At least bar bands could play. Yeah, that’s pretty snobby, but I see that now. So what changed? A couple of things have changed. I’ve gained maturity over the years, and my love and appreciation of music has grown in leaps and bounds. Also, I learned how hard it can be to get on stage in front of a lot of people through my experiences with open mic nights. How did I do? when i was starting – lets’ just say they weren’t my finer moments. I was super nervous – I’d forget lyrics; my hands would shake from stage fright. With time I became better and more confident as a performer.  Another thing that changed was I took singing lessons. Through this experience, I learned just how hard it is to be a good singer. It wasn’t really until I took singing lessons, that I saw karaoke as the ideal vehicle for work on my singing. It freed me from having to concentrate on the chords i was playing and providing the rhythm.  Somwhat recently, I discovered that people I already knew in the Seattle tech scene liked to perform at karaoke. So I’ve started doing it and discovered that I really like it. One of the things about doing open mic nights in the past, I limited song selections to what I could sing and play. With karaoke, I’m free to work on my singing and related activities like composure, stature, pitch, breath control, and be in character. Now when I think about song choices, I think: do I like the song? is it within my range? do i think I could do it well?  As I try more songs, I surprise myself on the number of songs I’m finding that I think I can do well. I’m also noticing that I’m not nervous anymore when I go on stage. hmmm, I wonder why that is? Nevermind for now. That is a different post.  So what about the “tour”? The Seattle Karaoke Tour was devised by Jeff Croft and Alix Han. Eight nights in a row of karaoke, where each venue is different from the last, throughout Seattle. I’m looking forward to it. Last night was a great start. I’ve got a list of new songs that I haven’t tried yet.  I’m hoping to make it to each night, to try them all. We’ll see what happens.

Barcamp Seattle 2009 Schedule

Some of you may be wondering what the schedule is for Barcamp. Friday Night there is a kickoff party/book signing at office nomads . Tara Hunt (@missrogue) will be selling and signing copies of her book “The Whuffie Factor“. Saturday morning at 10am the doors open for Barcamp Seattle. People will mingle for a bit and around 10:30 we’ll make announcements and let people signup themselves up for sessions on the board for the day. Everyone who shows up, has the opportunity to run a session. At 5pm, the sessions will wrap up for the day. Afterwards, we’ll head over to the Red Door, which is just a couple of blocks away. On Sunday, another set of session will start at 10am  and will wrap up at 1pm.

Build Your Portfolio With CodeIgniter

You know about web design, and you’ve decided to use a PHP framework to get you started. With the availability of so many great open source software projects out there – like Zend Framework, CakePHP, and Drupal, Wordpress – it’s easy to be overwhelmed. Each of those projects has their merits and drawbacks, but my favorite is CodeIgniter – it’s powerful, lightweight, and flexible. There are several  tutorials on CodeIgniter. Here’s a introductory video tutorial that uses PHP4 syntax. The things this tutorial uses PHP5 syntax.   For the sake of  brevity, I’m going to assume you’ve already installed it. I’m going to explain how to build a portfolio site using CodeIgniter. Lets think about the typical layout of a portfolio – homepage, about, contact, services, work – most of which are probably static pages. The “work” page could be database driven, depending on how comfortable you are using databases. For this post, I’m going to assume its static, and leave it as an exercise for you to make it dynamic. Let’s get started, shall we?! Here’s how CodeIgniter reads it’s urls by default: example.com/class/function/ID You want your URLs to be simple. The homepage should be “/”, contact “/contact”, about  “/about”, and services “/services. For the moment, we’re not going to consider the Work pages. If you create your controllers using the default URL setup, you’ll have 4 controllers to start. In each one of those, you would create a method called index(). This is the method that gets called automatically when you don’t specify a 2nd segment for your URL.  While that will work, there is a better way, that will makes things easier for you. Lets  start by opening your favorite text editor, and create a file called Main.php. In this file we’ll create your controller. it should look like this:
<?php
class Main extends Controller {
    public function __construct(){
        parent::__construct();
    }

    public function index(){
        echo "Homepage";
   }
}
?>
Save this to your CI_INSTALL/application/controllers directory. To run go to example.com/index.php/main where example.com is your site. But wait, we wanted to call it ‘/home’ . To make this happen we’re going to use a magical feature of CodeIgniter – routes! Ok, maybe it’s not magical, but it sure is great to use. So you’re aware it’s a very bad practice to use echo statements in your controller. This gets fixed shortly. In your CI_INSTALL/application/config is a file called routes.php that we need to edit. The default controller should be set to “main”, like below.
$route['default_controller'] = "main";
While we’re editing the routes.php file, lets also add the following lines below the default controller and scaffolding settings.
// Custom routes for my site
$route['about'] = "main/about";
$route['contact'] = "main/contact";
$route['services'] = "main/services";
Now that we’ve made that update, lets go back to our controller main.php. Lets update the index action to use a view script instead of the echo statement. The code below will load the file home.php in the CI_INSTALL/application/views directory.
public function index(){
    $this->load->view('home');
}
That takes care of how to load the home page. Now lets create the methods for the other routes.
public function about(){
    $this->load->view('about');
}

public function contact(){
    $this->load->view('contact');
}

public function services(){
    $this->load->view('services');
}
When you call your views scripts this way, you’ll need to have all the page HTML – from DOCTYPE to your closing “html” tag. You can call multiple view scripts, so I suggest you make two more  – header.php and footer.php – as an exercise. For now, create them with all the required HTML. For the about page, run it in your browser like this example.com/index.php/about Now that we’ve done a majority of the pages now, we just need to do the ‘work’ pages. We made this one separate because this one could be more involved than the other pages, depending how you’d like to implement it,  so its best to create a separate controller. Since this will be responsible for displaying pages of our work, we’re gonna want a little more power.  We’ll have two different different URLs – /work (which will be an overview page), and /work/client-name to display each client project on it’s own page. The overview page is easy. It works just like the homepage. In your CI_INSTALL/application/controllers directory, add the following code.
<?php
class Work extends Controller {

	public function __construct(){
		parent::__construct();

	}

	public function index(){
		$this->load->view('work_index');
	}

}
?>
Now that you’ve created the controller, now create a view script in CI_INSTALL/application/views called work_index.php and add the html you want to display. For the client pages, we’re going to add a little more code. Our goal here is to have one page that we can re-use for every client. The first thing we need in a new method that we’ll call client. In the method we’ll create an array to associate the client id with their information.
public function client($clientId){

    $data = array(
        'foo' => array('title' => 'Foo Title',
                 'hero' => '/images/foo/hero.jpg',
                 'altText' => 'foo logo')
        ,'bar' => array('title' => 'Bar Title',
                 'hero' => '/images/bar/hero.jpg',
                 'altText' => 'bar logo')
    );

    $this->load->view('work_client', $data[$clientId]);
}
What’s happening above, is the third segment that comes in is passed in as the argument to the method. To paraphrase: the value of $clientId is whatever appears the in the third url segment. $clientId is used to get the corresponding information to send to the page. Below is a simple view file that will process that uses the information for the client.
<html>
<head>
<title><?php echo $title; ?></title>
</head>

<body>
    <h1><?php echo $altText ?></h1>
        <img id="hero"
             src="<?php echo $hero?>"
             alt="<?php echo $altText ?>" />
	<p>this is some information about the project.
You should update the controller with the information that you would like
 to appear here.</p>
</body>
</html>
Above we mentioned that we want our client urls to be example.com/index.php/work/client-name, but if you’ve been paying attention, you currently need to type example.com/index.php/work/client/client-name for the page to show up. Now I’ll show you how to fix that – by returning to our magical friend routes.php. Add this to the file just below the routes you added earlier.
$route['work/(:any)'] = "work/client/$1";
At this point everything should be working fine. But you’re probably thinking “how do I get rid of the index.php from my URLs?” To do this you need a .htaccess file in the root of your website. paste the lines below into it on your server.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|css|js|images|robots\.txt)
# this line adds index.php to the URL so CodeIgniter can process it.
RewriteRule ^(.*)$ index.php?$1 [L]
Throughout your site, now you can write URLs like /about. The Apache web server will use the htaccess file make the URL be index.php/about so CodeIgniter can handle it properly. Ok. That should be enough to get you started. Take the time to write your feedback in the comments below. If this helped you, great! If there’s something you think is missing, that is also good to know.

Geek Fit Seattle

As if getting fit wasn’t hard enough, it’s even tougher when you try to do it on your own. I know you’ve tried it. Maybe you’re were one of the lucky ones and accomplished your goal. But more than likely, something came up and managed to derail your plans. I’ve been there. I’ve done that several times in fact. However, I have an idea that will help things be different this time. The secret to success with fitness is a combination of collaboration and independence.  This means we work together, but in a way that adapts to our individual lives. Its a hybrid of Meetup and Daily Burn. In fact, we would use both of those sites to coordinate. I’m calling it Geek Fit Seattle. It works like this: On Meetup, I set up various events like a Green Lake run, a bike ride on the Burke Gilman trail and people sign up for the events that interest them. After we complete the event, update your Daily Burn account with the info. Simple. The other side of this is accountability – to keep each other accountable and on track with the goals we say we want to achieve, to motivate and cheer on our friends, while making everyone healthier. The goal is for everyone to gain the fitness level and lose the weight they desire. What I want to know is: How many people are interested in this? When do you want to start?

Update Fri June 19, 2009

A few days ago, I created the Geek Fit Seattle group on Meetup.com. Last night we had the first event, which was a Greenlake Run.  We’re already up to 25 members in the group. This makes me happy. Now I’m trying to decide what kind of events people want to participate, and which are the best days to schedule events. This will take time to master. I’m really hoping that people in the group blend well together. Ideally, every member will have at least one buddy to help keep them on track. This also will come with time. That being said, It can’t be forced and has to come naturally.

Update Mon June 22, 2009

A Geek Fit Seattle group has been created on Daily Burn (formerly Gyminee). Sign up so you can track your fitness information for the events you attend, as well as the exercise you do when not with the group.  I look forward to seeing everyones progress.

Accessibility Affects Everyone

“An accessible web page makes all content available to any human user who wants it regardless of browsing technology.” WebAxe In your browsing experience on the web, you may have heard the word ‘accessibility’ mentioned. If you did a quick web search, you saw that it was to help people who are disabled access the web.  That is true and it’s still a primary driver, but the benefits of accessibility affect everyone. One example is phone numbers. Marketing people like to use words, substituting letters for digits, in their phone numbers. So you might see “1 800-your-mom” instead of  “1 800 968-7666″.  They do this for 2 reasons. First, people are better remembering words than numbers. Second, it helps with their branding.  The convention is based on the original rotary phones, and then touch tone phones.  It was useful in years past, but its quickly becoming an outdated strategy. As more people use mobile devices with full QWERTY keyboards, the letters no longer matchup with the digits, and the solution becomes inaccessible.

Everybody needs access

I agree that disabled people have been treated as second class citizens on the web. Sometimes, not considered at all. There has been some forward progress thanks to the web standards crowd through the use of alternate stylesheets, semantic markup, and considering whether someone could use their design with a screen reader.  With that said, to sell accessibility as a way to assist disabled people sometimes does more harm than good for the cause (increasing adoption of accessible design). Most people don’t identify with the disabled community, unless they happen to know someone. In fact, its not even on the radar for most businesses. So when it comes to their company website, accessibility is not considered during the website design process. But if it were, it wouldn’t cost that much to add it. Adding it afterward, just like security, is always a more expensive process. If you discuss accessibility in terms of the non-disabled users, it’s likely businesses will see the value more readily. As a result, the disabled users get what they need.

Data from a U.S. Census Press Release

In a press release titled “More Than 50 Million Americans Report Some Level of Disability” released May 12, 2006, The U.S. Census Bureau provided a number of important statistics. Below is a quote from that report. “About 18 percent of Americans in 2002 said they had a disability, and 12 percent had a severe disability, according to a report released today by the U.S. Census Bureau. Among people with disabilities, more than half of those 21 to 64 years old had a job, more than 4-in-10 of those ages 15 to 64 used a computer at home and a quarter of those age 25 to 64 had a college degree.” Perhaps this will get businesses addressing accessibility as a primary concern, if for no other reason than that it could increase their bottom line. Here’s to hoping.