Today we had morning breakfast, which I had forgotten, upsss, since I arrived late night from a weekend trip to Amsterdam to another context, with another content. So even I did part of the morning walk, not enough to get focus but just to assimilate part of the content heard, talked, thought over the weekend.
Though I must say, that on the train on the way back I couldn’t help to continue with the tutorial I’m following for the #hackership 😀 … I guess there is something addictive about coding.
During the breakfast, the table was full of things, juices, tea, coffee, croissants, bread, jam 🙂
After brekfast ,we wrote down the goals that were for last week and if we achieved them and the goals for this week, and let’s see what happens 🙂
I decided that today, I wanted to finish the tutorial, so then I’ll concentrate on doing the unit tests for my app.
Of course, there is always some procrastination and sometimes happens when you share info, this case was recommending zsh as shell, I’m new to it, so to learn more about it, the guides look as a good place to start from.
Continuing with the tutorial, the fact is that the app built, has as goal to search twitter tags. for that we use twitter gem, but what happens when you don’t have access to Internet? Well that was actually the situation that I was yesterday..doing the tutorial, not having access and trying to continue doing it (yes I know, doing a tutorial in a train back to Berlin was not the expected thing to do). The tutorial covers that fact, and refactors the code not to need Internet 🙂 but some questions appear, when you have to do a fakeTwitter.
Move code to a lib/ directory … that great place where you put everything that you don’t know where to put and that needs to be sharerable …but never too sure what kind of code … for getting the ideas more clear read this nice post about what code to put in lib 🙂
Once you think that you are on the way, then comes the fact that in Rails 4, you also use concerns for sharing code. So everything comes a real concern.
A bit after, more doubts appear, not new ones, but those that I keep, forgetting and forgetting, what is the difference between methods each and map.
 map will return an Array composed of the block results while each will just return the original Array. The return value of each is rarely used in Ruby code but map is one of the most important functional tools.
And as the tutorial continues, more doubts, what does a ||= mean in Ruby language?
||= is an assignment operator, which returns the value assigned. a ||= b is equivalent to the statement a || a = b which means that if a is set and has some true value, then it remains the same, otherwise it takes the value of b.
And ‘langsame, langsame’ the day is over, but not too bad, I manage to finish the tutorial, so at least after day 1 of week 2, I’m still on time, tomorrow who knows!
RT @carolina: Starting week 2 of #hackership
http://t.co/9mpSGJHshM @hacker_ship