Posts

Showing posts from August, 2020

Null and void

Image
 In the initial days of Kotlin learning, I would just convert a java file to Kotlin using IDE option and then tweak to make it compile. Most of this tweaking involved adding exclamation or question mark to variable names - for null checks. And I wasn’t sure, I will add ?, if that doesn’t work I will add  two exclamations.  Then I learnt about lateinit keyword- how it allows you to define a variable which can be initialised later. And now every so often my program crashes saying lateinit was never inited. :) :)  You can't escape the null pointer exception!! At least now I know what’s wrong and how to fix it.  When we are on the subject ,let us talk about void. This famous statue above is called Emptiness. It’s original artist is Albert Gyorgy! it's a bronze statue located at Lake Geneva. I think this aptly describes the null, the void in all of us

Shanti mantra

Image
And this video of shanti mantra is mesmerizing.  

Mathz app source code

Image
 I have been reading about view model architecture and live data in android projects. To put it very crudely view model lets you divide UI and program logic. So you create a ViewModel which will take care of all manipulations of data. And your main UI controller just displays the content. And by integrating another aspect called live data, you need not worry about the state of your project when there is a configuration change. Like screen rotation. You need not bother creating saved instance state and using this saved values again etc. Reduces a lot of headaches.  To my game mathz , I added these features and published in git repository. You can refer to the source code of the app here .     The app is available in Google play

Reforesting

Image
 I remember an event from 30 years back. My cousin who was a school going kid was discussing how he got money for planting a sapling in his field. He was very happy - obviously. But what is more interesting is the fact that, the then DC was encouraging the village people to plant more trees by giving incentives. Now is the time to bring that plan back. Each and every district must have a plan to distribute money to people who have a grown a plant for one year and that incentive can be continued for subsequent years. That way, plants do grow to be trees.  And they will help us in bringing the rains and reducing the soil erosion and floods. Again this incentive story can be expanded. The larger incentives and financial subsidies can be given to people who want to develop mini forest in their backyards using Japanese Miyawaki technique. This technique can also be used to grow larger trees in city parks as it requires as less as 20 square feet space. And after 3 years, this forest will be

Why

Image
 Well so many uplifting, self improvement blogs, posts, posters in the world wide web. If only we spend time in trying to implement them rather than googling them. Some where I read that in one of these articles that if you find the "why" then your task becomes much easy. What is my why? To numb the imaginary pain? To find existence?  Any ways, a day completed is a day won these days. If a days gets completed well and fruitful, then it's double win.

Vocative

Vibhakti(declensions) in Kannada was memorized by us as kids without understanding anything about them. That does not mean we spoke all ungrammatical sentences - no, we spoke pure kannada. But how does the grammar work - why do we need these vibhaktis? No, we didn't bother - as long as we got our marks in Kannada. Now 50 years later when I am trying to learn other languages, I am realizing its significance.   So a funny case is vocative case - which is used to call a person. O Rama, where are you? And so on. So in Sanskrit, vocative case of Rama is Hey rama. The famous last words of Mahatma Gandhi and also title of a famous Hindi film which was way ahead of its times. An article in today's paper mentioned this phrase - very apt term in today's context. Context being the beginning of new era in India - what is this new era, depends on your interpretation and which side you lean towards. So hey ram, we are seeing all old words and old worlds being obsolete and new wo