|
Any pet owner will tell you their pets train them.
|
|
|
|
|
... oh it took me a while to be on the same page
|
|
|
|
|
Experts often refer to Kotlin as a "concise" language. Kotlin is closely related to Java, but look at this example of defining a class in the two languages:
In Kotlin the following single line will define a class:
class Person(var firstName: String, var lastName: String)
Note that the class definition does not seem to have a body. Kotlin will infer from the parameters what constructors, fields, etc. the class will need and provide them for you.
Now consider how you need to define the class in Java:
public class Person {
private String firstName;
private String lastName;
public Person(String firstName, String lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
public String getFirstName() {
return this.firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return this.lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
}
(Kotlin may provide different names for the getter and setter functions.)
Source:
Constructors and members · Kotlin Quick Reference[^]
This may explain why large organisations like Amazon, Google and some banks are moving to Kotlin for the creation of Android apps for devices like phones and tablets.
This does not mean that learning Kotlin is easy. Its very consiseness can make the code difficult to figure out for newcomers. But once you master it, you will never go back to Java for the developments of Android apps.
Get me coffee and no one gets hurt!
|
|
|
|
|
The downside of this is when it comes to debugging your code much of it is hidden. I played with Kotlin a while back but did not go deep into it.
|
|
|
|
|
Richard MacCutchan wrote: ...much of it is hidden. That's my problem with these type of "modern" languages. I'm old school, back when you had access to, or had to create, everything, so hiding it all under multiple layers is just time consuming. I'm doing a huge Angular project right now. Trying to find out why/how certain things work is over half my battles. Types and punctuation can be omitted, and symbols (and their order) are very important. Trying to backtrack a variable to its origin, only to find out that it just materialized out of thin air goes against my grain. Part of this is just the syntax of a new language, but the rest feels like deciphering hieroglyphics!
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Sounds for me like the dependency injection hell 
|
|
|
|
|
Yep, DI!
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
If you do develop Android apps, keep in mind that new features that become available for the Android system, are likely to be available only on Kotlin projects, not Java. This is already true for Jetpack Compose that improves developing user interfaces. It is only available for Kotlin.
Get me coffee and no one gets hurt!
|
|
|
|
|
I know nothing about Kotlin, but you confirmed my distaste for Java. I guess sometimes it really is the programming language, not the programmer.
|
|
|
|
|
Going from VB (any version) and C# to Java was a horrible, horrible experience for me. Kotlin looks like a winner to me, and it eliminates Google's vulnerability to another Oracle lawsuit over Java.
|
|
|
|
|
You could do this, too.
Refactor later if you really need getters and setters.
I have done this with types that are just used for conversion/repackaging. Build once, send somewhere else.
public class Person {
public String firstName;
public String lastName;
public Person(String firstName, String lastName) {
this.firstName = firstName;
this.lastName = lastName;
}
}
|
|
|
|
|
Thanks for rubbing in how 💩 Android-Java is to program in. For what were reasonable considerations 2.5 years ago (mostly compressed customer timelines and ramp time needed for a new language) the project I'm on decided to stick with the older language.
"No it's not my favorite language either, but everyone on the team already knows it, and it's not anywhere close to Objective-C levels of awfulness either."
When our first increment of money was supposed to deliver a working app in 3 months; a month of low output while learning a new platform wasn't something I could support either. When it actually took 2 years before a second pot of money was released to us...
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
|
|
|
|
|
I woke up invisible this morning.
Unfortunately, the doctor couldn't see me right now.
|
|
|
|
|
My doctor scribbled graffiti all over town. I know it was him - the writing was illegible.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Two kinds of Physicians
Those who fix things and the one's that cut them out
My other favorite for anesthesiologist
YES I know you can put me to sleep but can you wake me up ?
|
|
|
|
|
Nice to see you back making jokes after a dark time (which most probably make you think for a longer time).
All the best anyway.
|
|
|
|
|
Thanks, I'm not one to wallow in misery
I've been making (slightly darker) jokes, just not on here
|
|
|
|
|
Variation my kids used when I first heard it.
What did the Nurse say the invisible man?
I'm sorry the Doctor can't see you.
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
All the words, you know? (10)
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
VOCABULARY = All the words you know.
|
|
|
|
|
That's what I thought Derek but it's not cryptic
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
It lasted an hour and a half - that's cryptic enough for me!
And you know that punctuation is only there to mislead ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Maybe OG had enough of not solving his clues...
"Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid." ― Albert Einstein
|
|
|
|
|
Plus he counted correctly! 
|
|
|
|
|
Yay! You are up tomorrow!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|