« first day (3657 days earlier)      last day (1274 days later) » 
00:00 - 15:0015:00 - 18:00

3:02 PM
resume could call restart
can you purge timers before assigning a new one?
not sure about the API you are using there
I use different timers :D
 
mr5
@Wietlol cuz it's ugly if I put it in constructor
 
why?
 
mr5
CustomTimer(1, 1, {

}, {

})
ugly ^
it's a timer from Android
android.os.CountDownTimer
 
class CustomTimer(
	private val millisInFuture: Long,
	private val countDownInterval: Long,
	private val onTick: ((millisUntilFinished: Long) -> Unit)? = null,
	private val onFinish: (() -> Unit)? = null,
)

val timer = CustomTimer(0, 0,
	onTick = {
		// on tick
	},
	onFinish = {
		// on finish
	})

val timer = CustomTimer(0, 0,
	onTick = {
		// on tick
	})

val timer = CustomTimer(0, 0,
	onFinish = {
		// on finish
	})
named arguments, my fren
 
mr5
like this?
 
3:08 PM
also, i'd recommend this format:
private class InternalTimer(
    private val parent: CustomTimer,
    millisInFuture: Long,
    countDownInterval: Long,
) : CountDownTimer(millisInFuture, countDownInterval)
{
    // ...
}
@mr5 pretty much, but you dont have to provide the implementation, just the visibility modifier
 
Its the final Countdown! Tirorirooo tiroriroriiii
 
var isRunning: Boolean = false
	private set
 
mr5
@Wietlol it's a bit similar to mine but I like to be k&r compliant
 
k&r?
 
mr5
@Wietlol ohhh
why is AS not telling me that
 
3:12 PM
at least put the last property and the supertype list on different lines
@mr5 I think it does tell you and the auto fix for that redundant setter should fix it
 
mr5
also, the reason I expose onTick and onFinish is I instantialize that object upon declaration but assigned those properties on lately, and izz ugly if I those property initialization were packed in the same place
 
@mr5 you should keep the mutation extremely small scoped
having public var properties is often a bad idea
 
and you can probably do better than what you are doing now with it being ugly
just embrace the immutable
@PatrickStar my fren
 
@ mY FrEn
 
3:16 PM
-_-
thanks for reminding me to never speak to you again
 
mr5
@PatrickStar u said what I have in mind when I see wiet's syntax highlighting colors
 
@ u sAiD WhAt i hAvE In mInD WhEn i sEe wIeT'S SyNtAx hIgHlIgHtInG CoLoRs
 
@mr5 what?
 
mr5
p4k said "my eyes"
I felt that
 
but my highlighting colors are bootyful
 
3:17 PM
@CaptainSquirrel 🤣
 
also... my highlighting colors are VS Dark based
with a few modifications
 
mr5
gleaming blue hurts my eyes. why don't you like dark colors? kinda darcula theme
I still think onTick and onFinish deserve to be a property.
 
mr5
Kotlin should make a new keyword to enforce that "property" rule.
 
property rule?
 
mr5
3:20 PM
I only haz 2 options 😁
 
the one I had open was Rider
 
mr5
if you marked some var/val a private it's already a field.
 
I cloned it's settings over to IJ :D
 
mr5
if not, then it's a property.
 
and why do you care if it is a field or a property?
(and trust me, it is more complicated than just if it is private)
 
mr5
3:23 PM
cuz in C# world, there's a clear distinction between property and fields. I thought the same would apply in Kotlin.
 
in kotlin, you have properties
 
mr5
the private property is almost non-existent.
 
fields are either
1, an optimization for the compiler
2, a way to access the inner data in custom getters/setters
 
mr5
does it have a special declaration though?
 
why do you care if it is a property or a field tho?
 
mr5
3:25 PM
OOP
 
OOP my ass
 
Hey umm guys, scaffolding's bugging the shit out of me. Can anyone explain what's going on? It worked the first time, but never again :(
The error: `The entity type requires a primary key ...`
 
mr5
@Wietlol y u h8 oop?
 
OOP is trash
 
mr5
I'm making a game, so OOP is very useful to pattern my thoughts.
 
3:27 PM
none of the peeps in here use OOP tho
 
mr5
yeah cuz people here are pure website-y people
 
also, in OOP, you shouldnt have public properties at all
 
mr5
would you rather circle.radius += 2 or circle.increaseRadius(2)?
 
the first
 
mr5
edit to have the same meaning
then you expose the property?
 
3:29 PM
yep
 
mr5
@d4rk4ng31 what is scaffolding?
 
the second is more OOP like
 
mr5
is that like folding silk
 
Umm, where you create the CRUD pages
 
mr5
a service/UI builder?
4 mins ago, by Wietlol
also, in OOP, you shouldnt have public properties at all
 
3:32 PM
I would rather choose option 1, also "OOP is trash"
and "the second is more OOP like"
what confuses you?
in OOP, you dont really have data classes
you have behavior classes only
 
mr5
welp, afaik, properties are parts of OOP
 
a DTO is strictly against OOP for example
> DTO is a very popular design pattern, but it is actually an anti-pattern in object-oriented programming that has no right to exist.
 
mr5
they can co-exist, no?
 
in OOP, you have fields to store data, but the data is always private
operations done on the data belong to the class that has those fields
I cant really think of an example because my mind actively rejects OOP
 
 
1 hour later…
@Feeds shut up
 
5:07 PM
Jack still hasn't responded lmao
 
00:00 - 15:0015:00 - 18:00

« first day (3657 days earlier)      last day (1274 days later) »