
On “From Java to Kotlin and Back Again” - edem
https://zsmb.co/on-from-java-to-kotlin-and-back-again/
======
dave_sid
After developing software for 20 years, hearing the argument of ‘X language is
better than Y’ gets a bit boring. At the end of the day, you can write shit
code or good code in either language in the same way that you can build a shit
house or a good house out of brick or stone.

No language will prevent a team of developers from building an un-maintainable
mess no matter how good it is (and I have seen a few). Proper design skills
and knowledge of ‘good’ software architecture will make or break a project
every time. Stop getting hung up on languages.

Unless you’re being asked to develop in C (then I applaud you), then agree on
a language that will still exist in 6 months time and then on with the
difficult part...writing decent code.

~~~
Scarbutt
Agreed, but do you think that a language that reduces lines of code
considerably (lets say clojure vs java) is bike shedding or is part of using
"good design" ?

~~~
dave_sid
No it's not bike shedding. The team should certainly choose the most
appropriate language. Even if not all of them have experience in it. If they
decide on clojure then go for it. But agree on something and move on.

Also, saving lines of code isn't necessarily the end goal for me in a language
choice to be honest. Get rid of boiler plate code yes, but what I'd like to
aim for is code that is easy for the next developer to understand and support
as quickly as possible, whether thats 10 lines or 20 lines.

------
dreae
Reading the first article I was left with the impression that the author's
team switched to Kotlin just for the sake of switching to Kotlin, tried their
darndest to write it like it was Java, and then was just upset that it wasn't
Java.

~~~
lmm
I read it as: the author was a Kotlin skeptic whose team wanted to use Kotlin,
so was trying to find out whether they could use Kotlin for the sake of their
team while still writing Java-like code themselves. Given how Kotlin pushers
have been marketing it as close to Java with easier Java interop than other
JVM languages (falsely if you ask me), that seems like a reasonable approach
on the original author's part.

~~~
on_and_off
I don't think that setting yourself up for failure is a good way to approach a
change :/

~~~
lmm
Doing the thing the marketing tells you you can do is only "setting yourself
up for failure" if you know the marketing is bollocks. (And even in that case,
it might be the easiest way to expose the fact).

------
_bxg1
I find debates over "is language X good or is it bad" to be a particularly
subjective topic in programming. Not that there's nothing objective you can
say about them, but opinion pieces like these are always rife with personal
preferences, and often (like in these two) interspersed with pettiness.

[https://twitter.com/computerfact/status/968333338267324417](https://twitter.com/computerfact/status/968333338267324417)

~~~
on_and_off
There are still legitimate tradeoffs that can be discussed.

For long, Kotlin has meant way longer compilation times. That's no longer the
case (or at least way harder to determine, kotlinc is even faster than javac
in some projects) but that was a legitimate bullet to bite 2 years ago.

Sadly I agree with the author of the second article, all the reasons given are
very petty and I wonder how much of these 6 months were really spent writing
kotlin.

------
colonelxc
I dislike blog post 'responses', because it's the equivalent of two people
shouting past each other.

As the author of this blog post notes, there are good responses in the
/r/programming comments[0].

[0]
[https://www.reddit.com/r/programming/comments/8lmnl2/from_ja...](https://www.reddit.com/r/programming/comments/8lmnl2/from_java_to_kotlin_and_back_again/)

~~~
endorphone
Both are speaking to an audience, and the point/retort approach is how most
reasoned discussions occur, and how we move forward. Some see them as
confrontational, and thus unsavory, which is unfortunate.

~~~
colonelxc
We can also have reasoned discussions directly with each other (as you and I
are here). Here we may have an audience of other forum members, but the same
audience can see the same back and forth (and contribute).

In my opinion, the 'speaking to an audience' via indirect blog posts doesn't
really help us move forward as much as direct discussions do. Since we already
had thorough discussions about this topic both here and on reddit, I don't see
the value in this post.

I will admit that this type of indirect conversation isn't without its uses
though. For one, I don't think the original blog author participated in the
discussions here or on reddit. So our discussion boards were also indirectly
attacking that post, without much room for the author to respond. Similarly,
it's impossible to have a discussion with everyone you disagree with.
Sometimes the best you can do is state your opinions, and let people consider
them as they will.

I guess a better statement I could have said earlier is that we already have a
forum (right here) for discussion of articles, and we don't need the
disconnected responses-via-blogposts, because we can just discuss things
normally here.

------
vbezhenar
Blank page in Edge. Object doesn't support property or method 'replaceWith'
kagu.js (663,4)

~~~
akerro
In case anyone else uses Edge, this is what this page looks like on Firefox
when you use a VPN
[https://i.imgur.com/IsvknB2.png](https://i.imgur.com/IsvknB2.png)

/s

PS.

wow, what a garbage...

~~~
pmontra
It's one of those blogs that are implemented as a web app that reads the
content with JavaScript, because HTML is not enough...

The text is a JSON at [https://zsmb.co:8443/public/articledetails/url/on-from-
java-...](https://zsmb.co:8443/public/articledetails/url/on-from-java-to-
kotlin-and-back-again)

Btw, that 8443 port is probably blocked by firewalls in many enterprise
networks. They usually allow only ports 80 and 443.

~~~
zsmb
Hey, site author here.

I'll try not to spam too much and just reply to this one comment to address
the feedback around here about the technical aspects of the site.

\- Yes, it's a completely pointless web app in the place of what could be a
very simple, quick, and well functioning static HTML site. I'm using it as a
hobby project to test drive a framework I'm working on. I do desparately need
feedback on it, so thank you for everyone who's reporting issues!

\- Yes, I didn't have time to do any compatibility testing, so right now I
only know that it works alright in Chrome. There are probably things that are
very easy to fix (e.g. not using those couple functions that are missing in
Edge), I'll have to look into these later.

\- I don't know if I can solve the port issue yet, I understand that random
ports besides 80 and 443 are often blocked, I've actually ran into this just
trying to access my own site already too. I only have this one domain and one
server for it so far, and I need separate ports to serve the app and to expose
the API it talks to. I'll have to think about how I can solve this later.

~~~
pmontra
From your answer I guess you have a static web server on port 80 and another
one on port 8443. The URL of the JSON starts with /public so I guess it's
completely static.

If you can setup the second web server then you're probably in control of the
server. How about reverse proxying an /api URL to localhost:8443?

If you can only run another web server on 8443 and can't modify the
configuration of the main one on port 80... You simply serve the static JSON
file from port 80. This is too easy so you probably can't do that. Do you have
an application serving those files on 8443? Maybe run it once to create a file
and store it where the web server at port 80 can serve it. Some small script
with curl should be enough.

------
myWindoonn
This page doesn't render with JS enabled, even in Reader Mode. Disappointing.

------
rammy1234
FIrst article was an opinion and second article response is also an opinion in
Kotlin defense. Opinion here is very subjective with problem at hand.
Switching from one language to another should happen after you fall in love
with what that language was offering not just for the sake of trying. Not a
good idea to waste time trying without loving it.

"This is like marrying without love"

~~~
snaky
> Various small sample surveys have been done to ascertain if arranged
> marriages or autonomous marriages have a more satisfying married life. The
> results are mixed - some state marriage satisfaction is higher in autonomous
> marriages, others find no significant differences.

[https://en.wikipedia.org/wiki/Arranged_marriage#Love_and_res...](https://en.wikipedia.org/wiki/Arranged_marriage#Love_and_respect_in_arranged_versus_autonomous_marital_life)

------
V-2
_" And it's about 7 extra characters in a line of this length."_

(regarding the example from "Class literals" sections)

Well, the Kotlin line is still shorter overall, despite the ".java" bit,
because it allows to get rid of "new" keyword (two of them), and to replace
the first occurence of "GsonBuilder" with "val".

~~~
greiskul
People who live in glass houses shouldn't throw stones.

A java programmer complaining about another language being verbose is
hilarious.

------
he0001
I’ve tried a few different languages in different companies and positions. I
think I understand the gist of the original article.

It’s like saying German is more effective to write with than English or that
German is easier to express poetry than English.

------
teilo
In other words "I don't like language X because it's not exactly like language
Y."

------
parvenu74
Could just be me but the site appears to have been Slashdotted (sorry --
inspired to use a throwback term based on the other HN story about WebDav).

Assuming this is a story about Android development, there will be the sequel:
"From Java to Kotlin and Back to Java -- before surrendering to Dart and
Flutter." :-)

------
V-2
_" Java programmers are male."_

Not typically no

~~~
qw
I think it is a reaction to the author using a gender specific pronoun («he»)
in the example

~~~
marcodave
How is that relevant to the topic of answering the criticism?

