How-To

Learn how to use Kotlin delegates to defer your interface implementation and reduce code!

Kotlin supports a beautiful feature called delegation. According to the docs:

Kotlin supports “delegation” design pattern by introducing a new keyword “by”. Using this keyword or delegation methodology, Kotlin allows the derived class to access all the implemented public methods of an interface through a specific object.

Key points from this:

  1. Delegation is achieved using ‘by’
  2. The derived class can access all the public methods of an interface via an object.

Ok, so what does it mean?

Let me explain in detail.

Use-Case: We want access to the currently signed in user from the UI to show the user’s name (let’s say). …


Android

Google has released this very easy to use library to store shared preferences securely

At some point in time of your Android Development, you’ll be faced with this problem, is my app secure? Am I storing the important stuff securely? If you’re not faced with these questions, then you should.

Store server JWT token

These days, servers are becoming stateless where the server doesn’t remember who you are and what is your authentication status. So, the clients have to send a token, or some authentication on each API call to authenticate.

The first time a user logs in, the server sends a token back to the client. This needs to be preserved by the client, securely. If someone…


Performance Management

We all need people who will give us feedback. That is one of the ways we improve. In the workplace, feedback becomes even more critical for addressing performance gaps and recognizing exemplary work…

Criticism, like rain, should be gentle enough to nourish a man’s growth without destroying his roots.

-Frank A Clark

We all need people who will give us feedback. That is one of the ways we improve. In the workplace, feedback becomes even more critical for addressing performance gaps and recognizing exemplary work. Till date, feedbacks are the most flexible and efficient tool available for getting results from our people.

The Two Types Of Regular Feedback

Frequent feedback is necessary for employees. Please don’t assume that even your top performer knows well what they are doing or what they are doing right.

Jamie Harris says,

“The higher…


Performance reviews are an integral part of Performance Management. Circumstances and priorities can shift or alter over time, and gaps form if the employees are unable to keep up with the change. To solve this problem, many companies are implementing more flexible performance cycles.

The review session is a time-bound formal process while assessing performance and providing feedback is a continual process.

Periodic check-in sessions are essential to help you:

1. Stay Grounded In Goals

Monitoring progress towards goals offers the opportunity to reassess and revise the targets based on the circumstances.

2. Recognise And Reinforce Strong Performace

People always welcome positive feedback about their work and performance. Research says, giving…


Performance Management

Creating goals that teams and organisations will accomplish isn’t just a matter of defining what needs doing; you also have to spell out the specifics of getting it done

As Social Psychologist Heidi Grant says in ‘Get Your Team to Do What It Says It’s Going to Do’:

Creating goals that teams and organizations will accomplish isn’t just a matter of defining what needs doing; you also have to spell out the specifics of getting it done because you can’t assume that everyone involved will know how to move from concept to delivery.

Creating goals that teams and organizations will accomplish isn’t just a matter of defining what needs doing; you also have to spell out the specifics of getting it done because you can’t assume that everyone involved…


Performance Management

As a founder or a manager, defining the goals for the employees is one of your key responsibilities

As a founder or a manager, defining the goals for the employees is one of your key responsibilities. From a logical perspective, goal setting should be a top-down process that begins with the company’s goals and cascades down from top ranks to the bottom line of the workforce.

However, the downside of the ‘cascading goal’ is the fact that the employees do not feel a sense of ownership. They feel stuck as they can’t set their goals, and that doesn’t motivate them enough. …


Performance Management

The SMART test constructs the goal appropriately; however, it may not mean that goal is valuable to the company or organisation.

As a founder or a manager, one is accountable for ensuring that the employees produce results that align with the needs of the organisation. The stepping stone to achieve the desired effect to set the goals — effective ones.

Defining goals is critical because these goals define the results, and ensure the employees spend their time and energy on things that matter the most to them and your organisation.

The most common criterion used for defining goals is SMART — Specific, Measureable, Attainable, Realistic and Time-Bound.

The SMART test constructs the goal appropriately; however, it may not mean that goal…


Humour

“So… How does it feel to work for yourself?” — this is something I get asked too often since I started to venture into my startup

“So… How does it feel to work for yourself?” — this is something I get asked too often since I started to venture into my startup. So I thought to myself, let me do a roundup of all the feelings that catch me now and then.

After completing my MBA and working for a couple of years, the first few months were nothing less than a blessing. There was so much — these so-called “Good Vibes” — peace, positivity, fresh perspective, zeal and the will to change the world, the industry and to top it all — become a better…


Android

How to access Retrofit or custom parameters in an Android RxWorker class. I’ll guide you step by step how we can achieve that using Dagger. Read on!

WorkManager is the latest solution by google which is very helpful in running background tasks. Under the hood it uses a combination of JobScheduler (API 23+) and BroadcastReceiver + AlarmManager (API 14–22). This basically creates a very powerful solution for scheduling or performing immediate background tasks along with constraints like Network, Disk Space etc. If you’re not familiar about the WorkManager, I suggest you do a WorkManager Codelab first.

Before we start, this article is for people who are familiar with Dagger 2 and have implemented Dagger 2 in their project.

That being said, we not here to discuss WorkManager…


Android

If you’re building an application that has a considerable amount of local database usage with a lot of tables, you will come across this problem at least once where you need to write custom queries

Room Database is an excellent solution by Google which makes our life a lot easier using the Sqlite Database on Android Devices. It uses the approach of Spring style JPA objects called Entities and it does it very well. At the ground level,each entity object = 1 table in the database. It can even handle joins and nested objects very well using @Relations and @Embedded annotations.

But what about custom queries and custom objects which don’t necessarily point to a single table? Let’s find out how.

Enter @RawQuery

The official docs say,

RawQuery serves as an escape hatch where you can build…

Wonderquill

Write To Relate

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store