Ignored By Dinosaurs 🦕

My first post on my new blog! I wrote this one all by myself, with the help of hundreds and hundreds of open source collaborators, Stack Overflow commenters, IRC, Google Groups, and sheer force of WILL!!!

This is my first running, production Ruby on Rails app. It took me about two days/6 hours to write, and about 4 days/30 hours to deploy. Deploy means “make work on the web so people can see it” and it was every bit the pain in the ass that I'd heard it was supposed to be. But by god, here it is! Nginx/Passenger/MySql/Rails. I'll make it look prettier later, and hopefully also have something to say.

Guess I also need to set it to something other than Greenwich mean time. It begins! Some more!

#rails #random

I was listening to RadioLab the other evening during the WNYC pledge drive. During the part of the show in which they were actually driving pledges they announced one of those perks for donors of a certain level, I think they called them “lab partners”. It entitles you to some stuff, some interactivity with RadioLab producers, and the obligatory “exclusive content”. The very first thing that popped in my head was -

I'm tired of content

I got to thinking. Commerce and economics. Supply and demand. Scarcity.

Take music – music was once a thing that could only be experienced live. The recording era ended all of that and ushered in a successful business model that had a good run of 80 years or so by not only increasing the supply of music to people, but by exponentially increasing the demand. Previously if you wanted to hear Beethoven's music you needed to go to the symphony to hear it, but now you could put on a record and listen to it. Not only that, but after the performance had ended you could put on some Pink Floyd, and after that whatever else. You weren't confined to listening to music once a day (or once a month), you could basically listen to it all the time.

But, the commerce of the business was still driven by scarcity since after all, you still needed a record and a record player. You still had to go down to the store to buy the record, if it was even available yet. Records could be released on a date, remember that? Now what?

Records are routinely leaked on the internet and unlike a physical resource that leaks out of something, the instant something digital “leaks” onto the internet the supply will forevermore outweigh demand. How do you build a business around that?

I've been pondering this for as long as anyone and I now think that “exclusive content” completely misses the point. I don't give a rip about exclusive content because there's no such thing. Trying to create this impression of scarcity to stoke demand is pointless because there's an endless wealth of other content that's free right now. Don't even demean your customers or fans with it, because it only means that they will have to jump through a hoop to engage with it. Everybody else will be casually engaging with the free stuff at their convenience. If you're lucky.

If you're lucky you will have patrons, not customers. Customers barely exist in the creative world now.

#random #business

I'm reading this morning and I come across a post about a thing that somebody wrote called (or subtitled, I'm not sure) Node.php. Anyone who doesn't understand what it is by looking at the name wouldn't understand my explanation for what it does, so whatever.

For the non-programmers —

It's written in a language called PHP. PHP, despite being the backbone for the server side component of a huge number of the largest websites in existence (as well as this tiny little one), is almost universally derided in hacker circles. It's sort of like the Alvarez guitar of programming languages. No “real professional” guitar player would be caught dead playing anything but a Les Paul or a Strat, so the Alvarez is widely acknowledged to be a “starter” guitar, much like PHP is “starter” language to some people.

The problem is that this is all a bunch of pseudo-religious hokey, and (many) hackers are more vain, egotistical, and prone to engaging in flame wars over their chosen tools than even musicians. Any actual real professional musician knows good and damn well that he can get a beautiful sound out of an Alvarez and that only rookies have the time to make fun of each other for their choice because the pros are too busy creating.

I typically play a plywood Chinese bass that's been cut up into little pieces and I get a damn good sound out of it. Is the sound better than my carved bass? Is it easier to play? No. Does that stop me from rocking the joint with it? No.

So why in the face of so much evidence that PHP is a perfectly useful language to a vast number of programmers of all skill levels around the world does it garner such derision? Someone please explain it to me as if you were trying to convince a non-programmer that they should care because the whole thing seems a little immature.

#technology #php

So I've decided to start playing around with CodeIgniter. It's a supremely simple PHP framework that has a lot of good documentation, a pretty big user/developer base, and has a lot in common stylistically with Rails. I've just really started playing around with it, and wanted to use the migrations feature for building up my database. I won't explain what migrations are or how they work or why to use them because that's been covered.

Our project will be something like a database of shows. So we need a “shows” table in our database. CI needs you to edit application/config/migrations.php to change $config['migration_enabled'] = FALSE; to $config['migration_enabled'] = TRUE;. This will enable migrations in the app. The next meaningful line down the page – $config['migration_version'] = X; will tell your app which migration it's supposed to be on. If you're working with someone else and they update their codebase from a repo, then their app will check their local development database, see that X number of migrations have not been applied (by checking the version number in the migrations table in the DB) and bring the schema up to date. It's neat.

Step 2 will be to write our first migration. Under application/ you'll need a /migrations directory (application/migrations). This is where you'll write out the migration file. About here is where you start realizing some of the amazing things that Rails does for you, such as building all of this with a line on the terminal instead of making you trot all over you app to set this up. I digress.

Our first migration will look like this -

// application/migrations/001_add_shows.php
 
php defined("BASEPATH") or exit("No direct script access allowed");

 class Migration_Add_shows extends CI_Migration {
 
 public function up() {
 $this-dbforge->add_field('id');
 $this->dbforge->add_field(array(
 'date' => array(
 'type' => 'DATE',
 'null' => FALSE,
 ),
 'location' => array(
 'type' => 'VARCHAR',
 'constraint' => '255',
 'null' => FALSE,
 ),
 'description' => array(
 'type' => 'TEXT',
 'null' => TRUE,
 ),
 ));
 $this->dbforge->create_table('shows');
 }

 public function down() {
 $this->dbforge->drop_table('shows');
 }

 }
?>

So here's what this says -

We're creating a migration called “Add shows”. This will create our “shows” table in the DB. It will have an 'id' column. By using $this->dbforge->add_field('id');, CI knows to make this your primary key, to make it an auto-incrementing integer, and for it not to be NULL (http://codeigniter.com/userguide/database/forge.html#addfield). We're also adding a date field, a location field, and a text description.

The name of this file is important. If you call the class Migration_Add_shows and name the file 001addshow.php (singular), CI won't be able to find it. This is it for step 2.

Note: the down() method is for reversing this change. I haven't figured out how that works just yet from the standpoint of running the down() migration, but you'll want to write the reverse of any up() method for every migration. This is the “undo” button on this process. Ignore it at your peril.

Step 3 is to create a migrations controller, since you'll need this migration to be called from somewhere. I will learn how to run migrations from the command line next, since the CLI is obviously where it's at, but for now we'll write a controller and do it the hard way.

// application/controllers/migrate.php
 
php defined("BASEPATH") or exit("No direct script access allowed");

 class Migrate extends CI_Controller {
 public function index() {
 if (ENVIRONMENT == 'development') {
 $this-load->library('migration');
 if ( ! $this->migration->current()) {
 show_error($this->migration->error_string());
 } else {
 echo "success";
 }
 } else {
 echo "go away";
 }
 }
 }
?>

Now, if you visit yourapp.com/index.php/migrate, you'll have run the migration. It took me a few minutes to get this wired up correctly, and CI gives you some useful error messages, so hopefully you'll be on your way. Basically this says -

This can only be run while in development mode, else “go away” and stop monkeying with my app. Load the migration library, which runs the migration up to the version specified in config/migrations.php. When you add a new migration, update the version number in that file, and it'll be run next time you visit this url.

Did you get all that?

#php

This is part of an IRC transcript between a buddy and I, wherein I try to explain a little bit about how the internet works and why knowing at least a little bit of database theory will go a long way in demystifying learning how to build stuff. (It's a technical term.) He's trying to learn a bit about Drupal and about how you build sites with it, so I'm going to tag him in on a project for a friend of mine who runs a yoga studio. Hers was the first site I ever built, in Wordpress. I've been thinking about porting it to Drupal and having some more fun with it, as she'd kinda like a database of her registered students among a few other niceties that would be fairly easy to pull off in Drupal.


grubb: And it basically works fine, but I wanted to have a bit more fun with it and integrate the calendar into the site

[4:21pm] grubb: but it's pretty much a prefect easy Drupal site.

[4:21pm] grubb: When I say “there'd be a couple of different content types

[4:21pm] grubb: “

[4:21pm] Keith__: ok

[4:21pm] grubb: does that mean anything to you?

[4:24pm] grubb: So I'll just go ahead and explain it

[4:24pm] Keith__: ok, sorry multitasking

[4:24pm] grubb: Pretty much everything you interact with on the internet is an interface to a database somewhere.

[4:25pm] grubb: no sweat.

[4:25pm] grubb: I assume you're familiar with super-basic database theory

[4:26pm] grubb: basically a database is a bunch of data, and that data is ordered in a very structured way so that it's easy to tell a computer how to go get the specific data you're looking for

[4:26pm] grubb: Example – http://ignoredbydinosaurs.com/

[4:27pm] grubb: if you scroll to the bottom, the blog – that's one content type on my site, which means more or less that each one of those posts is located in one row of the “blog” table in the database.

[4:27pm] grubb: I'm the only user on that site, but if there were more we'd each occupy one row in the “user” table in the database.

[4:28pm] grubb: My portfolio is another content type – each portfolio entry is one row in the “portfolio” table in the database.

[4:28pm] grubb: (This is a simplified explanation, but basically accurate)

[4:28pm] grubb: If you go to Facebook, each user is a row in the “user” table in the FB database.

[4:29pm] grubb: Each post on everybody's wall is a row in the “wall_posts” table in their database.

[4:29pm] grubb: The “wall_posts” table in the database would have a column for the “post” and for the “user” who posted it.

[4:30pm] Keith__: ok

[4:30pm] grubb: So if I post something on my Facebook wall, that particular row would have “blah, blah blah” (whatever the post is) and my user_id

[4:31pm] grubb: So by linking that table with the post on it with the table that contains my profile info (including my user_id), you can put all of that info onto my post on someone else's wall.

[4:31pm] Keith__: ok

[4:31pm] Keith__: based on user id

[4:31pm] grubb: and that post would have all the meaningful shit that you want to see on FB

[4:31pm] grubb: right

[4:31pm] Keith__: ok

[4:31pm] grubb: so the user_id is important

[4:32pm] Keith__: what browser do you work in?

[4:32pm] grubb: it appears not just in the user table, but also in the posts table so you can link the two together

[4:32pm] grubb: I use Chrome

[4:32pm] grubb: is this making sense?

[4:32pm] Keith__: somewhat

[4:32pm] grubb: the point is obviously that whenever you go to a web page, you're looking at HTML

[4:32pm] grubb: (scuse me, it's not that obvious)

[4:33pm] Keith__: ok

[4:33pm] grubb: But there's not a mountain of programmers writing each page of HTML that anyone could possibly look at

[4:33pm] grubb: on the entire internet

[4:33pm] Keith__: right

[4:34pm] grubb: When you go to your Facebook homepage, a computer on the other end of that is putting that particular page of HTML together “dynamically”

[4:34pm] grubb: it says “okay, database, give me the 50 most recent posts from all of Keith Hick's friends. put the most recent one at the top”

[4:35pm] grubb: and that is fundamentally what a database does

[4:35pm] Keith__: ok

[4:35pm] grubb: and so it hands that information back to the computer which then puts that specific page together for you

[4:35pm] Keith__: right

[4:35pm] grubb: If you go to the front page of my website it does the same thing

[4:36pm] Keith__: complex filing system deciphered?

[4:36pm] grubb: you mean this/path/or/wahtever?

[4:36pm] grubb: to get that particular page?

[4:36pm] Keith__: huh

[4:36pm] Keith__: yeah

[4:36pm] grubb: what do you mean?

[4:36pm] Keith__: never mind

[4:37pm] grubb: OK

[4:37pm] Keith__: let's plan on rebuilding this site

[4:37pm] grubb: OK

grubb: so basically, start looking at most webpages as a thing that has been lovingly crafted for you by a computer at that specific point in time, because that's what a lot of them are

#databases

I dunno. I'm not really sure what I'm trying to say yet, but I'll give it a whirl.

There's a really interesting conversation going on right now, initially spearheaded by Pandolfi, but now spilling out into the wider stream. The whole “what is bluegrass” conversation, and it's almost certain that it's always been going on but just never showed up on my radar.

I've been, in the most nominal sense, a bluegrass musician for close to 10 years now. Jeremy from the Dusters asked me the other night how long I'd been playing bluegrass. I wasn't sure what answer to give him. Less than a year? Almost 10 years?

Then yesterday I read that Devol interview and the part where he says that the Avetts brothers are “in NO way a bluegrass band” struck a chord. Pardon the pun.

Now here's a bass player that I love like a brother, in one of those bluegrass bands that gets routinely and deliberately ignored by the IBMA, the supposed torch-bearing organization of bluegrass music, succumbing to the same trap of bluegrass judgmentalism that drives musicians like us crazy. I, for one, happen to think the Avetts ARE bluegrass, whether they care to be considered that or not.

I think RRE and Cornmeal are bluegrass, even if they are loud as fuck and have drum kits and electric guitars. I think Avetts and Mumford are bluegrass, even if they're poppy and successful. I think the Stringdusters are bluegrass even if they sound increasingly like a really good jamband. I love bluegrass music, but honestly, the shit I can't listen to for much longer than an hour or so is that SPBGMA (pronounced Spig-ma) style that is arguably the “most” bluegrass of all these subgenres. I surely wouldn't stoop to calling any of it “not bluegrass”. It just seems hypocritical.

Is there a “problem” with bluegrass? By every available metric bluegrass and all it's dialects is doing better than ever. Is the problem just that it's gone beyond it's traditional borders and has a lot more people involved in the conversation and the scene than ever before?

Is that really a problem?

I could see how it would be if you were the organization that used to be the authoritative voice on the subject for the community that used to be easy to contain within defined borders. I don't know. The Church analogy still seems fitting. The gated community one, also.

I recently joined the IBMA to see if there's any interest of this conversation within that community, rather than being one of these folks sniping from the outside. I guess we'll see.

#music

I'm just going to attach this note to a rock and toss it over the wall here. Maybe someone will notice it. Maybe it will even be read.


Hi. I'm one of the barbarian bluegrass players on the other side of the wall. I've been looking at your gated neighborhood my entire professional life, and it looks very nice from the outside.

A guy that I respect a lot also happens to be a member of your community. He and his band come outside the gates all the time to play for the masses out here, and we love them. I'm actually in another band that plays the same circuit out here in the world, and we have a great time. I've never really worried about whether or not I would be able to afford a house in your neighborhood because as far as I'm concerned, we've got it all out here. I just assumed that you guys would rather not mix with the riff raff (I say that with fondness) and that's fine. You're welcome to, but you shouldn't have to.

Please forgive me if I've got some of the facts wrong here, I've never actually been inside your neighborhood. But some things I've heard lately have surprised me. There are apparently some empty houses in there, and the number of houses that are being filled with new residents is not keeping pace with the number of houses that are coming up on the market. Some of those houses have been vacant for a while now? The tax base is dwindling, lawns aren't being kept and the neighborhood committee is starting to worry that this decline is accelerating. The idea of opening the gates has been proposed. To make the community inclusive rather than exclusive. To relax some of the requirements for membership. This guy I'm talking about is one of the most articulate proponents of this idea.

He has rightly figured that we make a lot more hay out here than you guys are able to in there. It's just supply and demand – there's more of both out here. The tax base you need to keep the neighborhood thriving is right outside the gate.


You all are more than welcome out here. That's the entire point of out here. We take everybody. There's plenty of land and having it worked rather than lay fallow only makes it that much more more fertile for the rest of us, which leads to more fans enjoying the fruits of bluegrass, which brings more young bands into the fold. A virtuous cycle.

I'm just not so sure about us coming in there.

I have 2 young kids and they're loud and a lot of times their toys get left in the yard, and admittedly it doesn't look that great but we live on some land where you can't really see the house from the road. Sometimes the grass gets a little shaggy. I still have part of a tree down from that hurricane, but I'll get to it.

If I move in there, then either I'm going to have to hire someone to keep my grass in line with the neighborhood covenant or I'm going to get dirty looks from my neighbors. Now, I refuse to pay someone else to mow my lawn, and you most certainly shouldn't have to be aggravated every time you look outside your window. Part of the reason you live in that neighborhood is because everyone there keeps their grass a certain way, and I can appreciate that as much as you can.

If the new committee does away with that covenant then it might make it easier for me to be who I am, but what about all the people that have lived in that neighborhood for a long time because they like it the way it is?

Where are they going to be able to go?

#bluegrass

Spotify.

My favorite thing on the internet ever so far.

Share music with my Facebook friends. Great idea. Find all kinds of new music without having to commit to buying it. Great idea. Subscription feature that lets me take it on a plane trip. Great idea.


Today I have to reconnect to Facebook for some reason. I look at the ridiculous list of permissions that Spotify wants me to grant them. Access to my data when I'm not online. Permission to post on my behalf. To name my third son Spotify. I wouldn't have thought twice about dismissing and going about my day, but for two things.

  1. Connecting to Facebook is apparently the only realistic way to find your friends in the world with whom you might want to share music.

  2. The words of my friend Teddy, who works at Facebook. When I first signed up with Spotify i was reluctant to connect it to Facebook for the mental discomfort it caused me to grant any application the rights for which it was asking. To paraphrase,

“You gotta realize, though. If they go and take a bunch of your data and post a bunch of stuff on your wall that you don't want there, it makes them look bad and Facebook look bad too.”

How true.


Luckily I wasn't indulging my Katy Perry sweet tooth this morning when I get a message from an acquaintance on Facebook that Spotify is indeed posting every single song that I listen to on my behalf. Exact same permissions that were granted two months ago, but now being used in the exact way that I didn't want.

It took me about 5 minutes of incredulous tweeting to figure out that I could go 3 levels down into the settings on Facebook and remove this particular permission from the Spotify app. I decided while I was at it to remove every other permission for the Spotify app as well delete about 30 apps that I had idea were even there. One bad apple.

The question I have

How can this sort of app behavior be opt-out?

Obviously Facebook and app developers in general would plead to the FCC before congress that any of this behavior is opt-in in the first place, that Spotify asked me up front for these permissions and I said “yes”. This is technically true, but total bullshit.

When an app asks for permission to do this and this and that on your behalf, why isn't there a simple little checklist of those things that you do and don't want it to do up front, instead of buried 3 levels deep in settings that are continually being moved around Facebook?

Cue the title of this post.

And by “Great”, I don't mean awesome.

For those of you who don't know what I mean when I say Lorem Ipsum, it's standard gibberish copy put in place of the real copy that's going into your design. It's been used for decades if not centuries to allow creative teams to test out different visual designs and know what it'll look like when some words get put in there.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

~ a standard paragraph of Lorem Ipsum...

So what's wrong with this?

I just built a website for a friend over the last half of last week. The designer and I worked together marvelously, which is great because it was our first gig. She was totally into trying out the cool, new tool that launched last week to see if it would help keep us organized while in a hurry (our launch date is today – Monday). The project manager was the one in charge of dealing with the ADD client, so it was really a perfect scenario. We went with Wordpress since everyone was familiar with it.

Friday evening I got a Word doc of the site's copy. I don't like placing copy in websites, but whatever. At least it wasn't in all caps.

This morning I open it up and at least half of the pages are “coming soon”. Approximately half of the remaining pages are four sentences or less. I'm all about white space, but this is a bit too much.

That's when the title of this post popped into my head.

Simple Rule for Marketing Websites

If you do the design first and the copy last, you lose. If you do the copy first and the design second, you stand a much better chance at succeeding with both.