`Day 69` - ~Implement DataStore In <https://github...
# 100daysofkotlin-2021
b
Day 69
Implement DataStore In Daily Doc • Completed Leetcode problem: Longest Consecutive Seq
Self-Comment
• Started implementing Preference DataStore instead of Proto
Copy code
RANT :)
It's interesting to see all of the articles and comments of people suggesting to use DataStore over SharedPref, but no up-to-date examples or docs besides the android documentation.
Also, all of the content I came across has extremely simplistic samples that don't differ in any ways from others while also suggesting to use a DI library(Hilt), but do not use it themselves., which does not benefit me
I'm thinking that a big cause for being stumped is that my foundation is lacking. So incorporating new libraries that lack relevant samples becomes a huge obstacle as I don't have experience to come up with ways to solve the problem myself. Perhaps I should fall back on some of these newer libraries I'm trying to implement and utilize some of the others(e.g. Use SharedPreferences over DataStore). Most of the libraries might be better than the previous ones they are meant to replace, but with the lack of information on them, it turns out to be more difficult to learn and use. Hmm...
◦ Only tackled this for a about 4 solid hours today, but I'm close to implementing it. Will be getting my 2nd dose of the vaccine tomorrow, so as long as I feel well.. This should get done! ▪︎ Once it's complete, the biggest issue then is that it is not yet encrpyted. So I can work on that once everything else runs smooth. • Seems I'm having some issues with coroutines as I'm getting double snack bars to appear and some other strange behaviour. Not too concerned with this at the moment, but will need to get fixed • Also need to go back and clean up my code. I have some improper calls in UserDataRepository, UserViewModel, and my UI Screens • Decided to try a leetcode problem before bed. Had fun fiddling around with it & performed as expected. Since I haven't been practicing algorithms / kotlin outside of the Android code I write.. I didn't quite get the solution. Timed myself for 30 minutes, while I was close. I spent more time playing around with various keywords before looking up a solution. Was very similar to what I had written. Interesting to see the various solutions people came up with (I checked Java solutions as I didn't see any in Kotlin)