Ignored By Dinosaurs 🦕

It's kinda difficult. I feel bad for not really having much to say, but I've been pondering (probably excessively) over what direction it should really take.

My good buddy Anders, of Greensky fame and fortune, let me know that he checks it out from time to time. “Some of it's really technical”, he says. Stacy says the same thing. “but then occasionally you'll write something” pertinent. So, I've been pondering how to take it and relate it maybe to something else that makes the dryness of database theory a bit more palatable.

For instance, my post a while back about “Development Platforms”. That was a bunch of tripe that would only make sense if you were already a propellerhead. What I should've said was something like this:

A development platform, and choosing one to develop on, is sort of like deciding what style of music you want to play. If you really like the blues, you don't have to invent the blues. Someone already did that and all you need to do is write some lyrics for your song, because the same 12 bar form has been there for decades now. That could be iPhone development. You want to build cool websites? The AABA form has been used to great effect to write countless jazz tunes since the 20s. All you need to do is pick a key and make up a progression. May I suggest rhythm changes? Ruby on Rails, well that'd probably be the blues since there's the least amount of configuring to do before you get to the creative part.

Make more sense? My other buddy Jay (of Donna the Buffalo fame and fortune) has a great analogy for database theory that I'll get to when I have a chance. I have way more free time on the road than at home these days. See y'all later...

Facebook made this announcement yesterday through the Developers section of their site:

Today we are excited to announce an important step toward greater openness through Facebook Platform. For the first time, we're opening the core Facebook product experience — the stream — with the new Facebook Open Stream API.

What this says to me is that Twitter is having a major impact on the evolution of the internet right now, namely in the heat they're putting on Facebook to innovate.

Now, the close up view of Twitter and Facebook looks pretty similar. Facebook is a place where people can make their own little website and stash pictures there to show their friends, etc., but the real innovation of Facebook has been to tap into the collective ADD of humanity and provide a place where you can tell people what you're doing and read about what they're doing, in small chunks. Twitter is a place where you can tap into the collective ADD of humanity and tell people what you're doing and read about what they're doing in small chunks, but the real innovation of Twitter is their API.

An API (Application Programming Interface) is basically the software equivalent to a door into your application. The 3rd party developer is then able to write his own application that uses that door to do stuff with the application (or it's data) on the other side. It's cool. It's what takes your application from being more or less a mute, single-celled organism to one that all the sudden can speak with others and communicate. That's why there are so many Twitter clients coming out all the time. Twitter on it's own is cool, if a bit mundane, but that they've opened the system to others to make more fun/valuable for them is why they are changing the world right now.

Facebook is paying close attention. They've kept lean and innovative where MySpace went bloated and corporate, but they've always preferred the closed ecosystem approach. All those applications that people continually send you are cool and all, but they force the developer to work within the confines of FB rules if you want to interact with the stuff that's going on within their walls. And there is an unfathomable amount of stuff going on within their walls. Think what you could do if you could break out all those people talking to each other, all those people posting photos, all those people connecting over similar interests or old school ties and start figuring out new ways to play with all that. The possibilities make Twitter look like a drop in the bucket...

#general-development

So, as I mentioned in phases-iphone-ownership-beginning, after about my first hour or so playing with the iPhone, it came to me that this was a device that could help you get things done. No more going to the computer, turning on the computer, waiting for it to boot up, etc., just to check my email? A calendar that I always have in my pocket? These were revelations to my unorganized old-self. After the 2.0 update and the ability to add functionality to an already cool device was released, that's when the real fun began. I was on the bus yesterday and Stacy was reading the NY Times across from me, and there was that ad that Apple is running aimed toward small business owners. One of the free apps that they displayed was called SimpleMindsXpress, so I checked it out. I cannot recommend an app more highly than this one. Let me elaborate...

As you darn well know if you read this blog, I've recently undertaken the self-assigned role of Web Czar of my band. Whilst pondering over all of the various aspects of what a band like mine needs to be on top of in terms of their web presence, I've often wished I were better about writing stuff down – organizational website overviews, flowcharts of how a shopping cart experience should be, etc. I'm just not a pencil and paper guy. Luckily, someone out there figured out a way to make it much more exciting to my brain! And it was free! So, here's how I picture RRE's overall web presence:

So, great! Now I can kind of get my head around it a little better. I've broken it into 2 main categories (for my purposes. Media/PR is going to be handled by the proper authorities), our official presence and the one that is probably going to be even more important overall, the Community. They both involve using the various social networks, and in the free version you can't link a child category to 2 parent categories, so I just created Social Networks for both. Now, zooming in a little closer, you can start to organize which social networks on which you want to keep track of your presence:

and if you have a campaign specific to one of them, you can zoom in further. BTW, the auto-spell checker on the iPhone automatically changes Twitter to Twitted (decidedly inconvenient these days), and there appears to be a bug in this app that won't let you dismiss the “correct” word. Annoying, but I guess nothing is perfect. Now I'm going to turn my attention to the forthcoming fan site, which we will park at Railroadearth.net when all is said and done:

And the next Railroadearth.com:

Or the RRE iPhone app:

Holy crap!!!

So, in closing, in two hours on the bus yesterday I was pretty much able to sketch out just about every component of our entire online infrastructure, which as much or as little abstraction as I needed. God bless America!

Edit: So last night's deep thought was that I completely forgot to even mention how it works. They call these diagrams “Mind Maps”, and when you create a new one, you start off with that central blue bubble. If you want to add a category under that you just click the button. A different colored bubble shows up that you then name with the category. You can move them around and add new ones and cut old ones out. For instance, here's the revised overall scheme, to which I added the iPhone app and just tightened everything up:

Ahmad Jamal – The Awakening

The only version of Oliver Nelson's “Stolen Moments” that might actually be better than the original. Several other outstanding renditions of great standards on there as well. A. Jobim's “Wave” and H. Hancock's “Dolphin Dance” are two of them. This is one of the first jazz albums I picked up in college, before I started playing jazz. When I took the jazz history class at ASU, I wrote a paper about it. I couldn't figure out why none of these tunes follow the AABA form. My ears later got good enough to realize that they did, but that Jamal was throwing in these huge jammy vamps in between the sections. Great jazz album...

They still suck!

There used to be something here?

All of the sudden, by bandwidth has gone up? I wonder what people are doing on there?

Simpletons guide to web server analysis.

For my band, for my band...

Would any of you care to help out with putting together yet another online community? The aim with this one is to try and organize Railroad Earth's online presence just a bit, mainly so that newcomers can have a better central clearinghouse for RRE info and community before swimming into deeper waters. This probably isn't the most expeditious place to post this, but I'm trying to keep this kinda small while we're hammering out the design details.

That said, if you're an RRE fan, or a curious onlooker, please check it out here, and feel free to let me know of any annoying settings that you discover that I might be able to change.

As in, what does that mean, anyway? I'll try and keep it short.

When I spoke of Ruby on Rails the other day as the 'hotsh!t dev platform of the day', I realized that it would need some clarification. So let me clarify.

Coding pretty much anything is a massive, time consuming job. That's part of the reason that computer languages have evolved from 1s and 0s to Fortran to C to C++ to Java to Ruby: if you were to try and write the Twitter website in assembly language (binary), you'd be there coding for a very long time. If you were to try and write Windows 7, you couldn't do it. Hell, they can barely do it now.

Man has devised a better way. I wrote about some of it in the Database post. He has set to automating as much of the menial, repetitive work as possible so that the developer may set his mind toward accomplishing other tasks, like the fun bits of the application. In the case of iPhone development, Apple has created an environment in which to write the apps, X Code. X Code is itself an application that runs on your Mac just like any other application. The nice thing about X Code is that Apple designed it specifically for the purposes of making applications for Macs and iPhones.

History lesson, culled mostly from the Mac dev bible, Cocoa Programming for Mac OS X:

Apple computers was started years ago in a garage by two guys named Steve. They're both very famous now, Steve W perhaps slightly less so. The two guys named Steve decided that since they were both programmers and engineers, that perhaps they should hire a CEO type to help them with their rapidly growing company. CEO guy came in and moved Steve J to some kind of powerless position in the company, so he split. He started another company called NeXT. They never did anything commercially successful, but they did develop an operating system and a platform for writing applications – one that started with a fairly significant library of code already put together to make the developers job that much quicker. At some point, Apple was not doing well financially or otherwise and Microsoft came in and basically gave them a lifeline. This was in the 90s. Steve J at that point was an intensely innovative failure. Funny, huh?

Around this time Apple decided to buy NeXT computers along with the Operating System that they had developed. Steve J was brought back as an advisor for a little bit before becoming CEO within a year. The NeXT OS eventually became Mac OS X, which eventually became the iPhone OS. The point is that even though the iPhone has only been around for less than 2 years now, the developmental lead-up took decades. During that time, various developers decided that they would put together 'libraries' of code for making Macintosh applications and save themselves the time of having to rewrite all this code that's essentially “boilerplate”, meaning the same in every app, there to provide low level functionality that the end user never encounters and is very rarely altered even by the developer though widely varying apps are coming out the other end. Every language that's in any kind of wide use has it's own set of libraries, there to provide standard functionality for the programmer and standard sets of instructions for the computer to execute when certain functions are called within the app.

Okay, sorry. There's a lot in there that I wouldn't have understood 9 months ago, so let me break it down for you.

When you tell X Code to start a new project, it asks you what kind of project you'd like to start. It gives you the options of a couple of different layouts of iPhone apps. Perhaps you'd care to build a navigation-based application. That's when you use buttons to navigate through different tables of data and settings. The Setting app on your (or your friends') iPhone is an example of a navigation-based app. Maybe today you'd like a tab-bar based app. This is like the iPod app on the iPhone. You have a menu of a few pages at the bottom of the screen that take you to different pages in the app. Maybe you just want a blank window because you're building a game that your crew can play in the bus between gigs. Anyway, after you decide that, it puts together the skeleton of your application with a bunch of different chunks of code that every single app is going to need to run. The developer then fills out the skeleton and a newborn baby application is brought into the world. Apple calls their development framework Cocoa, and for iPhone it's Cocoa Touch. Cocoa is just a collection of pre-compiled libraries of code lashed together to help make the dev process that much easier. Cocoa has a name, so it seems like it should be a physical thing. It's not. This has been one of the hardest parts about this process to get my head around. It's a bunch of code that someone else already wrote so that you don't have to.

Ruby on Rails is also a framework. A big part of writing Rails apps is using a command called 'script'. You call a script command to help you build these chunks of code, and the script automatically does a LOT of the tedious work for you. I love this, because I don't have nearly the experience to write something from the ground up, and that sounds like a lot of wasted time besides. Tweaking the generated code is then how the developer builds his app. Brilliant. This is what a development platform is. This is why most Mac applications have that “Mac-y” look and feel. This is why all these New-Web social networking sites have a that sorta clean, modern look and feel, and why so many of them employ Google maps as well as each other in their functionality.

Once you get your head around which platform you want to develop on (I'm thinking Rails to learn), then you can start learning your way around the API, which is where the real fun begins. I'm not there yet, but will try to remember to link there when I am.

#general-development

This part of the blog is going to be tough to write. Not because I don't have much to say on the topic, but because I have frequent pangs of “dude, you don't really know anything about any of this stuff”. Then the other side of my brain speaks up. “Dude, it's cool. They know you're not a professor. That's the point of this whole thing, right? If someone wants hard facts and a professionally written tutorial on computer science, they'd probably go somewhere else. If they're here, they're either a friend or an understanding onlooker, and either way they're probably well aware that you're just a bass player. Nobody really expects that much from the bass player.” So, I'm on I 70 headed east across Kansas after selling the shit out of the Ogden theater this weekend.

And now, my initial impressions on the theory and practice of the database.

What the hell is a database? Being a visual kind of thinker, I've been trying to come up with some sort of relatable analogy to help myself understand exactly what it is.

“It's a series of tables, populated with data, and the tables relate to each other.”

Okay. What do you do with it?

“Well, once you have the data in your database, you can run queries on it.”

That sounds like a lot of fun! But what the hell does that mean?

“Well, queries are like a request that you make. Say you have a database that's populated with every song that RRE has ever played at every show in every venue. If you wanted to know what you played at a given venue the previous time that you were there, then you could query the database to give you the set list from that show.”

Well, that's cool.

“Yeah, but say you wanted to know how many times you've played Mighty River. You could query the same database and get an answer on that, too. Say you wanted to know the venues where you played it. You could query that, too.”

Okay, I get it. So a database is kind of like a big spreadsheet?

“Sort of, but not really. You see a spreadsheet is basically one big monolithic sheet that stores your data in rows and columns; like a database, but a database is made up of many of those sheets, and the collection of those sheets and the way that they relate to each other, and the queries that you can then make of the data is what makes it a more useful tool than just a big sheet with some numbers on it.”

Okay. So, how about an example?

For this, we shall turn to the web. Actually, never mind because this is a blog which means that you don't need to turn at all. Let's press Ctrl-T and get a fresh tab going in your browser and go on over to Amazon. Mac users have the option of Cmd-clicking the link to open in a new browser tab, so you don't have to navigate away from me.

Okay. You see all that stuff on the page? Just about everything there is stored in a big-ass database – all the text, all the ads, all the pictures. Now, why is this important? For that, we'll turn to my bookshelf and it's copy of The Complete and Unabridged History of The Internet. I see here in chapter two after all this non-sense about universities and the DoD that once upon a time there was no such thing as the World Wide Web. I'll skip to the part where then there was a WWW. The first websites on the newborn baby web were mostly authored in straight HTML, an interpreted language used to help your computer assemble some data on the other end into a web page. A skilled HTML coder can control every single element on the page that's being displayed down to the very pixel (until it's opened in another browser, but that's another chapter). The HTML basically tells your browser what text to display, how to format it, what the background color ought to be, where to place the pictures and to what they should link. This is understandably tedious and time consuming work, but you gotta do it if you want your website to look right.

Somewhere along the way, websites started getting much more complex. Some genius decided to make a big online store where you could get pretty much anything, from books to socks to computers to whatever. Now, imagine if you will, the task of hand coding every page. For every item and every view and every picture and every review there was some army of poor bastards on the other end furiously coding away to keep up with the inflow of new inventory/users/reviews. I recently read about some guy who worked for an online newspaper, and he supposedly spent 14 hours a day coding HTML for the site before he figured out that there was a better way to get your steady flow of content up there.

The answer lies in scripting language and a database.

A scripting language is basically the same thing as an interpreted language in as much as it's not compiled, or even thought of until “runtime”. At runtime, the computer gives instructions to something, probably your browser, which then passes the request along to the code. It's at that time (runtime) that the code is crunched into the binary code that your computer can actually do something with on the processor level. This is hyper-simplified.

What this means in the Amazon example is that instead of hand-coding every page, why not just build a template that gets populated with the data that's requested at the time? Then you don't have to rebuild the wheel every single time a page request is made. Well, how do you build a template? With a scripting language, of course!

I'll just cut to the bird-eye view. When you go to Amazon, and it knows that it's you, and it spits out all that stuff that you should buy based on past purchases, that's because all of that info is stored in a database. When you click on an item and go to that items page, and the page looks just like the last one, that's because all that info is stored in a database. There's a table in there for every one of you, and for every item on the site. The table for you has all of your info in it, including past purchases, addresses, billing info, etc. The table for each item has the description, pictures, reviews, links, etc.

The point is that each of these tables is filled out in a standard way with all of their pertinent data. Why this is cool is that some automated process can then do something with it, like fill out a web page, or display your customer profile. The scripting language is what automates the process. It provides the instructions for the web server on the other end of your computer to “dynamically” make up the HTML needed to display the pictures and profile info and whatever else in a cohesive way across the entire website. Dynamically means that you don't need an army of HTMLers because the computer is writing the HTML at the time of the page request. Every different kind of page on the site (say reviews vs. the home page) has it's own scripted template that's called up when the appropriate request is made. Kinda cool, no?

So, a database is somewhere between MS Excel and that big Tupperware bin where you keep all your summer clothes. We'll dive into the beauty of doing things this way later.

A few database driven websites:

Extra credit : Start paying attention to URLs, especially whenever the letters .php are used. PHP is a very widely used scripting language for making database driven websites, and if .php is included somewhere on your address bar, you're looking at data that's stored in a database.

#general-development