6

Looks like Android studio's artificial java to kotlin converter learned faster to write better kotlin than my shitty brain :/

People from java background, where did you learned to write efficient kotlin code and how?

Where to learn how to write that famous "kotlin's super precise and small , ugly ass anonymous looking code full of keywords , that only work when arranged in a particular pattern and defies my all previous knowledge of oop , java and good practices " code?

I really wish to learn, since android and google seems to be heading towards this beautiful new shit

Comments
  • 2
    >where did you learn to write efficient kotlin code and how?

    - paying attention to what the IDE tells me: (use "apply", use a lambda expression, etc)

    - RTFM

    - code reviews. Usually my tech lead comes up with fabulous code sugar and I'm fascinated how to use this on my own code

    - Usually just Googling "how to write ..." in Kotlin. I would be taken to many Medium blogs telling me how to write this particular expression and why.

    - paying attention to how to write higher order functions and coroutines in Kotlin.

    Beautiful stuff
  • 1
    @jennytengsonM I must say that's a... peculiar way of learning a new language. We are so much dependent on learning from the translators, its like if you wanna learn spanish , then google translate every phrase you know. that's not how it should be done, but most of the people i know are really using the same way to learn as you described.

    I might have not learned many languages, but I learned c++ and java by just doing RTFM for basic stuff, oops,i/o , maybe pointers and behold, i know 2 languages.

    But kotlin is too weird , don't you think? constructor in class name or constructor via constructor keyword,same symbol for extending or implementing, MainActivity::class.java.whatev ,... it really makes you question your concepts :/

    But thanks for the reply. I was actually doing the same until now, maybe i will continue doing so and one day call myself a "kotlin android dev"
Add Comment