jueves, 29 de diciembre de 2016

AsyncTaks

In this article, I would like to share about of my experience with the AsyncTask on Android. Some time ago, when I was not of apprentice in Pernix. I tried so hard to create an app for Android. The app was a game similar to Mario and Bomberman. As already you know, to create a game is necessary to have a layout that continuously updates and by down the logic keep working. To do that is necessary use executions threads, a thread to run the interface and another that can keep the logic. When I designed my game, I knew about of this issue and I created a thread to prevent it. But the app always crashed when used the thread. I tried to solve this problem by a week, but I never could do it... Until the last week



Last week I was working on a query to Quickblox, that was about the dialogs user. To keep the interface working and make the query is necessary a thread. I was investigating about that and I found that exist 2 ways to fix the issue of the threads. The first solution is similar to what I did to my game, but with the difference that the thread must be executed in the context of the layout. The second answer is to implement a library called AsyncTask that helps me to control the events. To used is necessary implement create a class that extends and override the method of the library. In the next image explains the structure of the class more clearly.



By lucky, I asked Macho about that problem and he explained to me that the asynchronous task as already implements with the Quickblox library, then I didn't need to be careful with this problem.

miércoles, 14 de diciembre de 2016

Like in the first day

Today, I have my first anniversary in Pernix. Wow, How to fly the time?. I remember that on my first day was a Monday, I arrived very early, like an 8:30 am but I came at the 10:00 am o'clock I was really nervous because I was going to study (or work) by first time to a company. Then I was waiting in the fountain of the Terramall for several minutes until I was quieter. At the 9:45 am approximate, I called to the cellphone of the office for several minutes to they open the door to me and while I was thinking: Why they have a phone at the wall if they did not answer the calls?. (I just had knocked the door harder)



Finally, a person came to open the door, His name was Brayan and he was the manager of the apprentices at this moment. He gave a little introduction how works Pernix and he assigned severals readings. The rest of the day was bored I believed that I was starting to programming since the first day. 
The second day I met my mentor Cardoce, he explained me all about Pernix and he assigned a training board. Cardoce was a really good mentor for me, at the beginning, I always was feeling insecure about of my decisions, but he very patiently attended my question. Today he is still my mentor but now I am not very depending from him.



Maybe this is the blog with less importance than I would have written until now, but remember the firsts days and all the experiences It makes me think that today is a special day, because I had moments that I thought that I could not continue in Pernix but I could overcome these problems and learn from them. Also, this experience had been really useful in my life, because I can take betters decisions with my personals problems. 


lunes, 14 de noviembre de 2016

University vs company

This time I want to talk about of the different topic, I want to talk about of difference of making a project of the university and work on a project of Pernix Lab. My first project was Probetas Labin and I was working with another apprentice. My partner and I me only 1 week in Pernix when began, therefore, we had only developed projects to the university. On this we thought that we could work like in the university, they just told us what we should do and we just needed work it. When we estimate the required time, we thought that we just needed 2 weeks to finish it, but the 2 weeks passed and we were not close to finished the project. We had problems to understand how works git, just to create the repo in bitbucket we took a day. Worth highlighting that if we ask for help at that moment when we were creating the repo, probably we created the repo in only 15 minutes how much
To continue with the story, we continued with Labin after of the 2 weeks. When we create something we needed remake it again, because there was a better way to did it. The time passed quickly and our progress in the project was slow and after 2 months our project was canceled because we never communicate with the client.


In the university, if we had made this project probably we first went to read the project specification and we started the project. If we needed to learn something new, we go to show a tutorial on the internet or an example to guide us because we knew that if we went to ask the teacher, the most probably It did not bring us your help. Depending on the course and the teacher, we would have given more focus on some features than other to ensure a good score. When the revision day arrives, we will ask for the first date because we know that the teacher does not know what really wanted in the project and the first revision goes to be the checkpoint for the next.



The work style on the university and in a company is totally different, In the university, I am the client and the developer, therefore I do not have care about what I do. I only need that the project works. But I think that in a company the students become a real developer, that follows the quality standards and stop to asking only for yourself and talk with the client about It wants.



sábado, 29 de octubre de 2016

Seeking news solutions

From this 2 weeks, I continued with wappo Project, but this time continue with the fingerprint. We decided to return to that feature because we can test it in the Lugo's cellphone. Implement the code was easy, because some weeks ago I was tried to implements but I could not do it for the android version. When I tried to test it again, I had a message error about that the device did not have the fingerprint. When did I saw the error I was really upset because I did not idea what happen?. The problem was not about the software because I got the code from a google repo, therefore, the problem was the hardware. I investigate a lot of and I found that my theory was correct. To use the fingerprint in some devices we need to use a library for using it.



Now I had a new problem if some devices need a library to read the fingerprint how I could not know which devices needed that tool. When I investigate about to that new problem, I found that exist a library that I can help me. The name of the library is Reprint and add the multiple ways to implement the fingerprint on different devices. Also, the code is really easy to understand y short. When i had the first test on the Lugo's cellphone. I was really happy that I could do it.

I did not have problems to add the code to our project, but I saw that the transitions between the dialogs were strained. Before to continue with this issue I notify to Macho that I had finished the fingerprint.

I know that the problem can be solved with add a new layout that contained the others layouts. The problem began when in the passcode I could not call the keyboard to ingress the code. I found on inter many solutions how to display the keyboard but any did not work.



A lot of time before I check the code again, to found the issue and I noticed that the layout of the fingerprint and the passcode was differents. By lucky, that is the problem, and immediately I fixed it.

Too many times I need to check the issues since another perspective because too many times I loose my time try to solve the not real problem. Also if I go to ask for others about my problem, they can give me a new opinion does not matter if the person knows about the technology.


jueves, 13 de octubre de 2016

Pernix Values

On this 2 weeks, I was out of Pernix by personals issues. It is for this reason, I will do a different post. On this time I want to talk about of the Pernix Values. I think that these 10 months on Pernix has been vitally important for my professional development, and thanks to that all my partners have these values, I get a good profit out them.

Personal Responsibility: I think that the best way to demonstrate this value, It is with the daily goals. Personally, I many times write the goals late, but I always try to be  the most precise with these finish them. Another example of that value , It is the Personal development plan and follows the Method of development



Communication: On my opinion the most important value, because It does not matter how much you know or how much you are responsibility if you can not communicate with other clearly and concise. In Pernix everyone has the opportunity to interact with the customers and I think that a good communication with him and the manager I can get the succeed.

Technical excellence: I think as software crafters, we have our pride. We do not need to stay on Pernix to have a high technical excellence.

Leadership: I think that skill is learned by your mentor or project manager. It is very important to pay attention to them because the lead as the person that others decides to follow. The participation on differents activities helps to improve this skill.

Learn: When I enter to Pernix I felt nescient. Today I continue feeling the same, but not why I did not learn anything. I think that my partners continue with your learning. The continuous learning when you works here it is impossible to stop, all the days you go to learn something. I think this is the best of this work



miércoles, 14 de septiembre de 2016

Error with the versions on Android

In this 2 weeks I was working in Android, maybe It is not my first time on this technology but I am learning new concepts and functions about this language. The first that I learned was how to can I control several simultaneous events on the interface, For example, when we are using the a tablet and  we need resize the screen or image, we puts 2 fingers on the scream and we moved it oppositely, this is a event simultaneous. Other kind of event is when you do double tap on the scream, this event I used for the Wappo App. When the user make double tap on the scream, the texts go to be encrypted. I used this library to implements this functionality. On my opinion that is too easy to use and understand, the only problem is that the library is not support.





The second functionality of my feature were the fingerprint. From this functionality I had severals problems, especially on the versions of the android and the lot of documentation in internet. To implement this functionality I only use that example to help me. When I studied the code I learning that the finger was already register on the device  and I did not register. Also that if  I went to get the finger printer I needed create a key before to compare the actual fingerprint with the saved. Until this part the programming was not difficult, but when I tried to test the program on my tablet or the cellphone of Lugo the program crashed.





When I could ran the program without fails on both device on the phone of Lugo can not detect the fingerprint. On this moment my code was a disaster, then to detect the fail I first needed put in order my code. When all was relatively ok, I tried to test the code again, but I had the same problem. Then I decided investigate again on internet, but I only find that the fingerprint only had support by the devices with API 23 or more. when I get this answer I was disappointed, I thinked: What Google puts finger printer on device with the versions that the crafters could not use.





This was not the first time that I had problems with the versions, I need pay more the attention on this kind of errors. From the next time I need first investigate the tools that I go to use and find if the version can support it

lunes, 29 de agosto de 2016

Introduce myself to Android (Round 2)

From this to two weeks I was working in Bulalli project. Bullali is a project of Pernix Ventures, and It is about of express service from a restaurant. It is developed on C# and xamarin. I was working the most of the time with Daniel Peralta because I did not had Visual studio on my computer, and also I did not enough space on my computer to install it.




The first day Daniel and me was fixing a bug with the call of a Jason. In these moment, we was trying call a class from the model of .net. We try too many solutions of internet, but any it worked. Then Daniel went to ask to Ricardo, and he says us that we need create again the model on Xamarin. I was  really disappointed with that solutions, because It was not respected the clean code standard. But after I thought that we needed create something to show to the client

The next feature was create a view that It displays the a list with the types of foods. Fortunately, some years ago I was studied Android to create a game, but I do not had complete this app by problems with too many bugs on my code. But I know that this time go to be different, because I can ask for help to my Pernix parent.



Returning to the listview, we did not had problems to implement. But I felt some uncomfortable, because we only has this part and the project has 3 weeks. And we did not had something to show it to the client.

I think that I need give my opinion to other and do not only ask by the them. I need to strengthen my soft skills more.


jueves, 11 de agosto de 2016

Ubundows?

This time I really like to speak about of my last experience with operative system windows. All began when my cellphone died last sunday afternoon. In that moment I knew that I had a big problem, because I couldn’t connect my cellphone with my computer to get internet in Fedora 22. Then the rest of the weekend, I tried to fixed it to get internet on my computer, but I didn’t got a successfully result.


That monday morning, Manfred gave me a computer to work for a while. And that afternoon I was pairing online with Arnaldo but only on Arnaldo's computer. I think that the pair was very interesting and productive, but I think that since I couldn’t write code the learning process was not the same

At the night I was investigating if there was a way to use rails on windows, and I found that windows 10 can use a bash of ubuntu. Then I began the tutorial to install it. At some point of the tutorial, it said that I needed to make a update to windows but I needed wait at least  two days. When I read this information I was a nervous, I couldn’t wait two days. Then I tried install a virtual machine with ubuntu, but it runs very slow.


The next day I was thinking calmly, I saw that waiting by 2 days was impossible. Then I discovered that I could download the update manually. I downloaded Wednesday because I knew that this process could take a several hours. I began the installation at the 2 pm o clock. All was fine, the installation was slow but secure, It seemed incredible almost like a dream.



Until near of the 12:30 am o'clock in the last step, when I tried to create a user from the database postgres, the system fail. First I tried to investigate the error. The result was not satisfactory, because the first link was into the same page of the tutorial. In the comments too many people said they had the same problem.


The next day I investigated and some people said that I could install postgres on windows because the program access a port and not reference of the database. When finally I thought that all my problems were solved, I asked myself, How can I edit the program? I am not even a pro programer to use VIM, and if I tried to learned I would spent too much time.

I investigate a lot of more and found a program that  could open programs of Ubuntu on Windows, now I was ready to work in rails again.


Next time I need to put more attention on the comments of other people with this class of tutorials before I begin. Also I am very happy to help someone else with their problem in the installation, as other people had been help to me




jueves, 28 de julio de 2016

The weak points

From this 2 weeks I was working on ICS and a lot of TableXi. On ICS I was touching the model of the project creating a new table and adding some foreign key to the tables. Maybe was not interesting to some people, but this was my first time creating a migration and I think can be mentioned in this blog. To learn this functionality of rails I use this guide.

Also I was working on the interface. This section was especially interesting, because the project use bootstrap but with a different syntaxes called HAML. This is a gem from rails to make the syntax "easier to read".




Into a part of the project I was trying to update controller code, then I went to see the code I did not find nothing of the code. At the beginning I was surprised, How can be possible?, My first conclusion was that the view had the controller (I thought on this possibility because HAML was newer for me), but It was ridiculous. Then I prefer aks to Jesus about that, and he explain me that the HAML was working with other gem who made the role of the controller. After that Jesus explain me that I investigated the gem and I can resolve the problem.

Other new experience was working with Javascript, this time I had a problem to display some information. When I was working I needed display the information in a really specific way, then I needed work with javascript. I just try to change a function of javascript and I ran the code,at the beginning I was happy because the code runs but not like I expected. At lot of minutes after I was really upset because I could not see the problem. Again I asked for help to Jesus, He check my code a rans again. After he inspected the code of the page but this time on the navigator (Chrome). He said me that my code of Javascript was wrong. After he fixed and now the view has working.




I was working on tableXi with Arnaldo, but only was one day with him. He explain me how is working on the tickets, and we will try to fix a ticked, this was resize some images.


All  this experience was really usefull, I was working on my weak points of rails. Now I need to do the best to work on TableXi.

lunes, 11 de julio de 2016

Robot Crafter?

To this blog I continue with the second part of the Robotics Course. For the second leason was about how programing the robot. This time we needed group candle of the floor and when we had a moderately big the robot go back and take other way ramdon.
To the programming I decided use the reactive model, this means use the robot with out save values in memory while is running. I thought this was the best option because the robot needed check fast if a wall is in front of it. When I was the first test, this was better than I thought, but I saw that sometimes the robot could not detect when it were full candles. To solve this problem the best way was program using the hierarchical model, because on this form I could create a pivoting to reagroup the candles to detect it  the machine. At the final I choose the reactive model, but I changged the frame of the machine.
If I was choose the hierarchical model the robot went to hit with anything, and this was going to put on risk the robot.
I think that program a machine has the same rules to make a computer program, we can not get what we want.


To this week I was helping to Macho on Wappo app, this app is on Swift and the IDE is Xcode. I think that this is a powerful languaje OO with soft typing and a code easy to understand. But I really unlike that get much resources of the computer and I only can program on MAC computer.
About on my experience on programming was interesting and careful (The best DD ever) and working with Macho was surprising, he is too fast programming. 


miércoles, 29 de junio de 2016

Taking better decisions and robotic course

Before I start talking about my  last two weeks, I like to say that this blog is going to be short because I was out almost one week. On, Friday, the day that I was out, I was preparing for a exam of my course of languages, because the exam wasn't going to be presencial . But the teacher never send the exam until saturday. Deep inside I knew that the teacher wasn’t going to send the exam on Friday. Cardoce thought the same that me, and he suggest that I came to Pernix and if the teacher uploaded the exam we could work on it together.



If I would have come to Pernix I could have advance my swift training, and also began to work on Wappo earlier.

The next week I went to a robotic course, thanks to Pernix that gave me this opportunity. I had take a course of this type before, but it was orientate to the design of the structure with NXT. But now it was about of software. At the first part of the course we design a little robot like a car, on this part I had some troubles because I am terrible at welding. The second part was theoretical, on this part the teacher (Named Tomas) explained that the robots have to identify, plan and act. Also that there are three models of robots hierarchical, reactive and intelligent. The last part of the lesson was making a robot that could find the light with the three kinds of models.

I think that this course is wondering, and it gave news knowledges about the robotic world. This was a excellent opportunity and now I need to prepare me to share knowledges with others


lunes, 6 de junio de 2016

To remember for the next opportunity...

Last monday I was very nervous, I knew that I had made a serious mistake. Anyway, I began a training because it had been a while since I did one. The training was about Angular (Only Pernix Employee can see the link). The first chapter was a bit boring because it only explained how to install Angular and the typical 'Hello World'. I also got some information about Angular on the internet, and I discovered that Angular 2 exists. It’s structure is very similar to rails, but the model code could be written in different languages like Typescript and JavaScript.

I had a meeting with Cardoce, Carlos and Jesus. At this meeting, they give me a retrospective about my work on Asap, they told to me that I need to improve my soft skills.I feel like sometimes I worried about how was Tristan felling with the constant emails, so I only notify him when I had a breakthrough. Also I think that I should ask for more help, some features took me a lot of time. Another problem was that the project structure was wrong modularize, because I did not thought about futures features. Because of this I must show my ideas to someone before begin to write code.
After this Carlos told me I could continue working into Asap, but "In the shadows", at that moment Jesus become the project leader.
Next Monday I was helping Jesus organizing the project, but without writing code. Also this day I continue the angular tutorial, but this time I created an app on my computer, then I set the environment. When I finished this, I was really happy because I did it fast. I remember when I installed ruby, it was really difficult for me because was my first time using the console. I remember that the last time I was feeling insecure, but now I am confident in what I’m doing
The next day on Pernix, I continue with Asap, Jesus showed me the new design of the project, this new design was better than mine. I did a refactor on my part of the project. I came Thursday afternoon to Pernix because this was the day I could do pairing with Jesus. He explained some parts about his design that I could not understand. Also he told me that we could used the gem riif, I was surprised because I thought that it was not possible. At the beginning I didn’t believed  Jesus, but he told me something very important, that he has more experience than me and I needed believe in him. Another thing to remember is that I have to  change my way of talking, because I commonly use words like try and hope, but this words don’t  help me to be a proactive person instead of a passive person.
Finally this week Cardoce review my blog, and he told me all my mistakes in spelling on the first paragraph, but I did not took note about that, and now I can’t remember the corrections. I need to solve this kind of problems, and take note of the people say.
For next week I asked Sirias for a new project, because I had some free time. I decided to help on the project of budget dashboard in angular, because I went to practice the learned in the last week. Thanks to Escobar I understood the new project.
If I really want to be service employee, I need to work hard on my soft skills and pay more attention with the retrospectives. Also I need to do more pair programing, and not try “to discover hot water” without help.


domingo, 29 de mayo de 2016

When the system fails...

For these 2 weeks I was not available by many time also I do not feel really well on this moment . Then this blog maybe gonna be some short, my apologies about that. On the first day I completed the feature about email, but I needed the password to do it (When I tried without password the program ran but the email never sent). I was investigate for severals minutes other way, but I discovered that needed an password for gmail. I was investigating with diferent way, but I did not had success. To the Monday I preferred take free morning because the last night I could not sleep working into a university course. If my performance gonna fail during the tracking time I prefer no work. When I arrived to Pernix Cardoce and me had a meeting. In this meeting we talk about how important it is inform toTristan when I went to absent.
When I finish the meeting I went to inspect the clean code and fix the conflicts, to make a pull request that day.
On the same day at the night, Tristan sent a email with an error. The error was about the path. Inmediately I went to check my code on my PC, but the code worked. On this moment I was really nervous because I do not had idea how fix it. The Thuesday I asked for help to Cardoce and Jesus. Jesus during the day suggestme that I needed create a stating to the project. In the night I was investigate What was this?. The next day I began to investigate about the heroku, a new tool for me. When i tried to set up, I could not do it. Then, I find a diferent way to use the path, which I has successful.
To this time I complete the feature but i did not want to make pull request because I did not had the email, and without the email the program did not worked.
To the friday as Tristan did not answered I decided make the PR. But the next day Sirias a tell me that I was out of the project...

sábado, 14 de mayo de 2016

How i got my first merge to master

To this two week I was very busy, I began the week making the testing from all the classes. And again the project of ICS was really helpful to do that. I try to made all the cases that i could think. The some test was easy to do, but other not that much. A difficult test was of the controller, in the past i was make the test from the controller with the view but this time I needed test if i was creating the instance of the importation. Also I needed test if the file had the correct parameter. At the beginning I just need help, then I asked for help to Cardoce and Jesus, but they were too busy. To don't delay them I searched help in slack. Almost immediately Macho and Arnoldo bring me your help. Thanks to this help I saw my error and could make the test from the controller.
This is code to do the instance of the controller and check the file:

   let(:catalog_path) do
      Rails.root.join('spec/fixtures/transaction_catalog.csv')
    end
    let(:file) { Rack::Test::UploadedFile.new(catalog_path, 'csv') }

    it 'calls Import::Catalog with correct params' do
      sign_in
      expect(Import::Transactions).to receive(:new).with(file).and_call_original

      post :import, file: file
    end

    it ' imports the uploaded catalog' do
      sign_in
      expect_any_instance_of(Import::Transactions).to receive(:import!)

      post :import, file: file
    end
First declare a file to be loaded and in the test I load the file and compared with the the same but without the original, the other test i only check if some instance was created in the function

viernes, 29 de abril de 2016

Interface disign and import thefiles (ASAP)

From this last 2 weeks i worked totally in Asap Portal. On this time, at the begging Cardoce help me to redesign the interface because i needed add the option that the user can get the csv file from your computer. When i sew the code i almost i didn't understood the code. He explained that the interface worked with Bootstrap and that classes to design and give to the element of a HTML. Also we can make a custom design, changing the input of the classes into a css file.
I investigating the code, saw that the project only had 1 windows, the rest was panels. At few time i find where needed add my code, then i investigate how create a file chooser into Ruby on rails, this video was really useful to create that feature. When i returned to saw the code, the label generated by the file chooser i didn't needed. To fix that problem, i needed create a css file where i hidden these elements.
With the file uploaded into the controller, I decided create my first pull request of the project. But when Jesus revised it, He tell to me that i needed create test from the controller functions. To help me with this work, I used the code of ICS and take a look on the testing that Jesus had done.When I check the code, only check if the file uploaded was the same to the test. 
When i was doing the test, i contemplate other cases. For example: When the user don't upload a file, or maybe if the user loads a different with different extension. Then I pursue to validate this cases.
When my pull request was merge it, I continued to create a new folder to create the functionality of the project. On this part, I needed import 2 files, the report files (transactions) and the mapping template.
The logic was moderately easy, because i used hash tables, i only imported the files and got only the necessary information, and concatenated the information. The real problem is the testing, until right now this theme  I am really week.
To gave the format and create the file i used the information of this gem to create it.
The last Wednesday Sirias, give me a retrospective of Tristan. On this he tell me that i didn't show him my progress. Then i tried to show my advance on the same day and ask him for a follow up.

jueves, 14 de abril de 2016

Finish ICS, take a look on Gigger and begining Asap

In the last 2 weeks i continue with the parser in ICS, i begin to understand the testting on rails, in the rails project has a folder called Spec, in this i create a test for each part of the app. Thanks to Christan i could understand the test with a blog made for him (I tried to find the blog but i can't). To create a test on ruby we need create a var with sentence "let". After, I need create the context or the cases, and finally i write the function "it". At the final i have some same to that:

let(:parser) { TransactionDescriptionParser.new(keywords, sentence) }

    context 'when sentence has correct grammatic' do
      it { expect(parser.sentence_keywords).to eq(['Fresh Market']) }
    end

Also I can use a FactorygGirl, to create the instances of the object. But this is only necessary when we are testing the model.

My first Pull request has too much errors, but was by don't think in other cases, for example:
  1. If i have a specials strings on the sentence
  2. If the word is not complete
To solve the first case, i only need remove this special characters. The second i was talkig with Jesus to find a solution. i recommended use Backtraking to comparate how many as similar the string, and apply the learned on the university. I was investigate about that, but when i ask a opinion a patner school, she told me that could be dangerous because the work can change the meaning very easy. Then i don't implement.

Finally, Jesus explained me that the sintaxis on Ruby is the most import. In other words, i can read the code as a book.

The next week, i was in a new project called Gigger. On this Cardoce suggest me that do a Training about ruby on Rails. On this talk about how to develop a project on Ruby using Heroku (New for me). I don't finish the book right now, but i tried to finished this weekend and explain it in the next blog better.

On the same week, Carlos give to me of development a project "alone". The client is a American investor called Tristan. After that Carlos explain me the situation, i was nervous thinking: Holy Molly,  where do i star?. The project consist a cast of files, between CSV to IIF. On this day i tried look the tools that Tristan give me. The first i investigate some about the iif file, because was the first time in hear it. When i see the Gem to work the project i say: "OMG this gem don't has support since 2012". After i open the excel file i can't understand it, them i ask for help to Jesus. He says me that the file was not a CSV file or something like that. Immediately i send a e mail to Tristan to explain me the file.

martes, 29 de marzo de 2016

Meeting with a client and Problems on rails?

Before to begin this blog i want to say that I'm not the best person talking about me then i go to try speak my experience on this last 15 days, like What i learning? and my experience with the different tools that i worked. Then, he we go...

On this time, i was assigned to my second project, in this at the first time i talk with the client. A few minuter ago, i was some nervous, but when i meet the client he locks a good person. When he began to talk, he looked without afraid, imposing. He knows that he wants and he tried that we understood your idea, and i tried to don't loose the focus. On my opinion, the idea was amazing, and when he talked i begin to create the system on my mint. The challenge to program it sounded funny, but it was a pity that we only go to design a part of the project. Some interesting was the client used much metaforas and  also when he ask us if we have an personal project to explain better.

Also, for two weeks i was working in the project ICS, i had many problems with rails and postgresql. My SO is Korora (Derivative of Linux, Redhat), a friend recommended me use it. The at the beginning, with the installation  was easy. the problems started when i tried to mount the server. When i puts the command install bundle on the terminal, I could not install some libraries, after for several minutes without progress I ask for help to Jesus. He told me that i needed a ruby version manager (rvm), to help me with the installation. When investigate what does the rvm? i understood that the installation of the libraries was lineal, and some libraries was needed install before than others. Only in fedora has this problem, because the rvm was created for the community of red hat.

The next problem was when i created the server, because i cant associated with postgres, and was only the second point of the read me... For this time my postgres was configured for the network server, I read about on this page, but i tried to reedit the system the system would not let me. To changed i need install VIM, this is a toll to open and edit any archive. When i change the text and runs rake the out don't has any errors.

The last error was when i create the database, but this time it was not a error system. I investigate about the problem, some frustrated thinking that were other system error. But i can't find some similar on internet, and i don't has idea why?. To this time Manfred comes to help me. He see for some minutes the code and discovered that the real problem was with a table, because, similar to the libraries bundle installation, a query that change the name of a table runs before with other that uses the new name.

When i run the server for first time was amazing, i was really happy before overcome all the installation problems:


Also, I'm working with the class parser for ICS and soon i will beginning work in other project. But i want to talk about of these in the next post.


miércoles, 2 de marzo de 2016

Data Acces Object

The Data Acces Object (DAO) is a dessing pattern used to acces the information independently. It´s a powerfull tool that help us to make a better clean code and make changges into the dessing. The DAO has 4 parts: entity, the interface DAO, the entity DAO and the service. In the next image we can see a example how is linked

 TestTube class:

This class is the entity of the DAO

DAOInterface class:

This class help us to inherit this general functions into others DAO from the diferents entities.

TestTubeDAO class:

This class contains all functions that can help to acces and handle the information. Also define the methods of the interface

TestTubeService class:

Finally, this class help us to adminitrate the functions on the TestTubeDAO class.



miércoles, 10 de febrero de 2016

Notes Part 1

On this blog i gotta show you a notes. When i see a tutorial, i always try to take note, this is about the HTML

-<h#> </h#> Header, the  # specify the size of the font
**Color = Name, Color of the font
-<p> </p> i can use this to create a paragraph
-<ul> </ul> Pointer List
-<ol> </ol> Number List
-<li> </li> go before the  <ul> o <ol>, They are the elements of the list
-<Body> </Body> Storage the informaton of the page
-<Head> </Head> Used to load any Script
**i can add CSS code
<Link type="text/css" rel="stylesheet" href="main.css">
-<html> </html> its the body of the file
-<!DocType html> Says us the HTML version
-<a href= "Dir" Target="_Blank"> </a> Call a hyperlink
**Href HTML attribute direction
**Target Place
%% _Blank new Tab
%% _Self Tab
-<Center> </Center> Place of the Text
-<Div> </Div> Create a target can i put a class property

miércoles, 13 de enero de 2016

How to test on the database?

The testing in the programation is mandatory, therefore, i gotta tell about the test on the database. When my mentor says me that i need test the Sp of the database, i begin to investigate how i will do it. Into a blog of stackoverflow see that many people to test the database on java recommended the framework dbunit. This tool only help us to load the information of the database before of the test. Then we also need the framework Junit to the test.
To test the DB, we need create the test on JUnit:

  1. On the @Before we need:
    1. Load the Script of SQL (To run in any machine, and helpus to any change on the database)
    2. Load the database information into a .XML (DBUnit)
      • To do this, we need configurate the DBunit to use a large dataset and we get the information on the XML.
  2. On the @Test, we can do the test normaly
I need remember that isnt necesary if you are working with the framework ORM, because you can get the information till the code, but today not all the database works on this way.

References:
Stackoverflow:

Others:

martes, 5 de enero de 2016

Complete the database

While yesterday i was create the conection. i see that my BD needs more Sp. A Sp that tellme if a code has the state repeted, maybe this is the most complex because need make queries in all tables. I test the procedures but with very simplify examples in database. the rest of the day i continue try to test the SPs using this example. i look that i need a XML with the tables information, then i try the mysql generate to me this information. I use this Informtion to create the file, but with this export all the information and dont need.

lunes, 4 de enero de 2016

Testing the Data Base

Today i continue with the implementation the data base to Java, and incredibly i dont have problems to this. Thanks to this guide. The next step and question was, how can i test my storage procedures of the Data Base. In investigate and found this library, this seems good technique. i go to  ask to Avalos and he say me that i need firt understand the Junit, and i implemented a easy examples of the calculator, but not before problems with the jar and netbeans. The next step test the conection with the database i try for a some minutes but i cant doit. I saw this tutorial but i cant implements for time questions