I love kotlin, but should I start from learning Ja...
# getting-started
k
I love kotlin, but should I start from learning Java ?? Without IDE, I can’t do anything…
n
jumping straight into Kotlin without knowing Java first is going to be more challenging, because when writing Kotlin code, like 80% of the classes you're interacting with are Java/JDK classes
👍 1
also, out of curiosity, why can't you use an IDE?
k
In production environment, I can’t know what command to use., how should I create docker file, how to deploy etc…
n
oh, well, yeah when you're deploying to production you'll probably have build logic and scripts to help you with that. IDE is mainly for development and debugging
I think you'll probably want to figure out which Gradle commands generate a .war or .jar for you -- this node covers that a bit https://ktor.io/servers/deploy/packing.html
and then you'll need some other process to deploy that, not related to your IDE or even your build.gradle
k
Oh, Problem is that I don’t know gradle. Thank you. I will learn your link.
n
so...prepare yourself for some frustration. build.gradle files are using another language, Groovy, which is very dynamic and a bit hard to write/learn. build.gradle.kts files are the new thing that let you write Kotlin, but it's relatively recent and has significantly fewer examples. your best bet is to find another project you can use an example and copy bits from them.
👍 1
k
Oh I see. I will try from some examples. Without you I could not suppress my frustration.I am sorry and thank you. Kotlin syntax is the best among the languages I think, but entire ecosystem is a bit difficult. I will keep learning.
n
a foundation in Java isn't strictly required but will help a lot. I suspect if you focus for a couple weeks on learning Java before picking up Kotlin again, you'll be further a long in a month than if you focused on Kotlin alone. just my opinion.
👍 1
and yeah, Kotlin syntax is I think my favorite too. the ecosystem is so big that trying to jump in is definitely challenging, but if you have an achievable goal (i.e. small project/game) in mind that can help a lot towards focusing your efforts. it's worth keeping at it, and there's help here and on the Kotlin forum if you need it...though admittedly I don't know anything about deploying ktor applications 🙂
👍 1
k
Thank you. I respect you 👍
🙂 1
m
Keishi, you don’t have to learn Java first, you can start learning Kotlin directly with some exercises: https://play.kotlinlang.org/koans/overview