jmfayard
09/25/2019, 1:33 PMstreetsofboston
09/25/2019, 1:38 PMjmfayard
09/25/2019, 1:40 PMSebastian Sellmair [JB]
09/25/2019, 3:19 PMcedric
09/25/2019, 10:06 PMnull
, it’s languages that have null values but no support for it in their type system.null
but to support it in a type safe mannerActivity
a Context
, there is a lot of history behind itDaniel
09/25/2019, 10:09 PMcedric
09/25/2019, 10:13 PMjmfayard
09/26/2019, 5:13 AMThe billion dollar mistake is not the existence ofHello, I have updated my article, this merits to be said more clearly., it’s languages that have null values but no support for it in their type system.null
cedric
09/26/2019, 5:32 AMjmfayard
09/26/2019, 5:35 AMNot sure what such an admission would actually accomplish in practice. @cedricLook at the crap that the official Android documentation still produce today: https://github.com/android/camera-samples/blob/f555592364979f4005db0bea40753e0de52c8d86/Camera2BasicKotlin/Application/src/main/java/com/example/android/camera2basic/Camera2BasicFragment.kt#L60-L817 This, I can’t accept.
cedric
09/26/2019, 5:35 AMjmfayard
09/26/2019, 5:36 AMcedric
09/26/2019, 5:36 AMjmfayard
09/26/2019, 5:37 AMcedric
09/26/2019, 5:38 AMjmfayard
09/26/2019, 5:41 AMcedric
09/26/2019, 5:42 AMjmfayard
09/26/2019, 5:42 AMpavi2410
09/26/2019, 6:13 AMjmfayard
09/26/2019, 6:52 AMSebastian Sellmair [JB]
09/26/2019, 7:39 AMjmfayard
09/26/2019, 7:50 AMCasey Brooks
09/26/2019, 2:57 PMjmfayard
09/26/2019, 3:03 PMThe mistake was in taking too long to stop treating that class as the place to handle data logicBut here you a bit too generous to my taste. This is still on ongoing issue as I have shown with this official Android sample https://github.com/android/camera-samples/blob/f555592364979f4005db0bea40753e0de52c8d86/Camera2BasicKotlin/Application/src/main/java/com/example/android/camera2basic/Camera2BasicFragment.kt#L60-L817 Maybe they should first fix their documentation and samples, and then we can give the Android team the benefice of the doubt?
Casey Brooks
09/26/2019, 3:51 PMPablichjenkov
09/26/2019, 6:53 PMRuckus
09/27/2019, 1:53 PMPablichjenkov
09/27/2019, 1:56 PMRuckus
09/27/2019, 1:57 PMPablichjenkov
09/27/2019, 1:59 PMcedric
09/27/2019, 2:01 PMPablichjenkov
09/27/2019, 2:02 PMjmfayard
09/27/2019, 2:41 PMPablichjenkov
09/27/2019, 2:57 PMcedric
09/27/2019, 4:05 PMint
instead of Int
) was not a mistake and actually, probably instrumental to its success.Pablichjenkov
09/27/2019, 4:12 PMjmfayard
09/30/2019, 6:59 AMlouiscad
09/30/2019, 1:06 PMActivity
extend Context
and what was the context back then (prevent a monopoly by Apple). It's perfectly understandable, and it's also understandable that can't change so easily and 10 years, this design hasn't changed.
That said, all the samples that put everything in an Activity or a Fragment are serving the developer community very, very badly, and I say this after 5 years doing Android app development for a living.
So it'd be great for Google to openly say that god activities and god fragments that are close to 1K lines of code or more are bad, and for that to be the start of composable samples that are actually more helpful than raw documentation.
That is what we, including Jean-Michel are hoping for. We want Google to tell beginners and the community : stop doing this, it creates spaghetti code and unreliable products, here are better examples.
I hope it's more clear to you now. Also, I know you no longer work for Google.
@Adam Powell what do you think?Adam Powell
09/30/2019, 2:00 PMActivity
extending Context
, I know the person who committed that change and it was in direct response to the app teams at the time complaining loudly and over time that they had to call getContext()
all over and why can't they just pass their Activity
instead - it is indeed looked on by that person and others with the benefit of hindsight as regrettablemain()
in other environments. It didn't occur to much of the team that readers would see the equivalent of, int main() {
printf("Hello, World!")
}
and take away, "oh, I should put my entire app in main()
!" 🙂cedric
09/30/2019, 2:12 PMActivity
extending Context
is today seen as an obvious violation of composition rules, I still think the overall negative effect is pretty mild. The god object argument is totally unrelated to that inheritance decision.Adam Powell
09/30/2019, 2:13 PMPablichjenkov
09/30/2019, 2:16 PMAdam Powell
09/30/2019, 2:18 PMPablichjenkov
09/30/2019, 2:21 PMAdam Powell
09/30/2019, 2:22 PMPablichjenkov
09/30/2019, 2:25 PMjmfayard
09/30/2019, 2:43 PMPablichjenkov
09/30/2019, 2:56 PMlouiscad
09/30/2019, 3:48 PMAdam Powell
09/30/2019, 7:19 PMlouiscad
09/30/2019, 10:10 PMRuckus
09/30/2019, 10:18 PMjmfayard
10/01/2019, 7:13 AMAdam Powell
10/01/2019, 2:06 PMRuckus
10/01/2019, 2:09 PMAdam Powell
10/01/2019, 2:25 PMRuckus
10/01/2019, 2:46 PMApplication
class), despite the fact that it's considered just as bad practice there, but including a fully constructed app following all best practices just creates a significant amount of noise you have to fight through to get to the one concept you're looking for.jmfayard
10/01/2019, 2:50 PMlouiscad
10/01/2019, 2:53 PMI think expecting people to understand that examples of a concept are not examples of best practices in app architecture is reasonableI think otherwise because with so many entry points, people won't even think about the importance of architecture until they encounter problems after following "simple" samples that don't scale well.
ghedeon
10/03/2019, 12:52 PMAndroid was designed in such a way because that is what was best for the technology of the time.Wasn't it designed to become another Blackberry and then was forced to scrap the prototype and play catch with iOS? 🙂 "Weird shit" in its DNA, not "best for the technology of the time".
cedric
10/03/2019, 1:53 PMlouiscad
10/03/2019, 2:43 PMghedeon
10/03/2019, 3:07 PMPablichjenkov
10/03/2019, 3:11 PMcedric
10/03/2019, 3:37 PMjmfayard
10/03/2019, 7:03 PMSplitties
from @louiscad is an also a great example of that 😛
https://github.com/LouisCAD/Splitties#all-the-android-splits
Frankly it adresses a lot of the problems I had with Android.
So I’m not saying that Android isn’t a platform where you can build good products.
You can.
It’s just that for historical path-dependent reasons,
traditional Android programming were a rather dark age of programming as you can remember by vividly by having a look at older codebases.
and then things did evolve in a globally positive way,
but not quickly enough to my taste.
There is still a lot of zombies ideas that plague the android community.
The hard part is not to learn the new things but to unlearn the oldrkeazor
10/21/2019, 4:27 AMcedric
10/21/2019, 4:56 AMjmfayard
10/21/2019, 5:07 AMlouiscad
10/21/2019, 6:23 AMAsyncTask
and other stuff are still documented.rkeazor
10/21/2019, 12:48 PMjmfayard
10/21/2019, 1:56 PMrkeazor
10/21/2019, 2:11 PMghedeon
10/21/2019, 2:14 PMRuckus
10/21/2019, 2:16 PMrkeazor
10/21/2019, 4:32 PMRuckus
10/21/2019, 4:37 PM