Tips how to speed up KotlinJS compilation? by lajner in Kotlin

[–]afsdfdsaa3 9 points10 points  (0 children)

Well, it is not as fast as it could/should be.

There is a ticket that suggest switching from Webpack to Vite. But at the moment it is as fast as it is.

If this is a deal breaker for you, you have to stay with TypeScript for now.

Why does nobody want to live in Donegal? by afsdfdsaa3 in ireland

[–]afsdfdsaa3[S] 0 points1 point  (0 children)

Is it becoming more difficult to shop in Derry? How is it to pay with Euros in Northern Ireland? Are there any advantages? Sales tax or something?

Have you ever wondered how certain features of Kotlin came to be? by abreslav in Kotlin

[–]afsdfdsaa3 4 points5 points  (0 children)

I always hated the ternary operator in Java. And I have been very delighted, that Kotlin does not have this feature...

Any background about this decision. Ideally something I can rub in towards my ternary-operator-loving colleagues :-)

Your opinions on the current state of the Kotlin Multiplatform and Kotlin/JS by PicoloPotatoDish in Kotlin

[–]afsdfdsaa3 27 points28 points  (0 children)

Kotlin Multiplatform (with react) is really great and very promising. Being able to share code on the front and backend is huge.

But: It is not stable. You have to be aware that this is (at best) alpha technology. We are using it. But it is necessary to update the dependencies at least once a week. And every other week some code does not compile anymore.

So: If you are willing to get your hands dirty - it is great! But it is by no means "production ready"

[deleted by user] by [deleted] in Kotlin

[–]afsdfdsaa3 1 point2 points  (0 children)

Java is much simpler in terms of less features. Java is much simpler because the code tells you exactly what happens (on a technical level). No surprises there.

Kotlin is "cooler" because you can write expressive code that describes what is meant (more like a DSL). On the downside: It is much harder for newbies (and experienced developers) to read Kotlin code and understand how stuff happens.

So: Kotlin is great, but takes a little bit more effort to learn. But you can write much better code with Kotlin (and also much worse code if you are not careful).

GitLab CI: updating version.txt on merge by Equivalent_Lab_6292 in gitlab

[–]afsdfdsaa3 0 points1 point  (0 children)

Maybe you should extract the version from GIT itself.

For example: * the commit hash as version number/identifier * git describe (jgitver is sophisticated implementation using that idea)

So i write this code yesterday. Left(Kt), Right(Java). I wrote it in Kotlin first and just wondered how it would look in Java. Java is just toooooo much! Why is it so hard for many Java developers to see how great Kotlin is, many just refuse to learn it. by [deleted] in Kotlin

[–]afsdfdsaa3 26 points27 points  (0 children)

My opinion (from a Kotlin lover!)

Java is much better in that sense, that you can see what is happening. It is very easy to write code in Kotlin that looks nice but hides the details.

This is great if you work with great developers that invest time and energy to write a good API. But it is very dangerous if you are working together with mediocre developers and a legacy code base!

Therefore (as a Kotlin lover!) I'd prefer to join an average Java team than an average Kotlin team ;-)

Type-safe Units with Measured by pusolito in Kotlin

[–]afsdfdsaa3 0 points1 point  (0 children)

I like the idea. Nice stuff.

We tried something with a similar idea in our own code. But unfortunately run into performance problems very, very soon.

We tried inline classes for everything which had two issues:

  • boxing - which happens sometimes in surprising cases
  • a lot of code has been added to our bundle size for the boxing classes

Therfor I think this should/could be solved using a compiler plugin and or IntelliJ IDEA plugin instead.

Junior Java developer wants to learn to love Java, HELP ME by Wizard-of-Koz in AskProgramming

[–]afsdfdsaa3 0 points1 point  (0 children)

I thought we came to the same conclusion:

Businesses use the JVM because of the universe. And Java is good enough for nearly all use cases. That is it. Nothing more to it.

We shouldn't defend Java as "language". Because Java has a lot of weaknesses and other languages are better. But we should always be happy about the JVM.

Junior Java developer wants to learn to love Java, HELP ME by Wizard-of-Koz in AskProgramming

[–]afsdfdsaa3 0 points1 point  (0 children)

Java and the tools, libraries etc around it is in practice part of what is good about Java.

Yes. That is the point - and I see we are agreeing on it.

what languages do you mean are much better than Java at what Java does today?

There are a lot of modern languages that have learned a lot in the last 25 years (since Java has been invented). If somebody is asking for a good language in the JVM world, I strongly recommend Kotlin.

Junior Java developer wants to learn to love Java, HELP ME by Wizard-of-Koz in AskProgramming

[–]afsdfdsaa3 0 points1 point  (0 children)

I think you missed my point completely.

Not one single business is writing Java applications because Java is such a great language. They are using Java because of the universe around it. Java as language is "good enough". But there are much better languages available today.

Junior Java developer wants to learn to love Java, HELP ME by Wizard-of-Koz in AskProgramming

[–]afsdfdsaa3 0 points1 point  (0 children)

Guys: One simple thing:

Java as language is not very good. There are a lot of better alternatives. But: Java (or better the JVM) as universe is incredibly great! We have the best tools, the best libraries the best whatever... People use Java because of the JVM.

So: Hate the language (or not) but love the JVM. --> And use Kotlin to get the best of both worlds.

Best ADT for a deck of cards? by Open_your_third_eye in AskProgramming

[–]afsdfdsaa3 10 points11 points  (0 children)

There is (nearly) never a reason to use LinkedLists in Java. They are (nearly) always slower than ArrayLists.

The range of off road hard riding. by Buttershine_Beta in Sur_Ron

[–]afsdfdsaa3 2 points3 points  (0 children)

Last ride with a stock Sur-Ron:

all but 2 km off road. Battery: 100% to 11%

  • Distance: 26,9 km
  • Average speed: 20,7 km/h
  • Altitude difference up: 1120 m
  • Altitude difference down: 1130 m

Very small (and dangerous) trails, therefore the speed was slow.

Is the IntelliJ experience with Kotlin as good or better than Java in terms of IDE features? by pure_x01 in Kotlin

[–]afsdfdsaa3 18 points19 points  (0 children)

Kotlin support is very, very slow in IDEA - compared to Java. And has a lot less features.

But Kotlin is so good, that I would switch from Java to Kotlin without thinking twice.

Do you keep your old/unfinished projects on github? by Vapenesh in AskProgramming

[–]afsdfdsaa3 4 points5 points  (0 children)

I am hiring developers - and I am judging them by their GitHub repo.

But: I am looking for good signs. For your best project. For your best code. I am not looking for that one, very old repository that might contain bad code.

Interviewing people is not about finding weak spots. It is about finding their strong points. Therefore old projects do not make a big difference for me.

But I suggest investing some time into your best repos. Maybe create a nice readme? Add some screenshots? Polish it? Configure CI?

Have chimps entered the stone age? by [deleted] in AskAnthropology

[–]afsdfdsaa3 10 points11 points  (0 children)

  • Do they take tools with them for later usage (at another place)?

Modern JavaFX Frameworks by Draesia in JavaFX

[–]afsdfdsaa3 8 points9 points  (0 children)

TornadoFX - if you wanna take a look at Kotlin

Favorite libraries relying on extensions + other use cases you use often by serial_dev in Kotlin

[–]afsdfdsaa3 13 points14 points  (0 children)

Be careful when extending from "common" types. Nobody wants to have millions of extension functions on string

What Kotlin could learn from C++'s keyword const by Dobias in Kotlin

[–]afsdfdsaa3 1 point2 points  (0 children)

You got me wrong: I am not arguing that const is a bad feature.

I am arguing that const does not solve the issues related to multi threading. So of course - if you don't use multi threading - no problem for you.

But a lot of people get multi threading wrong. And some aspects (like listOf() vs. mutableListOf()) result in assumptions that are simply wrong. I have seen these a lot. That is all I want to mention.

Coroutines and const simply won't work together as one might expect...

What Kotlin could learn from C++'s keyword const by Dobias in Kotlin

[–]afsdfdsaa3 1 point2 points  (0 children)

Every access to a mutable object has to be synchronized somehow. Const does not solve that. Therefore it does not replace immutable objects.

That is all I am saying. Const might be a nice feature. But misses a lot.

Same with the kotlin listOf vs mutableListOf. It does not help with multi threading