martes, 14 de febrero de 2017

Stoping the Asynctask

These two weeks was really harder. First I discovered that all the project have a bug when the app has suspended this display an error. The error is caused by the async tasks, I needed to stop them before that the program has suspended. Solve the problem was easy from the async task made for me, but the calls with Quickblox was different. On this moment was when started the problems, the first problem was when my computer died, I was too near to cry by the lost. The rest of the week I was working with a computer of Pernix but Android Studio did not ran very well on the computer.



When I could return with the issue of Quickblox, I just only had an example that explains how to stop the thread. The example was 3 files with 700 line for each... WTF Who programmed this s***!?. Immediately  I thought that the best way is asking for help on this time. Then I ask for help to Erick but he was too busy. To not waste my time, I started an Angular tutorial (Probably the next time I will go to write about this topic).



domingo, 29 de enero de 2017

Delay on list view

On this week was some funny, I started the week working on an issue with the display the chat list on Wappo. The issue was a delay to it show the chats. At the beginning, I thought that was the query to quickblox, because to I got all the information I needed make 3 queries (To get the chatList, another to get the contact information and finally the avatar from the user). I tried so hard for several minutes but I could not get the solution Then I immediately ask for help to Macho. He suggested to me that I created a database on the app to save all the information on the phone. Then, when the app started I only needed load first the information from the database and after I load the information from Quickblox.



To I made the database, I used SQLite because was really easy to use and very similar to Hibernate. I did not have troubles on this part. I just only create 3 classes from the implementation: one from the design of the table, another from database creation and the last for the queries. I used this tutorial to learn SQLite. When I finished all the implementation, the app had the same delay again. WTF!? How could be possible?. Now I did not idea the could be. Then I began to run my code part by part until found the issue.


The issue was in the view, exactly on the adapter from the list view. When the app created an item on the Listview, this needed iterate severals time the creation to adjust the components. I found this solution to optimize the view and I used this solution.



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