<?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 Pranish Shrestha on Medium]]></title>
        <description><![CDATA[Stories by Pranish Shrestha on Medium]]></description>
        <link>https://medium.com/@pranish.shres?source=rss-49070460ace3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*kijGoN2F5mnqmXb0.</url>
            <title>Stories by Pranish Shrestha on Medium</title>
            <link>https://medium.com/@pranish.shres?source=rss-49070460ace3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 06:04:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pranish.shres/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[I quit social media for a week and here is what happened (Digital Minimalism)]]></title>
            <link>https://medium.com/@pranish.shres/i-quit-social-media-for-a-week-and-here-is-what-happened-digital-minimalism-fb539f8493a?source=rss-49070460ace3------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb539f8493a</guid>
            <category><![CDATA[habits]]></category>
            <category><![CDATA[time-management]]></category>
            <category><![CDATA[digital-minimalism]]></category>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[information-technology]]></category>
            <dc:creator><![CDATA[Pranish Shrestha]]></dc:creator>
            <pubDate>Mon, 22 Jul 2019 05:21:28 GMT</pubDate>
            <atom:updated>2019-07-22T14:20:41.278Z</atom:updated>
            <content:encoded><![CDATA[<p>Being a software developer, focusing on a single task or a problem is very important. But in this era of modern information and technology world, focusing gets harder. Whenever I am trying to complete a task, I get hit by the dopamine to check my messages and notifications on social media. A small <strong>bling !</strong>, check my phone and when I turn my head up, minutes have been passed by.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wjbuBwhHbYMDOqaB" /><figcaption>Photo by <a href="https://unsplash.com/@marcschaefer?utm_source=medium&amp;utm_medium=referral">Marc Schaefer</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>On weekdays, I get just about 3–4 hours time at home after office. I spend this time constantly digging up on my phone; scrolling through facebook and instagram and sending shitty messages to my friends which they don’t even care about. Sometimes I get in a fight only due to my social media activity, someone gets offended by the post I have shared or a message I had sent them. I even grab a book hoping that I would meet my daily goal of reading at least 20 pages a day, but its just <em>tap-tap-tap </em>on my phone and hours passes by doing nothing and finally I go to bed with my headphones on and still chatting until I finally fall asleep. I then woke up next morning and read the messages of the deep conversations I had last night, which today somehow feels silly and awful, thinking why did I open up so much to a person I am not even close enough in my real life.</p><p>If you think you are the only one having these kind of problems, then you are not.</p><blockquote>A wealth of information creates a poverty of attention - Herbert Simon</blockquote><p>So I decided to take <strong>1 week social media detox </strong>challenge. No facebook, no messenger, no instagram, no twitter, no viber, no youtube and no mobile games, nothing. And here is the twist. Every time I try to check my phone unconsciously, I would hold a book instead.</p><p>From the very first day of the detox, I was having that urge to check my phone. Just like a drug addict feels when they don’t do drugs. During lunch breaks, everyone in my work place were either busy in their phones or watching youtube videos on their desktop. I felt so much different from all of them. Looking at everyone’s face like a jackass who was left for the first time for human interaction. I constantly unlocked my phone searching for any apps which could help me pass time.</p><p>When I was at my workplace, I was occupied by my work, when I got bored, I read blog posts or listen to podcasts. But things went harder as I reached home. After I was home and had my food, I sat on my couch and had no idea what I would do without my phone and with the spare time I had. I went upstairs to help my mom prepare dinner and clean things up. Then I wrote my daily journal, planned for the next day and read a book for an hour.</p><p>I am definitely not against smartphone usage since I myself am a mobile application developer. Information Technology is one of the greatest invention of mankind. But it’s high time we as a consumer should decide when and how to consume digital information. Before the detox, I thought my pre 2000s life will be back but it was not much of a difference. Social media has caught our life so well that it has become an integral part of modern day society, a major source of entertainment. We are so focused on what we eat, why not apply the same habit on what type of information we consume?</p><p>So next time you try to pick up your phone, ask these questions to yourself first :-</p><ul><li>Why am I picking up my phone?</li><li>Is it worth doing what I am going to do?</li><li>Is it important than what I am doing currently?</li><li>Is it important than the people around me?</li><li>How much time would I spend on it?</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SBXxgTs69SGvS4ec" /><figcaption>Photo by <a href="https://unsplash.com/@ruggedwisdom?utm_source=medium&amp;utm_medium=referral">Alexander Ward</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I really liked what I did and even after 7 days, I am not in a hurry to use it again. I have gained control over the past 7 days and will change my digital media consumption habits. People are so concerned about drugs and alcohol addicts. But what about phone addiction? People who are miles apart from us become important than people infront of us. An era where capturing moments in our cell phones is more important than actually living it? People are prisoners of their phones. May be that’s why they are called “cell phones”.</p><h4>If you enjoyed this story, please click the 👏 button and share to help others find it! Feel free to leave a comment below.</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb539f8493a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android Bites 13 — Kotlin Labeled Breaks]]></title>
            <link>https://medium.com/ekbana/android-bites-13-kotlin-labeled-breaks-813124fa1225?source=rss-49070460ace3------2</link>
            <guid isPermaLink="false">https://medium.com/p/813124fa1225</guid>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[break]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android-bites]]></category>
            <dc:creator><![CDATA[Pranish Shrestha]]></dc:creator>
            <pubDate>Wed, 20 Jun 2018 04:54:52 GMT</pubDate>
            <atom:updated>2018-06-20T04:54:52.870Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aWzVGsJ4zacnzCP3" /><figcaption>Photo by <a href="https://unsplash.com/@jontyson?utm_source=medium&amp;utm_medium=referral">Jon Tyson</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Every developer is familiar with breakstatements. A break syntax is used to terminate the nearest enclosing loop in the program. But what if we can terminate any loop when the desired conditions in the program are met? Introducing labeled break .</p><p><strong>Labeled break </strong>in kotlin is used mostly with an if statement. A label is an identified followed by @ sign. Like @first, @second, @outer, @inner and so on.</p><h3>Implementation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*n7DQDenqAW1qjlvqiHBmDQ.gif" /></figure><h4>Unlabeled Break</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fef645c70acd5881ed2664e5fbc6b8e7/href">https://medium.com/media/fef645c70acd5881ed2664e5fbc6b8e7/href</a></iframe><p>Output :</p><pre>i= 1, j= 1 <br>i= 1, j= 2 <br>i= 1, j= 3 <br>i= 1, j= 4 <br>outer loop <br>i= 2, j= 1 <br>i= 2, j= 2 <br>i= 2, j= 3 <br>i= 2, j= 4 <br>outer loop <br>i= 3, j= 1 <br>i= 3, j= 2 <br>i= 3, j= 3 <br>i= 3, j= 4 <br>outer loop</pre><p>The break syntax will terminate the inner loop and continue executing rest of the code of the outer loop. So it jumps to code line 8 and prints outer loop and loops the outer loop again giving the above output. This is the scope of a break syntax.</p><h4>Labeled Break</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c4f9bd0900ab08a13b35b7c3bc81938/href">https://medium.com/media/3c4f9bd0900ab08a13b35b7c3bc81938/href</a></iframe><p>Output :</p><pre>i= 1, j= 1 <br>i= 1, j= 2 <br>i= 1, j= 3 <br>i= 1, j= 4</pre><p>We will just have to provide a label (any calling name) to the loops and then terminate the loop referring to the label. Here the outer loop is labeled as outer and break@outer will terminate the outer loop giving the above output.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=813124fa1225" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ekbana/android-bites-13-kotlin-labeled-breaks-813124fa1225">Android Bites 13 — Kotlin Labeled Breaks</a> was originally published in <a href="https://medium.com/ekbana">EKbana</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android Bites — 5 : An introduction to Sealed classes in kotlin]]></title>
            <link>https://medium.com/ekbana/android-bites-an-introduction-to-sealed-classes-in-kotlin-e12c45fa0c4a?source=rss-49070460ace3------2</link>
            <guid isPermaLink="false">https://medium.com/p/e12c45fa0c4a</guid>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[android-bites]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Pranish Shrestha]]></dc:creator>
            <pubDate>Mon, 04 Jun 2018 04:04:40 GMT</pubDate>
            <atom:updated>2018-06-07T05:40:16.572Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*26jw_oLB6-Q09heYyL_adw.jpeg" /><figcaption>Image from xenonstack.com</figcaption></figure><p>Ever since google announced kotlin as an official language on Android, we the android apps development team here at ekbana have been exploring features on kotlin. One of the things that we found really handy was <a href="https://kotlinlang.org/docs/reference/sealed-classes.html">sealed classes</a>.</p><blockquote>Sealed classes are used for representing restricted class hierarchies, when a value can have one of the types from a limited set, but cannot have any other type.</blockquote><p>Sealed classes are basically like extension of enum classes in a sense they both have restricted values.</p><p><strong>Code Example</strong></p><p>Let’s start with a basic java vs kotlin code implementation. In java we will be using enum and switch case. Then we will use sealed classes in kotlin for the same work flow.</p><p><strong>Java Implementation</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/24833df223f26381c934b6c58496bcdb/href">https://medium.com/media/24833df223f26381c934b6c58496bcdb/href</a></iframe><p><strong>Kotlin Implementation</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f24c182d2cd0b5e1e0d7cee885f6b777/href">https://medium.com/media/f24c182d2cd0b5e1e0d7cee885f6b777/href</a></iframe><p>And the best part here is kotlin’s smart casting. The bigBangUrl is accessible directly when the series object is of type BigBang.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e12c45fa0c4a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ekbana/android-bites-an-introduction-to-sealed-classes-in-kotlin-e12c45fa0c4a">Android Bites — 5 : An introduction to Sealed classes in kotlin</a> was originally published in <a href="https://medium.com/ekbana">EKbana</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>