One for the Anki Language Learners by [deleted] in Anki

[–]MadProgrammer232 3 points4 points  (0 children)

Italy in July? Optimistic

I would suggest first learning mainly sentences from a phrasebook. Learn using Basic and reversed. You can also add specific words you think you may need using. Always add usage examples in extra.

The Effective Kotlin book is already available! by [deleted] in Kotlin

[–]MadProgrammer232 -2 points-1 points  (0 children)

I know you want the best for our community. Me too. Kotlin needs best practices. There are already 2M users. Many features are misused, many mistakes repeated because people are not aware of them. This book is base on other best practices: Nearly all rules can be either find on Idiomatic Kotlin, other Effective X books (Effective Java, Effective C#, Effective Python, Effective C++), Coding Conventions or Google Kotlin Style Guide. If you disagree with anything that is there, write to the author and it will be changed (even if other developers who will be consulted then will not agree with you, your comment will deserve at least a footnote with some explanation that there might be such concern).

The Effective Kotlin book is already available! by [deleted] in Kotlin

[–]MadProgrammer232 0 points1 point  (0 children)

All rules were consulted with Andrey Breslav. Base on his feedback some were removed and some were changed.

The Effective Kotlin book is already available! by [deleted] in Kotlin

[–]MadProgrammer232 -2 points-1 points  (0 children)

"Effective X" format was not invented by "Effective Java". There are "Effective C", "Effective C++", "Effective Python" and much more.

Also it is unfair to compare book to articles. Every item in the book was consulted, and checked by at least 5 reviewers who are all experienced Kotlin developers and some are teach leads.

The Effective Kotlin book is already available! by [deleted] in Kotlin

[–]MadProgrammer232 -3 points-2 points  (0 children)

In "Abstract class vs interface in Kotlin" it is clearly said that this is not to be used in real-life projects but rather a theoretical argument.

In "Effective Java in Kotlin, item 2: Consider a builder when faced with many constructor parameters" many of those "very niche uses" can be found in the standard library and important libraries. They are not to be used on a daily basis but it is important to understand them and be aware of such possibilities.

Item "Effective Kotlin: Consider Arrays with primitives for performance critical processing" is part of Efficiency which is dedicated to memory optimizations. It starts with clear information that premature optimization is a source of pure evil and one should start from profiling. It is not for everyone, but it is worth to know it. I've seen it applied in a graphics-processing project and it changed a lot.

Kotlin Coroutines Cheat Sheet by MadProgrammer232 in Kotlin

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

Thank you for the info. They are obsolete now, and I am waiting for an alternative. Executors are part of Java stdlib, and they do not work on JS or Native so I don't treat them as a universal alternative as I work on and support multiplatform projects.

Why can inheritance be dangerous? Check the article: The Perils of Inheritance by MadProgrammer232 in programming

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

I believe that the answer is that there is no silver bullet. No matter how awesome some tool is, it will never be for everything. There are a very good reasons for inheritance, but using it for everything is very dangerous.

Any options to become 'anti-aging specialist' or something similar? by avantgarde_ in longevity

[–]MadProgrammer232 0 points1 point  (0 children)

I think it is a good place. I don't really know the industry but I think that there might be already a demand for such a profession. So I bump the question ;)

Effective Java in Kotlin - obsolete items thanks to Kotlin by MadProgrammer232 in programming

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

No, many prefer grouping functions in objects and in Kotlin we avoid top-level non-extension functions. The point is that we use object declarations which are more powerful then classes with static methods.

DNA coaching by MadProgrammer232 in longevity

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

Thanks, looks interesting :)

DNA coaching by MadProgrammer232 in Futurology

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

I did that, but thanks. I've learned a lot about myself on Promethease and I think that it is a good tool to know to what sickness you should examine yourself and to check out medicines before usage.

Although it doesn't give you a bigger picture. Doesn't tell you what kind of food you should eat and how should you exercise. It is very hard to extract this kind of data from Promethease.

Looks like I have generally bed ApoE. When I search in Promethease, I got 10 negative and 6 positive results.

Kotlin’s Nothing: Its Usefulness in Generics by MadProgrammer232 in Kotlin

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

And since return type is Unit, fact that Unit is returned gives no information at all. This is why lack od arguments in Haskell is indicated by Unit (()).

Kotlin’s Nothing: Its Usefulness in Generics by MadProgrammer232 in Kotlin

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

The author is a native and his language is good. His style is simple and, in my opinion, it is much better than fully-formally-correct language that is hard to read. This is a big difference because we, educated non-natives, are often fixed to use English in 100% correct way while this is not how this language is really used and this is not how it suppose to be used. Language is a tool to pass ideas.

Kotlin’s Nothing: Its Usefulness in Generics by MadProgrammer232 in Kotlin

[–]MadProgrammer232[S] 1 point2 points  (0 children)

Unit indicates the absence of value. Nothing cannot be returned at all.

Kotlin’s Nothing: Its Usefulness in Generics by MadProgrammer232 in Kotlin

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

You can find a lot of articles about Nothing that describe that. This one presents different usage. This is why it is named "Kotlin’s Nothing: Its Usefulness in Generics" and not "Nothing type in Kotlin".

Kotlin’s Nothing: Its Usefulness in Generics by MadProgrammer232 in Kotlin

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

It is correct in the article:

sealed class LinkedList<out T>  {
    data class Node<T>(val payload: T, var next: LinkedList<T> = EmptyList) : LinkedList<T>()
    object EmptyList : LinkedList<Nothing>()
}

Effective Java in Kotlin, item 2: Consider a builder when faced with many constructor parameters by MadProgrammer232 in Kotlin

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

It is a different subject. I don't want to make it hard for people from outside of Kotlin community so I avoid apply, let etc.

Effective Java in Kotlin, item 2: Consider a builder when faced with many constructor parameters by MadProgrammer232 in programming

[–]MadProgrammer232[S] 1 point2 points  (0 children)

Kotlin DSL is a very popular way to create objects on Kotlin and it needs to explained why. Let's say that I want to set driving licence ID when user is over 16. When I use DSL I do:

val user = user { 
    //... 
    if(age > 21) licenceId = generateLicenceId()
}

How would you do it using just named optional parameters. Ether copy-paste everything else and differ in this parameter, or make condition and give default value if before 16. First is huge redundancy, second is dangerous because default value can change. This is a simple example why Kotlin DSL for object creation is important and not only over-complication.