The Last Days of my Total Time Freedom
Tags: android, learning, 100daysofcode
Published: 2023-09-05 08:32:08

Roughly 1 month ago, I took a challenge for myself that focuses on learning and building in public. It’s time to reflect on what I’ve achieved.

I focused on learning and building, so writing blogs was not a priority. And I decided that today is the best time to make a review of my past 2 weeks.

## Learned

Lately, I’ve been learning Kotlin coroutines and flow. It was more of a quick introduction to this topic because I plan to learn databases, so I’ll need to understand it. Although now I’d want to do things differently, it was interesting to dip my toe into reactive programming.

Coroutines are scheduled code within a thread. And the fact that a new thread is not necessarily started confuses me. For now, the traditional way of multithreading with threads and callbacks is actually more clear and readable for me. But I’m sure that’s only because I haven’t worked with coroutines much, especially in the practical setting.

When it comes to flows, they are essentially placeholders for values that come in a certain period of time. That’s why they are called streams of data.

I also learned the Compose Navigation library that is AFAIU here just for convenience so that we don’t need to hold everything in state, write a huge `when` expression, manually deal with animations, and manually integrate with other Jetpack Compose components.

I also was surprised by the simplicity of MVI. Met this thing unexpectedly. So the main idea is that you put all the states in one data class as plain `val`s and then put the whole class to a single state. First, I doubted how optimized this approach is, because I thought that an update to a state would cause unnecessary recompositions. But this turned out to be not true because they are skippable as Compose is smart enough. This is not true about xml views though. However, MVI introduces some hassle if you want to save the state to the `SavedStateHandle` and can also cause race conditions [[source](https://youtu.be/cnU2zMnmmpg?si=suJTdt2hcs7dB1jc)] so I think I’m good with MVVM for now.

## Resources

Here are some resources that helped me learn this.

### Coroutines

1. [Introduction to coroutines](https://developer.android.com/codelabs/basic-android-kotlin-training-introduction-coroutines)
2. [Use Kotlin Coroutines in your Android App](https://developer.android.com/codelabs/kotlin-coroutines?authuser=1)
3. [5 Fatal Coroutine Mistakes Nobody Tells You About](https://youtu.be/cr5xLjPC4-0?si=10dRemzPBdhMh1Lm)

### Flow

1. [Kotlin Flow: Simple yet Powerful Implementation](https://dev.to/aniketbhoite/kotlin-flow-simple-yet-powerful-implementation-39jp) — This helped me understand how they actually work.
2. [The Ultimate Guide to Kotlin Flows](https://www.youtube.com/playlist?list=PLQkwcJG4YTCQHCppNAQmLsj_jW38rU9sC)

<table>
  <tr>
    <th>⚠️ However, I rethought my learning approach.</th>
  </tr>
  <tr>
    <td>According to <a href="https://dev.to/danielrendox/the-art-of-balancing-learning-and-building-45fa">my new mindset</a>, I should’ve begun with the following pathways right away. ⬇️ Especially given that they do not require knowledge of coroutines and flow. It is actually taught there.<br><br>1. Android Basics with Compose — <a href="https://developer.android.com/courses/android-basics-compose/unit-5">Unit 5: Connect to the internet.</a><br>2. Android Basics with Compose — <a href="https://developer.android.com/courses/android-basics-compose/unit-6">Unit 6: Data persistence.</a></td>
  </tr>
</table>

### + [Jetpack Compose Navigation Codelab](https://developer.android.com/codelabs/jetpack-compose-navigation?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fjetpack-compose-for-android-developers-3%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fjetpack-compose-navigation)

## Progress

I modified my roadmap a bit and now I’m in the middle of my path 🎉

1. Android basics
2. Kotlin
3. Jetpack Compose basics
4. Advanced state, side effects, and Gradle
5. Inline functions, testing, introduction to Coroutines and Flow ◀️
6. Databases and modularization
7. Interaction with remote API
8. Dependency injection
9. Architecture (MVVM, MVI) and other stuff

---

![Two lables and progress bars: 1. Make my app — 8; 2. Learn android — 55%.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e44mus51cg5d661crpgm.jpg)

See that “Make my app — 5%”? I actually managed to let go and it doesn’t bother me. But what I contemplated is that it’s not OK. I can already write business logic and the UI, only then add data storage. I also shouldn’t care about best practices that much. So to stay both practical and motivated, I decided to focus on building now.

## Oh, and I entered a university

Actually, I did it in the summer, but the lectures traditionally start in September.

And that’s coming from a person who is a big fan of the practical approach and says that higher education is a scam. 🌚

I’m honestly, indeed very skeptical about the higher education for developers. But, first, it’s free for me. Second, here are my expectations in descending priority:

- **More opportunities to find a job.** I can get an internship or eventually go overseas.
- **Communication.** Very high chances of finding great friends.
- **Plan B.** Being self-taught and having a degree at the same time is a win-win, especially for someone of my age.
- **Get the foundation, support, and confidence.** However skeptical I was, that’s what schools do well.

This is insufficient for me to justify the amounts of money people spend. My time is already a significant investment! 😼

I used to spread the information that classes only would take ~6 hours a day. People felt sorry for me, but it actually turned out not true. 😆 I just confused some stuff. In reality, it’s about 4.5 h. And Friday is a day off.

I’m enjoying it so far and feel like my expectations are going to be met. Who knows, I may change my decision in the future.

## Performance (adjusted to 2 weeks)

### **[My challenge](https://dev.to/danielrendox/finding-my-blogging-path-lessons-from-my-journey-31d1#challenge)**

✔️ 7/10 tweets

✔️ 2/3 articles

### Healthy habits

I’d better not tell you 🤭

### Changes

So I allowed myself to fall behind a bit. And until now I’ve been only increasing my goals. But now that I’m not going to have that much time, I think it’s an opportunity to focus only on a few of them. And finally, get back to the comfort zone.

And I also have exactly four weeks until my challenge finishes. So now I don’t have room for error.

- No more tweets. I’ll tweet only when I want.
- I will do programming at least 6 days a week, but won’t count the hours anymore.
- Back to 1 article a week.
- Also deleted a couple of habits I already have, and switched to [HabitNow](https://play.google.com/store/apps/details?id=com.habitnow&hl=en_GB) for habit tracking.

## Ending

I wrote this article for myself mainly. But if you read this far, thanks for being interested in me. 🤗

If you're learning Android and struggling with some of these topics, you can DM me on [Twitter](https://twitter.com/DanielRendox) or email me ([daniel.rendox@gmail.com](mailto:daniel.rendox@gmail.com)) and we'll figure it out together.