sábado, 15 de marzo de 2014

Getting real with the site (March 10th to 14th)


Another week has passed and after being just working on migrations, things are starting to look as the prototype showed in the firsts meetings. So, for this week I worked on some migrations and making part of the design alive, I'm getting more excited every time with the add-ons on the design.

My week started with the research of how to make the download of the albumes that the client was going to keep as products on the new site. Data transfer is  a really hard process and doing it manually makes it worse. It is as a result of the problem about how to get the digital content that the client is going to keep, that we found a way to do it automatically with an script that runs on a windows operative system, that downloads all the digital content needed. In this way, the script only needs to be generated and run once and it will download the mp3s.

On the other hand also, I started a research about the order processing on the e-commerce tool that we are using. With this research I found that :
1- We are going to be able to charge the user immediately after a purchase, in this way we are going achieve one of the points that they highlight on this topic.
2- We will need to develop an extension of the e-commerce tool, because it does not allow to generate csv file of orders, and the client needs to be able to generate those files to pass them to the invoice system.
3- The e-commerce-tool is not able to manage pre-orders.

After that little research I started coding the functionality to be able to export the orders on a csv file. The outcome of this is good, right now through a button an administrator can get a file with the data that an order has. Now, what is next, is to wait for which is the data  needed for the invoice system and to be able to apply some search criteria to filter orders.

Also, we worked with the designer changing the main page of the site, the site is starting to seem more real.A lot of things happened this week, and hopefully we are going in the right way.

domingo, 9 de marzo de 2014

14th Week

 This week on Thrill Jockey I worked doing migrations of products again, that happened because the client sent a list of labels that are not going to be distributed anymore. So the first thing we worked was to redefine the task on ruby on rails, basically the task takes a csv file, previously built, that csv file is red and through a library a hash is created. In that way, we create a cycle that takes each element of the hash, goes and inserts it in the database.

Here something was not really good, we found out that when reading the files generated for each product sometimes it presents errors running the tasks because 2 things had happened:
1. There is a missing/one more space between the name of the file, so when the task runs it fails when needs to run the that file or,
2. There are new characters that we had not seen before.

After we left that running we review with our tech lead the next stories that we are going to develop.  Right now the design is going to take part of the work that is coming, which is great because we will be able to show to the client something more real, more similar to what we showed her at the beginning. It is not going to be anymore just functionality, which in most of the demos was really difficult to get the stories approved because in the majority of the cases we needed to spend a lot of time explaining that what we did is not including the design that is different.

For example, something that happened this week that in fact turns me kind of mad and stressed was that we show something that was agreed the last week, that was a separation between the products that are owned by Thrill Jockey and the ones that are just distributed by them. So we did the separation, and everything was there but the client said that it did not look as she expected. We tried to explain her that the things that were missing are part of the design; at the end we could not approve that “functionality” because of that (we are still trying to make her understand that migration, design and functionality are different things.)

As I explained we had demo, so I needed to upload the new app to the development server, this step is now really easy, after start my internship as part of my tasks I’ve learned to put rails and php apps in the server and set them to be accessible from the web.

Also I had to write a document to Thrill Jockey, because some of the customer data that we had to migrate the last week gave problems so they asked us to send a list of the users that we could not migrate for them to review it and take a decision.  After I finished that document I started to read and research about the new functionality that was on the backlog, which is a research about the order processing.

I started to search about the payment gateways supported by spree, and also the one that is used by Thrill Jockey, fortunately spree seems to support the same gateways. I also spent time searching extensions to export orders into csv files. Unfortunately none of the ones found were compatible with the version of spree that we are using, so after the Tuesday’s demo, I’ll probably start implementing that functionality.

Something really good that I found was that, before when we started using spree to see how it works we were worried because the process of charging the amount of money for the products bought was manually, but this week when I was doing that researching I found that it can be doing without the intervention of an administrator. Basically what I needed to do was to change a line of configuration to make that process automatic.

I made a test after changing that configuration, using the default gateway and it was really cool to see how the state of the payment in the admin part was done, without any intervention. Now what I need to continue with this functionality is to get test accounts for the payment gateways that they need to have in the new site and prove them that everything works as they want.

On that functionality we will need to implement the automatic creation of the zip files after purchase digital products, and make them available in the record crate of each user. On the other hand, we will need to make a separation between the orders and preorders, and the ability to export orders into csv files.
For the next week, we will be working into uploading the digital content to the server, because now we think that will able to have everything in the development server. In fact after running the new scripts filtering the list that the client said the product list was reduced to the half of what they had at the beginning, which shows the amount of garbage that they have in their database.

When we finish the migration of that part I learnt something really important, never let data from your tests into the database, or at least use data that represents what you are testing, do not put just letters, make the data that you are putting as a test have some meaning that could help the next person that will check your database.

Then I worked on Eventwax project, for this week I did a redesign of the messages section, so I worked with saas and rails. This was an easy task, I just needed to change the message that was displayed and make it look as the client asked.

Also I help my coworker with her story that took a lot of time, because we needed to generate a barcode and qr codes for the events tickets, moreover we needed to change the template used to send the emails of attendees. When we finish that story I went to a code review with the tech lead of this project.
During the review, we did some refactoring, and we talk about why we did things in the way we did it. Also I learned some new tips about github, and was a really helpful code review.


sábado, 1 de marzo de 2014

13th Week

Thrill Jockey Project(Internship)

Stories:
1. Customer data
As part of this story I was in charge to write the parser for the users and the record crate that was a simple ruby program that takes a csv file and builds a new csv file with the data that the task on the rails application needs to run. So after finish that parser and generate the scripts that we were going to use, we enter into the part of the users authentication, because we needed to modify it to tell the user that it needs to reset the password if its his/her first time on the new site. I worked changing the code of the spree_auth_devise extension to make a new validation when a user tries to sign in into the site. The easiest way to do it was to take advantage of the column that the users table of the database has, which maintains a counter  of how many times a user has logged in. The validation I made was to ask that if that counter is 0 to ask the user to put his email, and we send one with instructions of how to get back its account working. The email contains a link which redirect to a page that let you reset your password. Also as part of this story I worked with cookies, that was the way in which we think that will be the best way to manage the session in the php part of the app. At the end we can say that the functionality was achieved, the thing that is making us not approve that story with the client  is that the migration is taking a long time, there is a lot of data that is not consistent and there are almost 30 000 users.
2. Thrill Jockey/ Distributed Releases
This second story was about to make distinction between the products that are of Thrill Jockey and the ones that are just distributed by them. So we needed to create two actions on the products controller. Also we create the views for that, and the thing that took more time until now was the definition of the route, because as we defined in the beginning it was making us have troubles with the paginator element, but after we got some help of a coworker, we were able to fix that with him. In fact almost the whole story was made in half day, what we are missing about it is to put the query for the distributed releases.

At the end of this week on this project I can say that it was not what I expected because I wanted to approve both stories. So fortunately on Tuesday we are going to approve 16 points.

What did I learn?

Well basically I put in practise, because I've red about it and made examples but not in something that is real:
- define routes, 
- add actions to a controller, 
- add columns to a  database table, 
- add models to an extistent app,
- how to modify the content of a spree extension,
- make queries using active record syntax,
- use cookies to manage sessions between applications in different languages,
- refresh php knowledge.

How to get better?

1. First of all, one of the things that took a lot of time was the migration, so it was in part becasue we did not know about rollbacks on rails, so we are going to research about it and put it on practise for the next migration, and reduce a little bit the time that it takes to run all the tasks.
2. The second thing is that I need to keep the repos cleaner, make commits more frequently.
3. And the third thing that I could improve is not to spend a lot of time searching when I'm in trouble with something, it is better to ask, if its taking a lot of time.
4. Keep using free time to learn more about rails.
5.Testing new code, learn how to make tests with  rspec-rails.



Eventwax Project(Extra)


This week on this project I just worked on Friday, and also that day I was verifying that everything that we had on the other project was right, so I was not focused on it completely. But the good thing is that I fixed a bug and finish a story as part of my day. Also I was in a code review of what my friend and I have done the past two weeks.  I learnt that work with time zones could be a really headache or at least is too difficult for me  J. But on this project every time I feel more confident about what I’m doing. Also the good thing with this is that I’m learning the good news that have been introduced into new versions of rails and ruby, because this uses ruby enterprise edition 1.8 and rails 2.3  while in the other project we are working with rails 4 and ruby 2.