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.