« first day (2910 days earlier)      last day (2030 days later) » 

2:00 PM
this is a first
 
How do I start an activity from a clickhandler class?
 
by starting it
 
for startActivity(intent) i need to extend AppCompatActivity
 
no
 
So what else must I do?
 
2:01 PM
you need to extend Activity
 
Ah
 
also startActivity is a context method
 
dam i heard the ping sound twice on desktop first then on mobile after half a minute
 
its just a wrapper call in activity
lol happens with me too raghu
 
Alright thanks
 
2:03 PM
typically click listeners are nested in an activity/fragment
as anonymous class
 
I know
But for binding I was adviced to use Handler classes
But when the handler is required to switch activities, it will be an extention from Activity class anyhow
 
handlers are rarely needed. Certainly not for click events
 
@MehdiB. Oh, wow.
 
But it is part of maintaining the MVVM principe?
Or.. is it not?
 
no, handlers are specific to android and should be used only in the view
 
2:13 PM
^
 
^^
 
sometimes I answer some question here and I think "cool, I know this, I am smart" then I turn and look at my own code and I think "mother of fuck what am I doing who wrote this pile of crap wtf is happening here"
 
as they say "easier said than done"
 
:D
 
as they also said "do as I say, not as I do"
 
2:17 PM
You Mauker
 
Me Mauker
 
@TimCastelijns nice i like it
 
@TimCastelijns But then why is it possible to do so? Isn't the intention best practise or such, that's what I thought
But it only gives me headaches
 
You don't have to do something just cause you technically can
 
it is possible because architecture patterns are made up by developers. Android OS doesn't care how you structure your code
 
2:20 PM
^
so TL DR use whatever floats your goat
 
lol
aren't goats sacred in india
 
Goat.floats = Random()
 
no its the cow
dude
well if you look it that way every animal is sacred here
 
@TimCastelijns What about memory leak preventions etc?
 
unrelated
 
2:23 PM
^
also that is your job
Tim even rivers are considered sacred here :D
 
kotlinconf currently streaming a talk on architecture
tune in
 
its in amsterdam
why dont you go to the venue?
 
you can't just walk in
tickets are like 700eu
sold out months ago
@EmanuelS she is on the main stage right now bro
 
Just flash your TimBadge
 
^
tell them i am the developer of the legendary timsort used by kotlin xD
 
2:30 PM
Tell them you created zucc
 
nobody would believe that
 
!tim
 
Unknown command '!tim'
2
 
xD
 
2:32 PM
:o
 
well even zuccbot doesnt know tim
i guess nobody will believe tim made the bot
 
That Zuccs for Tim
 
It's the beginning of the uprising
Zucc spent too much time talking with Raghav
 
Tim's made his Mark, he just needs to prove it to the guys at the door
 
Dude, you came out of nowhere
 
2:39 PM
I'm always here
 
Lurking
Collecting data
 
identifying targets
 
Changing synaptic weights
Acquiring cereal
 
lol
connecting circuits
 
Adding new blocks to the chain
 
2:43 PM
AndroidAnDandroid requested access. Rep: 64 - Questions: 3 - Answers: 13 (ratio 4:17.3)
 
Got it working with handlers :)
It makes the code at the activity class also a lot shorter / readable
 
meta.stackoverflow.com/questions/342440/time-to-take-a-stand just came across this the mother of controversy question
 
!accept
 
@AndroidAnDandroid welcome. Please start by reading the rules and confirm you have read them before saying anything else.
 
courtesy joel
 
2:45 PM
aka the biggest shit show ever seen on SO
 
what the actual fuck
this is a actual question -_-
 
Jesus
 
@TimCastelijns i closed that question xD
remember i closed the announcement question one day :D
that was rofl
 
Imagine going home after work, -finally- setting up such useless discussion and spent two days reading the bs coming from it
And reach nothing in the end
 
he typed this at work. Joel is the boss of SO
 
2:49 PM
Haha oh
Woops
 
i once thought i should have been born 20 years later now i feel no since there is no guarantee that by 2040 if i would be to able to swear to any person at all
 
Anyway today the black Pete discussion unleashed itself in my country
Such a fun time
 
who is black pete ?
 
Oh boy
Buckle up brother
 
fasten seatbelt
 
2:49 PM
Black Pete is someone going down chimney's to deliver presents
 
that is santa -_-
 
santa is not real bro
 
also i didnt got any presents yet :/
why santa why?
@TimCastelijns lol i know
 
He is black because of 2 reasons: one because he comes from the old slave tradition, the other because of the chimney. The chimney part was well accepted in our country for decades
 
@TimCastelijns Shhh, don't say that, we have children in here @Tristan
 
2:51 PM
^
 
@ColdFire buy your own presents with the tax money lol
 
But then some unfamous art-artist (Quinsey Gario) decided he needs more fame to sell his worthless shit, so he became famous by complaining about the color of black Pete
 
no i need it from santa
 
And now every Dutch person gets to see how easily triggered our city-people are
 
tldr: the modern age of 'everything is racism and if 1 person is offended nobody can do it anymore' ruined an ancient dutch tradition that is in essence something made up by parents so that kids can have a nice time
 
2:54 PM
oh well sad
damn we need to kill this PC virus soon in India
it hasnt spread so much
so we can escape this fate i guess
 
@TimCastelijns <- this
 
liberalism is already facing quite a backslash here
so we have contained this virus i guess :D
 
PC is the most dangerous of all
 
well only our media is compromised
 
a PC virus? Is this 1995?
 
2:56 PM
I told everybody at the black Pete discussion we must never give them attention, because they - will - seek a next target
And now x-mas trees become an issue
 
not like our media was any better :D
i remember john oliver making fun of Indian media xD
that was rofl
 
you act as if that is the obvious meaning
 
PC is definitly a virus though
 
Tim it is
the context is important
 
this is chat. We don't look at context
 
3:01 PM
sigh
 
hello doods
 
hello ahmad
 
Ahmad o/
 
Just discovered if you copy the entire code of class on the project explorer of intellij, the class file gets created automatically :O
 
s i c k
 
3:06 PM
they have some really smart if else writers at jetbrains
 
They aren't called jet brains for nothing
3
 
aka some really smart "developers" :D
 
holy shit
that kinda did blow me mind
 
3:09 PM
wait what? Raghav's comment or mehdi's?
 
Hii
 
@MehdiB. lol i noticed it yesterday
i was like holy shit magic
 
yeah very cool!
 
eski raghav's
i never tried it before thinking it wont work
sigh assumptions
 
oh lol, I thought there was some pun I was missing in mehdi's
 
3:12 PM
no
 
I was gonna be trying to figure that out for weeks
 
😂😂😂
 
hi
lol eski
 
3:14 PM
Tim what you up to
 
Tim's mind is blown
 
@eski raghav's
 
sigh video title - Top 5 FAST Train Passbys - 600kph! starts video with a indian train that travel at 160kmph -_-
that aint close to 600 kph dude ....
 
It was just warming up CF
 
still too less
 
3:16 PM
@ColdFire but it's close to 372.823 Mph
(disregard the unit)
 
Is it?
 
certainly closer than 600
 
160 ain't closer to 372 at all
even the new bullet train we are building is 320 kmph
 
That's a big text, what's the TL;DR
4
 
3:19 PM
:/
 
lmfao
 
Ehm
How do I pass current activity context through a bound onclick method?
android:onClick="@{handlers.fabClicked}"
 
 public void fabClicked(View view) {
    Intent intent = new Intent(==context==??, NewWordActivity.class);
    startActivityForResult(intent, NEW_WORD_ACTIVITY_REQUEST_CODE);
}
 
damn need a visit to this bridge^^
 
3:26 PM
Imo you should not do this
 
why
 
--------^
 
because the layout is only a layout. It is responsible for laying out the UI. It is not the concern of the layout what happens when a button is clicked
 
moreover proguard issues
that is just asking for more trouble
 
3:29 PM
@TimCastelijns But the layout is not supposed to know about what exactly will happen
Just that something will happen
Therefor binding is ideal
@ColdFire Proguard?
 
I disagree
 
also if you ever change the method name you are screwed without even knowing
 
I firmly believe that this type of binding is a bad practice
 
@TimCastelijns ??
 
3:32 PM
anyway the way the method is called is not important. The context will just be "this"
 
Then I honstly have 0 idea about what good practise is anylonger
I've been misinformed so many times now by so many docs
 
just keep doing what works for you right now, and form your own opinion on what you think is good/bad
 
I got this from Android docs themselves, what else is trustworthy?
@TimCastelijns As a student this scares the hell out of me
I don't care about much the money, I care about the usage of my app and hope to keep it running for a long time
 
I mean, just because I am here saying I think it's bad, doesn't mean that you should agree with me
 
But I do, I see you as a trustfull source
 
3:34 PM
you shouldn't
 
All of you, because there is no motive to lie to me either I assume
 
@TimCastelijns I second that
 
have you learned about the SOLID principles yet?
SOLID is more or less a set of guidelines that define the foundation of properly structured code. One of these guidelines called "separation of concerns" applies here
it means a component should do only one thing and should have only one reason to change
 
I did learn about SDLC
But not SOLID
 
if you define in the xml what should happen when a button is clicked, the xml (the view) now has 2 reasons to change
and it also concerns itself with the implementation of the activity (in this case the name of the method)
 
3:38 PM
@TimCastelijns Why 2? The call comes only from the activity class?
 
(1) the UI changes (2) the name of the method changes
as I said earlier "the layout is only a layout. It is responsible for laying out the UI"
suppose you no longer display in an activity, but in a fragment instead. Now that fragment must use the same method name as the activity did
 
Name of the method changes? It is bound to -> onFabClicked
 
even though the fragment doesn't give a shit about the activity
 
@TimCastelijns It's still activity
 
what is the case now is not important, it's all about what might be the case tomorrow
method names changes, components are swapped out for others, etc
you want to decouple everything as much as you can so that you can change stuff with as little impact on the rest as possible
 
3:41 PM
Yes I get that
I'm sorry I guess I was hoping to achieve the same thing I did with WPF, where 'event's' were bound to Commands
 
yes of course you can do this
 
It's ideal, the xaml UI file had buttons that knew something happened but not exactly what. Just a certain loose command which could point to all kinds of methods
 
it's not "wrong" and it will work. But I just wanted to say it's not the best.
 
It's not best in general?
Or just not best in Android?
 
in general
the SOLID principles apply everywhere
 
3:44 PM
Damnit, they said the exact opposit at the wpf chat back then
I'm a volnurable student haha I always get nervous about stuff like this
solid is the way to go?
 
but at this stage in your career you should just give everything a try
just do it how you had it, with the onclick in the xml
try another way in a next project
maybe you will like it better, maybe not
 
But I do get your perspective as well
So it's not like I am thinking "the hell with it" I take all kinds of info
 
do what works for you, don't do what works for others
ok that's good
 
But isn't what works for others the main principe of coding?
Low maintainence etc
 
let me rephrase. Do what you know works for you, don't do what others do because they tell you to
 
3:47 PM
Ahm
 
does it make sense xD
 
It does
But it's a bit of paradox for me as a student, I learn a lot per tutorials etc but I must also not listen too much to others
Guess I gotta find balance in that matter
 
indeed
 
How long does it take for a person to find that balance?
Or.. How do I make myself less nervous about this stuff
 
not sure. I haven't found it yet
it comes with experience
 
3:50 PM
But have you also been in this position in your life?
 
also our field is ever changing. Every time a new pattern or new framework or whatever comes out, we check it out and decide if it's better than what we were using before. Maybe it sucks and we ignore it, maybe it's great and we use it, maybe it's partially good and we come up with a combination
 
Trying to find out IF what you did was right or not, eventhough the stuff you created works and did not fail.. but was it best practise? Will it withstand future..? Will it... etc etc
 
maybe we use it because our boss tells us to use it cries in developer
 
cries in c++
 
I just hope this is a fase in my coding life. These sort of insecurities are not exactly fun
 
3:51 PM
^
 
@MwBakker yes, of course. It wasn't until after I graduated that I started to discover all of this. You don't learn much in school
 
I feel like that a lot
 
@Mauker lol
 
@TimCastelijns Alright, thanks
 
@MwBakker that's kind of our job. We improve over time. Every day you learn something new
which year you in?
 
3:53 PM
Fragmented - Android Developer Podcast: 137: Decompress KISS DRY testing
posted on October 04, 2018 by shows

 
@TimCastelijns 4th, hbo
 
let me tell you, I had a bunch of lazy shits in my class. Even in the 4th year I was the only one in the entire year that was active on SO because I wanted to learn. You have an advantage because you are actively looking to improve yourself, at this stage already
 
Thanks Tim, that is nice to know
 
so you were active on SO 6 years back?
wow
 
bro I graduated like 2.5 years ago
so no
lol
 
3:55 PM
just how many years is your graduation in NL ?
 
1 education = 4 years
but I started on SO in my 2nd year, or end of 1st not sure
 
hmm that will be 21 years
4 is what i thought and calculated it from that
 
oh so yeah 6 years lol
¯\_(ツ)_/¯
 
xD
oh perhaps NL schooling and our schooling years are different
 
how many years for the bachelor in india?
 
3:57 PM
i was a graduate at the age of 21
also normal age^
 
I calmed the chaos in my head a little
 
chill you will be fine , you are already ahead of 90% of peeps mwb
@TimCastelijns i started android in my 2nd year too not sure about SO i just googled that time whatever come i used xD
 
Thanks CF, at least I now know I won't go full off-tracks trying stuff
 
I mean i was a master of java in class and i knew like 5-10% of java that time
most people cant even code a simple project in my class
 
Time to go~~
Cya later people!!!! :D
 
4:01 PM
cya
 
Bye
 
Do go off track to try stuff if you have time. You have to know what is out there and what the options are before you can decide what works for you
3
 
@MehdiB. 4 and age 21
i thought you asked the age xD
 
@ColdFire I am happy about my school, they present many langauges to learn. But unfortunatly they don't really concentrate on patterns. It might be because they change a lot
 
patterns are things you can easily learn on your own
 
4:03 PM
I know, but the scary part is you can make an app that works dispite of the architectual part is shitty or not
 
Be sure to call in sick on the days they teach about php
2
 
try to maximize your learning on things that are not so accessible when you're working, such as robotics or highly theoretical things
@MwBakker implementing is the easy part, maintaining and adding new features is what's tough and requires a good architecture :D
 
@MehdiB. Exactly
And when it becomes tough, I'd already be too late to figure the architectual was bad
See what I mean about the scary part? :P Refactoring when you thought you were nearly finished..
 
don't worry, you usually work as part of the team, and the architecture is the first point discussed :D
 
Ah alright, I hope so
 
4:06 PM
and btw, that fear gets reduced with experience
 
yeah what mehdi said
 
when you reach a point where you think "yeah whatever it's just a technology, it's a matter of a few days and I'll get used to it"
 
In a team it's different, it's democraticly decided what is best y c'est ça. But when working alone, I'm douzled in options
@MehdiB. Alright, can look forward to that
 
when working alone, pick 1 proven architecture and stick with it, note what didn't work and what worked well, choose another one accordingly on your next project
but don't loop on tech choices in 1 project
 
I almost did
Almost 3 weeks of research alone, fortunatly I can document it in my research docs which is required
 
4:10 PM
BTW I look at Mehdi the way you look at me
 
😂
 
Consider everything he says the holy truth
 
I do that with all, I'm happy you all agree on eachother so far
 
you're better sticking with Tim's advices on Android though XD
 
Lol
@TimCastelijns took me a second to get that xD
 
4:11 PM
But I gotta go, closing time
Thanks all, cya later
 
Cya have fun
 
After 5y of exp, I've just finally reached the stage where I thought: Ok, this is what I wanna work on
 
There is new pattern mvi which I haven't tried yet. But I heard it in a meet-up.
Agree with mehdi stick to what works for you or your organisation
 
Hello, Android!
 
Hello CA
 
4:55 PM
How are you, CF?
 
5:11 PM
Afternoon!!!! :D
 
Good afternoon :D
 
posted on October 04, 2018 by Android Developers

Posted by James Lau (@jmslau), Product Manager Today marks the beginning of KotlinConf 2018 - the largest in-person gathering of the Kotlin community annually. 2018 has been a big year for Kotlin, as the language continues to gain adoption and earn the love of developers. In fact, 27% of the top 1000 Android apps on Google Play already use Kotlin. More importantly, Android developers are l

 
\o womper
 
joecizac requested access. Rep: 639 - Questions: 1 - Answers: 15 (ratio 4:60)
 
5:26 PM
!accept
 
@joecizac welcome. Please start by reading the rules and confirm you have read them before saying anything else.
 
@Code-Apprentice i am good wbu?
btw tim did you also closed that question by joel ?
i mean i did try my luck what more opportunity can you get xD
 
@ColdFire doing good...debating taking an afternoon nap
 
no clue
 
5:51 PM
o/
 
\o
 
@TimCastelijns the just shared most controversial question i mean
o/
 

« first day (2910 days earlier)      last day (2030 days later) »