Office Hours — Today, October 24

Thursday, October 22

Oct 24
3:55 PM
Mark M.
has entered the room
Mark M.
turned on guest access
4:00 PM
sudokai
has entered the room
Mark M.
hello, sudokai!
how can I help you today?
4:05 PM
sudokai
Hi Mark!
I was dealing with activity exit transitions
And it seems to me that finishAfterTransition doesn't quite work?
Mark M.
if I have ever played with them, it has not been in years
so, I don't know if they work or not
sudokai
It's the first time I deal with transitions
And it's yet another confusing thing
Activity transitions use the framework transition class
But Fragments use AndroidX transition
Mark M.
sorry, I have not worked with these APIs
sudokai
I ended up using the first solution here
4:10 PM
sudokai
But I don't know if it works reliably for all phones
4:10 PM
Mark M.
¯\_(ツ)_/¯
sudokai
In mine, it actually works, whereas finishAfterTransition doesn't
Mark, where do you think people should invest their learning efforts in the next 6-12 months
Mark M.
um, well, that depends a lot on what sorts of things you are working on
sudokai
The thing I don't like about Android is how they keep changing stuff and deprecating stuff
Mark M.
well, they want to keep improving things, for various definitions of "improving"
in some cases, "improving" helps developers, and in some cases, "improving" helps users
and in a few cases, "improving" seems to help nobody, except perhaps Google
if your concern is stuff to *apply* in the next 6-12 months, I don't really have a particular suggestion
if your concern is stuff to poke at in the next 6-12 months, for use in 2022 and beyond, I'd keep an eye on Jetpack Compose
it probably will not ship in stable form for a year, but once it reaches beta, Google is going to be pushing it very hard
4:15 PM
sudokai
But that will deprecate a lot of existing stuff right
Mark M.
not really, particularly in the short term
long-term -- say, 5+ years from now -- they might stop ongoing development of View-based libraries like RecyclerView, ViewPager2, ConstraintLayout, etc.
4:20 PM
sudokai
I just see a lot of activity, a lot of changes, multiple ways to do the same thing
The churn is incredible
Mark M.
it's a general modernization effort
sudokai
You adopt something and the moment you do it, there's already a deprecation date baked in
It's crazy that they push all this work to us the developers
While they figure it out as they go
The way it's going, I could see Compose actually helping Flutter adoption.
It's like, well, since I'm going to throw everything anyway
Why not go multiplatform lol
Mark M.
eh, I'
eh, I'm not expecting too much of that
trocchietto_Ivano
has entered the room
Mark M.
Flutter would require a ground-up rewrite
Compose can be added incrementally
but, let me take a question from Ivano, and I'll be back with you shortly
Ivano: hi! how can I help you today?
sudokai
Well, you can create a Flutter activity inside an Android app actually
Sure
4:25 PM
trocchietto_Ivano
good day Mark, my senior is an iOS dev and often try to force not idiomatic solutions I have this thing now in my ViewModel he "paired" with me:
View paste (6 more lines)
 ```private val declarationItemsSection: Observable<List<PageOverviewSection>> = declarationsObservable
                    .map { listOfDeclaration ->
                        listOfDeclaration.groupBy {
                            it.date
                        }.toSortedMap(reverseOrder())
                    }
            .map {sorted ->

                val listOfNewItems = mutableListOf<PageOverviewItemsSection<*>>()

                sorted.values.flatten().forEachIndexed { index, declaration ->
                    val item = PageOverviewItemsSection(declaration)
                    if (sorted.keys.elementAtOrNull(index) != null) {
                        val subtitle = if (index == 0) { "EURO (€)" } else { "" }
                        item.sectionHeader = Pair(sorted.keys.elementAt(index), subtitle)
...
is this an usual way to use the kinda functional Kotlin functions? Basically we want the date from the arrays in a list that come from the backend and he do this `sortedMap thing and also a `flatten` that I do not get what really obtain with this method
is from Iterable class: ```
View paste
```/**
 * Returns a single list of all elements from all collections in the given collection.
 * @sample samples.collections.Iterables.Operations.flattenIterable
 */
public fun <T> Iterable<Iterable<T>>.flatten(): List<T> {
    val result = ArrayList<T>()
    for (element in this) {
        result.addAll(element)
    }
    return result
}
sudokai
Wow, not very readable code
Mark M.
yeah, this is tough to follow, particularly since I don't know much about the various objects
trocchietto_Ivano
(@sudkai as far as I know google flutter team is going in December to release a plugin to insert flutter in native, at the moment there is a nice GitHub attempt made by Alibaba)
Mark M.
so, probably there could be some tighter Kotlin here, but it's the sort of thing where I'd need the whole project in an IDE to be able to make specific comments (e.g., in a pull request review)
trocchietto_Ivano
yes you are right Mark, and also thanks to Sudokai just wanted to be confirmed by somebody like you that see every kind of code if is something a bit "strange"
he always try to use swift solutions to android
4:30 PM
trocchietto_Ivano
the last one he did we got a lot of leakages because he made the intent explicit, like the Scene in swift creating a strange utility class :(
Mark M.
I have seen similar situations -- Swift is closer to Kotlin than Objective C is to Java, but there are still a lot of differences, both in syntax and in "style"
trocchietto_Ivano
yes
sudokai
This screams "I know functional programming, look how cool I am" lol
trocchietto_Ivano
anyway before we got to merge another Kotlin guy is going to see, and he is just the opposite
sudokai
Technology should get out of the way
trocchietto_Ivano
an idiomatic Kotlin fan, that uses all strange sugar
so they will fight, and I am the poor guy in the middle that take the ticket in Jira for an eon
:(
yes sudokai
I am against object oriented with functional
or you use seriously Clojure.Lisp stuff, or better OO
sudokai
I'm okay with applying functional bits
But some people seriously love RxJava
trocchietto_Ivano
my iOS senior
he use RXSwift and so copies everything in our android tickets
but I love him because he hired me and gave me the possibility to become a dev
sudokai
It's as if they get a high when they can show off a zip, combineLatest, lol
trocchietto_Ivano
oooh
E X A C T L Y
sudokai
then one of the zipped observables throws an exception
trocchietto_Ivano
he lives to see our code and use a combineLatest
sudokai
and ooops lol
trocchietto_Ivano
yes!!! everytime
4:35 PM
sudokai
I saw one case where a function that returned a primitive type was actually converted to return an observable
So they could use a freaking zip
trocchietto_Ivano
oh he is our tech lead
and oblige us to do like so
if I have a viewModel.isTrue that should return Boolean
he wants that we use Observable<Boolean>
because he says that we should not mix imperative and reactive
sudokai
Blah blah
Lol
trocchietto_Ivano
but I say: Hey but RXJava is not real reactive, under the hood we get always the same concurrency
sudokai
Ah no, it was worse
It was actually zipWith
trocchietto_Ivano
and RXJava is an observer pattern with call backs as an interface callback
sudokai
And you had to supply a zipper function
And I'm like, this second observable is just a primitive value
Just do a .map and inside you get the value
trocchietto_Ivano
anyway sorry did not want to do the queen taking soo much space
sudokai
Hello? Lol
4:40 PM
sudokai
This is not technical seniority sorry
It's BS
trocchietto_Ivano
Never mind, he hired me
ws really a piety act he did, so I am thankful forever
sudokai
Haha
I make a point of NOT hiring this kind of people
trocchietto_Ivano
how old are you sudoku?
sudokai sorry the autocompletion
sudokai
Almost 30
My entire job in the hiring process is detecting this kind of behavior
And filtering them out
Lol
trocchietto_Ivano
I see, I am 46, sometimes is not easy for me to relate to 25 years old programmers that speak only about Mario kart, fort nite and throne something
sudokai
Well, a lot of people do CV driven development, can't really blame them
But it's not technology for its own sake, it's about being able to implement your ideas
That's something a lot of technology focused programmers don't get
trocchietto_Ivano
I duckduckgoeged that, nice
4:45 PM
sudokai
CV driven development = I build this app with Kotlin, Coroutines, Rx, Dagger, Room, MVVM, Serverless, Firebase, etc. etc.
And I'm here wondering, yeah man, but what does your app DO
trocchietto_Ivano
yes this is what I want to do it to escape one day, instead to be rxjava slave
but actually everything looks easier to rxjava
sudokai
They care not about the product, the users, the experience of the app, it's all about this technology, that technology
trocchietto_Ivano
yesss I agree I want to work with you
yes
the cool guys
the cool cv dd guys
sudokai
As I said, I can't blame them, companies get rid of you as soon as you cease to be useful to them
So working with the latest technologies is a form of self defense
trocchietto_Ivano
I mean if you love programming you can study yourself other stacks, languages and deeper concepts and put on your cv with some story telling
with a toy project after all coding is always the same
sudokai
So when you are out in the hiring market again, you can say, yes, I have X years of experience with all these cool technologies
trocchietto_Ivano
dunno, developer do not know this kind of problems here in the Netherlands
sudokai
But I'd rather say, hey, I don't know what MVVM is, but look, I made this thing which is really cool
And people love it!
trocchietto_Ivano
I guess what matters is to be able to use code and framework as abstractions
4:50 PM
trocchietto_Ivano
what matter is algo, being able to build data structures, design patterns and play with other languages, the rest is just a waste of time, so if you need a framework or library you can build, or understand it in a couple of days
sudokai
Also, I'd say, invest in what doesn't change
That's hard in Android since everything changes constantly
But things like SQL for example
I know SQL very well
trocchietto_Ivano
mmh dunno
sudokai
Window functions, lateral joins, recursive queries, I put in the time to learn them because I know 10 years from now, I will still be able to use them
trocchietto_Ivano
I get what matters is to become a better dev, so that you can understand other things for analogy, and also more you play with other languages, more you get the game language reshuffling that is going on
coding has probably stopped in 1957
is all reshuffling
sudokai
Yes and no
trocchietto_Ivano
why no?
sorry mark
sudokai
I think knowing how to get things done in the latest framework is important for efficiency
trocchietto_Ivano
are we abusing of the time?
Mark M.
um, well, I'm really here to answer questions and try to solve problems
sudokai
You can't just say, well, what matters is the algorithms, I don't know any framework
trocchietto_Ivano
OK
sudokai
But just don't get too attached to any framework
4:55 PM
trocchietto_Ivano
yes otherwise you cannot get rid
anyway thanks for your ideas was useful sudokai
sudokai
Get this book if you struggle with Rx
Mark has a chapter on RxJava, but this is a dedicated book that goes beyond
Mark M.
and that chapter is a bit old at this pointt
er, point
trocchietto_Ivano
yes I read it, the one when you do the example of excel as functional
sudokai
The problem with Rx is that it's a very invasive technology
trocchietto_Ivano
but rxjava is a world apart, is kind of going deeper in dagger
sudokai
I don't know Dagger :D
I tried to get into it
trocchietto_Ivano
you can use hilt
sudokai
But I use Koin now
trocchietto_Ivano
is a simplified wrapped version
also easier
we do manual injection :(
sudokai
Mark teaches you how to use Koin and I'm much happier
I used Spring in the backend
and I got it in 5 minutes
trocchietto_Ivano
well nice day
5:00 PM
sudokai
But with Dagger, I just can't wrap my head around it
5:00 PM
trocchietto_Ivano
see you next time sudokai
5:00 PM
trocchietto_Ivano
bye Mark
sudokai
And frankly, with Koin I don't care
Bye
See you around
Mark M.
Ivano: have a pleasant evening!
trocchietto_Ivano
thanks bye
have a nice day
sudokai
Have a nice day Mark. It's time I see!
trocchietto_Ivano
and could get worse this evening, we did not speak about election
bye sudokai
Mark M.
yeah, that's a wrap for the chat -- next one is Tuesday at 7:30pm US Eastern
see you next time!
sudokai
has left the room
trocchietto_Ivano
has left the room
Mark M.
turned off guest access

Thursday, October 22

 

Office Hours

People in this transcript

  • Mark Murphy
  • sudokai
  • trocchietto_Ivano