Office Hours — Today, September 3

Thursday, August 29

Sep 3
3:55 PM
Mark M.
has entered the room
Mark M.
turned on guest access
Luca L.
has entered the room
Mark M.
hello, Luca!
how can I help you today?"
Luca L.
Hi!
Can you take a look to my stackoverflow question?
Mark M.
OK, give me a moment to read that
Luca L.
ok thank you
4:00 PM
Mark M.
some of the complexity you attribute to CursorAdapter is your own doing
the whole HashSet stuff is not a general requirement
beyond that, I do not see a problem with either approach
BTW, I'm the close vote on that question, because StackOverflow explicitly is *not* about soliciting opinions
had you phrased it as "are there other pros or cons that I should consider", that would have been better
as to which to choose, if deletes are common and the data set is small, POJOs seem fine
if deletes are uncommon, converting the data into POJOs may not be that beneficial
4:05 PM
Mark M.
and if the data set is large, Cursors (via CursorWindow) support larger data sets transparently; an ArrayList or something of POJOs will not
Luca L.
but when i have to do some update/delete with pojos i can udirectly update my data without respawn a task and requery the database
Mark M.
again, it's a matter of how common those are
if they are common, that's an advantage of POJOs
those operations are not necessarily common, or even possible (e.g., data is sync'd from some other source)
4:10 PM
Luca L.
i have understand, even with database driven data there are pros and cons with both approaches like Cursor is better with large datasets but need requery, pojos doesn't need requery and can be easly manipulated but they add memory and initialization overhead
Mark M.
precisely
Luca L.
it all depends on the dataset size and what kind of operation the user can do
Mark M.
at least -- there may be other criteria worth considering as well (e.g., are you using an ORM for database access?)
Luca L.
i have seen some orm but i prefer to use sqlite with raw sql with cursors and pojos when i need
4:15 PM
Mark M.
if you have additional questions, feel free to ask -- it's a quiet chat room today :-)
Luca L.
ok
when i need to execute a sql update on a user animated action (swipe to dismiss or similar) i have to wrap it in a "fire and forget" AsyncTask or there are better alternatives?
Mark M.
that's a reasonable choice
4:20 PM
Luca L.
do you have some advice to fight app piracy? i'm planning to realase an app with advertising and in-app billing
Mark M.
my long-standing advice is: don't worry too much about it
4:25 PM
Mark M.
follow best practices as documented by the in-app purchasing and LVL docs
but beyond that, focus instead on how you are going to market your app and making the app compelling for prospective users
the most powerful tool out there right now to try to prevent cracking is DexGuard, and I can think of a few ways to subvert it too, if I had the inclination
(besides, DexGuard is not cheap)
4:30 PM
Luca L.
even if dexguard can be subverted anyway, it discourages less experienced hackers?
Mark M.
correct
anyone with sufficient time and talent can get past it
so, somebody specifically interested in cracking your app probably will do so
if, OTOH, you are merely a "target of opportunity", they may move onto easier prey
Luca L.
i see that the price is not very high, i think that another level of protection never hurts
Mark M.
I suppose it all depends on how much you spend for tools -- I am used to developers panicking with a $795 price tag :-)
4:35 PM
Luca L.
my company is mainly focused on ios, we are approaching for the first time to this world and we are a bit scared of piracy and api fragmentation :P
Mark M.
with regards to piracy: every hour you spend on anti-piracy engineering is an hour you are *not* spending delighting your paying customers
Luca L.
true story :/
4:40 PM
Luca L.
thank you very much for your help, i'm a noob so expect further talking in the future :D
Mark M.
happy to be useful
BTW, the next book update should be released in the next couple of hours, barring problems
so, be sure to refresh your Warescription page and download the update when it becomes available
Luca L.
ok thank you, i think that your book is the bible of android development
Mark M.
thanks!
Luca L.
bye!
5:00 PM
Mark M.
that's a wrap for today's office hours chat
the next chat is tomorrow, 10am Eastern
Luca L.
has left the room
Mark M.
the transcript for today's chat will appear at http://commonsware.com/office-hours/ shortly
have a pleasant day!
Mark M.
turned off guest access

Thursday, August 29

 

Office Hours

People in this transcript

  • Luca Looz
  • Mark Murphy