Originally posted on Hacker Noon.
With how volatile the crypto market is, in order to achieve success it’s vital to find projects that are positioned for long-term success. Given how useful 1inch is to the DeFi community and its potential, the goal of this is to understand the governance around minting new tokens, and not as a “gotcha”.
After a user on Reddit called out that there is a function in the smart contract allowing the team to create unlimited tokens, I became interested in looking at the max token supply of 1inch.
My interest increased when a moderator on…
This is exciting as it means triple yields with swap fees, liquidity mining, and now AAVE! 👏🏻👏🏻👏🏻
Will users be able to configure AAVE on/off for their staked liquidity pools?
You’ve spent too much time testing if you have had to reconfigure a feature’s code to make it testable or have debugged the ordering of actions/events and the resulting test output. Using the Model-View-Intent pattern (MVI) provides the ability to test built-in to the pattern following the best practice of Test Driven Development (TDD).
If you’re not familiar with MVI, the pattern structures how information is shared and how views are created and updated. MVI defines a clear contract between the view and business logic with an interface that is a one-way, immutable, unidirectional data flow (UDF) pattern. …
You may think of ‘magic mushrooms’ when you hear ‘fungi network’. However, just like the Model-View-Intent (MVI) pattern, the forest’s organized fungi network of a connected info sharing system, like Model-View-Intent’s pattern, is indeed not magic.
The Unidirectional Data Flow (UDF) pattern does a great job to ensure information is sent in one direction from the view to the business logic, is retrieved, and processed in order to build the view. UDF alone does not organize how the data processed. The Model-View-Intent pattern structures the design of how information is shared and views are created. MVI defines a clear contract…
One of the many great things about the Unidirectional Data Flow (UDF) to organize an app’s logic is that it works with any reactive programming pattern, whether it be Kotlin coroutines Flow (Flow), ReactiveX (Rx) based RxJava/Kotlin, or LiveData. Kotlin coroutines version 1.0 was released at the end of 2018 and anecdotally has quickly been gaining adoption, alongside functionality. However, a large portion of apps have been built pre-late 2018 and rely on Rx. This makes both Flow and Rx important tools to be equipped with when working on a diverse set of codebases.
Spoiler — Kotlin Flow requires less…
The Lifecycle 2.2.0 update including simplified initialization with
by activityViewModels(), and
by navGraphViewModels(...) syntax for the ViewModel (VM) component is great for quickly creating VMs. What about re-using the VM instance throughout fragments, passing arguments/parameters into the VM while also enabling saved state? With a bit of customization, the above can be achieved as I recently shipped in the latest version of the Coinverse app.
To take advantage of the latest VM component, declare the most recent Lifecycle dependencies in the…
When I started building the Unidirectional Data Flow (UDF) with LiveData pattern, I did not have testing experience. Working on a small/fast moving startup team, Close5, owned by eBay, and building Coinverse from scratch, I had not been required, nor did I allocate the time to develop tests. One of the touted advantages of UDF is optimizing the architecture for testing. This made for a great opportunity to develop testing fundamentals explored in the Coinverse code below.
Based on amazing feedback from the Android community and taking advantage of Kotlin’s natural language features, the Android Unidirectional Data Flow (UDF) with LiveData 2.0 improves and simplifies upon the original pattern. Version 1.0 improved the efficiency of Coinverse’s newsfeed, removed adjacent native ads, and made audiocast loading faster.
If you‘d like to explore the Android code for Coinverse’s open app check out the GitHub page. Without the set up below, you can browse, listen on-the-go, and watch the newsfeed of audiocast and video content.
For access to features requiring authentication such as saving and dismissing content, you’ll need to implement the 6 steps to set up a Firebase project outlined below. If that’s too much work you can download the latest release on Google Play.
Code in the wild is always better to learn from than slide samples. Here I’ll be sharing code from Coinverse’s Open App to showcase a live Unidirectional Data Flow (UDF) pattern which makes the app more readable, easier to develop for, and debug.
Open source code:
About UDF + LiveData:
The previous post outlines the strategy for loading a newsfeed and removing adjacent ads using UDF. This post shares both a basic live example, and a more complex structure to return multiple processes in one method using
By downloading the GitHub project, you can run the code to explore…