« first day (2113 days earlier)      last day (2834 days later) » 
01:00 - 21:0021:00 - 00:00

9:17 PM
So close...
 
Nice, Mauker
 
YES!
 
Hey guys 0/
Got a quick question.
 
We might have a heavily delayed answer
 
I know it is good approach to make getter setters for pojos. But is it a good approach to not make them, to avoid creating more functions in the app? Like to reduce the chance of exceeding 64K methods.
lol
Guess you were not kidding...
 
9:32 PM
Lol sorry, we're having a rather workless day at work
Well, you could
But how many getters and setters are you possibly gonna have?
500?
600?
You're better off just using multidex
 
depends, asking generally
sometimes more apis, and more pojos
So, multidex is a better choice then removing the getters setters? I saved multidex in one project by removing all getters setters.
32 pojos I got there lol
 
Yes, but you'll almost definitely hit the limit again in a few weeks, if not days
It's just not a viable long term solution
 
True that, but is it bad practice to not use getters and setters at all for pojos? In general...
like making variables public and accessing them directly..
 
It can lead to issues
Sometimes you want to use getters and setters to update values based on other fields
For instance, in a Circle POJO, you might want to update circumference when you call setRadius
So you can do it from there
 
Right.
 
9:38 PM
Or you might not want diameter as a separate field, and have getDiameter() return radius*2
838
Q: Why use getters and setters?

Dean JWhat's the advantage of using getters and setters - that only get and set - instead of simply using public fields for those variables? If getters and setters are ever doing more than just the simple get/set, I can figure this one out very quickly, but I'm not 100% clear on how: public String fo...

 
Got it. Thanks Raghav!
 
Berserk, avoid internal getters and setters
 
umm internal?
Do you mean which return the variables directly?
Actually I went through some links before where people say it is not good for performance to make getters setters, and direct access to variables is much faster. But some people say use them. So, I am just confused now of what to do. I just want to write good code.
If it is personal choice, I will remove them if they just gonna return the variable directly. But if it is a good practice to have them, I will make them. But I can't figure out here what is good practice in android. Whether make them or not....
 
9:54 PM
within a class access fields directly
 
It's a good practice to have them when accessing fields from outside that class
 
ok I will go with it then, thanks
@netpork I never make getters to get variables in same class.
 
10:51 PM
So, I just upgraded an old project to Android Studio, new API, etc.
I'm playing with Jack, but it seems to take FOREVER to run. Any suggestions?
Like, 30+ minutes...
 
hey Pearson
So the Starbucks Android app (which I now work on) is ~1400 java classes, but even it doesn't take more than a couple minutes to compile and push to a phone
so if it's taking you 30 minutes, either something is drastically wrong, or you have written a very large amount of code.
 
11:12 PM
Ours takes about 13 minutes, with lint and checkstyle and all that stuff
 
if I recall correctly his is just a one-man hobby app
shouldn't be taking that long
 
I don't have that much code...
I do use a few native libraries, but there's obviously something wrong... Sigh.
 
how big is your gradle file?
 
59 lines.
There's about 15 compiles included in it, however.
But the only thing that takes any amount of time is Jack.
I might be able to get it to run without Jack. Worth a shot...
 
11:29 PM
Buzz is a hobby app, that takes like 3 hours to compile :/
 
It used to take about 3 minutes...
 
unfortunately I have to get going
 
No worries.
 
11:41 PM
Yeah, definitely a Jack problem. Well, I'm not going to use Jack for now...
Build time with Jack: 28 minutes. Build time without Jack: 18 seconds. I think there's a problem with Jack...
 
Problem? It's a feature!
It's their new way of rate limiting updates to apps
If you can't compile more than once a week, you can't update more than once a week
 
It encourages more careful thinking.
Get your code right the firs time, or else!
38 seconds with the signed build...
 
01:00 - 21:0021:00 - 00:00

« first day (2113 days earlier)      last day (2834 days later) »