ki is a Kotlin Interactive Shell developed by the folks at JetBrains.

One of my colleagues recently shared a neat little Ruby script to get an ad-hoc localhost webpage up and running with all deeplink URLs.

We’ll be doing a similar exercise with ki.

Even though ktor would be the popular choice for this article only for simplicity sake (number of modules to be loaded to get things up and running), I’ll be using as the web framework of choice.

Let’s get started

A very helpful feature of ki is that you can import libraries on the fly. Let’s import javalin…


Merry Christmas everyone! https://youtu.be/zHXaxeEYk6c

This article is #8 in Goodpatch’s Advent Calendar 2020🎄.

2020 has been tough for everyone. We are eagerly waiting for it to conclude and the good thing is we’re almost there! Since it’s getting pretty chilly around here, I thought it would be nice sharing snippets of few of my Jetpack Compose implementations as I sip over a Cup of Hot Chocolate playing Monster Hunter XX on my Switch.

Just a heads up, I will be updating this article timely as I share few more snippets in the future as Compose keeps growing.
Also, the snippets I am sharing aren’t…


Haven’t played Monster Hunter tri, but visually this was my favourite

While I was going through on how to make HTTP calls in Swift with Alamofire and subsequent URLSession tutorials, the HTTP calls looked something like,

While Alamofire does a pretty impressive job in cutting down a lot of the boilerplate, I soon realised that for projects with a lot many HTTP calls, maintenance of the API functions could be a lot easier if the generation of the Request URL and processing of response in are separated.

Being an Android developer, I’m very used to how Retrofit (Android’s goto Networking Library) lets us separate the HTTP call URL generation…


Alatreon: The Blazing Black Dragon

In most cases, we use as follows

<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:navigationIcon="@drawable/ic_arrow"
app:title="@string/screen_title"
app:titleTextAppearance="@style/ToolbarTitle" />

where we set the title and title’s style in the layout xml itself.

Let’s consider the following use case:


Gold Mother Goddess of Monster Hunter World. She’s regality personified.

Of recent I’ve come across AppleScript and its niceties. It’s a neat scripting language one can use to get tasks done on your macOS devices. There are some very good resources for learning AppleScript. This is going to be couple of articles I discuss how I came about making an MVP version of a Password Manager using AppleScript.

Part 1 is about the core mechanism of a functioning Password Manager i.e., Password Generation, storage and retrieval.

Part 2 will be how all these can be put together as an Application.

Password Generation ⚙️

For password generation logic I’m keeping it pretty simple. Out…


Charge Blade ❤️the most complex weapon in the Monster Hunter

I was reading on Haskell and came across three terms in the functional programming universe, , and . There’s a very well written & illustrated article on the three. I’ll be using the images from this article and explaining about the three in terms.

Functors

Suppose we have the following datatype which acts as a container to a and we have a normal function which adds 3 to an .

data class Something<out T> (val value: T)fun add3(x: Int): Int = x + 3

Now, there’s no way we can implement outside the context of


That’s me in Monster Hunter World 😅

Kotlin, with all the wonderful magic dust it has sprinkled over us Android Developers, has lot going on underneath. This article takes a look at some of the interesting Kotlin Bytecode generated when you write your beautiful Kotlin code.

“${..}”

Let’s take a look at a string formatting example,

Here, we see that when we do a string formatting, underneath it gets converted into a and all the non-string parts are appended.

companion object {..}

Let’s take a look at which is widely used when we want constants.

val in companion object

We can globally access . We…

Suraj Sau

Android Developer. 日本語勉強中。한국어를 공부하고.

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