<?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 Asad Mansoor on Medium]]></title>
        <description><![CDATA[Stories by Asad Mansoor on Medium]]></description>
        <link>https://medium.com/@asadmansoor?source=rss-5dfdfdfe74d8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*mocr_YifkmiZw4Rf92sn4Q.jpeg</url>
            <title>Stories by Asad Mansoor on Medium</title>
            <link>https://medium.com/@asadmansoor?source=rss-5dfdfdfe74d8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 19:03:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@asadmansoor/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[Expand Your Lint Checks with Custom Detekt Rules]]></title>
            <link>https://medium.com/@asadmansoor/expand-your-lint-checks-with-custom-detekt-rules-4fd9f4620432?source=rss-5dfdfdfe74d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/4fd9f4620432</guid>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[linter]]></category>
            <category><![CDATA[gradle]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Asad Mansoor]]></dc:creator>
            <pubDate>Wed, 26 Feb 2025 22:49:09 GMT</pubDate>
            <atom:updated>2025-02-26T22:49:53.860Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B7dD7yIK0020Az4olk80Ig.png" /><figcaption>Detekt html report with custom rules</figcaption></figure><p><em>Welcome to another post where I share what I have been learning within the realms of Android development. If you find this helpful and want to stay updated, feel free to like and follow.</em></p><p>In the last post, I shared my experience with integrating Detekt to an Android project. During that process I found numerous lint issues, some relating to styling issues and others revealing performance oddities that could lead to potential bugs in the future. Detekt is a useful tool for catching these issues before the code gets merged, ensuring a standardized codebase for all the developers that are working on the project. That got me thinking though. What if I wanted to create my own set of rules that checks for specific code formatting that is unique to my project. So in this post, I will walk you through how I created custom lint rules using Detekt.</p><p>I found the process of writing custom lint rules to be a tricky one. The official documentation could have been clearer, but once everything was up and running, the process turned out to be relatively straightforward. To follow along, you will need to have some basic understanding of Detekt. If you are unfamiliar, <a href="https://medium.com/android-dissekt/android-linting-with-detekt-8ace3ce29216">check out my previous post</a>.</p><h3>Overview and Requirements</h3><p>In short, Detekt is an open-source static code analysis tool for Kotlin. It scans the codebase for potential code smells, styling issues or anything that could harm the maintainability and reliability of the code. I personally enjoy using linters with my team to quickly gather feedback during the implementation and code review stages, helping us catch issues early and potentially saving time in the development process.</p><p>By default, Detekt scans the codebase using its own built-in lint rules which can be managed through the Detekt configuration file. As a developer, you have the flexibility to enable or disable individual rules, as well as adjust their thresholds. Detekt also offers a marketplace where you can integrate other third-party lint rules that others have open-sourced. My favorite one is Detekt for Compose. In our case, our lint rules will live inside our project as a separate module. They will be referenced in the configuration file and can be shared within a larger organization or different teams.</p><p>The lint rules I have chosen to implement are areas that I often interact with when I am developing a new feature. By creating these rules, I can ensure I am consistently following best practices, while also having a helpful reminder along the way. The specific requirements are as follows:</p><ol><li>All Preview annotations (for Compose) must include the group parameter.</li><li>All TODO comments must follow a specific pattern which includes the author and additional context.</li><li>A specific “useStaging” variable must not be set to True when the linter is running on the CI pipeline.</li></ol><h3>Getting Started</h3><p>Before we can start writing our rules, we need to make some changes to the project’s file structure and add the required libraries. I struggled a bit on this step. Where is what I did to start off.</p><ol><li>Create a new Kotlin-only module.</li></ol><p>We need a space to add our Detekt specific implementation. As advised by the official guide, we are required to use a Kotlin-specific module without any Android dependencies. I accidently created an Android module and for some reason, I could not get the rules to work. Continue to create a new module and feel free to name it to your liking, I went with “rules”.</p><p>Your project might look something like below.</p><pre>| Project<br>  | app/<br>  | rules/<br>    | src/<br>      | main/<br>      | test/ (I added a test folder to test our lint rules) <br>    | build.gradle.kts</pre><p>2. Add the required dependencies</p><p>One of the advantages of using a Kotlin-only module is that it allows us to keep our module as lean as possible. For dependencies, you will need to add the Detekt plugin along with the Detekt API and Detekt Test library. Make sure to reference the Kotlin plugin as well.</p><p>You can add any other testing or utility libraries based on your preferences. As of now, your build.gradle file (in the newly created module) might look something like below.</p><pre>plugins {<br>    id(&quot;kotlin&quot;)<br>    alias(libs.plugins.detekt.plugin)<br>}<br><br>dependencies {<br>    compileOnly(libs.detekt.api)                 // detekt-api:1.23.7                <br>    testImplementation(libs.detekt.test)         // detekt-test:1.23.7<br>    testImplementation(libs.junit)   <br>}</pre><p>3. Create the following files</p><p>Now we can start constructing the files we need for our custom lint rules. Do not worry too much about each file, we will go over them in more detail later. Create the following set of files.</p><ol><li><strong>CustomDetektRuleSetProvider.kt</strong> (you can choose any provider name)</li></ol><ul><li>Place it in the `src/main/java` folder</li><li>This will reference all of your rules you are going to create</li></ul><p>2. <strong>PreviewsMustIncludeGroup.kt</strong></p><ul><li>Create a new folder called “issues” and place the file in that folder</li><li>Each rule will have its own file</li></ul><p>3.<strong> io.gitlab.arturbosch.detekt.api.RuleSetProvider</strong> (name must match the spelling)</p><ul><li>You will need to create a new resource folder</li><li>Then place the file as is in the `META-INF/services/` folder (this consists of two folders)</li></ul><p>Your project structure might look like something below.</p><pre>| src/main/<br>  | java/com/company/rules/<br>    | issues/<br>      | PreviewsMustIncludeGroup.kt<br>    | CustomDetektRuleSetProvider.kt<br>  | resources<br>    | META-INF<br>      | services/<br>        | io.gitlab.arturbosch.detekt.api.RuleSetProvider</pre><h3>Understanding the structure</h3><p>The rules module will contain all the setup and implementation details for our custom rules. The first step is to configure the service. Detekt uses a ServiceLoader pattern which collects all the instances of our rule implementation and references it during runtime. In our module, we created a services folder with a file named <strong>io.gitlab.arturbosch.detekt.api.RuleSetProvider</strong>. In that file, we map it to our provider, which in this case should be our <strong>CustomDetektRuleSetProvider.kt</strong> file. So the content of the service will be.</p><p><strong>io.gitlab.arturbosch.detekt.api.RuleSetProvider</strong></p><pre>&lt;package&gt;.CustomDetektRuleSetProvider</pre><p>Replace the package with your project’s package. Ensure it is the correct package path to your provider class. Next we will implement the RuleSetProvider.</p><p>Open the <strong>CustomDetektRuleSetProvider.kt</strong> class and implement the RuleSetProvider. We will need to define the ruleSetId with a unique String id. Each rule set requires an ID, which Detekt determines whether to apply it during a particular analysis. The instance method provides the implementation class for each of the following rules in our rule set. Configuration arguments can be passed to make the rules more flexible, allowing them to adapt to different parameters.</p><pre>class CustomDetektRuleSetProvider : RuleSetProvider {<br><br>    override val ruleSetId: String = &quot;custom-rules&quot;<br><br>    override fun instance(config: Config): RuleSet {<br>        return RuleSet(<br>            id = ruleSetId,<br>            rules = listOf(<br>                PreviewsMustIncludeGroup(config),<br>            )<br>        )<br>    }<br>}</pre><p>Note: the ruleSetId is an ID we will reference in the Detekt configuration file later on. So ensure it has a clear and descriptive name.</p><p>Each custom rule will implement the Rule class, which defines the nature of the issue we are creating as well as the logic to determine whether a code format violates any of our requirements. Rules are implemented using the visitor pattern, so we can override the visit comment or class methods (along with many other methods to scan the codebase).</p><p>In the short example below, the rule first defines the issue object, specifying its severity, description and debt metric. This will be useful for the console output and reports. As for our implementation, we are overriding the visitComment method. Every time Detekt visits a class, it will then visit the comment which will further trigger the function below along with the logic to determine whether the code format matches our requirements. If it does not, we can report the issue.</p><pre>class PreviewsMustIncludeGroup(config: Config) : Rule(config) {<br><br>    override val issue = Issue(<br>        id = javaClass.simpleName,<br>        severity = Severity.Maintainability,<br>        description = &quot;Some description&quot;,<br>        debt = Debt.FIVE_MINS,<br>    )<br><br>    override fun visitComment(comment: PsiComment) {<br>        super.visitComment(comment)<br>        // TODO yet to implement<br>    }<br>}</pre><h3>Writing rules</h3><p>Everything is now in place for us to start writing our rules. I have already implemented the three rules and will walk through them in more detail below. While this would not cover every possible scenario when creating custom rules, I believe it is a good starting point for exploring this path.</p><p><strong>PreviewsMustIncludeGroup.kt</strong></p><p><em>All `@Preview` must include a group (e.g. `@Preview` ( group = someGroup, showBackground = true).</em></p><p>The PreviewsMustIncludeGroup is a helpful one for me when developing UI using compose. I often use the Preview annotation to view the Composable in action along with a third-party catalog library which renders all of the Composable functions. Remembering to add the group can be a challenge. To avoid going back and forth during the code review process, the lint check could signal all the places I am missing the group from. I have used the visitAnnotationEntry method to gather the information of the annotations.</p><pre>/**<br> * Composable Preview should contain group to keep the UI organized when referencing specific features<br> * later. It will come in handy when we are showcasing different screens in a catalog.<br> *<br> * @Preview( group = someGroup), along with other arguments, the Preview Annotation must include group<br> *<br> * Good<br> * @Preview ( group = someGroup, showBackground = true)<br> *<br> * Bad<br> * @Preview <br> */<br>class PreviewsMustIncludeGroup(config: Config) : Rule(config) {<br><br>    companion object {<br>        private const val DESCRIPTION = &quot;Previews must use specific group name in the annotation.&quot;<br>        private const val PREVIEW_TAG = &quot;preview&quot;<br>        private const val GROUP_TAG = &quot;group&quot;<br>    }<br><br>    override val issue = Issue(<br>        id = javaClass.simpleName,<br>        severity = Severity.Warning,<br>        description = DESCRIPTION,<br>        debt = Debt.FIVE_MINS,<br>    )<br><br>    // Visit every annotation to see if it is a Preview and whether it contains the group argument<br>    override fun visitAnnotationEntry(annotationEntry: KtAnnotationEntry) {<br>        super.visitAnnotationEntry(annotationEntry)<br><br>        val annotationName = annotationEntry.shortName.toString()<br><br>        // If the annotation is not a preview, skip it.<br>        if (!annotationName.startsWithIgnoreCase(prefix = PREVIEW_TAG)) return<br><br>        var doesContainGroup = false<br>        for (arguments in annotationEntry.valueArguments) {<br>            val element = arguments.asElement().firstChild.text<br>            if (element.startsWithIgnoreCase(prefix = GROUP_TAG)) {<br>                doesContainGroup = true<br>            }<br>        }<br><br>        if (!doesContainGroup) {<br>            report(<br>                CodeSmell(<br>                    entity = Entity.from(annotationEntry),<br>                    issue = issue,<br>                    message = issue.description,<br>                )<br>            )<br>        }<br>    }<br>}</pre><p>Once our rules are ready, we simply need to reference them in the Detekt configuration file. We will append our rule set (ruleSetId of “custom-rules”) to the default rules. For now, we can activate them but in the future we can pass custom arguments to our implementation class. It is important that the rule name matches exactly with the ID defined in both the provider and rule class.</p><pre>custom-rules:<br>  active: true<br>  MustMatchToDoPattern:<br>    active: true</pre><p>Go ahead and run the Detekt Gradle task.</p><p>You can find the implementation details for the “Must Match To Do Pattern” and “Must Not Commit Staging Tag” rules, along with debugging and testing tips <a href="https://asadmansoor.substack.com/p/expand-your-lint-checks-with-custom?r=1uudn1">in my free newsletter</a>.</p><h3>Conclusion</h3><p>And that includes our little investigation on how to create custom lint rules for Detekt. As of now, I just have these three rules running in my project. Hopefully I will get a chance to update these and grow my ruleset in the future. If you enjoyed this post and want to follow my Android development journey, consider subscribing and sharing this newsletter. Till next time, thank you.</p><ul><li><a href="https://medium.com/@asadmansoor">Follow me on Medium</a></li><li><a href="https://asadmansoor.substack.com/">Subscribe to my free newsletter</a></li><li><a href="https://asadmansoor.substack.com/p/expand-your-lint-checks-with-custom?r=1uudn1">Check out the full version</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4fd9f4620432" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android linting with Detekt]]></title>
            <link>https://medium.com/android-dissekt/android-linting-with-detekt-8ace3ce29216?source=rss-5dfdfdfe74d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ace3ce29216</guid>
            <category><![CDATA[linter]]></category>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[gradle]]></category>
            <dc:creator><![CDATA[Asad Mansoor]]></dc:creator>
            <pubDate>Mon, 13 Jan 2025 16:47:01 GMT</pubDate>
            <atom:updated>2025-01-13T16:47:01.664Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Static code analysis tool for Kotlin and Compose code for Android projects</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lt8t1r9FHuow3oXZELdF-Q.png" /></figure><p>This guide will help you get started with Detekt, a static code analysis tool for Kotlin. Detekt is excellent for identifying code smells and performance issues in your project. It can also be extended with third-party plugins and custom rules that you can write for your own needs. In this guide, I’ll walk you through the steps to integrate Detekt, along with some additional rules that I like to include in my projects.</p><p><em>This is just a small excerpt from my newsletter, where I dive deeper into these topics. If you’re interested in more insights, consider subscribing to my personal newsletter for further updates.</em></p><ul><li><em>Since Last Commit: </em><a href="https://asadmansoor.substack.com/"><em>https://asadmansoor.substack.com/</em></a></li></ul><h3>Adding the Detekt Plugin</h3><p>Add the <a href="https://github.com/detekt/detekt">Detekt</a> plugin, and remember to sync the project after each change.</p><p><strong>libs.versions.toml</strong></p><pre># Replace the version to the latest version<br>detekt = &quot;1.23.7&quot;<br>detekt-plugin = { id = &quot;io.gitlab.arturbosch.detekt&quot;, version.ref = &quot;detekt&quot; }</pre><p><strong>build.gradle.kts</strong></p><pre>alias(libs.plugins.detekt.plugin) apply false</pre><p><strong>build.gradle.kts (app)</strong></p><pre>alias(libs.plugins.detekt.plugin)<br><br>detekt {<br>    toolVersion = &quot;1.23.7&quot;<br>    config.setFrom(file(&quot;../config/detekt/detekt.yml&quot;))<br>    buildUponDefaultConfig = true<br>    autoCorrect = true<br>}</pre><p>To verify the detekt is working, run the detekt Gradle task either through Android Studio or the command line. Reports can be found in the app/build/reports/detekt folder of your project.</p><pre>$ ./gradlew detekt</pre><h3>Generating Detekt Config</h3><p>To modify the ruleset and their respective threshold, you will need to auto-generate a config file. To do this, run the following Gradle task.</p><pre>$ ./gradlew detektGenerateConfig</pre><p>This will create a detekt.yml config file in the config/detekt folder at the project’s root location. You can review the available rules in detail and enable or disable them according to your preferences. Not every rule might make sense for your project, you can find more information in the official documentation at <a href="https://detekt.dev/docs/rules/comments">https://detekt.dev/docs/rules/comments</a></p><h3>Additional Formatting Rules</h3><p>Detekt also offers a wrapper for Ktlint, an open-source linter focused on enforcing coding style. To enable this, make the following changes:</p><p><strong>libs.versions.toml</strong></p><pre>detekt-formatting = { group = &quot;io.gitlab.arturbosch.detekt&quot;, name = &quot;detekt-formatting&quot;, version.ref = &quot;detekt&quot; }</pre><p><strong>build.gradle.kts (app)</strong></p><pre>detektPlugins(libs.detekt.formatting)</pre><h3>Integrating Compose Rules</h3><p>While exploring the <a href="https://detekt.dev/marketplace/">Detekt marketplace</a>, a tool to discover additional rules developed by the open-source community, I came across rules specifically designed for Compose. These rules are particularly useful when adopting Compose, as they help ensure your Compose code is written correctly.</p><p><strong>libs.versions.toml</strong></p><pre>detektCompose = &quot;0.4.12&quot;<br>detekt-compose = { group = &quot;io.nlopez.compose.rules&quot;, name = &quot;detekt&quot;, version.ref = &quot;detektCompose&quot;}</pre><p><strong>build.gradle.kts (app)</strong></p><pre>detektPlugins(libs.detekt.compose)</pre><h3>Resolving Lint Rules</h3><p>By this point, you’ll likely encounter a significant number of lint issues, especially when adding Detekt to a large project. To resolve this, I follow one of these strategies.</p><ul><li><strong>Strategy 1: Ignore for now and focus on the future. </strong>This is known as adding a “baseline.” A baseline will ignore the existing issues and only alert you to new code changes. This is a good way to continue moving forward and tackling problems as they pop up. If you have some downtime, you can clean up the baseline.</li><li><strong>Strategy 2 — Do it one at a time. </strong>You can turn off all the rules and tackle them one by one. You can truly understand the issue and standardize that code throughout the project. Slowly, you can enable the other rules.</li><li><strong>Strategy 3 — Go all out. </strong>It’s a bit aggressive, but you can resolve all the issues in one go, although that would be a pretty interesting PR review (or series of PRs). I would not keep the lint failing for a long time because the project could add more issues as you are fixing them in your PR.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/563/1*kRywBX-SKGpCx-8BO3GPmA.png" /></figure><p>That’s all for this quick post. To read the full version, check out my newsletter post and don’t forget to subscribe: <a href="https://asadmansoor.substack.com/p/android-linting-with-detekt">https://asadmansoor.substack.com/p/android-linting-with-detekt</a></p><p><em>Thank you!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ace3ce29216" width="1" height="1" alt=""><hr><p><a href="https://medium.com/android-dissekt/android-linting-with-detekt-8ace3ce29216">Android linting with Detekt</a> was originally published in <a href="https://medium.com/android-dissekt">Android Dissekt by Asad</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Automate with Continuous Integration]]></title>
            <link>https://medium.com/android-dissekt/v1-0-automate-with-continuous-integration-1809ba8e5936?source=rss-5dfdfdfe74d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/1809ba8e5936</guid>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[testing]]></category>
            <dc:creator><![CDATA[Asad Mansoor]]></dc:creator>
            <pubDate>Wed, 17 Jun 2020 23:50:26 GMT</pubDate>
            <atom:updated>2024-12-24T01:41:36.630Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Hello everyone! Thank you for signing up for <strong>Since Last Commit</strong>, a newsletter that aims to bridge the gap between mobile development and release engineering. Through this platform, I would love to share anything/everything related on how we can build better products, become better engineers and be owners of every line of code we write that gets shipped to our users. I am not an expert by any means, but I hope to use this opportunity to learn along with you. Let’s get started!</p><h3>Cool Reads</h3><p><em>Tip: Here I share my favourite quote of the week</em></p><p>“Ask a programmer to review ten lines of code, he’ll find ten issues. Ask him to do five hundred lines, and he’ll say it looks good” ~ Gene Kim, The DevOps Handbook</p><h3>Continuous Integration</h3><p>Building software is a huge task which involves a lot of people. Software needs to be built on time, has to be stable and abide to certain specifications. When developing software, the number of tasks also tends to increase. I came across an example recently that software development can be looked at as maintaining a garden, rather than constructing a building. It needs to be taken care of and groomed in various situations. During the lifecycle of a project, bugs are introduced, code smells are lurking and performance issues are haunting the development process. As more and more tasks are required to groom the project, Continuous Integration (CI) can help automate those processes earlier in the development cycle.</p><p>CI is a practice of merging code from multiple contributors into the mainline continuously and automatically. Prior to merging, the CI must ensure that the code works as it should, passes the quality standards and does not break any existing features. Any issues with the CI pipeline will prompt the developers to quickly make the required changes even before merging to the mainline.</p><p>Customized to the project’s needs, the pipeline usually contains the following three stages: build, lint and test for any project.</p><p><strong>Build</strong></p><p>Any new code must be able to build and produce some sort of an executable. For an Android project, this is the APK. The coverage of this stage is to ensure that there are no syntax errors, dependencies issues or any other problems that may become an obstacle in obtaining the application.</p><p><strong>Lint</strong></p><p>Once the application can produce a build artifact, it’s important to perform a lint analysis on the source code. Linting is a process of finding issues that could turn into bugs or pieces of code that do not follow best practices. Usually, these are pre-defined to certain languages like the Android lint that comes as a pre-defined Gradle task. Lint rules can be customized to follow any structure. For example, organizations can use lint rules to structure their projects and enforce how teams should name their classes or variables.</p><p><strong>Test</strong></p><p>Even though we are able to build an artifact and perform analysis on the codebase, that may not be enough to validate whether the application works or not. Testing is important process to ensure that the application behaves as it should during runtime. This include unit tests that validate the core logic as well as UI tests that interact with a device. Tests should grow with the project, so every line of code is validated in one way or another.</p><h3>Tips and Tricks</h3><ul><li><strong>It’s all about feedback</strong>: ensure the pipeline is fast and structured in stages, so it can report any issues at the earliest.</li><li><strong>The pipeline works for you</strong>: don’t it let be a bottleneck, instead use it to your advantage and automate tasks you wouldn’t want to do manually.</li></ul><h3>Conclusion</h3><p>That wraps up our first newsletter. Hope you enjoyed it! If you have any questions, feedback or concerns, feel free to reach out to me on twitter (@asadmansr).</p><p>Keep hacking on!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1809ba8e5936" width="1" height="1" alt=""><hr><p><a href="https://medium.com/android-dissekt/v1-0-automate-with-continuous-integration-1809ba8e5936">🤖 Automate with Continuous Integration</a> was originally published in <a href="https://medium.com/android-dissekt">Android Dissekt by Asad</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android Template With Fastlane and Github Actions]]></title>
            <link>https://medium.com/swlh/android-template-with-fastlane-and-github-actions-d6d1d1ef51bf?source=rss-5dfdfdfe74d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6d1d1ef51bf</guid>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Asad Mansoor]]></dc:creator>
            <pubDate>Mon, 27 Jan 2020 02:01:01 GMT</pubDate>
            <atom:updated>2020-01-27T02:01:01.450Z</atom:updated>
            <content:encoded><![CDATA[<h4>Skip the setup and start building your next Android project</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MNiHNbE7aHYPq59b5StWdw.png" /></figure><p>Setting up an Android project can be a tedious task. One must download the correct set of tools, configure a continuous integration and continuous deployment (CI/CD) pipeline and share the standards on how to contribute to the project on GitHub. In this blog post, I’ll discuss how a template can help automate the process of setting up an Android repository.</p><h3>GitHub Template</h3><p>A GitHub template is a repository that contains files and directories that can be imported to a new repository upon creation. This is essential to organizations that wish to share the same development practices across various projects. For example, a template for mobile applications can contain pre-set Fastlane dependencies and GitHub Actions workflows to start building and deploying from the very first commit. Fastlane is a tool that helps automate tasks for building, testing and deploying mobile applications, whereas GitHub Actions allows the creation of CI/CD workflows within the GitHub repository. Although the tools that a repository needs may vary across teams and organizations, it is crucial that projects are set up and managed through some standards to enhance the developer experience, increase feedback loop and eliminate any steep learning curves. With a template, teams can come together to establish a standard and allow developers to start creating new repositories based on that template.</p><p>Link to<a href="https://github.com/asadmansr/template-android"> Android template</a>.</p><h4>Creating a repository from a template</h4><p>Visit the template and click on <strong>Use this template</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*28gBqpiYL0YvGgmTKcUf4w.png" /></figure><p>Configure the options of the owner, repository name, description and the visibility of the repository. Once all of the required information is provided, click on <strong>Create repository from template</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y3di2YV9fipmR-ur9rIuww.png" /></figure><p>Voila. A new repository will be created under your account with the following files and directories that were included in the template. You can now start building your project.</p><h3>Fastlane</h3><p>Fastlane is a tool to automate any tedious tasks in building, testing and deploying mobile applications. In this template, the fastlane template is set up to run specific Gradle commands locally and on the GitHub Actions pipeline.</p><p>Here are the following fastlane actions specified in the template.</p><p><strong>Android compile</strong></p><pre># Compile debug and test sources</pre><pre>$ fastlane android compile</pre><p><strong>Android lint</strong></p><pre># Execute lint and creates a HTML report</pre><pre>$ fastlane android lint</pre><p><strong>Android assemble</strong></p><pre># Assemble debug source and test APKs</pre><pre>$ fastlane android assemble</pre><p><strong>Android unit test</strong></p><pre># Execute unit test</pre><pre>$ fastlane android unit_test</pre><p><strong>Android instrumentation test</strong></p><pre># Execute instrumentation test on Emulator</pre><pre>$ fastlane android instrumentation_test</pre><p>The advantage of using fastlane allow teams to configure the lanes based on the desired needs of the project. With lanes defined, developers can execute the following operations locally or on the GitHub Actions pipeline.</p><h3>GitHub Actions</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZgT90-db1y7_Sb5fv2R2Xg.png" /></figure><p>GitHub Actions allows the creation of custom workflows within the GitHub repository. These custom workflows can automate specific tasks to build out continuous integration and continuous deployment pipeline. In this template, the CI pipeline is set to validate the new changes through the following stages of compiling, performing lint analysis, assembling APKs and performing unit and instrumentation tests.</p><p>Dividing the various jobs into stages allow developers to get fast feedback without using a lot of resources. For example, if the changes fail to compile the application, the pipeline would alert the developer and would not carry on with the rest of the pipeline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/1*DXuUxJ4hJOhyh3E_fm8aOw.png" /></figure><p>Once a pull request is open, developers can perform code review while GitHub Actions performs the following checks defined in the PR Pipeline Workflow, a custom workflow in the template to run only on pull requests.</p><p>Workflows are defined as yml files and placed under the .github/workflows/ directory. In the workflow, one must specify when to run the workflow, either on pull requests, branches or scheduled instance, along with the operations it must carry out. In the PR Pipeline Workflow, the following pipeline only runs on pull requests to the master branch.</p><p>An example of the compile job can be found below.</p><pre>name: PR Pipeline Workflow </pre><pre># Execute PR Pipeline Workflow on pull requests to master<br>on:  <br>  pull_request:    <br>    branches:      <br>      - master  </pre><pre>jobs:  <br>  ################################<br>  # Compile Job:  <br>  # Install dependencies and compile debug and test source<br>  ############################ </pre><pre>  compile:    <br>    runs-on: ubuntu-latest    <br>    steps:      <br>      - name: Checkout Repo        <br>        uses: actions/checkout@v2  <br>     <br>      - name: Set up Ruby 2.6        <br>        uses: actions/setup-ruby@v1        <br>        with:          <br>          ruby-version: 2.6.x    <br>   <br>      - name: Install Dependencies        <br>        run: gem install bundler &amp;&amp; bundle install<br>       <br>      - name: Run Fastlane Compile Lane        <br>        run: fastlane compile</pre><pre>  ...</pre><h3>Issue Template</h3><p>With this template, we have the following foundation for Fastlane and GitHub Actions. Building software applications requires a team effort. In order to work efficiently, teams need to follow a specific standard when creating issues and pull requests. With a specific format, it would be easier to share the issue as well as have the correct set of information to resolve the issue efficiently. The repository template also contains templates on creating issues and pull requests as shown below.</p><h4><strong>Issues</strong></h4><p>Issue templates can be found in the .github/ISSUE_TEMPLATE directory that contains the specific design for the following types of issues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bg6JxkVqm6od1zpOdVxxWQ.png" /></figure><p>For instance, in order to create a new Bug Report, the following template will be shown to the reporter to fill out with the required information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*JnUrz-LjxMda36gIESb5iA.png" /></figure><h4><strong>Pull requests</strong></h4><p>Template for pull request can be found in the .github directory. When a new pull request is being created, the following template is used by the developer to share the context of the changes being merged.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*68dTMF5Wv0s3aIAQAIhdjQ.png" /></figure><h3>Android Template</h3><p>The following template contains the setup of Fastlane, GitHub Actions and issue and pull request template, ready to jumpstart Android projects. Feel free to create your next Android project from this template or start building your own template for your personal projects or organization.</p><p><a href="https://github.com/asadmansr/template-android">asadmansr/template-android</a></p><p>Thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6d1d1ef51bf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/android-template-with-fastlane-and-github-actions-d6d1d1ef51bf">Android Template With Fastlane and Github Actions</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automate Your Development With Fastlane]]></title>
            <link>https://medium.com/better-programming/automate-your-development-with-fastlane-247221e6c0c5?source=rss-5dfdfdfe74d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/247221e6c0c5</guid>
            <category><![CDATA[fastlane]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Asad Mansoor]]></dc:creator>
            <pubDate>Fri, 20 Dec 2019 20:24:40 GMT</pubDate>
            <atom:updated>2019-12-20T20:24:40.905Z</atom:updated>
            <content:encoded><![CDATA[<h4>Enable a faster feedback loop during Android development</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8lAsg0Sba9XkDwYgWWqz0Q.png" /></figure><p>I’ll discuss how fastlane can help automate the validation of your development prior to making a merge request.</p><h3>Developing With Continuous Integration</h3><p>Building software applications is a monumental task. It requires planning, testing and reviewing from peers. As an application tends to grow, the effort needed to maintain the application also increases. Hence, adding a new feature or ensuring that the codebase is bug-free starts to become more expensive to fix later in the development cycle. To find issues earlier, software developers follow the practice of continuous integration to build software applications at scale.</p><h3>Building Blocks of Continuous Integration</h3><p>Source Control — the ability to track, manage and merge source code amongst multiple developers into a main version of the code repository.</p><p>Automated tests — the confidence to ensure that new changes do not break existing features or introduce new bugs into the application.</p><p>Pipeline validation — the verification that the application can build, produce executables, meets the quality standards and do not contain any lint issues.</p><p>In an ideal development environment, submitting a change to the repository involves a process of opening a merge request, which then triggers a CI pipeline that verifies all of the specified criteria. The types of CI that can be used are GitLab CI/CD, Travis CI, CircleCI, GitHub Actions, and many more.</p><h3>Build Fast, Build Often</h3><p>Using a CI has a lot of advantages when developing software. Not only does it find issues earlier in the process, but it also speeds up the process of validating through a series of automated tasks. However, teams that only rely on the CI pipeline to validate their work can find themselves in an unproductive state.</p><p>Using a CI server is often a resource-intensive process. The pipeline runners would need to be booted up and the required dependencies will be downloaded to perform the task at hand. In addition, if a pipeline fails at a later stage, developers would need to push their fix and re-run the whole pipeline.</p><p>Instead, developers should be empowered to execute their CI pipeline locally on their machine as a routine to ensure their work is validated prior to submitting a merge request. One of my favourite quotes from “The DevOps Handbook” by Gene Kim, Jez Humble, Patrick Debois, and John Willis is shown below.</p><blockquote>In the DevOps ideal, developers receive fast, constant feedback on their work, which enables them to quickly and independently implement, integrate, and validate their code, and have the code deployed into the production environment.</blockquote><h3>Fastlane</h3><p>Building a local CI pipeline can simply be achieved by fastlane, an open-source tool that automates tedious building and releasing tasks for mobile applications. Although fastlane is popular for automating screenshot captures, beta deployments, app store deployments, and code signing, it can also help automate the tasks that would be required in a local pipeline.</p><p>Once fastlane is installed and initialized in the project, commands can be executed as easily as shown below.</p><pre>fastlane tests</pre><p>The execution correlates to a test lane defined in the fastlane/Fastfile.</p><pre>lane :tests do   <br>  gradle(task: &quot;test&quot;) <br>end</pre><p>Learn how to <a href="https://docs.fastlane.tools/">get started</a> with fastlane.</p><h3>Faster Feedback</h3><p>Executing the CI pipeline locally grants developers the ownership of what they are building. It produces feedback at a much faster scale as well as opens possibilities to debug issues in a shorter period of time. With fastlane, teams can use the same Fastfile as they would on a CI server.</p><h4>Lane</h4><p>In this Fastfile, there are five different lanes that are defined which correspond to a specific job. For example, the lint lane verifies that there are no lint issues in the source code. Execution of the lint lane can be found below.</p><pre>fastlane lint</pre><p>Expected outcome:</p><pre>[12:33:02]: -----------------------------------------</pre><pre>[12:33:02]: --- Step: Switch to android lint lane ---</pre><pre>[12:33:02]: -----------------------------------------</pre><pre>[12:33:02]: Cruising over to lane &#39;android lint&#39; 🚖</pre><pre>[12:33:02]: --------------------</pre><pre>[12:33:02]: --- Step: gradle ---</pre><pre>[12:33:02]: --------------------</pre><pre>[12:33:02]: $ gradlew lintDebug -p .</pre><pre>[12:33:03]: ▸ &gt; Task :app:preBuild UP-TO-DATE</pre><pre>[12:33:03]: ▸ &gt; Task :app:preDebugBuild UP-TO-DATE</pre><pre>[12:33:03]: ▸ &gt; Task :app:compileDebugAidl NO-SOURCE</pre><pre>[12:33:03]: ▸ &gt; Task :app:checkDebugManifest UP-TO-DATE</pre><pre>[12:33:03]: ▸ &gt; Task :app:compileDebugRenderscript NO-SOURCE</pre><pre>[12:33:03]: ▸ &gt; Task :app:generateDebugBuildConfig UP-TO-DATE</pre><pre>[12:33:03]: ▸ &gt; Task :app:mainApkListPersistenceDebug UP-TO-DATE</pre><pre>[12:33:03]: ▸ &gt; Task :app:generateDebugResValues UP-TO-DATE</pre><pre>[12:33:03]: ▸ &gt; Task :app:generateDebugResources UP-TO-DATE</pre><pre>[12:33:03]: ▸ &gt; Task :app:createDebugCompatibleScreenManifests UP-TO-DATE</pre><pre>[12:33:03]: ▸ &gt; Task :app:mergeDebugResources UP-TO-DATE</pre><pre>[12:33:03]: ▸ &gt; Task :app:processDebugManifest UP-TO-DATE</pre><pre>[12:33:03]: ▸ &gt; Task :app:processDebugResources UP-TO-DATE</pre><pre>[12:33:03]: ▸ &gt; Task :app:compileDebugKotlin UP-TO-DATE</pre><pre>[12:33:03]: ▸ &gt; Task :app:javaPreCompileDebug UP-TO-DATE</pre><pre>[12:33:03]: ▸ &gt; Task :app:compileDebugJavaWithJavac UP-TO-DATE</pre><pre>[12:33:03]: ▸ &gt; Task :app:prepareLintJar UP-TO-DATE</pre><pre>[12:33:06]: ▸ &gt; Task :app:lintDebug</pre><pre>[12:33:06]: ▸ Wrote HTML report to file:///.../app/build/reports/lint-results-debug.html</pre><pre>[12:33:06]: ▸ Wrote XML report to file:///.../app/build/reports/lint-results-debug.xml</pre><pre>[12:33:06]: ▸ BUILD SUCCESSFUL in 3s</pre><pre>[12:33:06]: ▸ 13 actionable tasks: 1 executed, 12 up-to-date</pre><h4>Pipeline</h4><p>Lanes can be executed as a standalone job or part of another lane. In this example, the pipeline lane consists of five different lanes. These lanes perform a compilation of the codebase, run a lint analysis, assemble the APKs, execute the unit tests, and perform instrumentation tests on an emulator. For ease, developers would only need to execute one command as shown below.</p><pre>fastlane lint</pre><p>The following Fastfile template for the pipeline is shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_YFNKEAVS1UfujzsQvs9Nw.png" /></figure><p>A copy of the source code can be found on GitHub.</p><p><a href="https://github.com/asadmansr/android-fastlane">asadmansr/android-fastlane</a></p><p>Hence, the execution of the pipeline will produce a result summary as shown.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8lAsg0Sba9XkDwYgWWqz0Q.png" /></figure><p>Thank you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=247221e6c0c5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/better-programming/automate-your-development-with-fastlane-247221e6c0c5">Automate Your Development With Fastlane</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[A guide to analyzing changes in an APK using GitHub Actions and Diffuse]]></title>
            <link>https://levelup.gitconnected.com/diffusing-your-apk-ea9d044d4c0d?source=rss-5dfdfdfe74d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea9d044d4c0d</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Asad Mansoor]]></dc:creator>
            <pubDate>Sun, 01 Dec 2019 18:19:53 GMT</pubDate>
            <atom:updated>2019-12-05T19:45:56.154Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-e-YK6mHpLUWMeMWKm_Dfg.png" /></figure><h3>Example</h3><p>Diffuse is a tool to analyze the changes between two APKs. As new code continuously get merged into the mainline, the changes to the APK may go unnoticed. To generate confidence in what we build, Diffuse outputs a stream of useful metrics of the changes between two APKs in terms of size and count. Integrating this check in the development cycle can promote higher visibility on the state of the APK as well as provide early feedback to avoid unnecessary problems later on.</p><p>In this example, I have created an empty Android project on the master branch. With the help of GitHub Actions, I can execute the Diffuse tool on a Continuous Integration server as part of the development workflow. Once a pull request is made, GitHub Actions will compare the APK of the pull request with the APK on the master branch. As a result, it will output a series of information that can be used to validate the changes to an APK along with other code verification such as code reviews and automated testing.</p><p>In this case, I have added a new logging library called <a href="https://github.com/JakeWharton/timber">Timber</a>. Timber is a library that provides additional utility on top of Android’s Log implementation. As for my pull request, the changes include the integration of the library as well as the initialization within the activities. The goal of this exercise is to observe the difference between the APKs once this change has been applied.</p><h4>Reference</h4><ul><li>Master Branch (<a href="https://github.com/asadmansr/diffuse-example">https://github.com/asadmansr/diffuse-example</a>)</li><li>Pull Request (<a href="https://github.com/asadmansr/diffuse-example/pull/1">https://github.com/asadmansr/diffuse-example/pulls</a>)</li><li>GitHub Action Job (<a href="https://github.com/asadmansr/diffuse-example/runs/318149061">Diffuse Job on Github Actions</a>)</li></ul><h4>Result</h4><p>Once the job is completed, Diffuse will provide a high-level view comparing the old and new APK in its compressed and uncompressed state. It is also easier to visualize what part of the APK has been significantly changed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tzvaY1dZWyN0w4u0R-UnOg.png" /><figcaption>Output from the Diffuse Tool</figcaption></figure><p>In addition, information regarding the APK, types, methods, and fields are also shown in detail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yYKgCQr-CGT065HC7C7Lzg.png" /><figcaption>Information regarding APK size</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ihP31P5oDK0gJBC2Y0TmtA.png" /><figcaption>Count of types, method and fields</figcaption></figure><h3>Additional Diffuse Details</h3><p>Diffuse is a tool to track changes to an APK during the development cycle. When a new change is being merged, Diffuse can provide additional metrics on the state of the APK and prompt an alert during the code verification process in a continuous integration pipeline flow.</p><p>Diffuse provides insights on:</p><ul><li>Sizes that make up an APK (dex, arsc, manifest, res, asset, other)</li><li>Count of strings, types, classes, methods, and fields</li><li>Details of types, classes, methods, and fields</li><li>Size of assets</li><li>Possible APK lint warning</li></ul><p>Full usage of the Diffuse diff command:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6b7cf596f648357df03b19d76cc03c6c/href">https://medium.com/media/6b7cf596f648357df03b19d76cc03c6c/href</a></iframe><p>To learn more about Diffuse, visit <a href="https://github.com/JakeWharton/diffuse">Diffuse on GitHub</a></p><h3>GitHub Actions</h3><p>Workflows are series of steps that are executed through GitHub Actions. In this example, a workflow has been created that only runs on pull requests that generate the APKs for both the master and pull request branch. Once the execution is complete, the Diffuse command is used in reference with those APKs. The output will be shown in the real-time logs provided by GitHub Action.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*Lqn2O6aRoggNfGTelPxEGg.png" /><figcaption>Output logs of GitHub Actions</figcaption></figure><p>With a little configuration, the workflow can also generate a text or HTML file that can be stored in the GitHub Actions artifact for future references.</p><p><strong>.github/workflows/pull_request.yml</strong></p><pre>name: Pull Request<br>on: [pull_request]</pre><pre>jobs:<br>  # Checkout master branch and build the APK<br>  build-master:<br>    runs-on: ubuntu-latest<br>    steps:<br>      - uses: actions/checkout@v1<br>        with:<br>          ref: master<br>      - name: Build Master APK<br>        run: ./gradlew assembleDebug &amp;&amp; mv app/build/outputs/apk/debug/app-debug.apk app/build/outputs/apk/debug/app-master.apk<br>      - name: Upload APK<br>        uses: actions/upload-artifact@v1<br>        with:<br>          name: apk<br>          path: app/build/outputs/apk/debug/app-master.apk<br>  </pre><pre>  # Checkout PR branch and build the APK<br>  build-pr:<br>    runs-on: ubuntu-latest<br>    steps:<br>    - uses: actions/checkout@v1<br>    - name: Build PR APK<br>      run: ./gradlew assembleDebug &amp;&amp; mv app/build/outputs/apk/debug/app-debug.apk app/build/outputs/apk/debug/app-pr.apk<br>    - name: Upload APK<br>      uses: actions/upload-artifact@v1<br>      with:<br>        name: apk<br>        path: app/build/outputs/apk/debug/app-pr.apk<br></pre><pre># Execute Diffuse only when the two APKs are built successfully<br>  diffuse:<br>    needs: [build-master, build-pr]<br>    runs-on: ubuntu-latest<br>    steps:<br>      - uses: actions/checkout@v1<br>      - name: Download APKs<br>        uses: actions/download-artifact@v1<br>        with:<br>          name: apk<br>      - name: Execute Diffuse<br>        run: ./diffuse diff apk/app-master.apk apk/app-pr.apk</pre><p>That’s all for now. To view an example, check out the GitHub link below. As always, happy hacking! 🎉</p><p><a href="https://github.com/asadmansr/diffuse-example">asadmansr/diffuse-example</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea9d044d4c0d" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/diffusing-your-apk-ea9d044d4c0d">A guide to analyzing changes in an APK using GitHub Actions and Diffuse</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Droidcon Toronto 2019]]></title>
            <link>https://medium.com/tumiya/droidcon-toronto-2019-4816e498c640?source=rss-5dfdfdfe74d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/4816e498c640</guid>
            <category><![CDATA[droidcon]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Asad Mansoor]]></dc:creator>
            <pubDate>Fri, 15 Nov 2019 15:29:44 GMT</pubDate>
            <atom:updated>2019-11-15T15:29:44.104Z</atom:updated>
            <content:encoded><![CDATA[<h4>Snippets of the first edition of droidcon Toronto</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pnXxf_FPjsdm76tDBttZCQ.jpeg" /></figure><p>It was an arctic Wednesday morning in the city of Toronto and as I stepped down from my commute, a new sense of excitement dawned on me. It was the first-ever droidcon conference in Toronto. For the past nine years, AndroidTO held the reputation of being the largest Android conference in Canada. It was not that long, when the news broke out that AndroidTO was no longer a thing and droidcon would be hosting the android conferences instead. Droidcon, if you’re not familiar, is the largest Android community that organizes more than 25 droidcon conferences around the world attracting more than 25,000 attendees. This was surely an exciting news.</p><p>My day started at the registration booth, where I was greeted by the wonderful volunteers that provided me with a swag bag filled with stickers and a shirt. The conference had more than 15 talks scheduled, some that ran in parallel, so picking the talks that I would love to listen to became my strategy. Overall, the conference covered a large variety of topics ranging from Kotlin, Testing, UI to even development in Flutter. In this blog post, I go through some of the things I learned and enjoyed at droidcon Toronto 2019.</p><h3>HTTP in a Hostile World</h3><p>In the first talk of the day, Jesse discussed the pain points of networking within the Android ecosystem. For instance, the concept of idempotence arose, suggesting that a repeating request should not repeat an action. This is essential to an application that is initiating a network call, but ends up executing it multiple times through a double-tap or retry-mechanism that lies on the client or network side.</p><p>Debugging issues regarding networking can be a challenge. If a failure does occur, it can be hard to pinpoint whether it’s a client or server side issue. With that in mind, developers have to ensure that their applications are both correct and secure for their users.</p><p>One of the ways this can be achieved is through a library called OkHttp. OkHttp is a HTTP client to execute network calls without implementing a larger boilerplate and contains support for modern TLS features. In addition, the library includes a MockWebServer, that can be used to test the client. This can be useful as both client and server teams can validate and maintain the suite of mocked server responses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VBvSVybxnvP5GlNPJ5kLFw.jpeg" /></figure><p>In addition, Jesse believes that developers have a large responsibility in protecting their user’s data. It is important to question whether all of the data that is being collected is actually required and if so, when can it be deleted. Complying with an existing privacy standards, such as GDPR and CCPA ensures that a user’s privacy is protected at all times.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ldsO_06JIm3z6aEmL9pEJw.jpeg" /></figure><h3>Fighting Regressions with Benchmarks in CI</h3><p>For the most part, performance tests are often neglected in software development. Often there are no metrics on performance, until a user reports a laggy UI or something that does not render smoothly. A lot of the performances issues can be discovered earlier in the development cycle through the Benchmark library.</p><p>Benchmark tests allow you to measure your code performance and generate a set of results that can be examined and compared over time. Most importantly, these checks can be embedded in a range of automated suites during the continuous integration pipelines. The main use case of benchmarking primarily lies on testing recycler views, inflations of views and performing database queries.</p><p>The talk by Chris and Dustin was a repeat of an earlier presentation from Android Dev Summit. I would highly encourage to view their presentation and blog post explaining Benchmark in more detail below.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FynBPcFs6OOk%3Ffeature%3Doembed&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DynBPcFs6OOk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FynBPcFs6OOk%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f73babce3440d07cc872796f1d360fe3/href">https://medium.com/media/f73babce3440d07cc872796f1d360fe3/href</a></iframe><blockquote>Jetpack Benchmark provides an easy way to get accurate performance metrics out of an Android device. Put together with the step fit algorithm above, you can work around instabilities to detect performance regressions before they hit users — just as we do in Jetpack in CI.</blockquote><p>Read more about <a href="https://medium.com/androiddevelopers/fighting-regressions-with-benchmarks-in-ci-6ea9a14b5c71">Fighting Regression with Benchmarks in CI</a></p><h3>Testing Beyond Unit, Integration and E2E</h3><p>Our applications are validated through a series of unit, integration and e2e testing that check for correctness under normal and extreme cases. In this talk, Jimmy explores a new dimension of e2e testing called screenshot testing.</p><p>With the current state of e2e testing, Espresso does a great job at identifying the correctness of the UI through matchers. These matchers check whether a certain view is shown, clickable and has the desired set of values. However, theses tests often miss out on the look and feel of the UI.</p><p>Screenshot testings validates whether the UI is perceived correctly or not. It is often hard to catch issues that correlate to colours, styles and spacing of certain UI elements. Screenshot testings compares the screenshot of the current state of the application with a set of pre-validated screenshots, to check whether the UI has been changed. With pixel-to-pixel matching, detecting incorrect font, colour or spacing can alert the developer earlier in the feedback loop and help teams deliver a consistent design experience for their users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8Cjk2ET-Jr1CqR18WKgxkw.jpeg" /></figure><h4>Resources</h4><ul><li><a href="https://github.com/facebook/screenshot-tests-for-android">facebook/screenshot-tests-for-android</a></li><li><a href="http://facebook.github.io/screenshot-tests-for-android/">What is this?</a></li></ul><h3>“Why is everyone else smarter than me?”: Dealing with Imposter Syndrome</h3><p>This was one of the most interesting talks of the day. Phil shares his experience with imposter syndrome and how it affects his productivity throughout his day. Imposter syndrome is the inability to accept one’s success and having the constant fear of being exposed as a fraud. Dealing with imposter syndrome can be a challenging experience, especially when starting a new job.</p><p>Often the case, a negative mindset starts to set in place and thoughts like “Everyone at work is a lot smarter than me” and “I have tricked them into hiring me” starts to formulate. Phil debunks these negative thoughts and claims that we often set a higher expectation of ourselves than what others expect from us. To deal with imposter syndrome, the focus of fear has to be transformed into a growth mindset. For instance, even if a lot of my co-workers are smarter than me, this is a great opportunity for me to learn from those around me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*taFl_e5gtKAhGaSmZRJeIg.jpeg" /></figure><p>Everyone has faced imposter syndrome of some sort in the past. Some insights to deal with it is to write or talk about negative thoughts, keep a list of achievements and ask for feedback to facilitate the growth mindset. But one fact to accept that it is impossible to know everything.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K1uy92YYDNJMa-siWETMWw.jpeg" /></figure><h3>Diffusing Changes in your APK</h3><p>Back to Android! Releasing an Android application requires the generation of an APK. An APK contains a lot of information regarding the state of the application. As developers roll out new versions of their application, they may not be familiar of how much their APK may have changed. In this talk, Jake showcases his tool, Diffuse, that provides a comparison between two APKs. The comparison can outline the changes in the resource types within the APK as well as the count of string, types, classes and method in the compiled classes.</p><p>The tool is meant to be used as an additional check on the state of the APK on small changes, such as updating the Dagger library in a SDK Search app. The table below showcases a decrease in APK size through that change. In addition to size and count values, the tool also provides a lint check on the state of the APK.</p><p>Check out <a href="https://github.com/JakeWharton/diffuse">Diffuse on GitHub</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FswepEk5CMzN7njUHAprmQ.jpeg" /></figure><h3>Conclusion</h3><p>Alas, the day has come to end. Droidcon provides a great opportunity to learn, network and have fun all within the timespan of one day. The speakers were brilliant, the talks were informative and the volunteers were wonderful.</p><p>Pro tips:</p><ul><li>Don’t be shy approaching the speakers after their talks</li><li>Attend talks that you normally would not attend</li><li>Say hi to a random stranger beside you</li></ul><p>Till next droidcon…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4816e498c640" width="1" height="1" alt=""><hr><p><a href="https://medium.com/tumiya/droidcon-toronto-2019-4816e498c640">Droidcon Toronto 2019</a> was originally published in <a href="https://medium.com/tumiya">Tumiya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Guide to Android Testing: Basics]]></title>
            <link>https://medium.com/android-dissekt/guide-to-android-testing-basics-1f3fcd9e76c8?source=rss-5dfdfdfe74d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f3fcd9e76c8</guid>
            <category><![CDATA[automated-testing]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[quality-assurance]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Asad Mansoor]]></dc:creator>
            <pubDate>Tue, 29 Oct 2019 02:46:18 GMT</pubDate>
            <atom:updated>2019-10-29T03:01:40.491Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kSev1PvuunwRsh_8ZUvpkA.jpeg" /></figure><p>Suppose you are working on a cool idea for a mobile application. As you build out your features, you are constantly running the application on an emulator or a physical device and verifying that it works. Naturally, you are testing your application.</p><p>Testing is essential to building a robust software. As you continue to grow your application in features, the number of tests you will need to perform will increase proportionally to ensure nothing is broken. Testing provides validation on two aspects:</p><ul><li>New changes are working as intended</li><li>New changes did not break any other parts of the application</li></ul><p>Once these validations are in place, making changes to an application becomes easier and increases confidence in refactoring the codebase. However, manual testing will start to become a repetitive task, that could be time consuming and lead to a lot of human error. As a result, developers write automated tests, that are executed whenever they would like to validate their changes. In this blog post, we’ll cover the basic of testing an Android application.</p><h3>Local vs Instrumented Testing</h3><p>When you create a new Android application on Android Studio, the project is structured into various projects. These folders are called source sets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*47-PVC30ejX1t6roUC-i1Q.png" /></figure><p>Source sets are divided into three category:</p><ul><li><strong>main: </strong>contains the application’s source code</li><li><strong>androidTest: </strong>contains<strong> </strong>test files<strong> </strong>for instrumented testing</li><li><strong>test:</strong> contains test files for local testing</li></ul><p>The main difference between test and androidTest is where the tests are required to be executed. Local testing includes tests that can be executed on the JVM and do not require the Android SDK. These could be testing the core business logic with a specific input and expected output. For example, the sample local test is asserting on whether 2 + 2 equals to 4.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TI5n1Pem2ke_vyK_inwY-A.png" /></figure><p>Instrumented tests require the Android SDK, as they interact with the user interface or application context. In this case, an emulator or physical device will be required. For example, the instrumented test below assert on the package name of the context.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K8bH4jutDMOYHxWKalm7Cw.png" /></figure><p>When you create a new Android project on Android Studio, these two tests are packaged with every new project.</p><h3>Running your tests</h3><p>To run your tests, you can do one of two things:</p><ul><li>Right click on ExampleUnitTest and select Run ‘ExampleUnitTest’</li><li>Open terminal, navigate to the root project directory and execute ‘./gradlew testDebugUnitTest’</li></ul><p>Both operations will execute the local test and produce some sort of output, to indicate whether the test case has passed or not. When you execute the gradlew command, the gradle task also creates a html report of the test run. To find the html report, navigate to app/build/reports/tests/testDebugUnitTest and open index.html.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jOYmzKjlIlMRT8ZelbZIVw.png" /><figcaption>Summary of the test</figcaption></figure><h3>Testing the codebase</h3><p>Now for the fun part 🎉! Let’s create a new Kotlin file named getLowerAndHigherRanges.kt, which takes a list of Integers and returns an object with two values: the percentage of integers that are less than 50 and the percentage of integers that are equal or more than 50.</p><p>For example</p><ul><li>Given a list of integers: 1,3,44,59,99,102</li><li>Percentage of lower values: 50%</li><li>Percentage of higher values: 50%</li></ul><p><strong>getLowerAndHigherRanges.kt</strong></p><pre>internal fun getLowerAndHigherRanges(values: List&lt;Int&gt;): RangeResult {<br>    val totalValues = values.size<br>    val numberOfLowerValues = values.count { it &lt; 50 }<br>    val lowerPercent = 100 * numberOfLowerValues / totalValues<br>    val higherPercent = 100 * (totalValues - numberOfLowerValues) / totalValues<br><br>    return RangeResult(<br>        lowerPercent = lowerPercent.toFloat(),<br>        higherPercent = higherPercent.toFloat()<br>    )<br>}<br><br>data class RangeResult(val lowerPercent: Float, val higherPercent: Float)</pre><h3>Writing our first test cases</h3><p>To create a test file for our getLowerAndHigherRanges.kt, open the file on Android Studio and right click on the class name. Click on generate and select test. Follow the instructions to create a new test class under the <strong>test</strong> source set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pC4aBlac_0aXcS6m-SlJEQ.png" /></figure><p>As of now, we have the code that needs to be tested as well as an empty test class file. Let’s start by creating a few test cases around these requirements:</p><ul><li>Given a list of all integers below 50, the lowerPercent should equal 100% and higherPercent should equal 0%</li><li>Given a list of all integers above 50, the lowerPercent should equal 0% and higherPercent should equal 100%</li></ul><p>The local test should look somewhat similar to the code below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X73bakVTkfxKRIaLBgXX_g.png" /></figure><h3>Discovering our first bug</h3><p>As of now, all of the test cases should pass. However, there is a bug in the code 😱. We have not considered the case where the list is empty.</p><p>If we were to implement a test case to check that scenario, the code would throw an arithmetic exception as we are dividing by zero.</p><p>This is a perfect opportunity for test driven development.</p><h3>Test Driven Development</h3><p>In test driven development, the following steps are performed:</p><ol><li>Write a test case</li><li>Confirm that the test case fails</li><li>Write the minimal code to get the test to pass</li><li>Repeat</li></ol><p>We can proceed with writing a test case that takes in an empty list as input. Once we verify that it does fail, we can modify the getLowerAndHigherRanges.kt file to cover this case scenario. Once that is implemented, we will run the test again to verify that the bug has been fixed.</p><h3>Final Code</h3><p><strong>getLowerAndHigherRanges.kt</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pNcJwyvgcSgHrnilwoEhog.png" /></figure><p><strong>getLowerAndHigherRangesKtTest.kt</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C_tt2QadcDbKjGO9c5Vy8A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uxCDYbA34xMkcqHoH9PETg.png" /><figcaption>Summary report of all the test cases</figcaption></figure><p><em>Would like to chat? Let’s connect on </em><a href="https://twitter.com/asadmansr"><em>Twitter</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f3fcd9e76c8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/android-dissekt/guide-to-android-testing-basics-1f3fcd9e76c8">Guide to Android Testing: Basics</a> was originally published in <a href="https://medium.com/android-dissekt">Android Dissekt by Asad</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Good First Commit]]></title>
            <link>https://medium.com/android-dissekt/good-first-commit-984b0fb14d4c?source=rss-5dfdfdfe74d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/984b0fb14d4c</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[mentorship]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Asad Mansoor]]></dc:creator>
            <pubDate>Thu, 22 Aug 2019 13:48:55 GMT</pubDate>
            <atom:updated>2019-08-22T13:48:55.672Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NYoJyNtt8k0vykHEYmih9A.png" /></figure><p>The constant desire to learn something new has become second nature to me. Whether it be a new language or framework, it’s always exciting to start something fresh. Like for most people, the art of learning how to learn was first introduced in school. As some people could master a topic by simply reading the textbook, others preferred a more hands-on approach.</p><p>Personally, I loved going straight into the technical hands-on part. A lot of my side projects originate from ideas or technologies that I wish to try out. This way, I can meet my objective as well as create something of value that I could potentially use as a tool.</p><p>However, building a fully functioning side project is often hard work and tiring. For most of the time, I would be working on other things to support my project, instead of working on a particular component that sparked my curiosity in the first place. Through this experience, I have explored a different route to learn something new rather than building a side project from scratch. And that route is to contribute to open source software ❤️.</p><h3>My experience with open source</h3><p>A few months ago, I was looking for a new challenge. I found a new architecture model called MVVM (Model-View-ViewModel), that I really wanted to try out for building Android projects. As clueless as I was, I stumbled across a GitHub repo managed by Google Samples. Although the repo was in its early stages, it seemed like a great idea for Google to develop sample applications on the technologies they have built. While poking around the project, I came across an issue labeled as “good first issue”. The issue itself seemed really interesting and it was something that I felt I could contribute back to the project. So I gave it a try and opened a PR hoping for the best.</p><p>What happened next, really surprised me. I had other developers commenting on my PR and providing useful feedback on my code. After a few iterations of back and forth of discussions, the maintainer of the project decided to accept my changes and merge it into the master branch. As happy as I was, it was a great learning opportunity for me.</p><p>GitHub has a ton of cool open source projects that are backed up by great companies. It often feels intimidating at first, whether my contribution would be welcomed or not. But, there’s a large community of developers that share the passion of contributing to open source software. Not only this is beneficial for new developers to get exposure to developing software, it’s also helpful for project maintainers to attract new perspectives.</p><h3>Why open source?</h3><p>Regardless of your experience in developing software, contributing to open source software is a great way to become a better developer. Here are some of the learning opportunities I feel are beneficial for everyone.</p><ul><li><strong>Learning the codebase</strong>: It’s an important skill to be able to learn and contribute to a large codebase. This will help you optimize your solution for any future changes.</li><li><strong>Delivering real impact</strong>: It’s always a great feeling to be able to help by solving a problem that other people are facing.</li><li><strong>Getting feedback</strong>: Collaborate with other developers and learn from their feedback.</li></ul><h3>Introducing Good First Commit</h3><p>The hardest part for a new developer might be overcoming the initial hurdle of finding the right project. With so many projects to choose from, it’s often unclear of what kind of help might be required from new contributors.</p><p>Good First Commit allows you to discover beginner friendly issues on GitHub from various projects. Whether you are just starting or would like to learn something new, Good First Commit makes it easy to focus on one issue at a time.</p><p><a href="https://www.goodfirstcommit.com/">www.goodfirstcommit.com</a></p><p><em>Give it a try and let me know what you think :-)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=984b0fb14d4c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/android-dissekt/good-first-commit-984b0fb14d4c">Good First Commit</a> was originally published in <a href="https://medium.com/android-dissekt">Android Dissekt by Asad</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Being a product manager for my final year Software Engineering capstone project]]></title>
            <link>https://medium.com/android-dissekt/being-a-product-manager-for-my-final-year-software-engineering-capstone-project-87e5c330d7d5?source=rss-5dfdfdfe74d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/87e5c330d7d5</guid>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[students]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Asad Mansoor]]></dc:creator>
            <pubDate>Tue, 01 May 2018 20:39:03 GMT</pubDate>
            <atom:updated>2018-05-01T22:59:33.672Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rYqxGE8b5_lxlvF4OoE_AA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/zoCDWPuiRuA?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Daria Nepriakhina</a> on <a href="https://unsplash.com/search/photos/meeting?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>University is a great opportunity to experience different strategies. As I conclude my undergraduate degree in Software Engineering at McMaster University, I am tasked with a full-year project for my capstone design course. The faculty of engineering promotes a technical and functional design course which combines the practical knowledge of computer science, ability of producing technical documentations and final implementation of a solution with real impact. In other words, one full-year course summarizing a student’s accomplishments with their academic studies. As I journey through the course, there are lessons to be picked up at every milestone, whether it be learning how to work as a team, how to pick up on new technologies and most importantly, how to deliver a solution in a complete and correct state.</p><p>To shed some context regarding our capstone project. I’m currently working with five other students in their final year to tackle on a widespread problem in which every student has faced during their time in school. As higher education is becoming more accessible, the size of lectures are rapidly increasing and sometimes create more barriers in order to provide an effective means of learning. From our experiences as students, the act of <strong>interactivity</strong> between lectures could play a great role in modernizing education with the use of smartphones and smart gadgets. So much so, that bringing your own device to school are already being encouraged to students at an earlier stage. To resolve the lack of interactivity within classrooms, the capstone project focuses on creating an application designed to enhance discussions with peers and instructors, provide a means of assessing a student’s knowledge and allow students and instructors to take part in feedback exercises.</p><p>One of the biggest challenges we faced initially was managing the team as a whole. As we began the process of drafting our initial requirements and outputs, it became evident that managing a team of six would be a challenging process, especially if everyone is a full-time student focused on school and other commitments. We decided to split the large team of six people into three sub-teams with a designated team lead that handles most of communications between the teams. The Android, iOS and Backend team all had two members that would coordinate with their corresponding team members. This turned out to be a perfect balance for development as well, since the corresponding tasks would be divided amongst the two members.</p><p>Working on a large scale software application, it became a common trend to find the team go off-track and work on problems that were not required for the upcoming milestone. This led to a lot of delays and last-minute implementations for the proof of concepts and demos that involved various stakeholders such the instructor and teaching assistants. After the team being burnt one too many times, we decided to take a charge on how this project should be handled. So at this moment, we introduced a product roadmap to highlight our high level milestones with an addition to a Trello board to keep track of our low level tasks. Immediately after these tools were deployed, the team had a better idea on what they needed to implement and was more motivated than ever to deliver a great product.</p><h3>Roadmap</h3><p>Developing a roadmap required a lot of discussions on what the end result should be. As a team, we opted for the features that we all loved and believed were the main reason for the application to succeed and be useful for our users. Our roadmap outlined a four week timeline of the high level milestones that needed to be developed, which included a buffer period till the final submission of the project. One of the interesting aspects of the roadmap was shown as the ability for the cross-platform teams to work independently without being blocked by another team.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*auMngctAeJ3wlRdRJV9WAg.png" /></figure><p>One of the greatest outcome from introducing a roadmap was that it allowed the team members to meet once a week to discuss their accomplishments, concerns and gain insights on how they can approach their obstacles in a collaborative environment.</p><blockquote>The roadmap provides a high-level view on where the development will be heading towards and how much work is required for completion.</blockquote><p>Granted that the high-level milestones are defined, the next step in the process was to divide the milestones into sub-tasks that would be enough for a single developer to complete in the time allocated. This is where Trello comes in handy.</p><h3>Trello</h3><p>The use of Trello provided a clear image on the progress of the ongoing tasks throughout the remainder of the sprint. Knowing the tasks ahead of time was a great way to organize around the schedule of classes, midterms and assignments. The development teams had access to all the boards on Trello to allow transparency between teams and can assign tasks to other team members on different platforms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zEdhkvnIKVPZdLypq5me3g.png" /></figure><p>The Trello board is made of tasks that have been broken down from the high-level milestones. The goal of the exercise was to continuously break down a large problem into a series of smaller problems that can be solved by a single developer within that team in the allocated time frame.</p><blockquote>Break down large problems into smaller problems that can be solved by single developer in a given time frame.</blockquote><p>In addition, each Trello card represented a commit in the project’s GitHub repository. Not only these commits were used to track our progress, but they helped differentiate each feature and how they can go about being tested in the pre-production stage. As a result of deploying Trello into our development, each team member was more aware of their tasks that they had to complete and count the impact they have made on the overall product in the time span of eight months.</p><h3>Main Lessons Learned</h3><ol><li>Planning starts from Day 1.</li><li>Never assume that everyone knows what they are doing.</li><li>Incorporate software planning applications early on.</li><li>Find ways to optimize code throughput and remove barriers.</li><li>Always include a buffer period (just in case).</li></ol><h3>Conclusion</h3><p>The capstone design course was so much more than programming a solution. It was a combined exercise of solving a problem that we were passionate about and adhering to a path of learning, planning, documenting and programming. As a software developer, experiences like these shed a light on the overall effort it takes to make a product successful. The source code plays a big role, but it is also the ability to work with other people and accommodate resources in a timely fashion to ensure that the product is tested and actually solves the problem. Even through, the capstone design course comes to an end, I believe there is still lots to learn as we move into a phase of launching our application for our users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*58vpyJl8ApbiTCmxI_M-kQ.png" /></figure><p><em>If you enjoyed this article and would like to be notified when I release similar stories, follow me on Medium and </em><a href="https://twitter.com/asadmansr"><em>Twitter</em></a><em>. Thanks </em>😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87e5c330d7d5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/android-dissekt/being-a-product-manager-for-my-final-year-software-engineering-capstone-project-87e5c330d7d5">Being a product manager for my final year Software Engineering capstone project</a> was originally published in <a href="https://medium.com/android-dissekt">Android Dissekt by Asad</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>