Things to tick off in 2019

With 2018 ending on a high note I want to make 2019 even better. With that in mind and also taking into consideration of becoming a parent (which literally means less time) I needed a set of most important things to be accomplished in 2019.

This list is still in works but I have figured out what is needed for at least the first month to a quarter or two:

  • Build complete solutions or components for a bigger solution
  • Build a web app using Spring framework
  • Refresh on Java, its collections usages
  • Dive into React for the web (not for mobile)
  • Refresh data structures and related algorithms
  • More understanding of design patterns and principles

Other things which spans across the whole year are:

  • Build my own WordPress site & start hosting
  • Complete my Github profile page
  • More blogging monthly twice or weekly once
  • More streaming
  • Start podcasting – create themes or series of episodes
  • Vlog on things I have learned weekly or fortnightly or monthly

Looking forward to an amazing 2019.

Advertisements

2018 in review

2018 was very good for me in all aspects of my life. I learnt so many new tech stuff. My financial goals were achieved more than what i thought and during the last quarter I got promoted as a father of beautiful human being.

Here is my list of things I achieved on 2018 on the career front.

  • Learnt Angular js – built a small front-end app
  • Built couple of basic Android apps as part of a course
  • Started with basics of Machine Learning (Statistics)
  • Enhanced my swift programming skills
  • Back on macOS native application development
  • Refreshed my C++ skills updated on C++11, 14, 17 standards

From a extra-curricular things,

  • I started streaming my side project works.
  • Started a youtube channel
  • Planned for a podcast channel but did not make effort to work it out
  • Working on my communications
  • Started read eBooks on Kindle and iBook
  • Kept this blog live on an average of 50+ visitors per month

From a health and fitness side,

  • Started doing yoga though not consistent but weekly 3-4 days
  • Learnt Sudarshan Kriya from Art of Living

Hopefully I will exceed this list for 2019 and stick to my plan to explore paths which I haven’t traveled yet.

10 rules (part 2) for happier self

Having your self a part time hobby or goal enriches your self and increases productivity both in your regular day job as well as personal life. Here are the 10 tips to achieve it.

-= Tim Ferriss’s 10 rules =- (as I understand)
1. Have other interests – apart from day job do something different of your interest
2. Scratch your own itch – continued from point 1, add your creativity in hobby projects
3. Learn the art of the pitch – I think this a develop art of storytelling
4. Focus on your strengths – strengthen what you are best at along with improving weakness
5. Be able to sell – similar to point 3, work on your communications
6. Ideas are worth nothing – try to realise your thoughts plans into actions
7. Pick the right things to do – prioritise and work on what is needed now
8. Be pragmatically pessimistic – don’t be overly optimistic/pessimistic (hope for the best, prepare for the worst)
9. Have a focused metric – evaluate and re-evaluate your goals vs accomplishments
10. Use failure to help you – learn from your mistakes

I think these are simple things easier said than done. Takes persistence to put this into practice and make it into your inevitable part of life.

This is another post on same lines of my previous post. Just jolting it down for future me and for anyone reading this. Got this one from another video.

10 Rules (part 1) for Success in anything

Came across this video and when I analysed my day I do most of the stuff but also miss out on the key stuff. So thought of penning it down in a blog.

-= TIM FERRISS’S 10 RULES =- (as I understood)
1. Ask great questions – questions which actually makes an impact and whose answers really of some value
2. Start small – anything you start, do it with baby steps but be consistent
3. Be focused – dont get distracted
4. Unplug and reset – re-evaluate every now and then
5. Accept the collateral damage – (not sure exactly what damage – may be Sacrifices)
6. Try the Five Minute Journal method – make this either a morning or evening routine
7. Schedule your time – limit your time for social media, mails, everything necessary
8. Get feedback – start and get your stuff into hands of few people first for feedback
9. Simplify – anything in life must be done in the simplest possible way
10. Do AcroYoga – I would say start with basic yoga make it a routine and then advanced

-= BONUS =-
i. View problems as opportunities – take up, face it and deliver
ii. Find your diehard fans – true admirers, well wishers, fans give back
iii. Create space for creativity – allot some time for your creative brain.

 

Android-Kotlin Digest #5 – Null Safety

One of the most irritating things in programming is apps crashing due to null / nil objects.

In Objective-C, you can call a method on nil objects it wont crash but it will never ever give expected result and we developers end up debugging a whole lot of our time searching out for the culprit.

In Java it used to be NullPointerException (NPE). And reason for app crashes.

Modern languages solves this problem by having the null safety mechanisms.

Swift uses Optionals ? and Unwrapping ! the optionals. Swift also has if let and guard let statements for safely unwrapping the optionals and handle in case of nil values.

Here on the same lines we will discuss about how Kotlin ensures Null safety

var str: String = "abcd"
str = null // This line gives a compilation error



var str: String? = "abcd"
str = null // This pass thru since str is declared String?

Now suppose you want to check the length of str in case of optional, to do it safely you need to typically:

val len = if (str != null) str.length else -1

Or else use safe call operator ( ?. ) like : str?.length

(In swift we call it Optional chaining)


In Kotlin, the former if else statement can also written using what is called elvis operator ( ?: )

val len = str?.length ?: -1

And if developers are sure of an reference having a value then use not-null assertion operator ( !! )

val len = str!!.length

(Problem with this is if the reference is null the NullPointerException is thrown)

happyCoding!

Android-Kotlin Digest #4 : A simple way to Read and Write

Here I will give you an overview of :

– how to read user input from command line?

– how to read data from a file?

– how to write to a file?

How to read user input from command line?


println(" ->Welcome to our Bakery<-")

println("============================")


println("Hello! How can I help you?")

var userResponse = readLine()


println("Sure!!" + "It's fresh prepared just now!")

var userNextResponse = readLine()


println("You are very welcome! Have a nice day!")



println("================== ====================")


println(" :: Your Conversation with the Clerk :: ")

println("Clerk: Hello! How can I help you?")

println("Customer: $userResponse")

println("Clerk: Sure!! It's fresh prepared just now!")

println("Customer: $userNextResponse")

println("Clerk: You are very welcome! Have a nice day!")

How to read data from a file?

val reader = FileReader("itsdamslife.txt")
var char: Int?
try {
do {
char = reader.read()
print(char.toChar())
} while (char != -1)
} catch (exception: Exception) {
print("There was an exception : $exception.message")
}

 

How to write to a file?

try {

    var writer = FileWriter("itsdamslife.txt", true)
writer.write(message + "\n")
writer.close()
} catch (exception: Exception) {
println("There was an exception :  $exception")
}

Android-Kotlin Digest #3 – A gist of Collection types

Today in Kotlin, learnt about Arrays, Hashmaps, ArrayList, MutableList, MapOf, ArrayOf. Here is gist of things.


In Swift we have all the functionalities of Array in one place.

In here Kotlin we may need to use combination of Array and ArrayList.

Here are few Kotlin examples:

Array:

var myArray = Array<Int>(6){2}
for (element in myArray) {
println("Item - " + element)
}

for (index in 0..myArray.size - 1) {
println(myArray[index])
}


ArrayList:

var myArrayList = ArrayList<String>()
myArrayList.add("It's")
myArrayList.add("Coders")
myArrayList.add("Life")

if (myArrayList.contains("Coders"))
println("He's a rockstar!")

myArrayList.remove("Coders")
myArrayList.add("Dams")

//iterating through objects
for (names in myArrayList) {
println("Names:" + names)
}

HashMap: (Dictionary in Swift)

var hashmap = HashMap<String, String>()
hashmap.put("Mary", "Married")
hashmap.put("Paulo", "Married")
hashmap.put("John", "Single")

for (k in hashmap.keys)
println(hashmap.get(k))


Other Collection Utilities:

var myArrayList = listOf<String>("Me", "James", "Bonni", "Life")
var mutableList = mutableListOf<String>("Me", "They", "James")
var myHashmap = hashMapOf(1 to "Paulo", 2 to "James")