Image for post
Image for post

An annotation is a form of syntactic metadata that provides data about a program but is not part of the program itself. Annotations have no direct effect on the operation of the code they are added to.

In Java, annotations can also be embedded in and read from Java class files generated by the Java compiler which allows annotations to be retained by the Java virtual machine at run-time and read via reflection.

Annotations can be used for the following:

  • Detect errors or suppress warnings e.g @Override and@SuppressWarnings.
  • Compile-time and deployment-time processing e.g code generation tools.
  • Runtime processing.

This article shows how to leverage custom annotations to mark specific web service requests for caching in Retrofit. This is because we usually have a single Retrofit instance to make web service requests to the server. Therefore, it is necessary to devise a means of identifying requests that should be cached. …


Image for post
Image for post

Firebase provides a powerful, simple, and cost-effective object cloud storage service. Also, the Firebase SDK adds Google security to file uploads and downloads. The SDK can be used to store images, files, videos, and other user-generated content.

This article seeks to achieve the following:

  • Leverage Firebase storage to upload and download files in an existing spring boot server deployed on Heroku.
  • Externalize Firebase service account configuration.

In my previous article, the Strategy design pattern was used to develop a spring-boot application that uploads and downloads files using either local file storage or AWS storage implementation depending on the specified profile(development or production). …


Image for post
Image for post
source: Android Developers Blog

The android work manager API runs deferrable, guaranteed background work when specified constraints are satisfied. The API also supports both asynchronous one-off and periodic tasks. For more about Android WorkManager, please read the following articles:

A Periodic WorkRequest is used to perform recurring deferrable tasks. This executes periodically with the first execution happening immediately the given Constraints are satisfied. …


Image for post
Image for post
Photo by Hassan Pasha on Unsplash

The Strategy design pattern is a behavioral software design pattern that defines a family of algorithms, encapsulates each one, and makes them interchangeable[1]. It enables the selection of the clients at runtime. The Strategy pattern is flexible since it defers the decision about which algorithm to use until runtime.

To find out more about the Strategy design pattern and the ideal scenarios for use, please see the reference section.

In this post, I’ll explain how I leveraged the strategy design pattern to solve my challenge.

Problem statement

To be able to handle multiple email clients and storage types depending on the environment or profile in which the application is running.
My project requires that Gmail client and local file storage be used for sending mails and storing files respectively while working locally[dev-profile]. …


Image for post
Image for post
source: JWT

Recently I started a small project which required authentication and authorization. As a Java developer familiar with spring boot, I decided to leverage on spring boot to deliver the goods.

One key decision I made early on was to use JWT for authentication and authorization as I have read about the stateless capacity of JWTs.

However, along the line, I encountered some issues and made some personal findings that form the core of this article.

Disclaimer: As the title suggests, the views expressed here are based on my experience with JWTs which is meant to elicit opinions and expand the discussion about JWTs and it’s inherent capacities. …


Image for post
Image for post
Photo by Olenka Kotyk on Unsplash

They cut her deep
She was so young and naive
She couldn’t restrain
Mothers danced and made merry
This would make her strong on this journey
At least they thought…

Years went by, the scars remain
Her seams begin to crack,
Nothing to hold on to
She’s been held hostage by a ritual
She’s been bruised and broken
by this psychologically tainted philosophy

Every night is a reminder
Of this never-ending horror.
The gentleness of his touch
And tenderness of his caress
Brings back ugly memories…


Image for post
Image for post
source: unsplash

He so hated him
He would vex at the sight of him
He’s not fit for a man, talk more of a father
He said!
Shameless, heartless and loveless
Were his traits

Deep down he hoped for a change
At least, to the days he was truly his hero
What happened is still a blur
And His future seems unsure

Same story, different people
Is it genetics or coincidence?
That he’s becoming the man he had despised…


As an engineering graduate, Newton’s laws of motion is an integral part engineering systems. For me, they are not mere scientific or engineering laws as I strongly believe that they are fundamental universal truths that cut across religion, race and creed, and upon which I try to live after.

Newton’s laws of motion describe the relationship between a body and the forces acting upon it, and its motion in response to those forces. …


Image for post
Image for post
source

When I talk to you, I’m in love
but when you come around, I feel lust
If you leave, I’ll be lost…


Image for post
Image for post
source: Android Developers Blog

Relation is a convenience annotation which can be used in a Pojo to automatically fetch relation entities. When the Pojo is returned from a query, all of its relations are also fetched by Room.

The type of the field annotated with Relation must be a List or Set. By default, the Entity type is inferred from the return type.

There are tons of resources on Room persistence library, you might want to check them out.

Problem Statement

The scenario we would explore in this article is that of a hypothetical publishing company that has several authors whose books they publish. Furthermore, these Authors may have one or more Books published by the publishing firm.
The above relationship can be best described as a nested one-to-many relationship. …

About

Ikhiloya Imokhai

Software Developer | imokhaiikhiloya@gmail.com | https://github.com/Ikhiloya | open to exciting projects

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