Bryan L
03/26/2021, 7:07 AMDay17
• Completed Unit 2
• Created Affirmations app through Codelab as well as one with Compose
• Reviewed manual Dependency Injection
• Progress with RBP
Self-Comment
• I'm definitely having to take a slower approach with the layouts. Went through recycler view today and left me quite puzzled compared to the alternative in Compose(what I'm used to using). After Unit 3 I may go back and do some refactoring on these apps or add some features. Compose apps for sure, maybe the codelab apps.. My Compose version of the apps are poorly structured, but "completing" them on top of the Codelab app nonetheless! Looking forward to diving into Navigation tomorrow 🙂
• Went through manual dependency injection again. I definitely understood a lot more on how it works compared to before. Must mean I'm learning something? A bit fuzzy towards the bottom, but will revisit after Navigation Unit. Need to revisit lambdas still, checked documentation but I hate documentation that just uses single letters. My brain has a difficult time replacing the variables with realistic examples when done so.
• Progress with RBP! (maybe). While I know how useful it can be to learn how to query with sql and automate / build reports.. I'm currently tired of this project as it feels like I'm running in circles with little progress each time. This might be due to the fact when working with Android I'm doing front-end work so get to see shiny things appear on my phone
Goals Tomorrow
1. Work on Unit 3 Navigation
2. Review Lambdas & Generics
3. Research how to change app icon in Compose
4. Work on RBPJungIn Choi
03/26/2021, 1:46 PMDay15
• Halfway through Lesson 3 in Developing Android Apps with Kotlin
◦ Fragment - onCreateView, inflate / Activity - onCreate, setContentView
◦ Navigation, Navigation graph
▪︎ NavHostFragment acts as a host for each one of the fragment in the activity navigation graph
▪︎ Principles of navigation (apps have a fixed starting destination, navigation stack, back button)
▪︎ Conditional navigation, Back stack manipulation
Self-Comment
• Emm..lots of new things. Not conceptually difficult but there are some parts that don’t really touch yet. Hoping to get used to all these soon.
• Not much progress at daytime, I forgot to bring my macbook charger from room. 😂 But! the coffee was good anyways. 😄 Should make some more progress tomorrow.
GoalsTomorrow
• Finish lesson 3.Bryan L
03/28/2021, 4:35 AMDay 18 / Day 19
• Completed Pathway1 of Unit 3: Navigate between screens
• Completed part of Pathway 2. Introduction to the Navigation component
• Practiced with collections and lambdas
• Completed Chapter 2 of Atomic Kotlin
• Reviewed MVVM
Self-Comment
• Not much done past couple of days, distracted more than normal. Having some difficulty getting through the Codelabs dealing with navigation and Lifecycle(kind of). The codelabs are currently having me go through and tweak existing code which I find harder to go understand what's being taught than when starting from scratch. It's different than what I'm used to and seems to be hard to stay focused when I know it's material I won't be using in my projects, but I'll manage.
• Came across some tutorials with Kotlin & various technologies on play.kotlinlang . Tempting to start but perhaps after I finish up some of these Android based codelabs.
• Not sure I'm connecting with how Atomic Kotlin goes through it's material. Will skip to a later chapter and see, but will hold off on purchasing a physical book for now. I wanted to use a pass today and still feel like I should with what feels like little progress, but pushing through. I may use one tomorrow and just do some casual theory readings.
• Thinking about rewriting my notes app. A lot of the codebase will stay the same, but do a lot of refactoring. Use a current project instead of a new one to re-use code and better understand differences.
Goals Tomorrow
1. Better understand the different ways of how navigation is implementedJungIn Choi
03/28/2021, 11:17 AMDay17
• Finish Lesson 3
◦ Intent (Explicit intent - launches an activity by its classname / Implicit intent - launches an activity based upon parameters, such as action, data and data type)
◦ Menu navigation - adds to the backstack from the current position / App drawer navigation - defaults to popping everything off the backstack except for the start destination / Using Navigation Listener to define behavior during navigation / Animation basics (exit/enter, pop exit/pop enter transition)
• Started Lesson 4
◦ Activity life cycle
▪︎ states (created / started / resumed / destroyed / initialized), callbacks (called when state changes) (onCreate, onStart, onResume, onDestroy, onPause, onStop, onRestart), Application class (contains global application state of app)
◦ Logging - Using basic android logging API. Log levels(verbose, debug, info, warn, error, assert) / Using Timber library…but I think I have to pack up my things for checkout so I’ll stop here….
• Bug of today - Kotlin: Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper ‘-jvm-target’ option
◦ I’ve set kotlinOptions { jvmTarget = '1.8' }
but it still produced compile error. It was eventually a problem with Android Studio setting.. 😞
Self-Comment
• Navigation part doesn’t touch well. I think I’ll just have to get used to this navigating workflow through actual projects. But whatever, lessons done for that. Lesson 4 seems to be much interesting. Yay hello callback. I wanted to know more about you..
Goals Tomorrow
• Tomorrow I have to move to other guesthouse so.. I might use pass. If I have a moment, my goal is to finish Lesson4.
• Goals of upcoming week
◦ Finish until lesson 8 (priority 2nd)
◦ Have some research about Android BLE - Pick up basic terminologies.(priority 1st)
◦ Elaborate the ideas in my memo, draw some app sketch in notebook (priority 3rd)
◦ Enjoy the natural view of west jeju 🦠 (priority 0th)Bryan L
03/29/2021, 3:21 AMPass
Went ahead and still did some reading in DDIA as well as articles about Navigation. Tried depicting the differences between navigation with and without Compose(i.e. with and without xml). Listened to a couple android related podcasts as well as drew out my notes app across several sheets of paper all while taking advantage of the weather pool-side. 🙂 I think I may do this weekly. Knowing I was going to use a pass today kept me from feeling guilty and released some tension. Inevitably still doing something productive, but a release nonetheless!JungIn Choi
03/29/2021, 12:48 PMDay18
• Finish lesson 4
◦ Activity Life Cycle
▪︎ onCreate - one time initializations, layout inflations /_onDestroy_ - destroy everything
▪︎ onStart - start objects that only run when activity is on screen / onRestart - anything that runs only if not being created / onStop - stop objects that only run when activity is on screen. permanently save data
▪︎ onPause - called when activity loses focus / onResume - called when activity gains focus
◦ Fragment Life Cycle (states are the same, but the callbacks are different)
▪︎ onCreate / onCreateView / onStop / onAttach / onActivityCreated / onStart / onResume / onDestroyView / onDestroy / onDetach - be aware of fragment specific cautions.. (ex. should inflate layout xmls in onCreateView not in onCreate)
◦ Using LifecycleObserver
◦ Process shutdown (Android OS takes the state of some of your views and saves them to a bundle, to RAM when you navigate away.)
▪︎ onSaveInstanceState - safely save in case app process is torn down by OS.
• Should call super method to automatically save basic informations such as backstack info & some data values.
• To manually add data to bundle, call putXX methods with key and value. Key must be string.
• size of bundle is restricted, varies by device
◦ Configuration changes causes the activity to be rebuilt
▪︎ example of config change - user changes device language, plugs in physical device, rotates device
Self-Comment
• It’s quite amazing when design pattern I’ve learned in class(but just went through my ear..) appear again. Good to see u observer pattern.
• Managing life cycles seems to be important. For all this time I just used onCreate for initialization, without knowing anything about all these.🙄
Goals Tomorrow
• Halfway to lesson 5 & googling for android bleBryan L
03/31/2021, 5:22 AMDay 21
• Finished Unit 4 completing Android Basics in Kotlin.
• Reviewed Coroutines
Self-Comment
• Android Vocab Words - Interesting find today.
• Ended up finishing up Unit 4 completing The Android Basics in Kotlin Course. Overall I'm content with it, still getting comfortable with XML, Databinding, RecyclerView.
• There are 4 courses on the developer android page, this second one seems near identical to the first. Will go through it as it can only benefit, but curious to see if it offers new information. The third is Kotlin based, has some good topics but I feel comfortable with these so will probably skip this one to move on to Advanced Android after this Fundamentals course.
• The Coroutine and Channels link I mentioned yesterday seemed pretty advanced as it was going through topics I'd yet covered. So didn't start that, but instead went over Coroutines in Unit 4.
• Looking forward to building projects again. I'll see how this course goes, may build a mirror project alongside the course imitating some of the topics covered.
• I'm weak in algorithms. Might start working on simple problems to get my brain practicing. Let me know @JungIn Choi (or anyone else) if you'd like to try completing the same daily problem as we continue the challenge!
Goals Tomorrow
1. Continue Android Kotlin Fundamentals
2. Read some DDIA
3. Go through a couple medium articles/youtube videos for extra theory on data binding & recyclerview
4. Implement strStr() daily problem?JungIn Choi
03/31/2021, 11:48 AMDay19
• Halfway through Lesson5
◦ Application architecture, Separation of Concerns design principle
▪︎ Limitation of using onSavedInstanceState - 1) require extra code to store the state in the bundle & the logic to retrieve the state 2) size of bundle is limited
▪︎ (Simplified) MVVM
• UI Controller (activity/fragment) - Display views. Handle OS event(ex. capture user keyboard input). Notify View Model that OS event has happened
• View Model - Abstract class that holds and prepares data needed for the UI. Contain instance of LiveData. Survives configuration changes. No(less?) size restriction. Should not contain references to activity/fragment/view
• Live Data - observable data holder class that is lifecycle-aware
◦ Observer pattern - Observers “watch” the subject. When event causes subject’s status change, subject notifies observers. (In this case, Live Data is the subject and UI controllers are the observers.)
▪︎ Benefits
• Organized, Easier to debug, Fewer lifecycle issues, Modular
• Faster and easier testing (since ViewModel contains no references to activities, fragments, or views)
◦ (androidTest - heavy. require emulating android framework, test - doesn’t require emulating)
Self-Comment
• It is quite hard to concentrate after the pass-day 🤔 Hope I can concentrate on something at certain time whenever I want to. That is the superpower I really want.. Felt quite depressed that I wasn’t that productive enough today, but anyways it’s better doing than not doing so.
Goals Tomorrow
• Finish lesson 5
• BLE research (googling time)JungIn Choi
04/01/2021, 1:11 PMDay20
• Lesson5
◦ LiveData & Lifecycle Awareness
▪︎ LiveData : observable data holder class which is lifecycle-aware
• lifecycle-awareness : LiveData knows about the lifecycle state of its UI controller observers
▪︎ Two way lifecycle observation connection between UI controller & LiveData (nice diagram)
• LiveData will only update UI controllers that are actually on-screen. If UI-controller is off-screen, it gets no updates. When a UI controller goes from off-screen back to on-screen, LiveData will trigger the observer to get the current data immediately.
• When UI controller gets destroyed, LiveData internally cleans up its own connection to the observer
▪︎ Backing property & Encapsulation : restricted direct access to the object fields
• LiveData should be mutable inside the ViewModel but immutable outside the ViewModel
• MutableLiveData vs. LiveData (can be read but not modified), Backing property (allows returning sth from a getter other than the exact object)
▪︎ Event vs. State
Self-Comment
• I always get pre-lesson quizzes (in udacity) wrong^^.. (ex. where should ~~ component go to) But I won’t get intimidated, since who cares, I’m learning haha. Plus, my memories are amazing, amazingly short. (..) I remember that I learned this term “companion object” in the kotlin basics lecture, and even remember that it was confusing at that time, but I just couldn’t recall it 🤯 So I got back to my notion memos, and remembered what this was. So, I had some googling time.
• I’m using this as summarizing notepad from some point on.. It somehow seems to ruin this feed, so I’ll separate this to a comment in my own thread, if it bothers any of u 😂
• Was a productive day. I should really take care of my mentality, keep in mind that if there’s a less-productive day, I’ll just have to try harder the next day, but just don’t get stressed too much.
Goals Tomorrow
• Finish Lesson5 and start lesson 6. (As I view the contents, there comes this terminology “coroutine”. Quite thrilling that it is a mystery for me today, but not tomorrow.
• (Priority) Lesson5 -> BLE -> Lesson6 & LeetcodeBryan L
04/02/2021, 8:06 PMDay 23
• Worked on Navigation in Notes App
• Reviewed Room & Coroutines
Self-Comment
• Late report of yesterday, had a rough time trying to implement Navigation without using additional libraries so I shut down the laptop and decided to report today. I felt motivated after the Room codelab, however there is a difference between it and what I'm trying to implement in my project. While my first Notes Project included Hilt, I'm trying to build this version without to better understand it. Also came across that I should not be parcelizing my note for navigation and instead navigate by id & then grab the note. This is where I'm struggling as It doesn't seem to navigate even with the note Id. I could parcelize the note and navigate by note instead, but read that it should not be done this way due to extra data being transferred vs just an "id" or "title, for example. I'm hoping to upload this version of the Notes project to Github and start updating it through there. I had intentions of doing it with the previous, but decided against it. I'll add in a thread what my goal for the app before adding to git. Spent more time than anticipated on the project instead of going over Android Kotlin Fundamentals..
Goals Tomorrow
1. Continue with Notes project (add navigation to detail screen and maybe add screen).Bryan L
04/03/2021, 6:00 AMDay 24
• Working Navigation to Detail Screen & New Note Screen
• Basic UI set up for all 3 screen
• Caching new note works (if onDestroy()
is provoked from backpress on mainscreen or app closed, cache still disappears) 🤔
• Learned about Partition
Self-Comment
• Great day. Didn't set much for goals today, but managed to accomplish what I did. I'll take the win! The app doesn't have that great of UI and still needs a lot of work, but under the hood it's coming together. I was having a hard time at first not implementing Dependency Injection, but now that I've figured it out, it's not all that different. I'm understanding why people say that DI doesn't effect much in small apps, but pays off in larger ones. I'm sure I could improve a lot on SOLID principles, but I'll ask for code reviews once it's uploaded to Git. I'm thinking about changing the Detail Screen up and deleting the viewmodel for it. Just use the ListViewModel and when a note is clicked, instead of just navigating to the single note, make it to where I can swipe <- to see older notes and -> to see newer ones. That might take up some time, so I may work on adding some other features on my list first such as storing on a server instead of just local. Would also like to add a search feature, perhaps I'll work on that tomorrow. Also I'm sure I've seen it before, but partition looks convenient! Played around with it in my project, but ultimately decided not to use it.
Goals Tomorrow
1. Take a look at RBP and see if I can make a simple version of it with a few basic lists.
2. Add to Notes App (swipeable navigation, swipeable list, or start with either retrofit/firebase) & Upload to Git?? 😱JungIn Choi
04/07/2021, 1:07 AMDay25
• Review Lesson6, revisiting the details
◦ synchronized block - only one thread of execution at a time can enter the block
◦ smart cast - (link) Compiler infers the variable’s type and internally casts it. It allows access to the nullable variable after checking it’s actually not null
◦ Testing & annotations @ Before , @ Test , @ After
◦ <_merge_> tag & reusing layout (link)
◦ requireNotNull - throws an exception if a value is null
◦ Creating ViewModel
▪︎ needs application, since ViewModel has to use resources(string/style ..)
▪︎ needs DAO, since ViewModel has to access the database through DAO interface
▪︎ needs Factory to instantiate the ViewModel - Reference to the “database” is not needed, since there is DAO interface passed. However, existence of database should be checked when the ViewModel is created.
▪︎ Inside the Fragment/onCreateView(), create instance of Factory, get reference to the ViewModel, set data binding for ViewModel
• Conceptual basics about android thread, process, runnable (blog post)
• Lesson7
◦ RecyclerView, Adapter, ViewHolder
▪︎ ViewHolder - holds views, store information for RecyclerView, works as RecyclerView’s main interface
▪︎ Adapter methods - getItemCount, onBindViewHolder
Self-Comment
• Proceeding the lesson is important, but reviewing is also important. It’s a difficult mission to maintain the balance, since if I spend too much time and energy on reviewing, I can’t proceed. But if I just proceed with unsolved understandings, it’s quite useless.
• Curious about android testing, testing methods, specific use cases, flexible and wise usage of various testings in actual industrial deployment.
• Faced this bug Test running failed: No test results. onError: commandError=true message=INSTRUMENTATION_FAILED:
while running the provided test code. Seemed to be just another build..gradle..version..kind of problem, so I skipped this at that moment, but I’ll have to resolve this now while reviewing..
Goals Tomorrow
• Finish reviewing lesson6, proceed more on lesson7JungIn Choi
04/08/2021, 2:42 PMDay26
• Lesson7
◦ ViewHolder tells RecyclerView where and how an item should get drawn in the list
◦ Updating SleepTracker using RecycleView, adapter (WIP) (github).
Self-Comment
• Not much progress today, but had some very useful time having discussions with a senior developer. Good to have a respectable mentor.
• Got a bit loose at the end of my vacation. Should get back to my daily routines.
• Side project & algo practice - I should scoop up the first spoon till the weekend. At least think about it, set up some plans.
Goals Tomorrow
• Well, after arriving at my home, do the unpacking at night. Go straight to cafe or some work station, finish lesson 7. Must.Bryan L
04/11/2021, 3:27 AMDay 31
• Completed Coroutines and Room
• Started LiveData to control button states
• Started learning more about Ktor and KMM
Self-Comment
• Not much done today as I was out for most of it. However managed to get more done than expected. I always enjoy going over Coroutines as I feel like I learn more and more each time. Although this codelab skipped using a Repository and connected the database to the ViewModel to simplify the material. Felt odd making the connection without it. Comprehending what I know and how I think using Compose makes working with XML more difficult, but I know it will improve with practice using the two frameworks.
• I'm not interested so much in the LiveData codelab, but it's informative and will be helpful to understand the concepts. and practice with implementation.
• I'm still hesitant on how to approach learning backend server-side as I would like to go in depth on dealing with a remote database and practice with REST APIs. Can Ktor be used in the same manner as Retrofit but more extensively as well? I read that Retrofit is great for Android specifically, but Ktor is better if you intend to follow KMM. Kotlin Multiplatform sounds interesting to approach even if I don't plan on building apps on iOS. I'll need to do some research and just start practicing with these to get a better understanding. Do I use one or the other or both together? Question to answer tomorrow.
• It's fascinating to see how often I want to jump ahead or into completely different topics instead of stick to a curriculum as intended 😅
Goals Tomorrow
1. Work on RBP
2. Answer question: (Ktor || Retrofit) || (Ktor && Retrofit)
3. Continue LiveData codelab
4. Start working on Goal 2?JungIn Choi
04/11/2021, 5:31 AMDay28
• Finished Lesson7 - SleepTracker done! Github
• Started Lesson8
◦ REST (representational state transfer architecture) / RESTful service - web service that offer REST architecture
▪︎ Request
• Contains a _URI. (_URI can take queries). Transferred to the server using HTTP protocol.
• HTTP Protocol tells the server what to do (GET/POST/PUT/DELETE)
▪︎ Response
• Has formatted data (ex. json, xml)
◦ JSON Response - array containing objects [ {“name”: value, {“name”: value}, {{“name”: value, “name”: value}]
◦ Library
▪︎ App ---> (pass parameters to) ---> Library ---> (URI with query parameters, HTTP method) ---> Web Server
▪︎ Web Server ---> (response, for example in json) ---> Library ---> (kotlin objects) ---> App
▪︎ build.gradle(project) - google() for google libraries (ex. Jetpack), jcenter() for community libraries
▪︎ Network layer - API that ViewModel uses to communicate with the web service
◦ Retrofit library
▪︎ Creates network layer (Base url, Converter factory needed)
• Converter factory - allows Retrofit to return the response in required format
• Etc. memos
◦ Before adding a new feature, I must think how to check it. Should clarify what to display by popping up a toast, printing logs etc, and then write the codes.
◦ (recap) Sealed class - all the subclass of sealed class must be defined in this file.
◦ (recap) Navigation, its setup and basic flows. ( somehow got lost whenever the lecturer mentioned navigation so..)
◦ (recap) Lazy instantiation - created the first time it is actually used
Self-Comment
• AHHHHHHHH Really hate this outdated build issues…….. Wasted time due to some navigation/safe args issue. Cannot solve it even after wasting few..almost an hour?, so just pulled the repo from that stage.. Compromised with the navigation part, recalling that navigation is in less higher priority. (According to the senior developer who gave some advices after skimming the course syllabus). Quite frustrated, but I’ll have to control my mind.. I’ll just have to get used to these kinds of frustrating issues.
Goals Tomorrow
• More than halfway through lesson 8.Bryan L
04/12/2021, 3:00 AMDay 32
• Completed: Use LiveData to control button states
• Completed: RecyclerView Fundamentals
• Started: Getting data from the internet for Retrofit practice(completed once, building from scratch this time and not using existing code)
• Learned how to quickly find examples on current features I'm working on.
• Better understanding on Ktor & Retrofit.
• Kotlin Weekly #245 - edit -
Self-Comment
• Able to get through some codelabs which was great. Definitely was tough to push through the LiveData and RecyclerView codelabs as I had expected to flow into Database codelabs after, but not the case. Pausing this lesson and may come back to it later, but wanting to focus on Retrofit for now. I decided to cover the Mars app codelab again, while I've completed it once.. I'm going over it again for a brief intro before working on either a Recipe App or News App for more Retrofit practice.
• Ryan May explained a great way on how he looks through samples of features he's trying to implement. Will explain in thread!
• (Explaining simply as these could be articles in their own right) Pursuing Retrofit first as it will be quicker to pick up due to having less responsibilities since it's an HTTP Client while Ktor is a framework and I'll likely spend more learning things I don't currently need.
• I decided to hold off on RBP, but will focus it tomorrow. My focus is wavering lately and thinking about using a pass
soon. I'll try switching up my work for a day before committing to the pass.
• Will try to bold keywords each daily entry going forward for quicker visuals on daily topics. The links in Goals Tomorrow definitely help for quicker access to the material I'm wanting to cover for the day.
Goals Tomorrow
1. Work on RBP
2. Check out Master Coding's _**_ YouTube series with morning coffee. May decide to follow along this week if easy to follow.
3. Possibly review Extension Functions. Came across them again today and while I understand extension functions, I've never actually thought about using them!Bryan L
04/13/2021, 3:51 AMDay 33
• Created queries in RBP & Excel Output (4 seconds total down from 40 minutes..?)
• Finished first two videos of _**_ series.
• Listened to Android Leaks Episode - Composed Leek
Self-Comment
• Quite a lot more done than expected today! Successfully queried all records for total counts / date / and checked if missing. Reading both excel sheets, querying Database, and outputting to excel only takes 4 seconds down from 40-60 minutes? Not sure what I did differently to make that possibly besides change up how I made my queries. 4 seconds feels much better, although until I get the desired output, I'm unsure what changes will come about. I'm wavering on completing this project. It's time consuming and feels distracting compared to other projects I could be working on. Friend has been taking his time to help me and feel guilty if I drop it.
• Podcast episode was great, while I'm not sure if anything from it helps me directly, it was nice to learn about the process on building a UI Framework. I do feel like I have a better understanding on what goes on under the hood if only slightly. 2.5 hours flew by, but started losing focus about 1.5 hours in.
• I think I'm going to try sticking to this YouTube course as it looks like it will go in some pretty detailed queries. I will attempt to follow it using Compose instead of the UI Toolkit in the video, but we'll see.
• I may end up on a Podcast in a few weeks talking about what it's like learning Jetpack Compose as a beginner. Plenty to review until then, but excited to see where this goes!
• Also Chicago Roboto is coming up (never heard of it until today). Depending on how the podcast episode goes I may put in a submission to speak for 20 minutes. Conference date isn't until September, but submissions need to be in before May 15th. A month to improve before submitting a proposal and 5 months before the conference. Considering I'm only 4 months in to learning, I'll improve substantially by then.
• p.s. I know what I want to hear, but any advice on point#1 in Self-Comment? It's been a few months on this RBP project with little-to progress. He's been spending time with me in several voice calls going over it trying to help me get real-world experience with an actual project, but my path has been steering more and more towards android full-stack instead of focusing back-end. Should I stick it out and continue splitting my time up, or tell him I want to commit fully to pursing Android Dev and drop the project?
• edit: I should take notes on how JungIn Choi does her Daily Entries. ➕
Goals Tomorrow
1. Work on RBP?
2. Continue _**_ #3
3. Review Compose/interop
4. Work on improving Daily Entries. Omitting extra details or putting in thread. Most of it is either imposter syndrome filled thoughts or ideas I never act upon anyways. 😅
5. Would like to do some kind of improvement/commit to Daily Doc (haven't touched since upload)JungIn Choi
04/13/2021, 2:02 PMDay30
• Finished Lesson 8
◦ Actually got quite stuck with data binding & binding adapter part, so this part was a bottleneck. What goes around comes around^^.. I just hastily crammed it, and from some point I got puzzled, so I had to spend some time re-catching the flow.
◦ Parcel, Parcelables, Adding filter
• Start Lesson 9
◦ Network caching (Storing network results on disk, http caching, caching results per query etc.)
▪︎ Issue: Cache invalidation (outdated / modified ..)
▪︎ Solution : Using SQL&_Room_ db for caching!
• Other options: _SharedPreferences_(Only in key-value form, writing to disk only for small data, with no query support), _Files_(Flexible but too flexible..have to manage all those)
• (Getting data from server to app) Server --> DB --> app (Always showing data from the db!)
• (Updating data from app to server) app --> Server --> DB
◦ Room methods, DAO
▪︎ @ Query @ Insert @ Upsert
▪︎ conflict strategy should be specified (what to do if inserting data’s key already exists - ex. upsert)
◦ Data objects - 1) Domain object 2) Data transfer object 3) Database object (--> entirely for interacting with database)
Self-Comment
• Daytime was blew off - I still don’t understand why I have to wait hours at hospital in 21 century
• Thursday will be Day1 of my internship. Looking forward to it, there seems lot to do / lot to learn / lot to study.
• Didn’t sleep well yesterday. Was hard to focus at evening. To be honest, so I wasn’t in a good mood today. Hospital thing and many other things were quite troublesome, but just settled down and made the minimum progress.
Goals Tomorrow
• Finish lesson9
• Hopefully move into lesson10
• Look more into data bindingJungIn Choi
04/14/2021, 10:32 AMDay31
• Finished Lesson9
◦ Room db review (doc)
◦ Repository & Offline caching
◦ WorkManager
▪︎ Background thread(ex. network things) vs. Background works (When app is not running or in background. / ex. upload logs, process data, upload metrics, pre-fetch contents)
• Background work works in background thread
▪︎ Constraints should be specified (When to work / ex. charging, device idle, on wifi, etc.)
▪︎ Efficient battery usage (Optimize constraints for background works --> Let it use less cpu, disk. low network. schedule to run rarely. / Ex. prefetching done nightly)
▪︎ Work request (periodic / )
• WorkManager.getInstance.enqueu() - Schedule work
• Etc.
◦ (recap) Transformations.map - converts one live data to another
◦ (recap) <scope>.launch{} --> creates coroutine
Self-Comment
• Recalling that the main reason I had a hard time yesterday was because I didn’t review data binding part in the right time. I just stopped lesson 9 and reviewed the Room db part. This time, I didn’t do rough googling in korean, but instead just read the official android document and took notes by hand. Much better, much clearer.
• Must review data binding in this way too.. (Goal till this weekend.)
• Understand dependency injection thing --> Goal: understand this sentence thoroughly ” _Make your repo take a VideosDatabase constructor parameter, this way you won’t have any dependencies on Context in your repository (so called dependency injection)._”
Goals Tomorrow
• Halfway thru Lesson 10
• Check on data binding, dependency injection (link)
• But most importantly, having a nice first day of work..!Bryan L
04/14/2021, 1:14 PMDay 34
• Continued the REST API Course on YouTube (dropped it after #6)
• Typed up rough draft of conversation points for podcast
• Refactored Daily Doc
Self-Comment
• Dropped the course as it was in Java and was becoming more difficult to follow. I came across a few repos on github that do well with Retrofit and may filter/recreate theirs.
• Temporarily working with one screen for 1-2 weeks, so tabbing in and out gets tedious. Ended up trying to be productive on 1 monitor so I typed up a rough draft with conversation points
• Had some motivation to refactor Daily Doc. Pulled some logic out of the View(shouldn't be there) and placed it in the ViewModel. Working to create a single note for each day & if daily note is already created, load the data to edit. (basically cache daily note in Database)
• Did not work on RBP today.
• Possibly app idea in thread
Goals Tomorrow
• Work on Daily Doc
• Review Compose/interop
• Work with Retrofit App in the evening (2 monitors)JungIn Choi
04/14/2021, 2:25 PMJungIn Choi
04/15/2021, 3:29 PMDay32
• Retrofit practice, starting from scratch - adding library dependencies, permissions, creating interface, making api request, parsing response
• Stuck in some problem with coroutine.. should solve it tomorrow
Self-Comment
• Following the course - ready made starter repo with some cute TO-DO blocks - was easy, but starting from scratch is HARD.
• Was a tough day, first day at work - onboarding + working on this homework
• Actually it was very frustrating but was also very meaningful, starting from scratch. Got overwhelmed at daytime, but soon I just opened a notion document.
Goals-Tomorrow
• solve error with coroutine launch......
• (weekend goals) read documents inside the kotlin lang official coroutine guideBryan L
04/16/2021, 5:27 AMDay 36
• Worked on Daily Doc: Saves/Fetches Correctly, added Warning Dialog to Clear Icon, some UI changes, refactored, updated Readme with new(ish) screenshots
• Created* _APK for App_* (if you'd like to test in current stage)
Self-Comment
• Didn't finish Coroutines Codelab. I should get back to it, but I've been motivated to work on Daily Doc lately! I've put RBP on hold for the unforeseeable future. Feels like a burden has been lifted and my mind has been clearer since.
• A lot of work still needs to go in to the project, I'll have to review how to check for memory leaks and finish that coroutines codelab to point out some obvious flaws in how I've implemented them in my app!
• I built an apk and generated a signed bundle for it? Bit cloudy still on the process and avoiding uploading it to the play store until tests are implemented(problem for later), but available in the link above!
• Seems like transitions on navigation between screens/views are tricky in Compose. Will have to do some more research on this one.
• I should really practice with Extension functions sometime over the next week or two..
Goals Tomorrow
• Research Transitions and Animations
• Work on Coroutines CodelabJungIn Choi
04/16/2021, 8:50 AMDay33
• SearchLocation demo app - Using retrofit/okhttp to make request, parse response, Display the response in RecyclerView, Delaying request using TextWatcher and Timer
• Was searching for pagination but stopped. That will be my monday-job.
Self-Comment
• Wow I fell asleep. Started work from Thursday - successful and tough days. Had some onboarding times, receiving macbook, installing stuffs (android studio, sourcetree, postman etc.) etc.
• My supervisor gave some homework projects. I told him my exact status, and he prepared some prerequisites to try on. Was quite overwhelmed on first day, cuz I felt under qualified. I tried to put everything, data binding - mvvm - coroutine etc. on first trial, and totally mixed up. So I made my mind to throw away all those and try to make the mvp demo app with callback, without using data binding and mvvm.
Goals Tomorrow
• (roughtly weekend goals)
◦ Read https://kotlinlang.org/docs/coroutines-guide.html
◦ Search how & get used to using android debugger/profiler toolsBryan L
04/17/2021, 3:59 AMDay 37
• A lot of updates to Daily Doc
Upgraded APK (can download app on directly to phone from github)
Added Symbol Bar to Body TextField
Cleaned up and Refactored Project
Some animations added• High Order Functions & Lambdas through Parameters (Instead of passing the viewmodel I passed only functions used)
Self-Comment
• Successful day! A lot of progress when it comes to Daily Doc! Still needs work, but trying to make sure logic is kept out of Views and kept inside of the ViewModel. Would like to separate logic outside of the viewmodel later, but not concerned yet unless advised otherwise.
• Didn't finish the Coroutines codelab, but I read some article about LiveData and Flow. Spent some time playing around with replacing my LiveData code with Flows.
• New APK released, I'm updated the version on the google drive link and github as I release new versions of apk.
• I'm committing and pushing frequently, doesn't seem to be an issue but I wonder if this is bad practice? Solo project seems okay. Most of my pushes come from editing the ReadMe. I'll have to learn how the markdown code looks before pushing to github.
Goals Tomorrow
• Decide tomorrow or use pass 😊
• Look into GDE - Seems fun! I think I'll aim to apply within a few years android danceJungIn Choi
04/23/2021, 5:36 AMDay38
• Display zone markers
◦ Load marker images using Glide
• Display polygons of returning zones
◦ Had issues while parsing json data (null and jsonnull is different...)
Self-Comment
• That null/jsonnull issue really ... was eww. Found it by printing everything line by line.
Goals Tomorrow
• Study & get used to Rx. Replace call, callback things with rx
Day39
• Rx - read articles and documents
◦ subscribe, subscribeOn, observeOn, main thread / io thread
◦ creating observables, Single, etc.
• NaverMap app demo - Replace callbacks with Single
Self-Comment
• Actually I had lots of fear about Rx, but it wasn't that tremendous as I thought.
• Maybe it's because I know 1) how to use usual callbacks, 2) that these are all parallel concepts - callback, coroutine, rx
• Now it has been a week at this company. So far, so good. Sooo good. I love my work, love these people, love my lifestyle. It was an awesome decision to drop out of graduate school. Sorry professor.
Goals Tomorrow
• (weekend goals) Have quite a lot of things in 'input box', but I think I'll have to look at mvvm basics first. And I also have to check some long - term goals, review last 7 days in work.Bryan L
04/24/2021, 4:02 AMDay 42 & Dat 43
• Recorded Podcast Episode
• Implemented Hilt in Daily Doc
• Reached out and asked for feedback/code-review on Reddit & Twitter for Daily Doc
Self-Comment
• It seems I've made it a habit to only write every other day..
• I'm not sure what I think about the recording. I had some technical issues and by the time I set up for it, I didn't have any of my notes on me when recording. Will wait and see before I critique it, but after we we stopped recording we kept talking for another 15 minutes or so. I started recalling a lot of information that should have been shared during. It seems I eased up afterwards. With that, the next time will be that much easier. He seemed fine with the recording, so hopefully I didn't butcher it too much. So many points I didn't bring up because it felt like I was "on-the-spot" lol. 😆android dance
• Decided to work on implementing Hilt before going forward with any changes on Daily Doc as it seemed it would fix some of the issues I was aiming for with handling state / lifecycle. Had some trouble converting it to using Hilt, but works now!
• Started researching adding Firestore again, but I'm always hesitant every time I come back to it. I think it's just out of my element since I'm uncomfortable with anything to do with a server still.
• My point on Day 41 post still stands
"I feel my progress slowing down. I need to get strict on myself again to either implement Hilt, Firestore, testing, or start a new project. Or at least solicit some code reviews for Daily Doc so I can improve it. I'm getting too comfortable making little progress."
Hilt has been implemented and I've reached out for code reviews for Daily Doc, but I still feel like I've hit this wall and I'm lacking actual progress. Interesting feeling for sure!
Goals Tomorrow
• Review the article from Day 41: Android Developer should know these Data Structures for Next Interview
• Check and possibly work on any issues if feedback received from Twitter or Reddit
• Work towards implementing Firestore or add user data to Daily DocJungIn Choi
04/26/2021, 1:32 PMDay41
• Add distance checking feature in NaverMap demo app
◦ used BehaviorSubject
• Reorganized SearchLocation demo app into MVVM architecture
◦ with some other minor refactorings
Self-Comment
• Wow… tough day. Still at my office desk, 10:30pm.
• Acknowledged that reorganizing a working code into mvvm, could lead to not-working code. Got this lesson at daytime, while touching NaverMap demo app. I somehow made it work, but decided to practice MVVM once more on SearchLocation demo app. Success!
• But.. somehow I touched github wrongly.. so my “working-dirty-mvvm” version of NaverMap demo app is gone. It’s okay. I got “working-clean-mvvm” version of SearchLocation demo app. And I’ll have to try on “working-clean-mvvm” version of NaverMap demo app.
Goals Tomorrow
• Mvvm refactoring for NaverMap demo app
• Work on Room databaseBryan L
04/27/2021, 4:19 AMpass
on Sunday for a 2 day weekend. Haven't had a big break in awhile.
Day 44
• Added Drawer to Daily Doc
• Implemented Drawer Navigation from Login Screen to Account Screen inside the Drawer.
• Implemented first enum class
, Crossfade
, and when
block (in app)
• New APK Available
Self-Comment
• Not quite what I had in mind for the day, but when going to start implementing account settings I started to wonder if I could implemented some form of nested-navigation inside a drawer.
• Played around quite a bit as I decided to try using an enum class and state to declare which screen to show. While there's some obvious UI issues seen(minor), it works and even has transition animation(current navigation component doesn't support transition animations, have to fiddle with it to make it work). I'll show a screenshot of the difference between my drawer navigation code vs my original compose navigation. I'll leave it as is to display two different ways of navigation, but it may also confuse someone viewing my code as it might not look consistent.
• I didn't spend as much time working as usual, but I felt more productive with the time I did spend. I wonder if it was because I took an actual break. 😅
• The code can definitely be refactored and cleaned up, but the most important thing is that it's working.
1. Android Weekly #463 Biggest change is Room Auto-Migrations in my opinion!
2. Android Worldwide, April 2021 is Tomorrow. I signed up for it, will see how much I participate in!
Goals Tomorrow
• Participate in Android Worldwide, April 2021
• Implement either User Data/Firestore in App or work on Animations/UI.JungIn Choi
04/28/2021, 3:24 PMDay42
• Worked on demo app using map API & company API
◦ refactored into MVVM
◦ add data binding
◦ minor refactorings - add toggling on markers & polygons etc.
Self-Comment
• Refactoring is not easy.. Actually now I get the basics of MVVM but other issues pop up! Technical debt…
◦ At previous version, I used “fragment activity”, but this time I changed it into “fragment”. Why fragment activity at first? No reason, I just followed some medium tutorial to make a working demo, and that guy used fragment activity. But as I re-organized, I thought that fragment was appropriate, (but still no idea about fragment activity..) so I changed it.
◦ Then I had these issues with “context”. As I re-organized the entire directory & files, putting some to model package.. pulling off methods from activity and putting into view model etc., there were some methods inside view model that needed application context. I had some rough stack overflow-ing time and put out the fire with some messy code.. but I know this is a bad practice.
◦ As app scale becomes larger, there comes multi-dex blah blah issues, and this context thing will torture me if I don’t understand this soon.
Day43
• Initialized settings to use local storage
◦ Add Room dependency, kapt dependency
◦ Add database, dao, entity and the annotations. (Missing some annotations lead to disgusting red errors.)
◦ Faced some other disgusting error. Reason was,, I had to add some TypeConverter class .. .. .. .. .. phew,,
• Had to understand the basic logic of our company’s app. (with regard to local storage & server) It was quite confusing, understanding this complicated logic with bunch of rx codes and flat maps .. I didn’t fully understand it yet. I’ll have to continue tomorrow.
◦ (as far as i understood) (just for memo) flow goes like ..
▪︎ 0) user location changes -> 1) GET to server, with location query -> 2) Compare with bikes into local app storage -> 3)Delete, Add done in local app storage -> 4) show markers based on local app storage’s bike locations.
Goals-Tomorrow
• Add deletion method inside in view model/update bike table
• finish understanding & implementing this bike fetching flow
• move on to next feature : showing bike info on marker click -> info comin from local storage
weekend-goals
Links to check
• [context] https://blog.mindorks.com/understanding-context-in-android-application-330913e32514
• [app components] https://developer.android.com/guide/components/fundamentals.html#Components /
• [kotlin scope functions] https://blog.yena.io/studynote/2020/04/15/Kotlin-Scope-Functions.html