Hi, I'm Austin Vance!


Sugar Loaf road to Ward to Lefthand

Written by Austin Vance

Awesome ride today with a buddy from my MSF class. We took about 2 hours to do a big circle around the mountains west of boulder. It was my first ride with a real motorcycle jacket which was nice, I felt much more comfortable at higher speeds. This ride was also my first with any dirt. The dirt was awesome, my bike flew on it with the knobby tires.

Weather

Amazing nice and cool with no breeze. Felt a little rain but never enough to care.

Ride Style

Long straight roads with small high speed curves. Easily can maintain a speed of 45 through most the ride.

Other

We saw lots of deer and even a bull moose, his cow and calf. My friend rode a Honda Nighthawk 750.


View Larger Map

Sugar Loaf road to Ward to Lefthand

Lee Hill Drive

Written by Austin Vance

Over the past two weeks I have been working on getting a motorcycle, and this week it all finally came together. The bike I settled on is a Suzuki DR 650 2001 factory. It is an awesome fast street legal Dual Sport that has pump and really can bounce.

Today I took it for my first long mountain ride with my little brother and it was awesome. Lee Hill leaving from my apartment the ride was a total of 22.4 miles and the real fun part is between points B and C. The road was nice and curvy with one stop sign at the top of the hill.

Weather:

Rainy but as soon as we hit point be the roads were bone dry allowing me to really get comfortable with the big outside - inside - outside turns that the mountains require

Style:

Lots of big long turns with one 180 degree switchback, the road was pretty fast and clean.

Overall:

Great ride for a quickie after work or before the sun sets really beautiful and no traffic!
It felt good for my first real mountain ride. I did not have to worry about traffic turns shifting breaking and the whole shabang, I could really just focus on feeling the bike bellow me.


View Larger Map

Lee Hill Drive

Creating a charting app for current trends

Written by Austin Vance

Religion in our world today

If anyone that reads this is anything like me you are probably grumbling at the tile of this post... but this is not
some religious nuts blog post.

I decided for the final for my Religious Studies course I would try something cool and new. I decided I would compare
how our world treats religion to how we treat a celebrity. With this idea http://biebervsreligion.com was born.

But that is not what I want to focus on in this post instead I want to talk about the app that graphs everything. To create all the charts
and graphs I used an amazing graphing library Highcharts. With this I pushed in data that I poll from Topsy.

I take all the data I get and Highcharts does all the hard work, but what is cool about what I wrote is that it can take just about anything.

I wanted my chart to be expandable so I followed a JSON format for my description.

trends.islam =
  call: "islam"
  title: "Islam"
  search_terms: [
    {term: 'Islam'},
    {term: 'moslem'},
    {term: 'muslim'},
    {term: 'Mashallah'},
    {term: 'hijab'},
    {term: 'shaikh'},
    {term: 'inshallah'},

As you can see that is Coffeescript, I think a much cleaner way to write any JS application.

But what that you really should notice is the application is designed to take a group of sub object that are part of the trends
object. Each sub object has a group of terms, a title and a call. The call helps navigate through the chart and should be the
same as the key to the parent object. The title is used for labeling sections of the chart. Last the array of terms. You can
have as many terms as you want and they can be anything. All terms in the same Trend will be summed for pie the top level pie and
bar charts. And summed daily for the Histogram.

Last I included a loop in the code that decrease the amount of calls to the Topsy API. It groups the terms using an or into 14 term groups...
the topsy limit.

The other issues I have run into is jQuery's deferred really doesn't like error handling for JSONP requests. The solution for me because IE would just
fire the errors was to remove any error handling... not optimal at all.

Anyway go ahead and check out the new site http://biebervsreligion.com

Creating a charting app for current trends

Using Pygments on Heroku

Written by Austin Vance

After seeing RailsCast #272 Markdown with Redcarpet I wanted to be able to use markdown with pygments and albino in my blog, but I ran into a small issue, Heroku. The do not have pygments installed. This I thought would be a plan shattering problem but all was saved.

I found a version of Pygments on the google app engine deployed by trevorturk at Github. After finding this I went ahead and modified what the rails cast had told me to do so code formatting would work with a cloud version of Pygments. After installing and running for a few days I realized his version of Pygments was old and didn't have language support for coffeescript or anyother of the fancy new fun languages. So I deployed my own.

located at

http://pygments-1-4.appspot.com/

Here is how you can use Pygments 1.4 with your rails app on heroku with out a hitch.

First do everything the RailsCast tells you. then...

In application_helper.rb add

# Add at the top of the file
require 'net/http'
require 'uri'

# Replace the syntax_highlighter method with...
def syntax_highlighter(html)
  doc = Nokogiri::HTML(html)
  doc.search("//pre[@lang]").each do |pre|
      pre.replace Net::HTTP.post_form(URI.parse('http://pygments-1-4.appspot.com/'),
                                      {'lang'=>pre[:lang], 'code'=>pre.text.strip}).body
  end
  doc.css('body > *').to_s
end

and we have coffeescript syntax highlighted

hooray = -> alert "we have coffeescript"
Using Pygments on Heroku

Publishing a Rails 3.1 app to Heroku

Written by Austin Vance

This is my first post on my first blog, with my first rails app and it was an experience. First I want to qualify. I have been working with rails for the past couple months but never from scratch and always with a team.

Now for my process I have been hosting my PHP sites on dreamhost for over a year, but after switching to Rails I ran into some issues... rails is a pain to deploy to a shared host. Eventually I gave up on Dreamhost and switched to heroku(http://heroku.com). Their website is amazing and their service is as reasonable as it get's free.

Now lets start with the code:

This is a Rails 3.1 and so it required a little tweaking.

First install postgres. I tried using the dmg installer it didn't work so I instead went with homebrew

brew install postgresql

Next make sure you have your Gemfile is set to use PostgreSQL for production by adding

gem 'pg'

# Or for production only
group :production do
  gem 'pg'
end

Now you should have a working pg gem.

Now you need to create an account at http://heroku.com and install their gem, while you're in there add a couple more too, you will need them.

gem 'heroku'

# needed for the js runtime environment 
gem 'therubyracer-heroku', '0.8.1.pre3'

# Recomended to use instead of WEBrick
gem 'thin'

Now create a file in your application root called Procfile and add a line to have heroku use thin instead of WEBrick

web: bundle exec thin start -p $PORT

After this you should be ready to install all your gems

bundle install

Next we want to move the /app/assets/images folder to the public directory because Heroku has problems with it.

Remember to change all references to match the move.

Now we need to create a git repo. If you aren't using one

$ git init
$ git add .
$ git commit -m "First Commit For Heroku"

If you already are tracking then you are set just make a commit.

Now to get everything onto heroku

You want to create an account at http://heroku.com. Then come back to the command line.

Add your public key to Heroku, create the app, and finally push it

$ heroku create
$ git push heroku master
$ heroku run rake db:migrate

You now should have a complete running app on Heroku.

Congratulations!

Publishing a Rails 3.1 app to Heroku