<?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 Berezovsky on Medium]]></title>
        <description><![CDATA[Stories by Tanya Berezovsky on Medium]]></description>
        <link>https://medium.com/@tanyaberezovsky?source=rss-a542400a82ad------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*PzXiDVsZl2P5CBX0NjNyfg@2x.jpeg</url>
            <title>Stories by Tanya Berezovsky on Medium</title>
            <link>https://medium.com/@tanyaberezovsky?source=rss-a542400a82ad------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 10:51:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tanyaberezovsky/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[ Swift Async/Await vs Combine in iOS App Network Calls]]></title>
            <link>https://medium.com/@tanyaberezovsky/swift-async-await-vs-combine-in-ios-app-network-calls-f7c77dfbe133?source=rss-a542400a82ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7c77dfbe133</guid>
            <dc:creator><![CDATA[Tanya Berezovsky]]></dc:creator>
            <pubDate>Tue, 20 May 2025 18:17:28 GMT</pubDate>
            <atom:updated>2025-05-20T18:17:28.719Z</atom:updated>
            <content:encoded><![CDATA[<p>Align around <strong>modern Swift concurrency practices and </strong>how to replace Combines Zip Publisher in a new <strong>concurrency.</strong></p><h3>⚖️ Rule of Thumb</h3><ul><li>Use <strong>async/await</strong> for all new and refactored code.</li><li>Use <strong>Combine</strong> only where legacy support is needed.</li></ul><h4>🚫 Why Not Use Combine First?</h4><p>Combine-based networking often uses:</p><pre>Future { promise in<br>    httpClient.execute(target: target) { result in … }<br>}</pre><p>➡️ This still relies on old <strong>completion handler patterns</strong>.</p><p><strong>With GCD (old):</strong></p><ul><li>Each T<strong>hread hold one Network call</strong>.</li><li>More threads than CPUs → <strong>context switching</strong>, overhead, risk of <strong>thread explosion</strong> and even deadlocks.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YqxIhS5hZ2SEQgp3EMrRzg.png" /></figure><h3>✅ Why Prefer async/await?</h3><h4>🧠 Performance + Simplicity</h4><p><strong>With Swift Concurrency (new):</strong></p><ul><li>One thread per CPU.</li><li>Tasks use <strong>lightweight continuations</strong> (not full threads).</li><li>Suspension points (with await) cost just a <strong>function call</strong> — significantly cheaper than thread switching.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PWZcVxDUpmgA-f1GmHD17g.png" /></figure><h3>But. How to express Combines Zip Publisher in a new Concurrency?</h3><ul><li>Well. We will get to it shortly…it is like running tasks in parallel and then synchronizing them, right.</li></ul><h3>🧵 Async/Await = Structured Concurrency</h3><p>Wait — what does <em>structured concurrency</em> mean?</p><p>It’s like traditional structured programming:<br> → Code flows <strong>top to bottom</strong>, like an if statement.</p><p>Key benefits:</p><ul><li>✅ <strong>Improved readability</strong> — no deep nesting or tangled callbacks</li><li>✅ <strong>Standart error handling</strong> — use try/catch just like synchronous code</li><li>✅ <strong>Direct return values</strong> — no need to unpack result types or closures</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/0*UyUBBug4BXPu7hji" /></figure><blockquote>💡 The <strong>await</strong> functions act as a <strong>suspension point</strong>, where work might leave the main actor and execute on another thread. This is crucial to understand.</blockquote><p><strong>A common scenario</strong>:: The function will start on ViewModel on main actor, but will leave it as soon as you encounter a first await in your code. URLSession will not download anything on main actor too.<strong> Suspension points</strong> (await) mean that your task leaves the actor it was executed on and that actor is free to execute the next task until the wait finishes.</p><h4>⛓️ Running Tasks in Parallel and <strong>Then Synchronizing Them</strong> — The Structured Way With Synchronization</h4><h4>async let</h4><p>async let — executes task in parallel and following await waits until both ingredients are ready. We can say that this way can replace Combine’s zip.</p><p>Use when:</p><ul><li>You know exactly how many tasks to run in parallel.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NU7MIehLoy8-3PF2" /></figure><h4>Task Groups</h4><ul><li>Use task groups for providing a dynamic amount of concurrency when the number of tasks is not known statically.</li></ul><p><strong>Composition</strong>: You can combine different forms of structured tasks, like using async-let within task groups.</p><h4>✍️ Summary:</h4><ul><li>Use async/await as the default.</li><li><strong>Deprecate all non-async/await functions</strong> in your base network service.</li></ul><p><strong>WWDC21 Resources:</strong></p><ul><li><a href="https://www.youtube.com/watch?v=nyuq9qc-2H8">Explore structured concurrency in Swift</a></li><li><a href="https://www.youtube.com/watch?v=f-re0WpYzZo">Swift concurrency: Behind the scenes</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7c77dfbe133" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[iOS In-App Subscription with StoreKit 2]]></title>
            <link>https://medium.com/@tanyaberezovsky/ios-in-app-subscription-with-storekit-2-50589d25b32a?source=rss-a542400a82ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/50589d25b32a</guid>
            <category><![CDATA[wwdc-2022]]></category>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[storekit]]></category>
            <category><![CDATA[subscription]]></category>
            <dc:creator><![CDATA[Tanya Berezovsky]]></dc:creator>
            <pubDate>Sun, 20 Oct 2024 17:13:49 GMT</pubDate>
            <atom:updated>2024-11-08T17:33:49.989Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OXTNiPR7a9sJh3vGynYWgA.png" /></figure><p>Configuring StoreKit 2 for the first time was surprisingly easy.</p><p>The process was incredibly smooth, showcasing just how well Apple designs its tools for developers.</p><p>If you’re adding a subscription for the first time like I did, I recommend starting with the WWDC 2022 session “<a href="https://developer.apple.com/videos/play/wwdc2022/10039/">What’s New in StoreKit Testing</a>.” It provides an excellent overview of the entire StoreKit ecosystem, highlighting where to start the configuration process.</p><p>After watching <a href="https://developer.apple.com/videos/play/wwdc2022/10039/">What’s New in StoreKit Testing</a>, configure your subscriptions in App Store Connect and create Subscription view and Marketing content view. That’s it — you’re all set!</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/49fbb9d5fec4414e77e3e491fa3b858c/href">https://medium.com/media/49fbb9d5fec4414e77e3e491fa3b858c/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/325092807bbe2df0b96db46a98266c9c/href">https://medium.com/media/325092807bbe2df0b96db46a98266c9c/href</a></iframe><p>P.S my subscription was rejected with note:</p><blockquote>Update the app’s binary to include the following required information:</blockquote><blockquote>- A functional link to the Terms of Use (EULA)</blockquote><blockquote>- A functional link to the privacy policy</blockquote><p>I’ve added a missing code to the MySubscriptionView:</p><pre> SubscriptionStoreView(...) {<br>  ...<br> }<br> .subscriptionStorePolicyDestination(url: AppConstants.URLs.privacyPolicy, for: .privacyPolicy)<br> .subscriptionStorePolicyDestination(url: AppConstants.URLs.termsOfService, for: .termsOfService)</pre><p>And included a link to the standard Terms of Use in the app description:</p><p><em>License Agreement: </em><a href="https://www.apple.com/legal/internet-services/itunes/dev/stdeula/"><em>https://www.apple.com/legal/internet-services/itunes/dev/stdeula/</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50589d25b32a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Feature/Flow Modularization in iOS]]></title>
            <link>https://medium.com/@tanyaberezovsky/feature-flow-modularization-in-ios-985b2e8cfaf6?source=rss-a542400a82ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/985b2e8cfaf6</guid>
            <category><![CDATA[spm]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift-package-manager]]></category>
            <category><![CDATA[modularization]]></category>
            <dc:creator><![CDATA[Tanya Berezovsky]]></dc:creator>
            <pubDate>Thu, 10 Oct 2024 17:48:27 GMT</pubDate>
            <atom:updated>2024-10-10T17:48:27.028Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*e_MGt3qEyfVhLaDQKzyvTw.png" /></figure><p>Breaking down large applications into smaller, independent units improves maintainability and organization.</p><p><em>Based on </em><strong><em>Pointfree</em></strong><em> article: </em><a href="https://www.pointfree.co/episodes/ep171-modularization-part-1"><em>Modularization, Part 1</em></a></p><h4>What is Modular Code?</h4><p>Modularity refers to organizing code into separate modules, each of which has a clearly defined public interface. This allows certain parts of the module to be accessible externally while keeping other parts private and internal to the module.</p><h4><strong>The Problem Developers Face</strong></h4><p>Modifying legacy code in a monolithic application is often a challenging and time-consuming task. To manage this complexity, developers typically modularize the code based on <strong>layer/technical responsibilities</strong>, creating separate modules for networking, UI components, and so on. However, as the codebase grows, it’s usually the <strong>features</strong> that expand rapidly, leading to tight coupling between different parts of the app.</p><p><strong>Feature modularization</strong> is the key solution to achieve a more significant impact from modularization. By separating the code based on features, we can better manage growth, reduce dependencies, and make the application easier to maintain and scale.</p><h3>Impacts of Feature Modularization</h3><p><em>** Layer Modularization has a lower impact.</em></p><p><strong>Improved Build Times — </strong>swift modules can build parallel.</p><p><strong>Strong Boundaries— </strong>promote code isolation.</p><p><strong>Enhanced Testability — </strong>test modules in isolation for better stability.</p><p><strong>Independent Development — </strong>multiple teams can work on different modules simultaneously.</p><p>By focusing on feature modularization, we can improve code quality, simplify future updates, and safer scaling of applications.</p><p>Here’s a look at my side project, an older app I’m upgrading with feature modularization. It includes <strong>Layer modules</strong> like UIComponents, FoundationSystem, and DesignSystem, alongside <strong>Feature modules</strong> such as CigsCharts, IAPurchase, Monitor, and Notifications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*vUC2xFOldTgPsKV7mdrW5A.png" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4a068e9dbdbebcd52969967ceec8e306/href">https://medium.com/media/4a068e9dbdbebcd52969967ceec8e306/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=985b2e8cfaf6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Actors vs Classes and Structs — differences and similarities in Swift]]></title>
            <link>https://medium.com/@tanyaberezovsky/actors-vs-classes-and-structs-differences-and-similarities-in-swift-dfd834aebeaf?source=rss-a542400a82ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/dfd834aebeaf</guid>
            <category><![CDATA[struct]]></category>
            <category><![CDATA[actors]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[class]]></category>
            <category><![CDATA[race-condition]]></category>
            <dc:creator><![CDATA[Tanya Berezovsky]]></dc:creator>
            <pubDate>Sat, 10 Aug 2024 09:36:31 GMT</pubDate>
            <atom:updated>2024-08-10T11:51:43.284Z</atom:updated>
            <content:encoded><![CDATA[<h3>Actors vs Classes and Structs — differences and similarities in Swift</h3><h3>Main responsibilities:</h3><ul><li><strong>Actors</strong> in Swift are designed to isolate access to data, effectively eliminating data races. Data races occur when the same memory <strong>is</strong> accessed from multiple threads without synchronization.</li><li><strong>Classes</strong> are reference types suited for complex, shared data structures that benefit from inheritance. They allow multiple references to the same instance, ideal for objects maintaining state and identity.</li><li><strong>Structs</strong> are value types that encapsulate simple data structures, creating a unique copy on assignment. They are ideal for modeling small, immutable data and <strong>should be your first choice when these requirements are met</strong>.</li></ul><h3>Differences and similarities:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eIxpAxFRt5RvAWXvTyHvdQ.png" /></figure><h3>Remember<strong>:</strong></h3><ul><li>To access an Actor’s mutable data, you must do so asynchronously using the <strong>await</strong> keyword.</li><li>Try to go for a <strong>struct</strong> by default.</li><li>If you need a <strong>class</strong> marking it as <strong>final</strong> in Swift helps the compiler optimize your code by explicitly indicating that the class cannot be subclassed. This allows the compiler to make certain optimizations, such as devirtualizing method calls, which can improve performance. By telling the compiler that no other classes will inherit from your class, you provide more information that can lead to faster and more efficient code execution.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dfd834aebeaf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[iOS Unit Testing: Mocks vs Stubs Explained]]></title>
            <link>https://medium.com/@tanyaberezovsky/ios-unit-testing-mocks-vs-stubs-explained-cb3641ec90d2?source=rss-a542400a82ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb3641ec90d2</guid>
            <category><![CDATA[unittest]]></category>
            <category><![CDATA[unitt-testing]]></category>
            <category><![CDATA[mock]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[mocking]]></category>
            <dc:creator><![CDATA[Tanya Berezovsky]]></dc:creator>
            <pubDate>Thu, 25 May 2023 13:50:30 GMT</pubDate>
            <atom:updated>2023-05-25T13:50:30.860Z</atom:updated>
            <content:encoded><![CDATA[<p>Mocks and stubs play crucial roles in unit testing by imitating the behavior of real components. They both fall under the category of test doubles, but they serve slightly different purposes.</p><p><strong>Stubs</strong> are objects that provide predetermined responses to calls made during the test. They’re mainly used to provide the test with indirect input.</p><p><strong>Mocks</strong> are objects used to verify the interaction between the object under test and its dependencies. They’re mainly used to provide the test with indirect output.</p><p>Let’s take a look at an example of using mocks and stubs in unit testing on iOS.</p><p>Assume we have a UserController class that fetches user information from a UserService:</p><pre>class UserController {<br>   private let userService: UserService<br><br>  init(userService: UserService) {<br>     self.userService = userService<br>  }<br><br>  func fetchUser(completion: @escaping (User?, Error?) -&gt; Void) {<br>     userService.getUser { user, error in<br>       completion(user, error)<br>     }<br>   }<br>}</pre><p>UserService is a protocol which is used to get user information:</p><pre><br>protocol UserService { <br>  func getUser(completion: @escaping (User?, Error?) -&gt; Void) <br>}</pre><p>If we want to test UserController&#39;s fetchUser function, we can create a stub for UserService:</p><pre>class UserServiceStub: UserService {<br>    var user: User?<br>    var error: Error?<br><br>    func getUser(completion: @escaping (User?, Error?) -&gt; Void) {<br>        completion(user, error)<br>    }<br>}</pre><p>And then use the stub in the unit test:</p><pre>func testFetchUser() {<br>    let userServiceStub = UserServiceStub()<br>    let userController = UserController(userService: userServiceStub)<br>    <br>    userServiceStub.user = User(name: &quot;John Doe&quot;)<br>    userController.fetchUser { user, error in<br>        XCTAssertEqual(user?.name, &quot;John Doe&quot;)<br>    }<br>}</pre><p>Here, UserServiceStub is a stub. It provides the predetermined response that we need for the test.</p><p>For the same example, if we need to ensure that the getUser function of UserService was indeed called once when we called fetchUser, we can use a mock:</p><pre>class UserServiceMock: UserService {<br>    var getUserCalled = false<br>    <br>    func getUser(completion: @escaping (User?, Error?) -&gt; Void) {<br>        getUserCalled = true<br>        completion(nil, nil)<br>    }<br>}</pre><p>And then use the mock in the unit test:</p><pre>func testFetchUserCallsGetUser() {<br>    let userServiceMock = UserServiceMock()<br>    let userController = UserController(userService: userServiceMock)<br>    <br>    userController.fetchUser { _, _ in }<br>    XCTAssertTrue(userServiceMock.getUserCalled)<br>}</pre><p>Here, UserServiceMock is a mock. It records whether or not getUser was called, allowing us to verify the interaction between UserController and UserService.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb3641ec90d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use Fastlane to deploy multiple targets to TestFlight, Xcode iOS]]></title>
            <link>https://blog.devgenius.io/how-to-use-fastlane-to-deploy-multiple-targets-to-testflight-xcode-ios-41e1b932ef3?source=rss-a542400a82ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/41e1b932ef3</guid>
            <category><![CDATA[fastlane]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[testflight]]></category>
            <category><![CDATA[xcode]]></category>
            <dc:creator><![CDATA[Tanya Berezovsky]]></dc:creator>
            <pubDate>Tue, 02 Jun 2020 10:46:43 GMT</pubDate>
            <atom:updated>2020-06-05T09:38:21.544Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*4DI6yontRMF9B05MrwLnWA.jpeg" /></figure><p>A compact tutorial on how to deploy multiple targets iOS app to TestFlight in 8 easy steps.</p><p>Let’s get rolling.</p><blockquote>1. <a href="https://docs.fastlane.tools/getting-started/ios/setup/">First of all, install Fastlane</a></blockquote><blockquote>2. Setting up Fastlane</blockquote><p>Open Console -&gt; Navigate your project directory and run:</p><pre>fastlane init</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*yMjKFc8BsvHm6Zq5b2vh1A.png" /></figure><blockquote>This command going to ask you — ”<em>What would you like to use Fastlane for?”</em></blockquote><p>Choose the second option:</p><pre>👩‍✈️️ <em>Automate beta distribution to TestFlight</em>.</pre><p>This choice will set the basic setup that we a going to expand to work with multiple targets.</p><blockquote>3. Create environment variables per target</blockquote><p>For instance we have two targets App1 and App2. For each of them creates an environment file that will hold an <strong>environment variables</strong> Scheme name and Bundle. The filename should be in format .env.YourTargetName. Create .env.App1 and .env.App2 files.</p><p>For example, fou can create both files in the console:</p><pre>touch .env.App1<br>touch .env.App2</pre><pre>open -a Xcode .env.App1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*JyQxjFwQkp8Nm0MpgbGCLA.png" /></figure><p>Fill up both files accordingly, each with your unique scheme name and bundle of each App target:</p><pre>SCHEME = “schema name App1”<br>BUNDLE_IDENTIFIER = “Bundle identifier App1”</pre><blockquote>4. Modify an Appfile</blockquote><p>Open the Appfile and change the line:</p><pre>app_identifier(“your bundle identifier”)</pre><p>To use defined variable:</p><pre>app_identifier(ENV[‘BUNDLE_IDENTIFIER’])</pre><blockquote>5. Generate application specific passwords</blockquote><p><a href="https://docs.fastlane.tools/best-practices/continuous-integration/#application-specific-passwords">To upload builds to TestFlight, you need to generate an <em>application specific password.</em></a></p><blockquote>6. Fastfile and Gymfile</blockquote><p>The context of rest two files Fastfile and Gymfile are completely generic for all projects. They know to get a scheme and bundle identifier from our files.</p><p>Fastlane file — is a major Fastlane file that builds and upload to TestFlight for all targets.</p><p>Gymfile — is specifiled where and how to create a *.ipa files.</p><p><a href="https://github.com/tanyaberezovsky/fastlane_upload_multiply_targets_iOS">Download Fastfile and Gymfile from my GitHub repo and place them into fastlane directory.</a></p><blockquote>7. Inside Fastlane directory create a directory called “builds”</blockquote><p>Our Gimfile is configurated to create all *.ipa files in this directory.</p><blockquote>8. Run and test</blockquote><p>Run a specific target:</p><pre>fastlane do_everything — env TargetName</pre><p>Run all targets:</p><pre>fastlane do_everything</pre><h3>🤩 🤩 🤩 🤩 🤩 🤩 🤩 🤩 🤩 🤩 🤩 🤩 🤩 🤩 🤩 🤩 🤩</h3><blockquote>Finally, an exciting part!</blockquote><p>After Fastlane finished to run in my real environment, which includes four targets, I got this message in console:</p><pre>fastlane.tools just saved you 92 minutes! 🎉</pre><p>To be honest it’s saved me even more because I can’t perform action after action immediately.</p><p>In conclusion, there’s no doubt that Fastlane is 100% worth to use.</p><p><a href="https://github.com/tanyaberezovsky/fastlane_upload_multiply_targets_iOS">Download all files from GitHub</a></p><p>Thank you for reading this.</p><p>Good Luck!</p><p>P.S. This tutorial was partly base on <a href="https://medium.com/@vizllx/integrating-fastlane-with-multiple-target-for-a-single-ios-project-7920b32e1cb4">Integrating Fastlane with multiple target for a single iOS project by SANDEEP MUKHERJEE</a> and on <a href="https://www.raywenderlich.com/233168-fastlane-tutorial-getting-started">fastlane Tutorial: Getting Started By Lyndsey Scott from raywenderlich.com</a> there you can read more about Gymfile and do_everything loop written in Fastfile.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=41e1b932ef3" width="1" height="1" alt=""><hr><p><a href="https://blog.devgenius.io/how-to-use-fastlane-to-deploy-multiple-targets-to-testflight-xcode-ios-41e1b932ef3">How to use Fastlane to deploy multiple targets to TestFlight, Xcode iOS🚀🚀</a> was originally published in <a href="https://blog.devgenius.io/">Dev Genius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to increase amount of women employees in hi-tech companies]]></title>
            <link>https://medium.com/@tanyaberezovsky/how-to-increase-amount-of-women-employees-in-hi-tech-companies-43e1e3a6dd2e?source=rss-a542400a82ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/43e1e3a6dd2e</guid>
            <category><![CDATA[female-developer]]></category>
            <dc:creator><![CDATA[Tanya Berezovsky]]></dc:creator>
            <pubDate>Sat, 16 May 2020 13:00:22 GMT</pubDate>
            <atom:updated>2020-05-16T13:00:22.654Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*CuMdlZW-YJpwCovtAojuBw.jpeg" /></figure><p>Many companies are fighting to raise the percentage of women employees, while some women prefer to risk their careers and stay at home and raise children rather than go a to full-time job.</p><p>Why is this happening? Simply, companies are offering the wrong values to women. While advertising positions in words like ‘looking for next ninja’ and trying to attract their workers with boy-ish entertainment like free alcohol, video games and any of the latest gadgets. Whereas men are going to be excited by free beer and cutting edge devices, for women it could feel like a lesser- known territory, and only alienate.</p><p>I am working in a hi-tech company and in a regular team that has one woman(me) and four guys. A few month ago we were hiring an Android developer. I had a brilliant friend and she was looking for a job. She is a mother of three kids and lives pretty far. After my suggestion, my boss gave her an offer to work two and a half-days at the office, and the other two and a half days from home. This offer was a positive decision and she signed the contract even though our company was twice as far as the other one. I’m glad that my boss had the confidence and responsibility to bring an employee on such a different contract as anybody else.</p><p>The first month was onboarding and my friend worked full time from the office. A few months later she was hired, she showed herself as a high professional and responsible person with excellent productivity skills. Our work did not suffer from her being part time in the office. Moreover, when the genders proportions changed, sociable skills among the team escalated, diversity of topics were enhanced, and we became more friendly and I even feel more welcome since I’m not the only woman any more. Finally it even raised our motivation within the team.</p><p>In conclusion, there was no doubt that we should hire more women within hi-tech companies. We should therefore understand that women are interested in different privileges than men. We should take initiatives and ask our companies to offer women what they are seeking flexible hours and some ability to work from home. Women will be grateful, more motivated to work in an environment that cares about their needs.</p><p>P.S. I really hope that COVID -19 is going to change the way we work from now onwards. And that it becomes more and more legitimate to work from home.</p><p>Thank you for reading this. Feel free to share your thoughts.</p><p>Cheers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43e1e3a6dd2e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Swift Articles that Changed My Life]]></title>
            <link>https://medium.com/@tanyaberezovsky/a-swift-articles-that-change-my-life-4aeb891a09fb?source=rss-a542400a82ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/4aeb891a09fb</guid>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Tanya Berezovsky]]></dc:creator>
            <pubDate>Tue, 07 Aug 2018 18:54:11 GMT</pubDate>
            <atom:updated>2018-08-08T08:49:48.798Z</atom:updated>
            <content:encoded><![CDATA[<p>The Collection of: Must read articles</p><p>I’m reading a lot of good Swift articles, but this list is different. Here I’m putting only the articles that blow my mind, which I adore and which I implemented in my Apps. After you reading them, there is no return point to old-style coding, I’m promising.<br>I’m constantly looking to improve my code. I love simple and convenient solutions that appreciate Apple’s architecture.</p><h3>Mixins and Traits:</h3><ul><li>‘<a href="https://goo.gl/kAK4av">Mixins and Traits in Swift 2.0</a> ‘ by <a href="http://twitter.com/mhollemans">@mhollemans</a></li></ul><p>This is my number one! A brilliant article that shows on a use case the power of the Protocol Oriented Programming. You can apply this principle in wide scale all over your Apps and get more reusable and flexible code! What can be better?</p><ul><li>Also, you are very welcome, to check out my blog post, that was influenced by this article — <a href="https://medium.com/@tanyaberezovsky/a-flexible-validation-approach-in-swift-40e08ffd3ade">A Flexible Validation Handling In Swift 4</a>.</li></ul><h3>MVC -&gt; MVVM What?:</h3><ul><li><a href="https://matteomanferdini.com/mvvm-pattern-ios-swift/">The MVVM Pattern for iOS Apps in Swift: a Pragmatic Approach</a> by <a href="https://medium.com/u/f0e87a3fe8ce">Matteo Manferdini</a>, this article has a deep explanation of architecture and shows on a practical implementation.</li></ul><blockquote>‘The MVVM pattern is an extension of the MVC pattern’ — <a href="https://medium.com/u/f0e87a3fe8ce">Matteo Manferdini</a> wrote on his awesome article</blockquote><p>I definitely take a lot from his article.</p><p>After reading all over the web about all alternative iOS architectures I finally decide to stay with MVC as a solid pattern that can give a lot of benefits if we just use it correctly.</p><p>I was looking for simple solutions to deal with iOS Massive View Controllers. Solutions that extending MVC, saving its balance and not violating Apple’s ecosystem.</p><h3>Routing in iOS:</h3><p><a href="https://medium.com/rosberryapps/the-flexible-routing-approach-in-an-ios-app-eb4b05aa7f52">A Flexible Routing Approach in an iOS App</a> by @<a href="https://medium.com/@otbivnoe?source=post_header_lockup">Nikita Ermolenko</a></p><p>Another important topic. This article is simply the best and convenient iOS routing approach that I found on the web and implemented in my App.</p><h3>Networking:</h3><ul><li><a href="https://www.marisibrothers.com/2016/07/protocol-oriented-loading-of-resources.html">Protocol oriented loading of resources from a network service in Swift</a> by @<a href="https://www.marisibrothers.com/">Marisi Brothers</a></li></ul><p>There are tons of networking articles, but most of them are very basic.<br>This is the most fundamental article with an updated example on GitHub that I found so far. It’s ready to use. You can simply scale it. With some extension It allows you to have your iOS Network framework.</p><h3>UITableView — creating forms:</h3><ul><li><a href="http://bizz84.github.io/2016/06/18/Protocol-Oriented-UITableViewCells.html">Protocol Oriented UITableViewCells</a> by Andrea Bizzotto</li><li><a href="http://alisoftware.github.io/swift/generics/2016/01/06/generic-tableviewcells/">Using Generics to improve TableView cells</a> by Olivier Halligon</li></ul><p>Based on two above articles, I created <a href="https://github.com/tanyaberezovsky/TestDynamicTable">an example of UITableView with a set of cells implemented in Swift 4.</a></p><p><em>last update 7 Aug 2018</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4aeb891a09fb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Flexible Validation Handling In Swift]]></title>
            <link>https://medium.com/@tanyaberezovsky/a-flexible-validation-approach-in-swift-40e08ffd3ade?source=rss-a542400a82ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/40e08ffd3ade</guid>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Tanya Berezovsky]]></dc:creator>
            <pubDate>Tue, 24 Jul 2018 07:12:55 GMT</pubDate>
            <atom:updated>2018-08-06T10:10:11.369Z</atom:updated>
            <content:encoded><![CDATA[<p>Protocol composition for better scalable and testable code</p><p>My challenge was how to implement a reusable input data validation, that can be called from (n) screens. For example an email validation, that I should to use in signup, login, restore password and in change user details screens. A simple input validation that doesn’t include any transforming formatted data or any business logic.<br>According to MVC, it can be implemented in ViewController. But if I use this validation from several ViewControllers I will end up with duplicated code.<br>Also In order to avoid Massive View Controllers, in general, my approach is to remove from ViewController knowledge about the UI, validations, logic, networking…</p><p>The key was the amazing <a href="https://goo.gl/kAK4av">Mixins and Traits in Swift 2.0</a> article by <a href="http://twitter.com/mhollemans">@mhollemans</a>.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p>My example will be for email and password validations.</p><h4>Implementation</h4><p>Let’s start with trivial email validation protocol.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2c271ee248d99350ee69a72695c24787/href">https://medium.com/media/2c271ee248d99350ee69a72695c24787/href</a></iframe><p>ValidateEmail protocol defines a validation function in case it’s failed the appropriate error will be returned to the person.<br>In the protocol extension, there is a default implementation for the isEmailValid method. <br><a href="https://gist.github.com/tanyaberezovsky/155d64fcc3068c64b82ba40672f66b51">The ValidatePassword protocol has the same structure, it’s code available on GitHub.</a><br>Both validation protocols throw an error that implemented in ValidationError enum, the enum with associated values. ValidationError accessed to validation error enum types and know to return a specific error description. <a href="https://gist.github.com/tanyaberezovsky/9c80cd3c13fa3d6e569bdaced474dd0f">Because the ValidationError is talking on a quite different subject, it’s code also available on GitHub and I will go throw it in the next post.</a></p><p><strong><em>Here is coming an interesting part. How to use our protocols?</em></strong></p><h3>The problematic way:</h3><p>Obviously. We can conform to protocols directly in class definition.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9c72fa61c0eccd4638eb4c9fba1a7f19/href">https://medium.com/media/9c72fa61c0eccd4638eb4c9fba1a7f19/href</a></iframe><p>This implementation will cause a mess in a class definition. Especially when we talking about of group of protocols, that can growth to (n) protocols.</p><p>A better way, is to use Protocol Composition.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4f317b827db6ba6bbb1f2b87df25e9bc/href">https://medium.com/media/4f317b827db6ba6bbb1f2b87df25e9bc/href</a></iframe><p>But this implementation will writes all default protocol functions into the class in compilation time. And access to the function become less obvious.</p><h3><strong>An alternative way:</strong></h3><p>In the ideal world I would love, any ViewController to be able to access only the validations it needs, through the object that captures them.</p><p>To do so let’s compose all protocols in the certain struct. This struct gets conform to it’s inner <em>typealias</em> and then we can create a new instance of it in our ViewController it will allow to us access to all protocols default validation functions.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a45455ebcac9dd8a3a0df2319785b0d3/href">https://medium.com/media/a45455ebcac9dd8a3a0df2319785b0d3/href</a></iframe><p>To start using new LoginValidator let’s create a new instance of it in the VC or we can also inject it in a constructor.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/00704b17fa103aaca822330fc635140c/href">https://medium.com/media/00704b17fa103aaca822330fc635140c/href</a></iframe><p>The <strong>validator. </strong>variable<strong> </strong>will show the list of all validation functions. The function call <strong>validator.isEmailValid(…)</strong> becomes clearer and more readable<strong>. </strong>Each new struct wrapper object defines <strong>exactly what it needs </strong>and it also make<strong> maintenance cost lower.</strong></p><p>This definition allows convenient use of independent <strong>Unit Test</strong>s and use of <strong>dependency injection</strong>.</p><p>Thats it.</p><p>You are awesome! Thank you for reading till the end:)</p><p>Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40e08ffd3ade" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Swift: Private extensions ]]></title>
            <link>https://medium.com/@tanyaberezovsky/swift-private-extensions-aa5afcb4eaa0?source=rss-a542400a82ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa5afcb4eaa0</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Tanya Berezovsky]]></dc:creator>
            <pubDate>Sun, 27 May 2018 12:54:39 GMT</pubDate>
            <atom:updated>2018-05-27T12:55:32.997Z</atom:updated>
            <content:encoded><![CDATA[<p>A convenient way to group your Access Control</p><p>For me, it’s little bit tediously to set manually private Access on each declaration.</p><p>I discovered a new way, in Swift we can group all private functions under a private extension. All code under this declaration become a private.</p><pre><em>// MARK: private methods</em></pre><pre><strong><em>private extension</em></strong><em> MyViewController {</em></pre><pre><em>func addConstraints() {</em></pre><pre>...</pre><pre><em>}</em></pre><pre><em>func hideKeyboard() {</em></pre><pre>...</pre><pre><em>}</em></pre><pre><em>}</em></pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa5afcb4eaa0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>