One of the best things about working on iOS and Android development simultaneously is that you get to try various programming approaches, software patterns, tools, etc. While both platforms offer an interface for the development of mobile applications, the experience on each platform is significantly different.
Logging is one of the places where such a difference arises. If your expectation from logging is to simply debug while development you can use
println in Swift and Kotlin respectively.
println for logging in an Android project is a bit tricky, because the output will only appear in
I started writing on Medium just a few days ago. Up until this time I have attempted to post articles on topics that I find interesting, mostly related to software engineering. In all my attempts, I eventually ended up deleting the drafted article with a though that it has many flaws, and there are people in community who already covered or can cover the subject better than I do.
You probably have come across the
mutating keyword in Swift and wonder what is it all about? To define it we need to understand how structs are organized in Swift first.
A struct is a data type that organizes property and methods in a unit. It has almost the same interface as a class with a few subtle differences. For example, once you set up a struct’s properties, it automatically generates memberwise initializers while a classes will not. The other significant difference is that while structs are value types, classes are reference types.
What does this mean? This basically means…
There are various ways of null checking in Kotlin. Let’s say we have a Student data class which is composed like following:
data class Student(
val firstName: String,
val lastName: String,
val middleName: String? = null
var lastSubmission: Submission? = null
)data class Submission(
val timeStamp: Long
Looking at the class we can understand that any instance of Student will always have a first name and a last name, while having a middle name is optional and may have a null value. Let say we need to need to write a function which will return the full name…
Young enthusiastic software developer, currently full-time at PASHA Bank building Android and iOS applications.