Mittwoch, 31. Juli 2013

Developing is rhythm and meaning

Henri Matisse said: "Jazz is rhythm and meaning". Perhaps, we can adapt it to: "Developing is rhythm and meaning"

I made my first pull request for the first story to the gem voluntary and Mathias exceptionally deployed it on production before the end of the iteration using capistrano to show the release process on the server, github and RubyGems.org.
So a registered user can now nest areas on production.

Also, we completed the story: areas filter for projects through area page. So we can see the area' s projects on the area page.

Then, we started a new story: areas filter for projects on the portal of recommended / qualified work for the worker and project monitor pages for the manager.

We decided to not directly show the stories table but the areas table after selecting a product as a worker, then show a projects table behind the area link and the old stories table behind the project link.

Probably we complete the current story on Friday.

Bye!!!





Dienstag, 30. Juli 2013

Completion of first story.

Today, we needed some extra time for the completion of our first story with its last task because of dependent new lessons about a new gem simple_navigation, cross site scripting protection through safe html, cucumber debugging, Array and String handling, meta programming through eval vs. send or method_missing and its pros/cons.

I also had the chance to put some previous lessons learned like "reverse engineering" and duck typing into practice.

The task was about including the links of ancestors in the breadcrumb of the area page.

To complete the story we covered all layers of the implementation with 1 new cucumber scenario (happy path) for the area resource and decided against separate unit tests for each layer.

We documented the story implementation through version control commits and pushed it to github (Diff).

Tomorrow we will start the next core story about filtering projects by area.

Bye!!!!

Montag, 29. Juli 2013

Implementation of first story: nesting support for areas

Today we started the first iteration with a story about enabling nesting of areas in the core product of voluntary.

On the areas page we only show root areas and on the area page we now show a table of child areas.
We also implemented a link on the area page to add a new child area by passing the current area as the parent through the new area form.

Tomorrow I will complete the story with the last open task to show the current path in the breadcrumb of the area page, increase the test coverage and start the next core story about filtering projects by area.

During the resolution of this story Mathias showed me some methods about studying new and old code to integrate a feature well like interaction diagrams and code traces.
I also get to know debugging to fix today's bugs with a debugger in a IDE like RubyMine, the debugger gem for the terminal, debugging for the poor man (raising exceptions) and the gem better_errors.

I also installed Aptana on my laptop to compare with Sublime.

Tomorrow more!!






Sonntag, 28. Juli 2013

Trees with Ancestry

Today I have been studying a railscasts for trees with Ancestry.

"http://railscasts.com/episodes/262-trees-with-ancestry?view=asciicast"

First of all, I created the model for Message. The problem is the model Message appears empty in the example code. To have the example running before using Ancestry, you need the following code:

class Message < ActiveRecord::Base
  attr_accessible :content
end

And the schema has to be:

  create_table "messages", :force => true do |t|
    t.datetime "created_at", :null => false
    t.datetime "updated_at", :null => false
    t.text     "content"
  end

A thing that I made different from the railscast is using simple_form for the form. The code I used is:

<%= simple_form_for @message, html: { class: 'form-horizontal' } do |f| %>
  <%= f.error_notification %>
  <%= f.hidden_field :parent_id %>
  <%= f.input :content, label: 'New Message', :input_html => { :rows => 8 } %>
  <%= f.button :submit, "Post Message" %>
<% end %>

I wasn't able to apply an indent in the nested messages using css, but at least I have ancestry running.

Step by step.





Freitag, 26. Juli 2013

Stories for the first iteration 2/2

Today we have completed the pragmatic story definition for the first iteration: https://www.pivotaltracker.com/s/projects/871843

The iteration should add a vacancy-resource-allocation through a new product voluntary_classified_advertisement and nested facet filter of areas at least for projects through the core product of voluntary.
As a reserve story I can also implement a nested facet filter of regions for projects.

My homework: Learn the concepts and code needed for next iteration with three railscasts:
  • http://railscasts.com/episodes/262-trees-with-ancestry
  • http://railscasts.com/episodes/162-tree-based-navigation-revised?view=asciicast
  • http://railscasts.com/episodes/273-geocoder
Good weekend!!


Mittwoch, 24. Juli 2013

Stories for the first iteration 1/2

After my last entry, I continued working and used "before_filter :require_login" in ApplicationController to apply Authorization in all the application. But, for some controllers I had to use "skip_before_filter :require_login". The login and sign up pages must be public!

Today, Mathias and I have been working together.

First of all, we reviewed my homework and talked hereby about descriptive and shallow nested routes. We used http://DiffChecker.com to see the differences of generated routes before and after using shallow routes and saw with this comparison that our Rails 3 version seem to not support it (it's also not mentioned on current Rails 3 guide for routing but on the guides for 2 and 4).

As a response to my last blog post he showed me examples for when it's a good idea to use Simple Form even when we don't have a model. For instance DRY usage of themes like Twitter Bootstrap, which I should enable for all the forms of my learning app).

He also explained the concept of mocking objects like (3rd Party) dependencies with RSpec and advantage of working on dependent stories like frontend and backend stories in parallel.

After this we started the backlog grooming and wrote some stories in Pivotal (https://www.pivotaltracker.com/s/projects/871843). We decided to use the ref number from Pivotal in commits to easily select code for the code review step in each story-lifecycle.

We created a quick wireframe with the web demo of http://balsamiq.com/ as a specification for the task review step story.







I have to say that extracting stories is a hard work but we plan to complete the backlog grooming together on Friday where we evaluate free ? map-services like http://OpenStreetMap.org and gems like http://www.rubygeocoder.com/ for easier geocoding of projects, vacancies as well as resources.

The start of the implementation iteration is planned for Monday. Each iteration is 2 weeks long.
Between iterations we will review stories, deploy accepted stories and specify stories for the next iteration in detail. Denied stories will be completed in the next iteration or moved to the ice box.

Tomorrow more discoveries!!!

Dienstag, 23. Juli 2013

How I test?

Today, I have made http://railscasts.com/episodes/275-how-i-test
It has been hard because there were new concepts for me.

The problems that I have found in the railscast are:

- In code "password_resets_spec.rb" after the "it "emails user when requesting password reset"" a "do" is needed
- Factory.define is deprecated, so I used FactoryGirl
- After "rake db:migrate", a command "rake db:test:prepare" is needed

I achieved pass all tests!!!!