Pages

Saturday, October 22, 2011

D'addarrio has launched a new string, EXP stating it outlasts Elixir in terms of clarity.

Many thanks to my good friend, Sam who notified me that the shop he works for is actually putting these on for free. As my lovely EM 325C Maton has not seen the light of day since it was last played last year, I figured this was the opportunity it deserved.







 After a quick call to my buddy, Walter, we made way to Cranbourne music, Blackburn this morning to get our acoustic guitars restrung. His of course, is a nice hand made Cole Clark form the early days of the company and needed a restring.
  The first impression of the strings was that they were only about 80% as bright as the Elixirs when new but if their clarity lasts longer, why not?

 I was of course very impressed with the guys in Cranbourne music, Blackburn particularly Ryan who restring my guitar. When he removed the existing strings, he also took the opportunity to help me clean up the frets and reseated the string holders (sorry, I can't remember what you call those 'ball' like string holders at the end of the bridge).
 Next month, they are going to restring electric guitars for free with D'addarrio electrics. As an ernie ball extra slinky fan, I do want to try new strings out. Have used D'addarrio many years ago on my SG but have never with my strat. It will be interesting. Email me and I can let you know what the date will be for the free electric strings fitting :)

 Overall, a big thank you to Cranbourne music and Sam the man :)
Bought my amps, fender hard case, Maton and accessories from them since 2006 and have never ever been disappointed. Keep rockin', guys!

Friday, October 14, 2011

I just read a bit more on RSpec's expectation matchers : should, should_not

should - It's being used like a connector. For example, if a GET request was made to the index of a resource's controller,

  fact: the resulting page would have the string, 'I love rails'
  spec:

  1. the spec would therefore expect to have the string, 'I love rails' in it
  2. we would write the spec as follows:
       request.should contain('I love rails')




should_not - it's the 'negative' version of should. This means we need not use 'not' :)


For example, if a GET request was made to the index of a resource's controller,

  fact: the resulting page will NOT have the string, 'I love rails'
  spec:

  1. the spec would therefore expect to have the string, 'I love rails' in it
  2. we would write the spec as follows to say, "we do not expect the resulting request object to have the string, 'I love rails' in its contents":
       request.should_not contain('I love rails')




Here's also another article which speaks of this well.

Gordon Yeong :)
Sequence of calls in rspec
                
 Example:
        describe "creates a new brand entry" do

            puts "I am defined BEFORE the before hook"

            before(:each) do
                puts "I am a statement defined in the before(:each) hook..."
            end

            puts "I am defined AFTER the before hook"

            login_admin_user
            it "assigns a new brand as @brand" do
                get :new
                assigns(:brand).should be_a_new(Brand)
            end

Result:

I am defined BEFORE the before hook
I am defined AFTER the before hook
....I am a statement defined in the before(:each) hook...
..........

Finished in 1.61 seconds
14 examples, 0 failures


Statements defined in before hooks will be run right before any specs are ruined. This means that if you defined statements before the statements in the before hook, those statements will run first.


To bang or not to bang?

In ruby, the bang (!) symbol is used as a convention for methods.
The general rule of thumb is use bang(!) when the method will modify its argument(s).

Refer to the following extract from the book, 'the well grounded rubyists'. It has a very clear illustration.

Here's another article which speaks on when to use ! in rails.