« first day (2473 days earlier)      last day (2493 days later) » 

1:00 PM
JS is a by reference language and you might be losing it inside the observable callback
also browser contextes are scarily weird
 
how do i print in dueDiligenceService the dueDil that i filled in confDueDiligenceService
?
that's what i don't know how to do D:
 
why don't you run the 2nd "stuff" after the first has ended?
 
Hmm, thanks.
 
?
 
@CptEric JS is not a by reference language
JS is a by reference value language like Java.
It actually has the same pass semantics as Java, with primitives and pass-by-reference-value
 
1:02 PM
well... time to go
 
how JS contextes are written on browsers makes it a pretty fucking mess
 
Let's say I have a content provider and an app, and I have callbacks set on both the app and the content provider and the content provider is set up first.
 
of references
not like java.
 
@CptEric I have no idea what you're talking about, but nothing about JS is a mess in 2017.
 
tomorrow i'll hit my head with the wall with this
Have a nice afternoon people!!! :D
 
1:03 PM
perhaps you could get something useful from this example developer.android.com/samples/BasicSyncAdapter/src/…
 
everything on JS is a mess since always, no need to ping me
 
I have a ContentProvider which defines a onConfigurationChanged - and I have a ComponentCallbacks2 implementation that also has a onConfigurationChanged. Is it guaranteed that the content provider will get its onConfigurationChanged callback called before the app?
 
that's tricky. I don't know
 
never used ContentProviders
so no idea
 
I'd expect something like this to be well documented somewhere but the docs are pretty silent about it.
 
1:06 PM
it's probably the first or second time i've heard about it
 
if it doesn't say anything about order, don't asume anything
 
I register the app callbacks with context.getApplicationContext().registerComponentCallbacks(mPeer5ComponentCallb‌​acks); (to sum it up)
 
what are the use cases for ContentProviders?
 
@OcuS a freelancer we have here says it's guaranteed to be the creation order. (the order of registration)
 
> You want to offer complex data or files to other applications.
You want to allow users to copy complex data from your app into other apps.
You want to provide custom search suggestions using the search framework.
You want to expose your application data to widgets.
 
1:07 PM
@CptEric to provide information between apps, but we just use it to load a low latency things in the background since it's a better hook and called before the application's onCreate.
 
oh
 
what arguments does he have beside "sayings" ?
 
that's why i never used it
 
Word
 
sup graeme
 
1:08 PM
His response was literally "but registration order ==> callback order"
 
trust the documentation (which doesn't say anything) and code for the worst case scenario (unordered)
 
" load a low latency things in the background"
 
@CptEric that took you way too long :P
@OcuS That was my intuition as well and sounds like good advice. I still think maybe I'm missing something and it's documented and I'm just terrible at Android.
 
i was trying to figure why would i need that
yeah work for worst case scenario
 
I have to say by the way that Android (as a platform) is a lot more pleasant now than it was 2 years ago.
 
1:11 PM
@BenjaminGruenbaum you're among few friends here, no need to ping ;)
 
Very big leap forward in tooling, and enough of the devices are newer to not use any of the awful stuff.
Sorry, I have keyboard shortcuts for replies set up from the JS room and I'm used to them. I'll do my best not to ping anyone here.
(Actually, the shortcuts are from before the JS room, but that's when I adapted them to the SO chat)
 
yeah it's not fun to code with pings
 
And Android could be much more pleasant, without Contexts and Fragments
 
Ugh
Missed the bus
Next one in 30'
 
Android could be much more pleasant, as "messy" as you think web development is it's leaps ahead in terms of development experience.
 
1:15 PM
o/
 
Hiya Graeme, Adam!!! :D
 
o/ Pa3ll3r
 
overall my experience as dev points that, on business projects, android > web > ios for ease of development, and ease of deployment.
with web slowly catching up and ios falling into the pit of tears.
biggest flaw of web hybrid app dev is the lack of a working stable repository system like JCenter/maven, because npm sucks balls at updating and checking for incompatibilities.
for example it lets you install anything, wether you have the requisites or not, and then, and only then after it's overriden some stuff, complains (if it does anything).
sup @AdamMc331 , long time no chat
how was the trip to tristanland
i read somewhere that you took a relaxing bath.
 
Paeller... That's a new one
 
@BenjaminGruenbaum many seemingly basic and/or essential android concepts/techniques are barely documented
 
1:23 PM
It was quite the relaxing bath. I took it so I could clean my pixel.
 
XD
 
As a community, why don't you step up and document everything?
 
For the glory of satan of course
 
Like MDN for web
 
1:23 PM
@AdamMc331 so you're a clear pixel user now
 
Rolf
 
we cannot take initiative to document stuff because we are too busy complaining about the lack of documentation
6
 
The way lifecycle works sounds so profoundly basic to how applications work that I'd expect it to be really documented.
 
1:24 PM
lifecycle is well documented
but just the basics of it
 
Not for content providers it's not :D
 
a content provider is not a basic thing
 
@TimCastelijns XD
 
Docs call them a "standard interface".
 
standard doesn't mean basic
 
1:26 PM
I'm probably just biased because I'm bad at Android, but I've had a lot of fun writing code in the weekend and now when I work on the company app (and not my code) I'm worried about context.
 
they are conceptually basic, but not many people use them
 
everything with an ISO code is a standard stuff.
 
Wait, is there an ISO code?
 
there must be
 
No seriously, if this is specified in a formal specification I'm 100% comfortable with reading that.
 
1:27 PM
every service concept written by google has one so apple doesnt' fuck it up
 
I don't know of any android thing that has an ISO code
 
if there's official google certifications, they must specifiy what you certificate on
they were announced last I/O
that or it's a made up title
 
BTW Benjamin, if you are looking for a nice database library, I can give you exactly 1 tip
 
In web certifications are awful.
A nice database library for Android?
 
1:29 PM
so hungry
 
YUP, looks like google made up the certifications, so you can only trust them to certify you're certified
 
I found the line about ContentProvider lifecycle: "Android normally handles ContentProvider startup and shutdown automatically. You do not need to start up or shut down a ContentProvider.". Good luck with that
 
sorry, no ISO for you
 
i was hoping they did it well
 
1:30 PM
android and a few other platforms
 
By the way, in case anyone cares what I'm working out is running Peer5 on Android - Peer5 is a peer to peer CDN for video provider. It's really cool code - we make delivery distributed.
Although on mobile it's leech only by default so it's less cool (because data plans)
Here is everyone currently connected to the system on web globe.peer5.com
What's the database advice?
 
awesome globe
REALM
 
yes, realm
 
how did you make this globe?
 
Thanks, I didn't write it :D I only joined 3 weeks ago but the JS code here is pretty well maintained and they do all the stuff that makes sense (testing, coverage, PR flow, everything I'm used to for Node)
 
1:31 PM
a lot of us use and like it. @RaghavSood swears by it
 
Globe reads live data from Redis and serves it with Node to d3.
 
Peer5 marketing messages are way less subtil than the one from Realm marketing team >_>
 
yeah that is a very nice visualisation
 
@TimCastelijns Use what?
 
nothing, go away
 
1:32 PM
Sorry, 3js, we have a blog post about it blog.peer5.com/peer5-live-network
Thanks
 
requestAnimationFrame might stop working soon tho
edge and safari want to block overusing it
 
scheduling is very tricky in the web, but in a pretty predictable way.
I actually helped write a library that does pretty funky stuff with scheduling in JS - if you have a question I'd love to return the favor and help.
 
scheduling would be fairly easy in android if they didn't mess it all up with doze
 
DOM scheduling can be pretty tricky, but for good reasons and most users don't care. The DOM (and Node) have the notion of a "macrotask" (something that runs after I/O) and a "microtask" (something that runs before I/O). The goal of microtasks is mostly to ensure the order of things is consistent (so the call order is predictable) and the goal of macrotasks is mostly timers and stuff.
I'm not marketing anything OcuS, I came here to ask for help and I wanted to show you what it's for. You're not really potential clients unless someone here just happens to use ExoPlayer to stream video. (which I guess is rare).
 
1:35 PM
I like predictable stuff
 
I'd take JS concurrency over threads and contexts any day.
 
Exoplayer is pretty commonly used in android as far as I know. But none of us use it I think. At least I haven't heard
 
The fact the code I'm looking at (that was written in the last year). Uses new Thread is absolutely bonkers to me.
Like, you would not do that in C#, it's so weird Java doesn't have an easy async I/O abstraction although .nio has been around forever.
 
I don't know about java, but android has async abstractions. There are like 36 different way to do threading/async though, and none are 'the standard'
 
yup
you don't need to to threads
it's slightly discouraged
there's even annotation based thread stuff
that makes your stuff run in background just with a @Background
teatralization
 
1:42 PM
Threads are great for CPU intensive stuff which is rarely why add developers use them.
 
what i meant is you don't need to do Threads
 
I'm an SDK, what do I do instead?
 
the thing is that (generally) the better the abstraction is, the more complex the concept is, making it harder to get started with. So most people just go with the 1 line new Thread they can copy from SO
 
I disagree with that statement, an abstraction can be simple (like a CompletableFuture) and be very easy to start with (by having syntactic assist with async/await for example)
An abstraction doesn't have to be easy - but it certainly can be simple.
 
There's actors, there's annotations, there's RXstuff, many many things
 
1:44 PM
CompletableFuture is java 8 :(
 
What are you guys on about?
 
I'm complaining about not having some feature I like from language X in Android.
 
@BenjaminGruenbaum this is true. But for most people it can't get easier than new Thread {code here} and they don't care to look further because "it works for now"
 
And the people here are tying to be helpful.
Even in C#, you have new Thread and Task.Run (which does the right thing) but everyone is using async functions for several years now.
Then again, Google can't break Java.
 
sadly android developers are stuck with java 7 for now
 
1:47 PM
In the web, you have TypeScript, and anyone can influence it - you can talk with the core team pretty easily.
And even without TypeScript, the language has progressed tremendously in the last 2-3 years.
 
yeah
TS is love, ts is undefined method life() on object ts.
 
And it has a non sucky typesystem.
You literally can't get undefined methods in typescript, or null reference exceptions like that.
 
we are making steps with Kotlin now. People are slowly adapting
 
It's much faster than Java (unless you disable strictNullChecks and love pain and suffering)
 
i get them a lot of times actually, but i don't get to configure it as i'm using it with angular 4 and it's stuff
yeah kotlin is lovely.
kotlin on android is basically what swift would become if it had a decent framework
 
1:51 PM
Angular 4 is a mess
It's a mess of contexts and implicitness and things communicating through non-standard needlessly complex abstractions.
 
what's wrong with Threads for background stuffs?
 
Why do you have background stuff?
 
now that we have some web knowledge here.. I registered a .com domain a couple days ago and have already been approached by 34 different spammers, is it normal? Does it ever stop? The site is near empty
 
I've actually done Swift on the weekend too - and I have to say I've enjoyed Android more (and I actually did swift for a month before). AVPlayer is pretty messy and undocumented compared to ExoPlayer and all the code samples are broken since they break their APIs all the time
You were approached by whom? (Via the website's email?)
 
Banjamin - for them to run on the background and not obstruct the main thread?
 
1:53 PM
yes via the email I registered the domain with
 
I/O can happen asynchronously without threads.
TimCastelijns - should have gotten whois guard :D
 
Ok, but what's wrong with using them?
 
about half are "register your domain" and half "hire us for cheap designs"
 
It doesn't stop, just change the email to something you'd only use for that sort of stuff.
 
Wait, what feature do you want in Java that's missing?
 
1:54 PM
Mehdi - in Anrdoid or optimally? Optimally you shouldn't have to care.
That I have in TypeScript or in genral?
 
never heard of a whois guard.. brb googling
 
I'd like to have proper value types in Java, I'd like to have async functions and proper non-blocking APIs, I'd like to have more complex type-safe types (like being able to specify what string an event handler can be without inheriting a whole interface - cleanly). I'd like better types on arguments - I'd like to not have nulls, and I'd like better functional abstractions.
Closures, proper high order stuff, the ability to use values rather than references when I choose to.
TypeScript's type system just feels so modern compared to Java's (which is hardly a fair comparison but it's one I make).
 
didnt read everything, but a huge +1 for typescript
 
It's also a lot nicer than Swift's IMO which is very limiting - and errors there are hard to debug.
JavaScript isn't that horrible either way, but people wrote very bad JavaScript with mutable global state for a long time, and there is a lot of terrible advice online - but it's getting better.
 
Proper value types?
Aync Functions with non-blocking API's?
 
1:57 PM
Java has two "types" of types, values and references. Values are only primitives and never your own types.
 
o/
 
Maybe I'm tired :) I understand words but not sentences :D
Ben - Right. Why is this bad?
 
Graeme let's say I want to write code that reads the content of an HTTP request and then updates the view - how would you write it in Java.
 
apparently I'm gonna be doing more backend than android for my internship and I'm so happy :)
 
I would read the request and then push it to the view...?
 
1:58 PM
Graeme - because you cannot create more value types, and you have all these weird "Integer/Boolean" boxes around, and .equals vs semantics.
 
I do?
 
In JavaScript, if I want to update the text of a div with the contents of an HTML it would look something like this:
 

« first day (2473 days earlier)      last day (2493 days later) »