<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Tanya Masvita on Medium]]></title>
        <description><![CDATA[Stories by Tanya Masvita on Medium]]></description>
        <link>https://medium.com/@tanyamasvita?source=rss-81b3baea3ef------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*5cKDpQ1370MGBar2OJVHyA.jpeg</url>
            <title>Stories by Tanya Masvita on Medium</title>
            <link>https://medium.com/@tanyamasvita?source=rss-81b3baea3ef------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 01:14:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tanyamasvita/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Why Rust for Embedded Systems? (And Why I’m Teaching Robotics With It)]]></title>
            <link>https://tanyamasvita.medium.com/why-rust-for-embedded-systems-and-why-im-teaching-robotics-with-it-100af0ca0d4d?source=rss-81b3baea3ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/100af0ca0d4d</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[embedded-systems]]></category>
            <dc:creator><![CDATA[Tanya Masvita]]></dc:creator>
            <pubDate>Fri, 12 Dec 2025 12:53:31 GMT</pubDate>
            <atom:updated>2025-12-12T12:53:31.505Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lG86oDEXR0i9fR7u" /><figcaption>Photo by <a href="https://unsplash.com/@sahandbabali?utm_source=medium&amp;utm_medium=referral">Sahand Babali</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Rust has officially graduated. It’s quickly shifting from the most admired programming language on Stack Overflow to a true workhorse language.</p><p>As of late 2025, Rust in the Linux kernel is no longer experimental and is now a core part of it. The Android Open Source Project has supported Rust for developing the OS itself since 2021, citing the need to “not only improve detection of memory safety bugs (introduced by languages like C/C++) but to prevent them in the first place” as the main reason for adoption. And finally, esp-hal, the first vendor-backed Rust SDK from Espressif for embedded software development, hit its stable 1.0.0 release on 30 October 2025 [3]. This effectively settles the debate over whether Rust is ready for production.</p><p>Currently, C/C++ remains the industry standard for embedded systems, but it also introduces critical risks that are increasingly unacceptable.</p><ul><li>An analysis of vulnerabilities in Real-Time Operating Systems (RTOSes) over the last decade showed that 54.2% were memory corruption vulnerabilities.</li><li>Defects in embedded software have real-world impacts that affect safety-critical systems like medical devices, industrial controllers, and power grids.</li><li>A lack of formal processes for bug detection leads to developers not doing rigorous testing and relying on manual inspection to handle safety issues. This means a lot more bugs go undetected.</li></ul><p>Because of this, the industry consensus is shifting towards leaving mature legacy code alone while prioritizing memory-safe languages strictly for new development.</p><p>Rust modernizes the way we write firmware, resulting in improved safety and overall correctness. The compiler prevents entire classes of bugs rather than leaving them to be discovered during testing or in production. There are a few key features that make this practical for embedded work, which include:</p><ul><li>Immutability — variables are immutable by default, so you must be explicit about what can change.</li><li>Initialization — every variable must be initialized before use, eliminating uninitialized memory bugs.</li><li>Error handling — this is mandatory, and the compiler won’t let you ignore a function that might fail.</li></ul><p>The result is that common embedded bugs get caught in your editor instead of in testing or production environments.</p><p>The biggest challenge with adopting Rust is not just the learning curve, though a skills gap exists (86% of engineers cite lack of expertise as their main barrier). It’s how rapidly the ecosystem is changing. Embedded Rust moves fast enough that code examples from six months ago often won’t compile today. HAL libraries update frequently, but documentation seems to almost always lag behind development. You end up searching through outdated tutorials, GitHub issues, and release notes just to get a basic peripheral working.</p><p>This is exactly why I’m developing RAVVEN (Rust-based Autonomous Vehicle for Virtual Environment Navigation), a hands-on embedded systems course that teaches Rust through building an autonomous robot. The project is highly technical and attempts to address the skills gap by walking students through a structured and rigorous curriculum with comprehensive technical documentation that’s maintained alongside the code. I’ve completed a System’s Architecture Specification and Interface Control Document that defines the three-node topology and custom UART protocols for subsystem communication, the kind of engineering rigor that’s often missing from online learning resources.</p><p>The project centers on building a dual-ESP32 robot that navigates a virtual maze with real-time synchronization between the physical robot and a digital twin. This architecture teaches both embedded firmware with Rust (motor control, sensor fusion, inter-processor communication) and full-stack software development (WebSocket protocols, real-time visualization) in a single cohesive project.</p><p>My goal is to provide a reliable path into embedded Rust development that doesn’t require students to fight the ecosystem while they’re still learning the language. The documentation exists, the technical decisions are justified, and the project is designed to be built incrementally.</p><p>Follow the series and grab the full RAVVEN Engineering Data Package (EDP), including docs, schematics, CAD/3D models, and source materials at <a href="https://blog.ravven.dev/">https://blog.ravven.dev</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=100af0ca0d4d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Redux Style State Management for Android Apps]]></title>
            <link>https://medium.com/better-programming/redux-style-state-management-for-android-apps-62da15dc7578?source=rss-81b3baea3ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/62da15dc7578</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[android-development]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Tanya Masvita]]></dc:creator>
            <pubDate>Thu, 10 Feb 2022 19:16:25 GMT</pubDate>
            <atom:updated>2022-02-11T05:39:09.293Z</atom:updated>
            <content:encoded><![CDATA[<h4>Use the best architectural practices in your Android apps</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EdEzaDBmB-0Mxwnp" /><figcaption>Photo by <a href="https://unsplash.com/@rmrdnl?utm_source=medium&amp;utm_medium=referral">Daniel Romero</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This article says Redux style state management but to be honest, the following ideas are not necessarily Redux style, they are rather inspired by it so it’s okay if you are unfamiliar with Redux. Also, “feature” in this context is used to describe a screen or UI that the user interacts with.</p><h3>State and State Management</h3><p>State Management is a way to facilitate communication and data transfer between components by centralizing all the state of various UI controls to handle data flow across the application. It is one possible manifestation of the Single Source of Truth paradigm, that is, the state is stored in a single object and that single object serves as the only true source of state for our application.</p><p>State then in the simplest terms is whatever data triggers a UI change. For a social media application, one example of state would be a post, it forces the UI to update.</p><p>Within that Post, we might have properties like image, caption, time, and likes. If we assume that image and caption are immutable then at the ‘Post level’ those two wouldn’t be considered as a state because once set they never really change. Time and Likes would be our ‘Post level’ state because they are mutable and changing and they force the UI to refresh or update. So in this sensed state is not limited to Objects or user-defined data structures like a social media Post but it extends to primitive types like the number of likes a post has (Integer).</p><h3>State Management and Architecture</h3><p>State Management is not independent of app architecture. As a matter of fact, State Management is because of app architecture. According to the SOLID principles an exceptional architecture is one within which modules are closed for modification and open for extension. That means when a new feature is to be added to an app, modules should not be modified to accommodate the new feature, but rather code should be added to the modules that implement the new feature, and the added code should preserve the invariant that modules are closed for modification and open for extension.</p><p>If users can interact with the new feature then it is STATEFUL. Having centralized state management means no other parts of the app will be modified to accommodate the new feature’s state but that state will be added as part of the central state from which our new feature will access its state.</p><p>Visualizing the above scenario is not easy but the point it makes is that the need for state management becomes obvious as applications grow in complexity (as new features are added). This is why it is a necessary first step to think about State Management and how to do it in a way that is scalable. Before diving into any more detail let’s first think about the properties surrounding the state and how to abstract them in Android.</p><p>If each screen in your Android app represents a feature then it is an architectural best practice to avoid the sharing of data or communication between different features. This can be further enforced by separating features into independent modules. Unlike State Management in a web app where we have a central state repository that communicates with every component in the app, here we have multiple state repos for every feature.</p><p>Take view models for example. Ut usually makes sense to have separate view models for all features in your app rather than a central view model responsible for all features in your app. This way, if the state is defined as a property of a certain feature then no two features depend on one another since each feature has its own separate state and state management.</p><p>The following treatment assumes the case described above that each feature is independent and has its own state management.</p><p>Assume we are building a social media app like Facebook and our task is to build the user profile feature where a user can see details about their profile such as their profile pic, username, bio, friends, and list of previous posts.</p><p>At this point, we are not concerned with the backend and information retrieval from an API but are more interested in how to handle this specific profile feature, how it’s rendered, and how it responds to user actions.</p><h3>Key components</h3><p>Again assuming independence from all other features, here are 4 main components required to make this work.</p><p>We will need:</p><ul><li>The Main Profile View — This is the main screen or feature of the profile which renders all profile-related data. Our main frontend component.</li><li>Profile View Model — This gets all the data from our repositories and data sources as well as data stores [shared preferences] and provides a state object that will be used by our Profile View.</li><li>Profile View State — An immutable data class representing the state which maps all data received by the view model and transforms it into a single state object where the properties of this object are the data. Since it is immutable, when one piece of data changes a new state object with the relevant updates is created and returned rather than modifying existing state, a feature borrowed from REDUX.</li><li>Profile Actions — This includes abstract signatures of all possible actions that can be performed by a user while they are within the scope of the Profile View. These actions could be, Edit Profile Photo, Update username, delete a post, unfriend a friend, and navigate to settings, etc. For a login screen, some actions might be Login and Forgot Password.</li></ul><p>Here is how one might implement all these components.</p><h3>Actions</h3><p>First, define all actions that can be made from within the Profile feature. The actions will depend on the type of feature you are developing. For this example we might have something like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0c2349227080cc1f1af52f8ffdcbade6/href">https://medium.com/media/0c2349227080cc1f1af52f8ffdcbade6/href</a></iframe><p>To edit a profile the EditProfile action requires a user to edit in the first place and likewise to Unfollow, the action requires an id of the user to unfollow.</p><p>We use data classes for this and for actions that require no special data we use objects. All actions within the ProfileAction have to explicitly extend it, the reason why will become obvious soon.</p><h3>Profile View State</h3><p>This is the object holding all states used by the user profile feature. It is immutable thus changes to any of the data it holds will force the creation of a new instance of the view state containing the modified data. Here’s one way to implement it.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6996f9a718c4634511b9ff66c6de4b6c/href">https://medium.com/media/6996f9a718c4634511b9ff66c6de4b6c/href</a></iframe><p>We initialize all properties of the ProfileViewState to some default values that essentially represent an empty state.</p><h3>The Profile ViewModel</h3><p>The ViewModel exposes only state to the view (the Profile screen). The implementation of the ProfileViewModel is fairly complex so let’s start with the implementation followed by a brief explanation.</p><p>A curious reader will do further reading on some of the concepts I’m about to introduce because I simply cannot go into any detail without confusing you — assuming you are unfamiliar with Kotlin coroutines and flow.</p><p>If you are really curious then you should definitely check out my app here, <a href="https://github.com/aeyonblack/showhub">GitHub</a>. Play around with it then check out the code, It will be really helpful.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bfbd928f05a7f1ad353090ca44d139e8/href">https://medium.com/media/bfbd928f05a7f1ad353090ca44d139e8/href</a></iframe><p>Woah! that’s a lot. The key thing to understand here is that the ProfileViewModel is responsible for creating the state and executing any actions that are dispatched from the profile view.</p><p>It does this by using interactors and observers already implemented in the data layer of your application. Going further than this would be inconvenient.</p><h3>The Profile View</h3><p>This is the main UI component of the profile feature implemented using Jetpack compose.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b511a0a3d578d0ee92f9222bac47e03f/href">https://medium.com/media/b511a0a3d578d0ee92f9222bac47e03f/href</a></iframe><p>The profile view makes use of one state object that contains all the data it requires to describe it. Actions are sent back to the ProfileViewModel using a dispatcher where they are handled. This way the Profile view is only responsible for describing how data is laid out, actions, and state are handled by the ViewModel. That’s pretty cool if you ask me.</p><p>State management comes in handy as applications grow in complexity, so it is a necessary step to think about how you are going to handle state at the very start of your project. This was an example of one way to do it, you don’t have to understand everything here, just the core idea is enough.</p><p>This was a really long article and if you got this far well done. Thanks for hanging out. Stay sharp!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=62da15dc7578" width="1" height="1" alt=""><hr><p><a href="https://medium.com/better-programming/redux-style-state-management-for-android-apps-62da15dc7578">Redux Style State Management for Android Apps</a> was originally published in <a href="https://betterprogramming.pub/">Better Programming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build Single Activity Apps With Jetpack Compose]]></title>
            <link>https://medium.com/better-programming/single-activity-apps-with-jetpack-compose-bba4938ad630?source=rss-81b3baea3ef------2</link>
            <guid isPermaLink="false">https://medium.com/p/bba4938ad630</guid>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[androiddev]]></category>
            <category><![CDATA[jetpack-compose]]></category>
            <category><![CDATA[kotlin]]></category>
            <dc:creator><![CDATA[Tanya Masvita]]></dc:creator>
            <pubDate>Tue, 01 Feb 2022 23:50:30 GMT</pubDate>
            <atom:updated>2022-02-04T04:42:05.974Z</atom:updated>
            <content:encoded><![CDATA[<h4>Create standalone Android apps</h4><figure><img alt="Hand holding an android device" src="https://cdn-images-1.medium.com/max/1024/0*kUUx_YBG5bWWo16d" /><figcaption>Photo by <a href="https://unsplash.com/@rmrdnl?utm_source=medium&amp;utm_medium=referral">Daniel Romero</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When I started developing android apps back in 2017 I remember building out activities for every single screen or feature in the app and baking all the business logic inside these activities. The code looked so complex and messy and I would proudly show it off to my friends. I was in my 11th grade at around 15–16 y/o and I thought I was pretty smart, “No one can do what I do”, I thought to myself.</p><p>Then I learned about fragments and there was nothing I hated more about android development. What was the point? They looked just like activities but made everything harder. I couldn’t get fragment transactions working or pass some data between multiple fragments without going through a maze of errors (which taught me a lot by the way). To spare me the trouble I only used fragments when necessary and continued to use activities throughout entire apps.</p><p>In my quest to keep on upskilling and learning I discovered clean architecture and SOLID principles which I try to apply in every software I build, mobile or otherwise. The next app I built had a single activity and around 4 fragments. Turns out fragments weren’t so bad after all. I had a much better appreciation of fragments at this point and vowed to always use them. Until I picked up jetpack compose. Long story short, I hate fragments again.</p><p>If you have never used jetpack compose before you should try it. I will not go into any details on how it works or the basics. The best resources I used were <a href="https://codingwithmitch.com/">coding with mitch</a> and <a href="https://developer.android.com/jetpack/compose">Google’s documentation</a>. In this article, I go through one of many ways to build single activity apps using jetpack libraries.</p><p>The key idea is to have one single activity that serves as the main entry to and exit from your app. certain apps might require building several activities, for example, a MainActivity and a SettingsActivity but the fundamental idea remains the same.</p><p>Before we get started it’s important to understand the main components that make up most apps, in this context, it’s mainly one or more screens the user interacts with and a mechanism for navigating between these screens if there’s more than one. So how does this work?</p><h3>Create the app’s MainActivity</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c88dda07c118f6e11074dbd4affe50ec/href">https://medium.com/media/c88dda07c118f6e11074dbd4affe50ec/href</a></iframe><p>Once we have our basic Activity ready we now need to set up our navigation controller which will allow us to navigate between different screens. For this example, we assume our app has only 3 possible screens, Home, Search, and Library.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6997cf19bc56c3b21d63a0fa6b35c4b7/href">https://medium.com/media/6997cf19bc56c3b21d63a0fa6b35c4b7/href</a></iframe><p>The next step is to create a top level Singleton Screen Object that assigns unique routes for all possible screens in your app. For our example this Object — stored in a top level Kotlin file — looks something like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f390c5d535654dbefcafea059a7e392d/href">https://medium.com/media/f390c5d535654dbefcafea059a7e392d/href</a></iframe><h3>Add NavHost</h3><p>Back in MainActivity we now add a NavHost with the initial route set to Screen.Home.route because that’s our app’s default screen.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5f06c2cef6b368fba798d16e46a84fea/href">https://medium.com/media/5f06c2cef6b368fba798d16e46a84fea/href</a></iframe><p>The next step is to put all top level destinations — in our case the Home, Search and Library destinations — inside the NavHost. To do this we take advantage of Kotlin’s extension functions and express each of these screens as extensions of NavGraphBuilder.</p><blockquote>We take advantage of Kotlin’s extension functions and express each of these screens as extensions of NavGraphBuilder</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7666b600bff1e6905d6f70153924fd06/href">https://medium.com/media/7666b600bff1e6905d6f70153924fd06/href</a></iframe><p>Back in MainActivity we now put these inside the NavHost as follows:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f44348b4d2981e07e6a47f8a162eb5c5/href">https://medium.com/media/f44348b4d2981e07e6a47f8a162eb5c5/href</a></iframe><p>Of course, the app would not function like this. To actually navigate between screens you would need a Scaffold with a bottom app bar or some other means of navigation for example a button click that calls navController.navigate(route). The above functions allow you to create a navigation graph that defines the relationships that exist between different screens in your app.</p><p>A good practice would be to extract the navigation logic to a separate top-level Kotlin file because usually for a production application the navigation graph gets quite complicated. Another best practice would be to place our screens in separate modules altogether but that’s a topic for another day.</p><p>Thanks for stopping by. Stay sharp!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bba4938ad630" width="1" height="1" alt=""><hr><p><a href="https://medium.com/better-programming/single-activity-apps-with-jetpack-compose-bba4938ad630">Build Single Activity Apps With Jetpack Compose</a> was originally published in <a href="https://betterprogramming.pub/">Better Programming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>