domingo, 21 de julio de 2013

Week 3

Well this is the 3rd week, since I started the apprenticeship program. So far, I’ve learned to program in Ruby, and also I have done a tic tac toe on it. I think that it has been a great time for me because I have learned so much. Comparing the first tic tact toe that I sent to enter into this, with the one I finished the last Monday, it is a huge improvement (I have to say that it has so much to do in things about refactoring, and also maybe improve the names, but that’s difficult when you’re starting), at the end of the post I will attach the link to git, where the code is.

Moreover, I did my first gem, so exciting! In the beginning I was kind of stressed because it did not work, but at the end checking with a friend that is also in this program, we figure it out that the problem was a capital letter (huh  :-S). I’m going to add the gem to github too, for all the people that like me at the beginning did not know how to do a gem. Also, they explained me about the Presenter-Interactor-Repository and Screamming Architecture, so I’m going to write the main ideas of these. About the second one, it is that the architecture must reflect what problem it is been solved, it is like to not adapt a problem to an architecture, instead of that  we should create an architecture that satisfy the problem.
And the Presenter-Interactor-Repository pattern  is because ruby is based on MVC or model view controller, but because we have to remove dependencies, is why are created the presenters, interactors and repository. Basically repository is the one that is in charge of the communication with database, so with that we do not need to worry about to be link to a specific database. The presenter is the one who removes the dependency between the controller and the view. And finally the interactor is the one who removes the dependency between the model and the controller.
On the other hand, I also have to read about git branching, and for me that is really confusing, so I need to do an example to understand it better. But the idea of branching is to have a branch (es) that contain the same as the master branch, so we will work on the branch created and after being sure that everything works fine make a merge or rebase to unify the branch created with the master. When I make an example I will post it, to make it clear.

Also, I did a tutorial about CSS from W3schools, it was really interesting, and helped me a lot. For example the different types to apply styles to a web page, also the tricks like how to format a table, the box model, display and other things. After that I also took the quiz, and I did  pretty good,  so now all I need is to put all I’ve learned from that in the practice.

Finally, I started reading the rspec book, that’s about rspec, cucumber, BDD and also talks about TDD. Right now I’m on chapter 19, and I stopped on that because from that chapter they talk about rails, and I don’t have any knowledge on it. This book started with an example of how to use rspec, cucumber making a code breaker. For me that is something unknown, so many files to do. But it is really interesting, the form in which they explain the cycle of how cucumber and rpec are related to build things. The idea is to have a cycle of red/green/refactoring in cucumber, making the scenarios and steps, after that we repeat the cycle but with now rspec, that there is where we specify the spec files. And finally when we have everything passing and the only mistakes that we have are the ones that are about logic we are ready to start writing the logic of the app that we are making. Also in the book they talk about the problems that people have with the projects they develop, exactly about the problems with communications, costs and others. It is important that every team work based on a contract, have a clear understanding about the requirements and the behavior that an application should have, how the changes at the beginning do not have so much impact on the scope of the project and the costs, but how risky and expensive is to make changes when the project is in an advance state. There is a lot to say about this book, they talk about many things, in the second part of the book for example they make an explanation about what is Rspec and cucumber, and talk about the structure, methods, syntax, etc, of each one.

No hay comentarios:

Publicar un comentario