1. Successful Entrepreneur in AZ

    Just wanted to do a quick link for an article about a local AZ man and his success story in raising $1.5 million for his tech startup written by a friend of mine.  You can read it here Entrepreneurship Series: Interview with Paul Kenjora or here NOW THAT’S CALLED BOOTSTRAPPING: WHY ONE ENTREPRENEUR STOPPED PURSUING INVESTORS


  2. RebelHold Web Development Collective

    Since the beginning of the year, I have been made an employee of RebelHold, LLC.  It is because of RH, that I am even working as a Ruby on Rails developer.  Prior to last fall all I ever did in RoR was tutorials, tutorials, and more tutorials.  I advertised that I would work for free just to get experience.  Can you believe that NOT ONE PERSON took me up on that offer!

    So there I was, a desire to quit my job and become a programmer but no way to do it.  It would be different if I were a college student and could study/practice more but I had a full time job that amounted to working a good 50 - 60 hours per week on salary.

    Then I met Michael (@m3talsmith) on Twitter and the rest is pretty much history.  I worked together with Michael and with Fletch (@fzf) by pairing with them and watching them work.  They were available to answer questions and to help me.  Then they offered me a paid internship!!  They offered to pay me hourly to learn and work with them!  Can you believe that?  I was trying to find people to let me work for free just to learn and these guys at RebelHold were going to PAY me to learn RoR.

    I quit my day job......

    So what is RebelHold?  In Michaels own words:

    "Rebelhold is a workers collective, completely worker owned and run.

    RebelHold was created to equalize the playing field for workers, providing full health care (with no copays), paid training, equal salaries, and to meet the physical and social needs of communities all around us. We believe that putting the means of production in the hands of the workers is a first step, and that training new people to be able to work in whatever capacity they can is valuable. Every worker is an owner, all decisions are made by consensus, and every worker has the combined responsibility of training others. We are highly motivated to taking care of the needs of others through this process; and open to other processes to help.

    To create a mass of workers on equal grounds with each other who are taken care of completely; to pour ourselves in to improving the communities around us through training, through direct action, and through charity as needed; to communicate well with others; and to make high quality software that we can be proud of."

    Now mind you we are still in our infancy stage and not all of the ideas have been implemented yet.  Decisions are made by the partners in a community like manner.  There is no Alpha male or boss or anybody in charge.  And opportunity to advance?  Well, I guess to ability to make partner is about as high of advancement that is possible.  As a partner, the incomes are all the same and decisions are made by the partners.  A truly employee owned and operated organization.  Notice that I didn't say company!!  It is more of a group or organization than anything else.

    We are always looking to add members to our group.  We intend to have a well rounded group of resources skilled in many facets of programming.  We call interns apprentices as they are learning a skill.  We endorse free training and open-source.  Our website is currently under construction and we are making it a community project called 'Communal' which is and will remain open-sourced.  Many of the things done at Rebelhold are open-sourced.  We are currently talking about Fridays being set aside for just this purpose.  Oh, yeah, we do NOT charge for training!!

    If you have read my other posts you know that I am pretty anti charging to teach programming.  Now there are tutorials and the like that I have paid for but not training.  We plan on offering free Ruby and Rails training here locally as has been expressed to the local Ruby::AZ group.  We have given presentations for the group already and will continue to do so in the future.

    We are still small at this point but slowly growing.  We will have a great group of programmers because it is fun to be here.  We are RebelHold. …


  3. So you want to be a programmer

    I thought that I would put this link up here.  Quite a good job describing what you need to do to become a programmer: http://penny-arcade.com/patv/episode/so-you-want-to-be-a-developer-part-1


  4. I want to work for you

    Todays post is a quick little rant of mine.  I noticed recently that there are areas in the world that are begging for Ruby on Rails devs.  If you list RoR on your Linkedin account you will get hammered by recruiters.  Read all of the RoR jobs that are posted around the world.

    So I think that we can all agree that there is a high demand for Rails devs, right?

    Then why the Hell do so many companies want to hire local devs?  I mean specifically for Rails and all other web applications, why?  We are making apps for the INTERNET.  Now, most of you have probably already been on the internet or at a minimum, heard about it.  Then there is another term that has been floating around for a bit that you might have heard of; Telecommute.

    We are building apps for the internet but it seems that too many employers do not want their devs to work via the internet.  Uh, WTF? (Again, this is my RANT)

    A friend sent me a link the other day to a blog post from 37 Signals but the main this was this :

    So stop whining, spend a day to get up to speed on remote working practices, and hire outside of your commuter zone.

    Now I think that most would agree that 37 Signals is rather successful so maybe there is something to that.

    Now, I will agree some people NEED to work with others present.  Those are the ones that thrive on others energies.  They are also maybe those that find it hard to commit to working from home and going to an office is what they need to be in the right mindset.  Why do you think that so many co-working places exist?  People do not pay more money than what they pay for internet at home just to go to a co-working place and use the internet there.  Co-working places are great for those are the ones that work better with others around.

    Then there are the "others" and they are the ones that work better alone.  The programmer persona of the guy sitting in the dark and coding is not necessarily because those people are anti- social (all though that may be the case) but rather they work better when not interrupted. I can get more QUALITY work done at home than when I go to a co-working place and mind you that this is not to be meant as to demean co-working.  I need to focus and when there is too much going on I get distracted easily.  At home, I have no distractions BUT thanks to the INTERNET, I can Skype, IM, Email, use Campfire, use Basecamp, use Github and all is well.  I can even use my telephone if need be.  Like to pair-program?  There is this thing called screen sharing.

    So my point is this, if you NEED to have a dev on location, then good luck with your search.  If you DO NOT NEED a local dev and you need a web application built, then hire a dev to work remotely.  I work with RebelHold and we do Ruby on Rails web apps.  If you need a web application built, then we can do it!  Now you do not have to worry about hiring anybody locally because we can all use the internet to communicate (This assumes that you have Internet access).

    </RANT>


  5. Create a Ruby on Rails TODO application pt. 3

    On with the test....

    I found something the other day that I was not aware of.  A major major kudos to Jeffrey Way and his tutorial "The Intro to Rails Screencast I Wish I Had" which is the easiest to understand and best explanation of a Rails project creation and setup that I have seen.  I did not know that there was a Rails generator for integration_test.

    After I created my app from the Rebel-Foundation clone, and did my bundle install, the next thing that I did was run 'rails g integration_test notes'.  This then created the notes_spec.rb file in the spec/requests directory.  I then cleaned out the mess and now my test looks like: [sourcecode language="ruby"]
    require 'spec_helper'
    describe "Notes" do
    it 'should be able to create a new note', js: true do
    visit notes_path
    click_link 'New Note'
    fill_in 'Title', with: 'Clean out the Garage'
    fill_in 'Description', with: 'Get rid of the junk and clean out the clutter'
    fill_in 'Due by', with: '2/1/2012'
    click_link 'Save' page.should have_content 'Note created successfully'
    page.should_not have_content 'Error'
    end
    end
    [/sourcecode]

    That was pretty easy to write seeing as we had this all listed in the story already.  Now it is easy to see that writing good stories is helpful for when you need to write the tests for them.

    So with using Rspec and Capybara we can create the actual steps that the user wil need to take to create a note.  On line 05, I added the js: true so that Capybara will launch Firefox and use Selenium for our tests.  I don't think that this is really needed for this test as we are not using any Javascript but it is nice to see our efforts in the browser.

    The first thing that we do is "visit notes_path", and then we follow the rest of the steps.  After clicking on 'Save' we EXPECT to see 'Note created successfully' on our page and not 'Error'.  When writing tests, think about what you are trying to do and what you expect to happen if you do that.  As we have not written any other code, we pretty much have a clean slate to work with. [sourcecode language="bash"]
    Failures: 1) Notes should be able to create a new note
    Failure/Error: visit notes_path
    NameError:
    undefined local variable or method `notes_path' for #<RSpec::Core::ExampleGroup::Nested_1:0x007f8da8070458>
    # ./spec/requests/notes_spec.rb:6:in `block (2 levels) in <top (required)>' Finished in 22.4 seconds
    1 example, 1 failure
    [/sourcecode]

    From here, we start down our path of sometimes absolutely useless error messages.  The issue here is not that there is not a variable or method but rather that there is not any routes created.  So we need to add "resources :notes" to our config/routes.rb file.  After adding that to our routes, we can run "rake routes" to see our RESTful routes: [sourcecode language="bash"]
    [master] ⚡$ rake routes
    notes GET /notes(.:format) notes#index
    POST /notes(.:format) notes#create
    new_note GET /notes/new(.:format) notes#new
    edit_note GET /notes/:id/edit(.:format) notes#edit
    note GET /notes/:id(.:format) notes#show
    PUT /notes/:id(.:format) notes#update
    DELETE /notes/:id(.:format) notes#destroy
    [/sourcecode] With our Routes, we see that the index is notes. All we need to do to get to the index is add "_path" and we have "notes_path". We will also need to use the "new_note_path" when we go to create a new note. If we run our "rspec spec" test we now get: [sourcecode language="bash"]
    Failures: 1) Notes should be able to create a new note
    Failure/Error: click_link 'New Note'
    Capybara::ElementNotFound:
    no link with title, id or text 'New Note' found
    # (eval):2:in `click_link'
    # ./spec/requests/notes_spec.rb:7:in `block (2 levels) in <top (required)>' Finished in 19.59 seconds
    1 example, 1 failure
    [/sourcecode] Well, at least this time we get an error message that make sense to us; there is no link 'New Note' for us to click on.  Sounds like a good thing to get into for our next post. By the way, all of my code is available at git@github.com:brobertsaz/todo_application.git


  6. Becoming a better Developer

    I have been reading some good books this weekend that have made me think about an earlier post of mine, "Whats in a name? Programmer or Developer" and my views on the subject.

    One of the books that I read was "The Passionate Programmer" by Chad Fowler and "The Pragmatic Programmer" by by Andrew Hunt and David Thomas.  Both are excellent sources of ideas and techniques to become a better programmer.  And there it is, the word "Programmer".

    Interestingly enough, after reading these two books about 'programmers' I feel as though that there is a greater distinction between Programmer and Developer than I had believed.  Both of these books discuss knowing more about the trade than just the writing of code.  They talk about learning and knowing the business end of programming.  They talk of learning more of what the user wants and feels.  They both talk about a lot more than writing clean code.

    I guess that the terms are also different based on the point of view.  A Programmer with a large fiem most likely never deals with users or clients but is more of the assembly line to the finished product whereas a freelance Programmer will spend a lot of time dealing with the client and management of the project in addition to the actual writing of the code.  Again, this is by no means any slight on Programmers.  At present that is exactly what I am.  I am not even the lead Programmer on the project that I am on.  So, the question then becomes; do I want to be a better Programmer or do I want to become a Developer?

    For me, the answer is simple; I want it all.  I want to be a developer to take a clients idea and make it come to life.  I do not want to site in an office and be told to program.  I want the interaction with the client and I want to know what the end users feel and think about the project.  In the end, isn't that what it all comes down to?  Satisfying the client and their customers?  The best coder in the world does not mean a thing, if that coder does not give the client what they want.  Now, there is a gray area there in the fact that a lot if not most clients do NOT know what it is that they really want.  A guess a difference between a good developer and a great developer is that the great developer discusses what the client wants and offers options as opposed to just writing the code to satisfy the requirements.

    So what to do to become a better developer?  Here are my thoughts intermingled with those from the aforementioned books.

    • Listen - don't let our egos get in the way.  Just because we 'think' we know better does not mean that we do.  Listen to the client and hear what they want.  Maybe they just cannot put it into words.  Don't assume that what you think they want is really what they want.  This becomes a gray area in the middle of the project.  A different interpretation of a desired functionality can lead to disagreement or creating more work that is out of scope.  The best way to prevent this is to listen to the client in the beginning and make sure that you have documented exactly what it is that they are expecting you  to give them.
    • Learn - Both of the books said the same thing; learn more.  Read books, write code, learn new languages.  I am going to make it a personal goal for myself to read a new book every two weeks.  Whether that book is about coding, or self improvement or  other programmer development books, I plan to read one every other week.  I am also going to learn a new language this year.  In addition to that, I am going to continue to learn more of the languages that I do use.
    • Mentors - Both books recommend to find a mentor.  I already have a couple of guys that I am learning from and hopefully continue to learn from.  Additionally, I hope to get to a point where I can become a mentor for somebody.  I plan on giving presentations for our local Ruby user group.  I have only given one presentation so far, but I have found that I learn more in the preparation.  Try to hang out with the geniuses; they will make you become smarter.
    • User Groups - I joined a Ruby user group last year and I attempt to make it to the monthly meetings.  There are always new things being presented or basic concepts that I need to learn better.  User groups are also a great way to meet fellow programers and create friendships that may help you out.
    • Give a Shit - As stated in the Pragmatic Programmer, Tips 1 and 2 are "care about your craft" and "think! about your work" and mean a lot.  Strive to write better cleaner code and to be proud of the code that you write.  Be proud enough to put your name on it.  We are the same as artists, and Picasso was not ashamed or embarrassed by his paintings that he did not leave his signature.  In my opinion, it is not a bad thing if you above and beyond what the client wants.  I would rather work a few hours for free and have a happy client.
    As usual, these are just my thoughts and you can take them for what they are worth.  But, hopefully you can come away with something that makes YOU a better Developer! …


  7. Want to learn a thing or two about programming, right here, right now?

    Found a great starter list of resources for learning Ruby: Want to learn a thing or two about programming, right here, right now?. …


  8. Create a Ruby on Rails TODO application pt. 2

    Ok, well with Christmas behind us it is time to get on with our project...

    I use Pivotal Tracker for creating stories.  Creating stories is a new thing for me but it really helps to plan out your app.  In fact, if you write your stories well, it make writing our tests easier.

    As with any programmer worth their weight in code, I will be creating this app using TDD or BDD depending on how you view those two terms.  In my opinion, Test Driven Development consists of writing the tests before writing the code whereas Behavior Driven Development is writing tests to describe the desired behavior that you want.  With BDD, it is more that you test what an object does and not so much what it is.

    On to Pivotal Tracker..  In pt.1 I listed four stories that I added to my Pivotal Tracker account. (https://www.pivotaltracker.com/projects/441447).  One thing that I will not get into is the point estimation for stories in Pivotal Tracker.  That is what Google is for.

    Lets start with the first story; As a visitor ISBAT create a note.  Before we do anything, lets think what it is that we want to do.  We want our visitor to be able to create a note.  Now I know that a true TODO app would require user registration or just be for myself only but for this we are going to leave it open for all to use.  So, lets think through the process..

    • Visit the main page
    • Click on link 'Create Note'
    • Fill in title with 'Clean the Garage'
    • Fill in description with 'Get rid of junk and clean out the clutter'
    • Select 'Due by:' as 2/1/2012
    • Click on 'Save'

    Pretty simple, isn't it?  We that is what I will fill in for my Pivotal story under tasks.  Now we are looking and thinking about what we want the user experience to be.  We have not really concerned ourselves with the workflow and have not written a line of code.

    The next thing we need to think of is "what do I expect to happen?" if I follow the above steps.

    • I should see 'Note created successfully'
    • I should not see any error messages
    • The number of notes should increase by 1

    Now we know what we expect to do to create a new note and we know what we expect to happen afterwards.  For testing I mentioned that I use Rspec and Capybara.  I am not saying that other testing tools are not good; I just have never used anything but.  Capybara just continues to amaze me.  There are so many different ways to use it that it seems like there is always a solution.  It works great with clicking links, making queries, testing Ajax , and more.  There once was a time that I tried to learn Selenium for automating tests in Firefox but I found it too cumbersome.  Capybara uses Selenium without having to write it!!

    I will write my test and post the code in pt.3.


  9. Create a Ruby on Rails TODO application

    In an attempt to improve my RoR skills and based on the suggestion of @m3talsmith, I am going to be creating a TODO application from almost scratch.  I will be blogging each step as I create the TODO both for my personal learning experience in addition to helping others to learn.

    The TODO application will initially involve the following functions:

    • Add a note
    • Edit a note
    • Delete a note
    • View all notes

    These functions will initially be for html, then xml and then json.

    Creating Stories

    I have found that creating stories for each function is a great way to think thru the workflow.  I personally use Pivotal Tracker but there are other applications out there that you can use.

    ISBAT - I should be able to

    Generally, the stories are created using ISBAT.  For this TODO application, I will start with four stories:

    • As a visitor ISBAT create a note
    • As a visitor ISBAT edit a note
    • As a visitor ISBAT delete a note
    • As a visitor ISBAT view all notes

    For testing I will be using Rspec and Capybara.  There are a lot of things that can be tested in an application, but I am going to be using just request specs.  These are tests to emulate the actual user experience to include filling in fields and clicking on buttons and links.  The theory behind this is that if you test all of the possible actions a user can perform, then the functionality behind the actions should work correctly.  I will be creating a blog entry for each of the above listed stories.

    Project Setup

    The guys at RebelHold have created a great open source starter application to build an application upon which uses MongoDB and Mongoid, Haml, Rspec, FactoryGirl, and Heroku.  As a today, Rebel-Foundation uses Rails 3.1.3 and Ruby 1.9.2. To create my project I will clone Rebel-Foundation from github: [sourcecode language="bash"]
    git clone git@github.com:rebelhold/Rebel-Foundation.git todo_app
    [/sourcecode] This creates a new Rails application named "todo_app". Following the instructions on github:

    == Instructions
    
    For those rvm users we've included a rvmrc. Just:
    
    cp rvmrc .rvmrc
    cd ..
    
    And cd back in to your project.
    
    Accept the rvmrcgem install bundler
    bundle
    If you are NOT using rvm, then you need to!! This will setup the basic project.  My next blog entry will be writing the first story, the tests for that story and the code to pass the tests. …


  10. First month as RoR programmer

    I believe that a celebration is in order as I completed my first month as a full time Ruby on Rails programmer.  I have to reflect on my last post, that I really had no idea what I was in store for.  It has definitely been a challenging but yet fun first month. I think that the biggest challenge that I have encountered is that it is one thing t create a NEW Ruby on Rails app and an entirely different matter working on a legacy RoR app.  My first project is a quite in depth and detailed one.  It has taken some time to just wrap my head around what it was that the application did and was supposed to do.  That was the first big hurdle for sure. Now a month later I understand what it is that the client really wants and  I understand what it is that I need to do so that the client will get what they want. For those of you out there thinking of quitting your day job and going it solo, I say do it, but plan it out first.  Were it not for the fact that there is a solid few months of work for this project I do not think I would have made the move.  By the time I am finished with this project, I will be more than ready to take on the next one.  If you are thinking of making the move, find a good project that will keep you busy for a few months so that there isn't the constant worry of "what next?" and you can really dig into the existing project. After a month, I realize that I need to learn a lot more Ruby and Javascript.  So much to learn.... BDD/TDD development - Everything that I am doing is fully BDD/TDD development.  Do not write and code unless there is a test for it.  It will seem like a lot of extra work at first but later on when you start to make changes to your code you will be happy that you already have tests to run.  That is probably the biggest thing for test driven development, not the original code but when you start to refactor your code, you know that it was already working.  Everyday, I start off by checking my GitHub status and then running all of the specs.  The last thing that  do everyday is run all of the specs and push to GitHub. For me, I use Rspec and Capybara.  I would say that about 90% f the tests are request tests.  I have never used cucumber all though I read about it in the Rspec book.  The project is also using Pivotal Tracker and the client is heavily involved in the stories in Pivotal Tracker.  It is a great way for them to keep up with what is being worked on everyday. Well, that is it for this week........