Hi, I'm trying to convince my manager to start usi...
# announcements
j
Hi, I'm trying to convince my manager to start using Kotlin at my company. Does anyone have any up-to-date stats on who's using Kotlin? or lines of code on github? Or anything similar.
d
i'd opt for the example projects route over lines of code... lines of code is sort of meaningless unless you can put some meaning to them
m
Interesting fact is you could do that with Groovy without even telling other developers. Week 1: add dependency to Groovy Week 2: every file you change, set extension to
.groovy
. Still write code in 100% Java Week 3: every time you change something, don't add semicolons to relevant lines Week 4: Someone notices Java code without semicolons and they ask you how is this working. You respond with "We are using Groovy for a month now, didn't you know?"; They will reply: "Of course I knew!" and will go back to their desk. True story. // CC: @karolkowalski
😂 2
k
Tried with kotlin too. But they found out at the end of day. We are using kotlin since then anyway
🧌 11
m
who's using Kotlin?
I'm using Kotlin 😉
lines of code on github
10 millions LOC
anything similar
null-safety, mutability-safety, property delegation, and many other cool things making Kotlin the best language for real problems to solve.
j
I just slowly used it more and more. Started by rewriting my companies build in gradle using gradle script kotlin instead of groovy. Then we got permission to use kotlin in unit/integration tests but not production. Once we showed how it could make us much more productive overall our manager decided it was a good idea.
d
Haven’t been able to sell Kotlin to my current manager 😞 Not for lack of trying though. I suspect there’s no winning in some circumstances.
m
I actually don't get it why would a manager be involved in a decision like this. As if I need a permission from manager to use IDEA/AS over Eclipse, or to use git over svn, or to indent with spaces over tabs (except for in Go), or to use self describing, correct, meaningful names for variables and functions over
i
,
j
,
k
,
l
,
x
and
y
(and sometimes
a
and
b
), or writing tests over not doing it at all...
t
yea the hell with the managers, does your immediate team buy off on it? if so, begin the kotlin. If you team is uncomfortable, the use of it in tests is a great way to get them acclimated.
and make them all do the koans so they can get taste of the kool aid
d
In my case the manager is more of a technical manager, not a business person, and the team I’m on is sufficiently large that it might take some time try sell it to everyone, so I understand that concern.
m
Does manager asks you why do you Retrofit / Spring? Maybe you should start composing byte arrays containing jsons to send data to server / client instead?
🧌
j
Some risks you may have to assume are integration with existing technology. For example, if you are using maven and the aspectJ compiler I don't know if you are going to be able to get the aspectj weaver to weave kotlin classes in a nice way. Because we'd just switched to gradle I was able to get our build system into a configuration such that we can weave kotlin classes with aspects.
If you are using aspecj there will be a certain amount of complexity. I plan to pull the gradle plugin (currently internal) out of our build and open source it at some point. It will let you weave kotlin and java classes with aspectj.
👍 1
Other problems you may have to deal with is there not being good support for things like findbugs or other tools.
There is a linter for kotlin called ktlint.
m
@dalexander I'm not a fan of big teams. They don't have an ability to prove they provide more value. https://www.darkcoding.net/software/facebooks-code-quality-problem/
d
You’re preaching to the choir 🙂