How to turn off screen transitions Kotlin Multiplatform

In this article we will find answers to the following questions: Suppose we have the following navigation host: All we need to do is to set up value for enterTransition and exitTransition. If needed, you may want to look at popEnterTransition and popExitTransition as well. In this example we just turn off the transitions:

READ MORE

Kotlin Multiplatorm min window size

Unfortunately, it seems that Kotlin Multiplatform doesn’t support setting minimum window size for the desktop right now, however, there is a workaround. In this article we will find an answer to the following questions: Suppose we have some window with size: So the idea is to add listener for size changes and adjust it given […]

READ MORE

Auth 101: Your Guide to AuthN, AuthZ, and Friends

I had a serious conversation with my dad the other day. He poured me a glass of whiskey, and said gravely: it’s time. You should overcome your fears and sort Auth stuff out. In this article we will be answering questions as following: Services and concepts that we will be exploring include:(1) AuthN, (2) AuthZ, […]

READ MORE

AWS Nodejs14.x is no longer supported

Suppose you run into this exception while deploying your infrastructure using CDK v1 code to AWS: And you think: wait, I don’t have any lambdas, why do I keep receiving this? The thing is that CDK v1 implicitly creates lambda functions to support some functionality. For example, when you create S3 bucket this way: CDK […]

READ MORE

Reading AWS Kinesis Data Stream messages from the console

Suppose we want to read AWS Kinesis Data Stream messages from the console. We can make it happen, as long as we have AWS CLI installed and configured. Get main stream information: Get stream shard list: For intance, we want to read shardId-000000000000. We should get shard iterator for the beginning of the stream for […]

READ MORE

Solving Django N+1 problem

In this article, you will find answers to the following questions: Optimizing Django model relation queries with select_related and prefetch_related When working with Django models, you may run into inefficient queries. This can have a significant impact on performance, especially when dealing with large datasets. Django’s select_related and prefetch_related methods are powerful tools to improve […]

READ MORE

Python build object from json and back

Suppose you need to have bilateral conversion from json to object and vice versa. So, in this article you’ll find out how to: Build object from json Convert object to json If you need to rename some of the properties in the target json, you can make it this way: Here you go!

READ MORE

Safe database migrations in Django

The simple process of renaming a DB column becomes more complex when DB migrations in specific scenarios are applied before code updates by pipeline. It means that there may be a timeframe, when the “old” code will be running against the “new” database. Therefore, using the built-in Django rename functionality will lead to errors. “Old“ […]

READ MORE

gRPC cannot assign requested address

Suppose you just run into this exception, saying that gRPC cannot assign requested address: TL;DR: most likely you opened too many connections, and you run out of ephemeral ports. Consider channel/stub reuse: https://mchesnavsky.tech/grpc-channel-stub-reuse. Details: first, we should distinguish between fixed ports, and ephemeral ports. Ephemeral ports are typically used by client devices initiating communication with […]

READ MORE

gRPC channel / stub reuse

Creating new gRPC channels and stubs involves establishing connections and negotiating capabilities with the server. Reusing them eliminates this overhead for subsequent calls. By keeping connections alive, you avoid the initial handshake delay for each RPC, leading to faster communication. However, you should ensure that reusing the channel doesn’t create a bottleneck in your application. […]

READ MORE