Posts

Showing posts with the label developer

Android Kotlin Digest #2

Back again with Kotlin I learnt. Kotlin runs on Java Virtual Machine (JVM). Syntax for declaring variables: Mutable:      var name: Type = value Immutable:  val name: Type = value Type Bit width Double 64 Float 32 Long 64 Int 32 Short 16 Byte 8 Kotlin 1.1 supports underscores ( _ ) in numeric values for readability: val mySalary = 1_000_000 val myCreditCardBill = 20_000 Difference between == and === : val a : Int = 10 val b : Int = 10 (a == b) // gives true  (a === b) // gives true  Note: Here primitive types are compared. When the primitive types are nullable it is turned into references and following is the result: val a : Int? = 10 val b : Int? = 10 (a == b) // gives true  (a === b) // gives false   Note: Here a and b becomes references and hence comparision with === results false. Type converters: 'c'.toInt() 80.toString() A raw string is delimited by a triple quote ( """ ), contains no escaping a...

Why I love programming?

Image
Extended title:  " Why I love coding/programming, software development, software engineering and everything in this field of work ? " I am a guy who easily gets bored of stuff within short span of time. In this context, I have a brain like that of a 2 years old kid who craves for something and when I get it I abandon it away within no time. But it's exactly the other way round when it comes to anything in computers. I first saw a computer at the age of 15 when my first cousin got one for a post graduate program. I, for that matter anyone of us kids, were not allowed to touch it initially. After a few months of pestering we were allowed to play games and MS Paint. Eventually, not by choice though, got a seat in computers and information science branch for my engineering course and my dad got me my first computer. I am including the spec just to know how much we have progressed since 15 years. - Pentium  III  processor cased inside a cab...