« first day (3566 days earlier)      last day (1386 days later) » 
06:00 - 18:0018:00 - 22:00

6:14 AM
Suchismita requested access. Rep: 85 - Questions: 16 - Answers: 0 (ratio 4:0)
 
!reject
 
@Suchismita you currently do not meet the requirements to chat here. You can find our requirements in the rules.
 
6:52 AM
Saransh Khurana requested access. Rep: 47 - Questions: 8 - Answers: 2 (ratio 4:1)
 
7:05 AM
!reject
 
@SaranshKhurana you currently do not meet the requirements to chat here. You can find our requirements in the rules.
 
 
1 hour later…
8:23 AM
Greetings!
 
o/
It's been a while Raghu, how is life?
 
all good bro.
 
8:44 AM
glad to know :)
 
how have you been?
 
I'm okay
 
Hi @all
0
Q: Image gets rotated on Note 10 and One Plus devices in android studio

PihuI need to upload an image to the server. For that I capture image(or take an image from the gallery) that image is placed in its exact position but when I upload image to server the image gets rotated. I have googled also but no luck. Below is my code: private fun chooseImage() { val item...

 
\o
 
9:17 AM
@Pihu you have to handle exif image orientation
read and exif from image and rotate acordingly
 
9:44 AM
@IvanMilisavljevic I tried Exif also, but for some devices i was getting wrong orientations
 
9:56 AM
can someone help me with mockito? I'm getting Argument passed to when() is not a mock! and I really don't understand why
 
10:07 AM
@grrigore kotlin?
 
This was the most starred message last year on this day:
Jul 22 '19 at 20:04, by AdamMc331
do not listen to ball breaker
 
10:26 AM
@IvanMilisavljevic yes
 
are you trying to mock a final class?
note that all kotlin classes are final by default
 
yes, but I think I fixed that
with this one mock-maker-inline
I'm trying to test this one suspend fun login(loginRequest: LoginRequest) that returns a LiveData<Result<Login>>
do you have any resource?
 
and what are you trying to mock?
LoginRequest?
 
well it's a big story haha
I can show you my code if you want
 
yeah why not
 
10:30 AM
that's a method in my reposiroty
just a second
I have to clean it up a little
line 47 throws the error
I know there might be other problems, but I think loginRepository is a mock...
so I expect another error haha
 
there are multiple errors actually
first of all you have to run this test under instrumentation
second you cant mock everything with mockito (for example you cant mock a androids Context)
 
@IvanMilisavljevic is this beacuse I have to mock things?
 
no, there are 2 different kinds of unit-test
insturmented and local tests
instrumented tests need to run under instrumentation (they have to run on android emulator/real device) because they have requirements on android runtime
 
yes
 
so you cant really mock a context class
suggestion: avoid passing anything that comes from AndroidSDK to the domain layer
 
10:40 AM
suspend fun login(loginRequest: LoginRequest) =
    makeApiRequest(errorParser, apiRequest = { loginApiModel.login(loginRequest) })
this is the function that I'm trying to test, it's in the repository
and I've thought I could test it using a unit test, but now that you said about that context
 
why do you need context for that?
 
in ContextErrorParser I get strings from res
a generic one "an error occurred"
that might need translation
 
i get it
do it like this
create an interface ErrorParser
 
got that
class ContextErrorParser(val context: Context) : ErrorParser
 
implement that interface into the ContextErrorparser
exactly
change the LoginRepository(contextErrorParser to the errorParser)
and make that a stub - mock ErrorParser with default implementation
 
10:45 AM
thank you
I was googling stub
@IvanMilisavljevic what do you mean by this? in the LoginRepository's constructor?
 
il get back to that in a minute
 
sure, no problem
 
I think I got
well I didn't
but this still has to be an instrumented test?
 
so basically a difference between a stub and a mock is that:
stub returns predetermined value to the SUT
mock is a test double that ensures SUT calls appropriate method of its dependencies
if you remove context (like in the gist i showed you) you can run this test locally (without instrumentation)
@grrigore so do you understand what did i do in the gist?
 
10:52 AM
just a second
I mean I don't get it where I should do that, I use errorParsser in LoginRepo constructor
that's what you meant by that, right?
 
ah true right
yeah i missed that part
so yeah thats good
 
my bad, I did not mention it
 
and now in your test
remove context and the ContextErrorParser
instead create a mocked/faked instance of ErrorParser (i suggest a fake, because you don't have to relly mock something like this)
 
I've updated the pastebin
but now that I m providing an implementation of errorParser, do I still have to use @Mock?
 
nope
and now
to the original question
since you created an instance of LoginRepository - its not a mock
 
10:58 AM
gotta use InjectMocks?
 
so thats why you cant verify its behavior like this
@grrigore YES! but setup like this will hardly work
if you want to do it like this you will have to mock entire chain of calls
 
I gotta go for a few minutes
be right back
 
11:22 AM
I am back
 
welcome back
 
I think I gotta go for something like this stackoverflow.com/a/13365382/7972851
in order to mock my repo, right? is there another way?
 
you can use InjectMock
but i would suggest not to do that
this SUT provides very little value as it is
as in its testing implementation details (instead it should test behaviour)
 
11:40 AM
hmm
 
let mi give more details
 
where did you learn these stuff?
I find a lot of tutorials but I don't know which one to trust
 
first of all, you should write unit test for specific units eg:
LoginDaoModel and ErrorParser
after that create an integration test for a Repository
now, how you should test a Repository
create fakes/mocks of Repository's dependencies (i prefer fakes - why? - try googling why mocks are bad)
create tests that test the behavior of the SUT
for example
fun passingCorrectCredentialsSuccesfullyLogsYouIn()
where you should test if you pass correct (predefined) credentials to the repository
 
what is SUT here?
 
it retuns true
System under Test
 
11:46 AM
yes, but you're talking about the repo, right?
 
I guess I gotta read some more theory stuff
 
tldr;
1. Create unit tests for dependencies of your repository
2. Create an integration test for a Repository
@grrigore well yeah, i would say its better to have 0 test vs tests without any value
and writing valuable tests requires a bit of work, but they provide really huge value in the long run
 
> provide really huge value in the long run
this is what I want
but yea I think there's a big learning curve
 
2 books you have to read on this
Unit Testing Principles, Practices, and Patterns
Growing Object-Oriented Software Guided by Tests
 
11:51 AM
thank you so much Ivan
 
yeah no probs
 
12:36 PM
nice
there is juicy drama, meta.stackoverflow.com/questions/399495/… @Mehdi @Tim @MwBakker
 
Tim
1:11 PM
I saw it earlier and downvoted it
I really don't give a shit about 1 person, like why must a meta post be made because you decide to leave the network
just leave
Give it 2 weeks, she'll be back again. — Ben Fortune 5 hours ago
this is also true
walking drama generator
I think it's incredibly arrogant to think that your departure must be made known to the entire network. Sure you want to say goodbye to your friends. Do it in chat like the rest of us.
 
hi Tim
fancy some FIFA tonight?
 
I did not see it this way initially since there were other similar posts on meta, but I realised that those were actual Mods and elected by the community, so it made sense to let the community know
With this in mind, I totally agree with you
but why did she get suspended? nvm, it says it was at her request
> This account is temporarily suspended. The suspension period ends in 3 days.
 
1:27 PM
posted on July 21, 2020 by Android Developers

Posted by Florina Muntenescu, Android Developer Advocate Getting on the same page with Paging 3 The Paging library enables you to load large sets of data gradually and gracefully, reducing network usage and system resources. You told us that the Paging 2.0 API was not enough - that you wanted easier error handling, more flexibility to implement list transformations like map or filte

 
Tim
@Mehdi she was a mod before, but she resigned when that drama was going on, and she left, then came back soon after, wanted to get reinstated as mod, they said no. Now she wanted to run for mod again, and mid election she decides to leave again
"I am doing this and that bla bla and everyone should know it" so arrogant
 
She got rekt in the comments to her questionnaire meta.stackoverflow.com/a/399162/4467208
 
so now she left again because she was bitter about the whole mod thing?
 
why don't you put that energy into a fifa game?
 
She had this "reinstate monica" thing in her name, but then removed it when she candidated
I went into the rabbit hole to read that, I was amused
making my 10k reps worth
 
1:37 PM
XD
 
Tim
1:55 PM
lets play 1 game grigg
or 3
@grrigore gooogogo
 
maaan
I'm working right now
 
Tim
you deserve a break
 
yea in like an hour xD
sorry tim cannot gooogogo right now
 
Tim
ok
 
but I can gooogogo later if that's fine with you
 
1:59 PM
@Tim Being a victim is the hip new fashion trend.
 
nice bad influence
 
what about 7-8 o'clock, Tim? your timezone
 
Tim
I don't know if it is playing the victim. It looks more like attention seeking, like posting on meta just so you can see all the people say "thanks for everything you did, we will miss you" etc. I mean if you are really done with the network as much as you make it sound, just get up and leave. People who are friends with you will know how to contact you. There needs to be no public goodbye party for stroking ego and causing more drama
 
but we like drama
 
Tim
but not when it's the same drama from the same person for the 5th time
 
2:04 PM
that's a series haha
 
"Playing the victim" is just a form of attention seeking.
 
Tim
ah ok, then yes :P
 
To be fair, that strategy basically got Trump elected, so she may still win the election.
 
lol
but we are not americans
 
lol the fatal flaw in her plan.
I have a dream, that one day someone will develop an upload progress bar that actually shows you the progress of the upload.
 
2:11 PM
I have a dream, that one day I will get money without working.
mine is realistic
 
Tim
I have a dream, that one day I can update my pc and it will not get fucked up
yours is more realistic yea
 
@Tim You're dreaming of a Mac.
 
it's 7-8 ok, timmy-g?
 
Tim
no good for me, I can usually play at like 11pm
 
@grrigore Yea... If you the amount of money doesn't matter, you can probably accomplish that in like 5 minutes. lol
 
2:13 PM
even better
how?
 
Tim
quit job, sit on street with a blanket and shake a tin cup
 
still working xD
 
Savings account.
 
yea true
 
ok, apparently I need to go set my laptop on top of the wifi router for my upload to work...
 
2:30 PM
see you later, @Tim I'll be here around 11pm
bye guys
lol
keep in mind that he/she is swiping for the clothes, not the girl
 
did yall see how thick zuckerbergs ass is
4
 
That's kind of interesting if it could use those choices to determine other clothes you might like. It seems likely that everyone would kind of trend towards the same things though.
@Ahmad uhhhh....
 
stating the real facts here
 
zucc made a deal with the devil, for every "accept terms of service" button click his ass gets fatter
a deal of a life time
 
2:49 PM
MORNING YALL!
 
3:02 PM
heyooooooooooo
@Ahmad lmfao
that' a lovely message to star right there
 
3:20 PM
almost done with my next (and likely final) release of BitLink.
Better than Jitsi in many ways, the other open source alternative to zoom.
 
what's bitlink
 
ahh ur chat thing
 
yeah
 
@MuratKaragöz hahahaha
@Ahmad that was so random XD
 
3:28 PM
The only zuckerthing I've seen in the psat day or two is the pic of him surfing in hawaii with white-face
 
same, and the land-acquisition lawsuit thing
 
3:39 PM
didn't hear about that one
I wonder where ahmad is getting his juicy-ass news from
 
@ballBreaker newsweek.com/…
 
lmao I didn't know which one this was in response to and thought it was gunna be zuck's butt
 
Androidification requested access. Rep: 161 - Questions: 8 - Answers: 1 (ratio 4:0.5)
 
!reject
 
@Androidification you currently do not meet the requirements to chat here. You can find our requirements in the rules.
 
3:50 PM
@Mehdi wait they mention that zuck has a family
is this MF not single
TIL he has a wife
I wonder if he's going to restrict his own kids from using facebook in the future lol
 
@grrigore you work for nike?
😳😳
 
o/
 
4:07 PM
@Reno yeah he's a child labourer in one of their factories
They give him a few breaks each day from his 1 cent per hour wage to come talk with us
 
4:24 PM
Ribbit
How you're all doin'
 
Joe McMullan requested access. Rep: 21 - Questions: 5 - Answers: 1 (ratio 4:0.8)
 
hey joe you don't meet the requirements, sorry amigo brochacho
 
Brochacho?
 
it's like muchacho, but for bros
 
Got it
 
4:48 PM
Btw, @JBis the current internet connection I'm dealing with is apparently too slow for Apple's servers to handle the upload of my app. 🤦‍♂️
Trying with cellular hotspot now. haha
 
facepalm
 
I might have to go sit in DunkinDonuts parking lot or something.
 
lmao
 
I don't know what's going on. I'm sitting next to the router and I have 0.5Mbps. lol
 
You're in the US right?
 
5:03 PM
@Reno nope i found that on github
 
@JBis Well this is DSL in kind of the middle of nowhere, but still...
But yea, US.
 
\o
If it stops raining I'll just go outside where I have a better cell signal and a hotspot will probably work.
 
I finally got the facebook that has dark mode
 
facebook is a cesspool
 
5:16 PM
o/ 101
it really is
 
yeah big time
 
but its a unique cesspool, if someone shows me content from facebook, i can tell its from facebook without them even saying
 
sometimes yea
I was watching this today which came from facebook but I had no idea
it's a funny video
everytime I see these politic rallies where americans get super uppity about socialism for absolutely no reaosn I think of you Jbis
 
@ballBreaker this is so dumb
 
posted on July 21, 2020 by Neal Eckard

Android Studio 4.2 Canary 5 is now available in the Canary and Dev channels. If you have Android Studio set to receive updates on the Canary or Dev channel, you can get the update by choosing Help > Check for Updates (Android Studio > Check for Updates on macOS). Otherwise, you can download it here. For information on new features and changes in all preview b

 
5:21 PM
which aspect of it
 
everything in that video with the exception of the grass
 
even the trees?!
It's just a dude trolling some people, but yeah
 
@ballBreaker thats just extra long grass
 
the whole idea of holding a rally for the police is pretty dumb, I agree
 
@ballBreaker lol not sure how to respond to that, but alright
 
5:23 PM
haha im mostly kidding
 
The entire police v BLM is stupid
 
It's pretty entertaining to watch everything devolve into a communism is bad argument down there though
@JBis yeah the whole thing is wild
 
hello
 
You have extremes on both sides, but the people in the middle agree. Good cops don't want bad racist cops. BLM people aren't anti-cop or destructive they are just anti-racist bad cops.
 
@ballBreaker lol
 
5:25 PM
But then you have have the extremists who fuck everything up
 
I wonder statistically how many people are in those "extreme" camps
 
difficult to tell, media like to report the extremes more often
on both sides
 
yeah I've been trying to get somewhat of a anecdotal idea just from seeing rallies and shit
but basically as far as I can tell the entire trump-base is in one of the extreme camps
which seems to be a decent number of people
 
But you have the same issue with everything. I've seen radicals on both sides of rape arguments too.
 
I mean, yeah, but it seems like maybe the line is starting to blurr
 
5:27 PM
You've got "Guilty until proven innocent" and "They asked for it" people
 
also you should probably not talk with the people there who are pro-rape
seems like an issue that shouldn't be bi-partisan lol
 
i don't talk with either camps much, but i know a ton of "Guilty until proven innocent" people
Which are often the same people who call to defund the police...and post about racist rape accusations in the south from many years ago
 
ahh, yeah people are way too quick to jump the gun on that stuff
people need to just get alongggggggggggg
it's sad you guys are so divided down there
also possible it's just not as bad as it looks
 
i'm telling you, if we let the south leave, the US would have so many less issues
 
I thought a lot of it was from the mid-west too though
all the really isolated rural areas
really you guys need to just succeed california and new york and join us in the best country
 
5:37 PM
@ballBreaker we'd have less, not none
 
we'll also take maybe washington
 
p.s have you seen this show, funniest shit
 
montana would be nice too, real pretty there
 
what that part of the episode so good
 
hahaha yeah I've seen em, I love sacha
my favourite is the prison rape song that he DJ's
I'm not sure which scene that is because it's blocked in canada apparently
(on youtube)
 
5:39 PM
fuck you Showtime, racist fucks
 
haahah im not sure why but a lot of US media companies block shit outside the US
The "skits" he does as the Israeli military trainer are hysterical too
Did you see the clip where he goes to a conservative rally a few weeks back and started getting them to do chants like "kill all chinese" and shit lol
 
@ballBreaker what did I just watch... XD
!reject
 
@JoeMcMullan you currently do not meet the requirements to chat here. You can find our requirements in the rules.
 
@Mehdi hahaha idk I found it on reddit
 
@ballBreaker shorter version of the same clip youtube.com/watch?v=KHJlZyFxp88
 
5:44 PM
ohhhhh hahahaha yeah this one's good
I love the one's where he's the hyper-liberal guy hahah they're hilarious
 
apparently he had like a bullet proof vest or something just incase, even tho they took all their guns before hand
 
lmfao
I've been rewatching through Chappelle's show the past few days
If you've never seen it, I'd highly recommend
definitely a bit before your time, but it holds up well
 
ive seen a few
 
nice nice!
 
i will give credit to Bernie, he handled his super well
 
5:51 PM
hahahah this one was good
I saw this before I even knew who bernie was and I remember thinking "he couldn't get one over on him"
A few of the other politicians just eat the turd instantly
 
yeah haha
 
I can't remember who it was, but there was one politican that got it reaaaall bad haha
 
did you see the gangster rap one? i was dying
 
@JBis "this here scooter is to preserve my body's finite energy" XD
I wonder if he prepared this one in advance or if he came up with it on the spot XD
 
hahah this is the one I was thinking of
It's missing the interview bit before which just sets it up perfectly but it's still good hahahaha
"these are some sounds that I recorded during my time in prison"
 
5:59 PM
@Mehdi best line in the entire show haha
 
06:00 - 18:0018:00 - 22:00

« first day (3566 days earlier)      last day (1386 days later) »