Monday, March 30, 2015

Rails TDD/BDD

I found a sweet tutorial series on Rails TDD.  I feel that while learning how to build Rails apps, that the testing side is kind of neglected.  This series seems to touch on it.
http://everydayrails.com/2012/03/12/testing-series-intro.html

Monday, March 2, 2015

Webcomic

I'm taking a webcomic that I developed a few years back as a static site hosted on godaddy, terrible, I know.  It was before I knew that much about web development.  I've seen the light and now have the domain registered through gandi and am attempting to use digital ocean to host the app.  The greatest struggle I've had so far is trying to figure out what technologies to use.  I want to have a rails backend with postgresql and rspec.  Then for the front end I'm still trying to decide between using ember or react.  
It's interesting taking something you've already made and making a legit web application out of it.  Setting up a backend for a webcomic is also a little tricky.  It seems like it's something that should be pretty simple at first, but then it has the potential to get enormous very quickly.  Adding, a blog or user comments gets the backend complicated very quickly.  So, I've decided to take a modular build approach.  Build out the very basic features, ie the comic feature, then modularly implement other features.  We'll see what happens.

Thursday, February 12, 2015

Rails testing

I'm currently working on a rails application.  I'm trying to implement good TDD.  The test suite uses the rspec rails gem , Factory Girl gem, and Travis CI.   I decided to use rspec over Test Unit partly because I've used it in the past, but also because it has about 21 million downloads on ruby gems.  Generally, that means there will be a lot more resources on it, and the documentation is amazing.   Also, on a personal preference level the syntax reads almost like English, so it's easier to understand what your tests are doing.  I chose to use factory girl because after some research, I found out that its easier to maintain.  It also looks like it's well suited for large scale applications.  And at a glance it seems less complicated than fixtures.  Finally,  I'm using Travis CI.  I've been very interested in using Continuous Integration since I first heard about it.  The set up was surprisingly easy, I just connected my github account and added a YAML file to the root of my app.  They even have a sweet badge that you can put on your readme, to let the world know the status of your build.  I'll post more on these tools as my project progresses.

Monday, February 9, 2015

Rails

My First Rails Project


   Three weeks ago, today I was introduced to Rails.  My initial reaction to rails was not the greatest.  There are a lot of decisions made for you on where things go and it's very confusing.  Lucky for me and everyone else, rails has some of the best docs I've ever seen.  So, after a little hesitation I decided to make a project with rails.  When I say I, I mean a cool team of developers from MakerSquare.  There were 5 of us, two brave souls took on the front end, which we decided to do in Ember (I'll talk about my thoughts on Ember in another post), and two guys and myself took on the back end.
   
   The app has a completely separate front end and back end.  Our back end is an api that our app queries. You can check out the full project here.  The idea behind the project was to query the songkick, meetup, and eventbrite API's based on a location and display them on a map using the mapbox API.  

     The first task I took on was querying the three API's and parsing through their data.  I had a lot of trouble deciding where to put all the logic for this, and eventually landed on putting it all in models, any thoughts on this are welcome.   So far that has been my greatest challenge, deciding where things belong and how much logic should go in certain places.  

    After I finished with the API's I tried to generate some tests using rspec-rails, after spending 2 full days of stagnation, I decided my time would be better spent on the mapbox API and jumped over to the front end.  I'm starting another rails project this week, and I'm hoping to use test driven development, I hope it turns out easier than development driven testing.  

Introduction

Hello World!

I am a Physicist that is taking on Web Development.  I'm currently enrolled in a program called MakerSquare in Austin, Tx.  I am focusing primarily on Ruby/Rails and JavaScript.