# vadzimv Dev Blog

Blog of a curious developer.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## OutOfMemoryError on Android: heap dump recording

DevFeed: [OutOfMemoryError on Android: heap dump recording](<https://devfeed.tech/articles/outofmemoryerror-on-android-heap-dump-recording-26142.md>)

Original publisher: [Read original article](<https://vadzimv.dev/2024/01/07/oom-android-heap-dump-recording.html>)

Author: Vadzimv Dev Blog

Published: 2024-01-07T11:00:00Z

Content type: tutorial

Language: en

Sources: [vadzimv Dev Blog](<https://devfeed.tech/sources/vadzimv-dev-blog.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [debugging](<https://devfeed.tech/topics/debugging.md>), [Java](<https://devfeed.tech/topics/java.md>), [Memory Leaks](<https://devfeed.tech/topics/memory-leaks.md>), [Android Studio](<https://devfeed.tech/topics/android-studio.md>), [Crashlytics](<https://devfeed.tech/topics/crashlytics.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-studio](<https://devfeed.tech/tags/android-studio.md>), [debugging-tools](<https://devfeed.tech/tags/debugging-tools.md>), [firebase](<https://devfeed.tech/tags/firebase.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [java](<https://devfeed.tech/tags/java.md>), [memory-leak](<https://devfeed.tech/tags/memory-leak.md>)

### AI overview

This tutorial explains how to automatically record a Java heap dump when an OutOfMemoryError occurs in an Android application. It covers heap-dump collection, uncaught-exception handling, Android storage, and subsequent analysis.

### Source excerpt

Learn how to record a Java heap dump at the moment of OutOfMemoryError.

## Notes from the "Pragmatic Programmer" book

DevFeed: [Notes from the "Pragmatic Programmer" book](<https://devfeed.tech/articles/notes-from-the-pragmatic-programmer-book-26141.md>)

Original publisher: [Read original article](<https://vadzimv.dev/2023/05/21/pragmatic-programmer-book.html>)

Author: Vadzimv Dev Blog

Published: 2023-05-21T07:30:00Z

Content type: article

Language: en

Sources: [vadzimv Dev Blog](<https://devfeed.tech/sources/vadzimv-dev-blog.md>)

Topics: [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [Requirements](<https://devfeed.tech/topics/requirements.md>), [Development](<https://devfeed.tech/topics/development.md>), [Tool](<https://devfeed.tech/topics/tool.md>), [Test coverage](<https://devfeed.tech/topics/coverage.md>)

Tags: [advice](<https://devfeed.tech/tags/advice.md>), [book](<https://devfeed.tech/tags/book.md>), [metrics](<https://devfeed.tech/tags/metrics.md>), [notes](<https://devfeed.tech/tags/notes.md>), [requirements](<https://devfeed.tech/tags/requirements.md>), [software](<https://devfeed.tech/tags/software.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [tests](<https://devfeed.tech/tags/tests.md>), [tools](<https://devfeed.tech/tags/tools.md>)

### AI overview

The author shares notes and reflections from The Pragmatic Programmer, emphasizing that software should solve users' business problems, requirements should be tied to clear goals, teams should value collaboration, and developers should continually learn and manage their knowledge deliberately.

### Source excerpt

Notes from the "Pragmatic Programmer" book

## Detect small memory leaks

DevFeed: [Detect small memory leaks](<https://devfeed.tech/articles/detect-small-memory-leaks-26140.md>)

Original publisher: [Read original article](<https://vadzimv.dev/2022/10/10/detect-small-memory-leaks.html>)

Author: Vadzimv Dev Blog

Published: 2022-10-10T08:20:00Z

Content type: tutorial

Language: en

Sources: [vadzimv Dev Blog](<https://devfeed.tech/sources/vadzimv-dev-blog.md>)

Topics: [Memory Leaks](<https://devfeed.tech/topics/memory-leaks.md>), [Android](<https://devfeed.tech/topics/android.md>), [App](<https://devfeed.tech/topics/app.md>), [SDK](<https://devfeed.tech/topics/sdk.md>)

Tags: [analysis](<https://devfeed.tech/tags/analysis.md>), [android](<https://devfeed.tech/tags/android.md>), [applications](<https://devfeed.tech/tags/applications.md>), [batch](<https://devfeed.tech/tags/batch.md>), [memory-leaks](<https://devfeed.tech/tags/memory-leaks.md>), [sdk](<https://devfeed.tech/tags/sdk.md>), [trace](<https://devfeed.tech/tags/trace.md>)

### AI overview

This tutorial explains how to detect small, long-term memory leaks in Android applications by recording memory traces, reviewing process RSS in Perfetto, and using queries and batch processing to analyze multiple traces.

### Source excerpt

Detect small memory leaks in Android applications.

## Slow unit tests: objects mocking

DevFeed: [Slow unit tests: objects mocking](<https://devfeed.tech/articles/slow-unit-tests-objects-mocking-26139.md>)

Original publisher: [Read original article](<https://vadzimv.dev/2022/06/03/slow-unit-tests-part-1-objects-mocking.html>)

Author: Vadzimv Dev Blog

Published: 2022-06-03T09:00:00Z

Content type: article

Language: en

Sources: [vadzimv Dev Blog](<https://devfeed.tech/sources/vadzimv-dev-blog.md>)

Topics: [Mocking](<https://devfeed.tech/topics/mocking.md>), [unit test](<https://devfeed.tech/topics/unit-test.md>)

Tags: [junit](<https://devfeed.tech/tags/junit.md>), [mocking](<https://devfeed.tech/tags/mocking.md>), [tests](<https://devfeed.tech/tags/tests.md>), [unit-tests](<https://devfeed.tech/tags/unit-tests.md>)

### AI overview

This article measures factors that affect unit-test execution time, focusing on object mocking. It compares a baseline with real objects, manually written test doubles, and mocking libraries such as Mockito and Mockk. In the reported measurements, Mockito significantly increased execution time when creating the first mock, while repeated mocks and behavior verification had little additional cost.

### Source excerpt

What does make unit tests slow? Is it objects mocking?

## Notes from the "Test Driven Development by example" book

DevFeed: [Notes from the "Test Driven Development by example" book](<https://devfeed.tech/articles/notes-from-the-test-driven-development-by-example-book-26138.md>)

Original publisher: [Read original article](<https://vadzimv.dev/2022/04/07/notes-from-tdd-by-example.html>)

Author: Vadzimv Dev Blog

Published: 2022-04-07T10:00:00Z

Content type: opinion

Language: en

Sources: [vadzimv Dev Blog](<https://devfeed.tech/sources/vadzimv-dev-blog.md>)

Topics: [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Test coverage](<https://devfeed.tech/topics/coverage.md>), [Refactoring](<https://devfeed.tech/topics/refactoring.md>), [modules](<https://devfeed.tech/topics/modules.md>)

Tags: [development](<https://devfeed.tech/tags/development.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [tdd](<https://devfeed.tech/tags/tdd.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>)

### AI overview

Personal notes on Kent Beck's Test Driven Development: By Example, covering how automated tests can reduce stress and errors, how TDD influences testing, and techniques for improving test coverage through simplification and refactoring.

### Source excerpt

My notes after reading the Test Driven Development: By Example book

## Android Native Text

DevFeed: [Android Native Text](<https://devfeed.tech/articles/android-native-text-26137.md>)

Original publisher: [Read original article](<https://vadzimv.dev/2021/10/01/android-native-text.html>)

Author: Vadzimv Dev Blog

Published: 2021-10-01T09:00:00Z

Content type: tutorial

Language: en

Sources: [vadzimv Dev Blog](<https://devfeed.tech/sources/vadzimv-dev-blog.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [unit test](<https://devfeed.tech/topics/unit-test.md>), [Localization (l10n)](<https://devfeed.tech/topics/localization.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [locale](<https://devfeed.tech/tags/locale.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unit-testing](<https://devfeed.tech/tags/unit-testing.md>)

### AI overview

This tutorial explains how to handle Android string and plural resources in view models while avoiding stale text after configuration or language changes. It recommends storing resource IDs and arguments in view models, resolving localized text in the UI, and unit-testing the resulting parameters without directly interacting with the Android framework.

### Source excerpt

How to use Android String and Plurals resources in a View Model + Unit testing them.

## Rules of painless unit tests

DevFeed: [Rules of painless unit tests](<https://devfeed.tech/articles/rules-of-painless-unit-tests-26136.md>)

Original publisher: [Read original article](<https://vadzimv.dev/2021/09/30/painless-unit-tests.html>)

Author: Vadzimv Dev Blog

Published: 2021-09-30T07:00:00Z

Content type: tutorial

Language: en

Sources: [vadzimv Dev Blog](<https://devfeed.tech/sources/vadzimv-dev-blog.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [Refactoring](<https://devfeed.tech/topics/refactoring.md>)

Tags: [refactor](<https://devfeed.tech/tags/refactor.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>), [unit-tests](<https://devfeed.tech/tags/unit-tests.md>)

### AI overview

An article presents practical rules for writing useful unit tests that remain stable during refactoring. It recommends testing systems through their public APIs, keeping tests specific, isolating external factors, using test doubles appropriately, avoiding overspecification and implementation-detail checks, and using factory methods for test objects.

### Source excerpt

Rules that make unit tests useful.

## Notes from the Clean Architecture book

DevFeed: [Notes from the Clean Architecture book](<https://devfeed.tech/articles/notes-from-the-clean-architecture-book-26135.md>)

Original publisher: [Read original article](<https://vadzimv.dev/2021/09/28/notes-from-clean-architecture-book.html>)

Author: Vadzimv Dev Blog

Published: 2021-09-28T09:30:00Z

Content type: article

Language: en

Sources: [vadzimv Dev Blog](<https://devfeed.tech/sources/vadzimv-dev-blog.md>)

Topics: [maintenance](<https://devfeed.tech/topics/maintenance.md>), [Code](<https://devfeed.tech/topics/code.md>), [releases](<https://devfeed.tech/topics/releases.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [article](<https://devfeed.tech/tags/article.md>), [clean-architecture](<https://devfeed.tech/tags/clean-architecture.md>), [notes](<https://devfeed.tech/tags/notes.md>)

### AI overview

Notes on selected topics from the Clean Architecture book, focusing on component cohesion principles and acyclic dependencies. The article explains trade-offs among the Reuse/Release Equivalence, Common Closure, and Common Reuse principles, and describes how versioned components and ownership can support independent development.

### Source excerpt

New things that I found in the Clean Architecture book.

## How to choose and automate the lint dependency version for a custom Android lint rule

DevFeed: [How to choose and automate the lint dependency version for a custom Android lint rule](<https://devfeed.tech/articles/pick-lint-version-26134.md>)

Original publisher: [Read original article](<https://vadzimv.dev/2021/07/28/calculate-lint-version.html>)

Author: Vadzimv Dev Blog

Published: 2021-07-28T15:00:00Z

Content type: tutorial

Language: en

Sources: [vadzimv Dev Blog](<https://devfeed.tech/sources/vadzimv-dev-blog.md>)

Topics: [Android Gradle Plugin](<https://devfeed.tech/topics/android-gradle-plugin.md>), [Android](<https://devfeed.tech/topics/android.md>), [Development](<https://devfeed.tech/topics/development.md>), [Automation](<https://devfeed.tech/topics/automation.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [automation](<https://devfeed.tech/tags/automation.md>), [dependency](<https://devfeed.tech/tags/dependency.md>), [gradle-plugin](<https://devfeed.tech/tags/gradle-plugin.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [implement](<https://devfeed.tech/tags/implement.md>), [lint](<https://devfeed.tech/tags/lint.md>)

### AI overview

This tutorial explains how to choose a lint dependency version for a custom Android lint rule by deriving it from the Android Gradle Plugin version. It also describes automating the calculation through project properties and dependencies.

### Source excerpt

How to pick lint dependency version when you implement a custom lint rule for Android project.

## Navigate without crashes using Android Jetpack Navigation

DevFeed: [Navigate without crashes using Android Jetpack Navigation](<https://devfeed.tech/articles/navigate-without-crashes-using-android-jetpack-navigation-26133.md>)

Original publisher: [Read original article](<https://vadzimv.dev/2021/07/26/android-jetpack-navigation-navigate-safe.html>)

Author: Vadzimv Dev Blog

Published: 2021-07-26T16:00:00Z

Content type: tutorial

Language: en

Sources: [vadzimv Dev Blog](<https://devfeed.tech/sources/vadzimv-dev-blog.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Jetpack](<https://devfeed.tech/topics/jetpack.md>), [Error Handling](<https://devfeed.tech/topics/error-handling.md>), [Exception](<https://devfeed.tech/topics/exception.md>), [App](<https://devfeed.tech/topics/app.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-jetpack](<https://devfeed.tech/tags/android-jetpack.md>), [app](<https://devfeed.tech/tags/app.md>), [crash](<https://devfeed.tech/tags/crash.md>), [error-handling](<https://devfeed.tech/tags/error-handling.md>), [exception](<https://devfeed.tech/tags/exception.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-navigation](<https://devfeed.tech/tags/jetpack-navigation.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

This tutorial explains how to use Android Jetpack Navigation safely in production. It recommends wrapper functions that handle navigation exceptions, log failures without treating them as crash reports, and use navigation actions to prevent duplicate navigation from simultaneous clicks.

### Source excerpt

Do not crash an app during navigation. Navigate safely.