Jhon Barrantes

Greenhorn
+ Follow
since May 24, 2014
Cows and Likes
Cows
Total received
2
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jhon Barrantes

Thank you John.

What you mentioned confirms what a friend (a professor from uni) told me when I quit my first job for the reasons I described in my previous post.

So I guess what I'm going through is not that unusual as I thought? I understand that when you're starting, sometimes you have to let others take the credit for your own work, but I can't help getting frustrated/angry because it's as if you're treated like a tool or machine that they can use whenever they want

Don't get me wrong, I totally understand that I'm getting paid to do what my company wants me to do, but it's just that ,as you mentioned, if they gave the chance/responsibility to finish what I start, I wouldn't feel like a mere tool in their hands.

Jhon.

4 years ago
John, a warm welcome to CodeRanch.

I don't know if what I going to tell has anything to do with me being young, but what I do know is that I'm really tired of it.

I'm 24 now and since I finished college (almost three years ago) I have had two jobs and in both of them I've being treated like some kind of means for others to learn new stuff.
You see, whenever there's something no one wants to do because they find it too difficult or they had no idea how to do it, they just hand it over to me. At first I thought it was because they really trusted me and to be honest I enjoy learning new technologies and trying to find solutions to tricky problems. The thing is that in almost all those projects once I passed the difficult parts I am removed from those projects and assigned to new ones, while I have to see all my effort ending up in the hands of more "experienced" developers (the same ones who didn't accept the challenge from the start)

Some friends have told me that I should look for a job where I could find the recognition I want, but I don't know what job could that be? Perhaps I'm just paying my dues.
What do you think I should do?

Jhon.

4 years ago
Welcome to the Ranch!

I hope you enjoy your stay and have fun answering our questions.

Jhon
4 years ago
Congratulations to all winners!

Thanks to Joel Murach for promoting his book and answering questions this week. Have a super-duper weekend and hoping to keep seeing you around the Ranch!

Once again, thank you.

Happy coding to you all.

Jhon.
4 years ago

Karthik Shiraly wrote:
Check https://source.android.com/source/life-of-a-bug.html on how to file a feature request, or contribute your own patch.


Thank you! I'll definitely file a request for the AsyncQueryHandler.
By the way, here's the direct link : https://code.google.com/p/android/issues/entry?template=Feature%20request

Thanks.
4 years ago
Thanks Karthik. I really appreciate your kind words
4 years ago
Hi Joel.
Thank you for taking into account my suggestions. I'm sure you'll knock it out of the park explaining those topics

Regarding what you mentioned about not always being necessary to use a background thread for SQLite operations, I think you're right.
There's some apps that are quite simple and don't make an extensive use of a db. For that kind of apps, I think I might consider doing the SQLite operations on the UI thread and see how it goes.

Finally, do you know if there's any way to get in touch with the Android team? I want to know if it is possible to request some improvements in certain classes? The AsyncQueryHandler class for instance,it has been around since API level 1, without being updated for later additions to the Android platform. Hence, there are some newer functions that require a more general asynchronous handling. For that reason I'd like to see if they could consider updating that class or perhaps coming up with a new one.

Thanks.
4 years ago
Yeah that guy is really awesome and very kind. He helped me a lot when I started using Content Providers.
Regarding the use of CursorLoaders without a ContentProvider, well a couple of years ago the library Wolfram(the blog's author) mentioned in his articule was very popular but the project is discontinued now.
We can always implement our own loaders, but this requires both more work and a deeper insight into the framework.

I'm glad you're considering adding a chapter of Loaders to the next edition of your book. On that same note, I hope you don't mind my recommending some other topics you could consider adding to future editions of your book:
  • A chapter of different asynchronous techniques (HandlerThread and of course Loaders)
  • Mentioning the IntentService class in the chapter of Services
  • And including the use of the Singleton pattern in the SQLite chapter


  • Your book is very good as it is, and I'd still recommend it to anyone who wanted to start in Android, but with a few additions, I'm sure it would become THE perfect choice for every new Android developer.
    Once again, thank you not only for your Android book, but also for all the wonderful books your company produce. They're excellent and they are certainly my first choice when I want to learn a new technology.

    4 years ago
    Well to tell you the truth, this is one of the things about Android that has caused me more headaches. For that reason I kept digging and found out that there are actually two APIs that can really help when it comes to CRUD operation but they only work with ContentProviders:

  • CursorLoader
  • AsyncQueryHandler


  • Since I got familiar with those classes I started using Content Providers in almost all of my projects, except for a few ones where I didn't consider necessary to go through the hassle of implementing a Content Provider. And it was for those cases that I was trying to find an alternative way to execute SQLite operations
    4 years ago
    Hi Joel,

    Thank you for taking the time to reply.

    Regarding the CRUD operations, well I was basically talking about a local SQLite db. I do update data in the cloud, but I guess there's plenty of options when it comes to doing that : IntentServices, Jobscheduler, SyncAdapter, etc.
    It's in those apparently trivial CRUD operations that we are left on our own Almost all the books I have read mentioned that we should avoid to perform such operations off the main thread.
    For instance, here I'm quoting one of the most extensive books on Android, "The Busy Coder's Guide To Android Development":

    You really should do your database I/O on background threads. Opening a database is cheap, but working with it (queries, inserts, etc.) is not.



    The problem is that despide all those recommendations, none of those books give a clear idea of how to do what they recommend. I know that when we're taking our first steps into the Android FW, we tend to use the AsyncTask for almost everything, but on further reading I came to the conclusion that I should stay away from that class, for many reasons, mainly because coordinating long-running tasks over the Activity lifecycle can be difficult and memory leaks can result if you aren't careful.

    For that reason I always wanted to have the chance to ask a professional developer/author how they handle that kind of operations in a real-world application.
    4 years ago
    Hi Joel,

    Congrats on your new book!

    The first edition of your book was the first book on Android I read and I'm glad I chosen your book because it was very easy to follow and gave a general overview of the main components of the android OS, which helped me a lot when I read more advanced books.

    In all the books I have read I haven't been able to find a general way to perform CRUD operation off the main thread, they all recommend not to execute those operations on the main thread, but they either do not show any example of how to do that or simply use the AsyncTask class which can be pretty tedious and repetitive when you have to write several of those operations in the same Activity.

    What pattern/class would you recommend to use so that we avoid having to write a new AsyncTask class for every CRUD operation we need to perform?

    Thanks.
    4 years ago

    Kondwani Chipeta wrote:Hello Jhon,

    RMS preserves your data so it should be available if you shut down your phone or if the battery runs out.

    Read this article to find out more about RMS.


    Thanks!!
    Just one more question, do you know where the data persisted with RMS goes(phone memory or a memory card)?
    6 years ago
    Hi.
    I need to save some data in my j2me application using RMS, but I'm not sure about what happens to this data if I shutdown the phone or if the it runs of out battery. Next time I start the phone, will the data be still there??

    Just one more question, do you know where the data persisted with RMS goes(phone memory or a memory card)?

    Thanks in advance.
    6 years ago
    Hi.
    I want to ask you if you know of practical way to display data (maybe in tabular format) coming from a WebService.

    I'm really new to j2me, I've just learned how to consume RESTful webservices, now I need to learn how show that data (which comes in json format) to the user.

    Basically this is the code I use :



    As you can see I only concatenating the results to then show it to the user. But surely there's gotta be better ways to that and here's where I need you help.

    How would you display a typical json Array in j2me ?? How do you deal with limitations such as limited memory and small screen sizes when you have to work with a considerable number of results? Pagination???

    Any advice or resources you could provide would be greatly appreciated.

    Thanks in advance.

    P.S. This is the jar I used to work with json: http://www.java2s.com/Code/Jar/j/Downloadjsonmejar.htm
    6 years ago
    Thank you Ulf Dittmer you're a life-saver!!!
    Now I really know how to build jars from source code.

    P.S. I also found the original jar I was looking for. Here's the link in case anyone needs it. http://www.java2s.com/Code/Jar/j/Downloadjsonmejar.htm

    6 years ago