Skip to content
tezvyn:

All bites

The whole library, newest first. Filter by what you are here for, or pick a topic if you already know.

8668 bites

Page 227

Gradle Build Types vs. Product Flavors
Android & Kotlin2 min read

Gradle Build Types vs. Product Flavors

This tests your understanding of Gradle's build matrix for creating different app versions. A great answer defines build types (how it's built) vs. flavors (what is built) and explains that variants are the cross-product. A red flag is confusing their roles.

What is the Android Debug Bridge (ADB)?
Android & Kotlin2 min read

What is the Android Debug Bridge (ADB)?

This tests practical command-line proficiency and understanding of the host-device link. A good answer defines the client-server-daemon architecture and gives two commands like adb install and adb logcat.

How do you debug a running app's view hierarchy?
Android & Kotlin2 min read

How do you debug a running app's view hierarchy?

Tests practical debugging skills. A good answer names the Layout Inspector, describes the component tree and attributes panes, and explains how the 3D view finds hidden elements. A red flag is only naming the tool without explaining its use.

Explain Gradle product flavors with a free/pro app example
Android & Kotlin2 min read

Explain Gradle product flavors with a free/pro app example

This tests your grasp of the build variant matrix, not just flavors. A great answer defines flavors, explains how they combine with build types, details Gradle config (applicationIdSuffix), and mentions source sets.

How do you debug an app crash in Android Studio?
Android & Kotlin2 min read

How do you debug an app crash in Android Studio?

Tests your systematic problem-solving process. A great answer outlines reproducing the crash, analyzing the Logcat stack trace for the FATAL EXCEPTION, and then using strategic breakpoints and the variable inspector to find the root cause of the bad state.

Explain the res/ directory and resource qualifiers for layouts
Android & Kotlin2 min read

Explain the res/ directory and resource qualifiers for layouts

Tests your grasp of Android's core resource system. A good answer defines res/ for non-code assets, explains how qualifiers like layout-land match device state, and provides a concrete example.

Project-level vs. module-level build.gradle files
Android & Kotlin2 min read

Project-level vs. module-level build.gradle files

This tests your grasp of Gradle's project/module structure. A good answer defines the project-level file for global settings (repositories, plugins) and the module-level for specifics (SDK versions, dependencies). A red flag is confusing their roles.

Describe the purpose of the AndroidManifest.xml file
Android & Kotlin2 min read

Describe the purpose of the AndroidManifest.xml file

This tests if you view the manifest as a contract with the OS. Define its role, then list key elements like components (<activity>), permissions (<uses-permission>), and hardware features. A red flag is just listing tags without explaining their purpose.

Implement a type-safe DSL in Kotlin for a UI component
Android & Kotlin2 min read

Implement a type-safe DSL in Kotlin for a UI component

Tests understanding of Kotlin's type-safe builders via lambdas with receivers. A great answer defines model classes, creates a top-level builder function taking a Receiver.() -> Unit lambda, and defines nested builder methods.

Explain Kotlin's `reified` type parameters and their use case
Android & Kotlin2 min read

Explain Kotlin's `reified` type parameters and their use case

Tests your grasp of JVM type erasure and Kotlin's solution. A great answer defines reified as making a generic type's Class accessible at runtime, explains this requires an inline function to substitute the type at the call site, and shows an example.

How does coroutine cancellation work internally?
Android & Kotlin2 min read

How does coroutine cancellation work internally?

This tests your grasp of cooperative cancellation. Explain that cancel() sets a flag, causing a CancellationException at the next suspension point. A non-suspending loop must explicitly check isActive to stop.

Explain backpressure in Kotlin Flows and its management operators
Android & Kotlin2 min read

Explain backpressure in Kotlin Flows and its management operators

This tests your understanding of Flow's sequential nature and strategies for decoupling producers and consumers. Explain default suspension, then detail buffer(), conflate(), and collectLatest(). A red flag is confusing conflate() with collectLatest().

Explain Kotlin's declaration-site variance with in and out
Android & Kotlin2 min read

Explain Kotlin's declaration-site variance with in and out

This tests your grasp of generic type safety and API design. Explain that out marks covariant producers (e.g., List<out E>) and in marks contravariant consumers, then contrast this cleaner declaration-site model with Java's repetitive use-site wildcards.

What is a CoroutineDispatcher and when to use IO vs Default?
Android & Kotlin2 min read

What is a CoroutineDispatcher and when to use IO vs Default?

Tests your grasp of thread pool strategy for CPU vs. I/O-bound tasks. A good answer defines Dispatchers, contrasts the fixed-size Default pool (for CPU work) with the larger IO pool (for blocking I/O), and gives clear examples.

Hot vs. Cold Streams: StateFlow vs. Flow in Android
Android & Kotlin2 min read

Hot vs. Cold Streams: StateFlow vs. Flow in Android

This tests your grasp of stream lifecycles. A great answer defines cold Flow (lazy, per-collector) vs. hot StateFlow (active, shared state) and uses a ViewModel UI state scenario. A red flag is mischaracterizing a Flow as a one-time operation.

Explain Structured Concurrency in Kotlin Coroutines
Android & Kotlin2 min read

Explain Structured Concurrency in Kotlin Coroutines

Tests your grasp of coroutine lifecycle management. A great answer defines the parent-child relationship within a CoroutineScope, explains cancellation propagation, and details how exceptions cancel the entire hierarchy.

Explain Kotlin's five scope functions: let, run, with, apply, also
Android & Kotlin2 min read

Explain Kotlin's five scope functions: let, run, with, apply, also

This tests your grasp of idiomatic Kotlin. A great answer categorizes functions by their context object (this/it) and return value (object/lambda result). Provide a clear use case for apply (object configuration).

What is a Kotlin `suspend` function and how does it work?
Android & Kotlin2 min read

What is a Kotlin `suspend` function and how does it work?

Tests your grasp of Kotlin's non-blocking concurrency. A great answer defines a suspend function as pausable, states its two calling rules (from another suspend function or coroutine builder), and mentions the compiler's CPS transformation.

Explain launch vs. async in Kotlin Coroutines
Android & Kotlin2 min read

Explain launch vs. async in Kotlin Coroutines

Tests your grasp of structured concurrency, return values, and exceptions. launch is for fire-and-forget tasks (returns Job), while async is for tasks that produce a result (returns Deferred).

What problem does `inline` solve, and how does `reified` relate?
Android & Kotlin2 min read

What problem does `inline` solve, and how does `reified` relate?

This tests your grasp of Kotlin compiler optimizations and JVM type erasure. Explain that inline eliminates the runtime overhead of lambda objects. Then, describe how reified leverages inlining to make generic types accessible at runtime.