Saturday, June 22, 2013

Thoughts on the 2013 NBA Season and Finals

The team I was rooting for, the Spurs, lost to the team almost everyone was rooting against, the Heat, in a 7 game series.  I imagine that history will glorify the Heat and will more or less forget this year's Spurs.

I set my DVR to record the games.  Since the games were on late, I expected to watch the start of games and then finish the rest the next day.  However, I ended up watching most of it live.  I guess I was really into this series.

During the breaks in action, I checked twitter to read live instant updates.  I think twitter could replace or at least supplement sports announcing.  I'd like to tell the television who I'd like to follow and then their tweets would appear on the screen.  I'd also like to chat (maybe through twitter) with friends while the game is going on.  This would all appear on the television screen so that I don't have to constantly check my laptop or phone.

As much as I like Jeff Van Gundy, there are other broadcasters that I don't like as much.  If I don't like a broadcaster, it would be great if I can switch to another.  For big games, there are usually at least two sets of announcers (the local and the national).  For huge games, there are international broadcasts as well.  I'm sure some people would prefer to watch the game with the broadcast in a non-English language.

I have devoted way too much time to following basketball this season.  Zach Lowe, you have raised the bar for basketball analysis, hopefully other writers keep up.  I am now always commenting on the angle in which the Spurs bigs set picks (something that only diehards could get excited about).  48MinutesOfHell, your writing is always thoughtful and exceptional.  Well done.  The basketball Jones, you guys always crack me up.  It's gotten to the point where I feel like I understand some of your private jokes.

Now that the season is over, I'm happy to get back the time used watching, reading and listening about basketball, but it was fun while it lasted.

(Actually, after I post this, I'm going to listen to the final TBJ podcast, which I haven't had a chance to listen to yet).

Monday, June 10, 2013

Ruby on Rails tutorial

I began this tutorial, http://ruby.railstutorial.org/ruby-on-rails-tutorial-book, about a year ago and got through a few chapters.  However, I lost momentum, and for reasons that I do not remember at all, I stopped working on Ruby development.  Since I got a new computer and I probably forgot everything that I learned, I'm going to have to start from scratch and go through the tutorial again from the beginning.

Installing ruby, rvm, gem, rails ...
There seems to be a lot of stuff needed to install and configure in order for you to begin coding.  There really isn't anything fun or interesting to learn as you install this software.  You just have to do it, and hope that you didn't make some silly mistake that comes back to bite you later.   After a few minutes of downloading, compiling and other magic, I finished the installation process.

first_app
So after installing and configuring, you can start up your first app rather quickly.  With these commands:
rvm use ruby-1.9.3-p429  
rails new first_app
bundle update
bundle install
rails server
Bam! The server was up and running for me, viewable from a broswer and I didn't have to write a single line of code. It was almost too easy.

Github and Heroku
As recommended in the tutorial I also made a git repository, pushed the code onto github and deployed the project to heroku.  There is a lot of 'pushing' and 'pulling', and it can be a little confusing.  Here is a rundown of what's going on.

On my local machine (my laptop), I have all the source code and configuration needed to run the application.  This is good for development.  If all of your users (and other developers) had access to your laptop, this might be good enough.

But what if I want to share my code or back it up in case my machine crashes?  That's where GitHub comes along.  At the lowest level, Github is a place to back up your code.  At a higher level, it's a repository which can help you keep track of changes, allow you to easily test and revert changes,  and share and merge your changes with yourself or others.  The final thing that Github does (that I will mention) is that it helps me push my files onto Heroku.

Now, what is Heroku?  Well, for the purposes of this first app I just made, it's a better version of your laptop.  After you push your latest versions of your files onto Heroku, it figures out that you have a ruby on rails app and starts the server, where users can now visit.  You can configure heroku to work a bit differently than your laptop.  For example: (if you followed the tutorial), on your laptop you used sqlite as the backend database, but told Heroku to use another database (postgres).

Conclusion
This is the second time I made the first_app ruby on rails app.  It's been so long, it was almost all new to me.  Although, I think I was able to move along a bit faster this time, and I definitely understood a bit more than I did last time around.