It’s a joke but it’s a serious one. The NoPhone post came up on the Hacker News. There are a lot of good and standard advice on how to break phone addiction but in my opinion is that time is limited and in order to think deeply one needs solitude. Mobile devices take that away.
August 13th, 2020
In last ten or so years when I started this blog it has seen many hosts. But at last I have brought it to WordPress.com. Previously, I was running as self-hosted but I don’t have a lot of spare time in my hand and it was difficult for me to maintain and upgrade it on a regular basis. I was learning a lot while trying to maintain the server but at this time I could use that energy at other place. Hence, I have moved to WordPress.com hosting. As far as caveats are concerned the default code highlighting is not that great. I can also not use plugins at all.
June 23rd, 2019
I have had a productive week. Thanks to MTECHVIRAL‘s Flutter series I am making a swift progress in learning the mobile and desktop hybrid programming language.
I find Dart to be super close to Java with a lot less boilerplate code but I still find Kotlin to be my favorite programming language. Although learning Flutter would mean that I could write mobile, web and desktop apps all together which would be a big win for me. Although Kotlin can also do that but it seems like Kotlin being a JVM language brings a bit of cruft with it.
I saw use of
new keyword and also a semicolon to end a statement in Dart but I am glad to know that Dart 2.0 has made
new keyword optional whereas semicolon is still required to end a statement.
Dart is very similar to Java and most Java developers will have no issues learning it. In fact it could be picked up in a weekend.
In Flutter like in Android where main container is an Activity and anything drawn on the screen is a
View similarly in Flutter everything is a
Widget. My understanding is that in order to create Material design apps we have to start with a
MaterialApp object. Inside a
MaterialApp object resides an object that provides the structure to start drawing widgets on. This structure is known as a
Scaffold. Within the
MaterialApp package will provide you button, text fields, etc. which are similar to what we have in Android.
Another main Flutter concept to understand is the concept of a
State. There are two types of widgets in Flutter. Flutter widgets are of two types which as stateful and stateless. Anything that you can interact with and if this interaction changes the state of the widget then the Widget is said to be a
Stateful Widget. For example, a Checkbox comes with two states checked and unchecked and you probably want to use a Stateful widget if you want your users to be able to change the state from checked to unchecked or vice versa. The second type of widgets are
Stateless Widgets. Any widget which doesn’t change its state or remains the same throughout the life cycle of the app would be a Stateless widget.
June 19th, 2019
I happen to meet a full-stack developer, over bonfire, in a secluded property in Coorg, Karnataka, India. Instead of mingling with other wanderers we had to talk about development. He made a strong argument about mastering your current skills and skills that may come useful in future. He also made strong arguments regarding hybrid mobile development.
I have for a long time resisted venturing out of Android world and that too native because I want to be master of my trade and not the jack of all. Although the amount of stage time that Flutter is getting has made it difficult to ignore.
The current plan is to spend one day on native development and other day on hybrid. The burning question is how to begin learning. I quickly ended up on the blog post – I want to learn Flutter. How to start? by Pooja Bhaumik.
I have worked my way through Pooja’s talk and have also quickly skimmed through the Google Codelab. The links can be found in Pooja’s blogpost.
I intend to start building project in Flutter as soon as possible as I don’t want to get too theoretical. I want to see if Flutter could be used in one of my projects.
February 5th, 2019
My desire to be able to run my plugin didn’t come through even today. I uninstalled Java 11 and installed 8. It turns out that I need the same version of IntelliJ IDEA as my Android Studio to be able to run the plugin. Now, I have to installed the older version of IntelliJ IDEA.
And finally it worked.
February 4th, 2019
An action is basically what happens when you click on a toolbar or a menu item.Write an Android Studio Plugin Part 1: Creating a basic plugin
I set out to learn how to develop plugin for JerBrains IDE. Initially, I have issue figuring out path to my Android Studio installation for Linux. I figured it out eventually and it is supposed to be following.
Another major issue is that I have Java 11 installed on my system but I came to know that IntelliJ IDE can only be opened on Java 8. Considering everything plays well with Java 8 I might switch back to it for time being.
Eventually, I was able to build the project by setting JAVA_HOME to IntelliJ’s JRE folder. But the plugin didn’t appear.
November 5th, 2018
I enrolled in the Data Structure and Algorithm specialization at Coursera. I hope to finally finish it this time. I went through the week one course material of the course. There were two problems in the week one. Solution and how to approach them were provided in the PDF form.
Solving an algorithm involves the following step.
- Read the problem
- Design algorithm
- Implement algorithm
- Test and debug the algorithm
The second part of week one explains the concept of stress testing. The steps of it is as follows.
- Implementation of an algorithm.
- A naive implementation of the same problem.
- Testing against a large set of input.
- Check if both fast and naive implementations results in the same solution.
October 31st, 2018
It’s the last day of the tenth month of twenty eighteen. The statement has sufficient weightage to deserve its own space on this daily log.
Today, I worked on the paging library for my Genius app. One of the issues that I am facing is that the data on main list changes frequently and I want to make sure that I am not force downloading data more than it needs to be. As I don’t have control over the data I have limited options on how to fix this issue.
The paging sample from the codelab has quite an interesting code. It uses lambda function extensively, implements infinite scrolling and also implements the network state for retrofit.
While searching for a solution for my issue I also came across Etag which means that data is returned only if any changes have been done on the backend otherwise 304 is returned.
October 6th, 2018
I happen to revisit the concept of properties in Kotlin. Parameter, property, backing field, backing property, etc. make the complicated landscape of Kotlin variable declaration.
Backing properties in Kotlin has done a good job explaining all the terms mentioned earlier.
Google has also released a Coroutine codelab at the KotlinConf 2018.
September 15th, 2018
Yesterday, I happen to attend the BlrKotlin September Meetup. We learned Spek framework for testing and for the later half we delved into the Kotlin Coroutines.
I can see myself use Spek framework now that I know basics of it even if it takes a little bit extra time. It’s code pretty much looks like English.
The focus of the meetup was solving Conway’s Game of Life. This was the first time I looked into how the Game of Life worked. I plan to implement the code myself at some point of time.