<?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 Yosif Yosifov on Medium]]></title>
        <description><![CDATA[Stories by Yosif Yosifov on Medium]]></description>
        <link>https://medium.com/@yyosifov?source=rss-5de02810b6a3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*LPiyquipuSVioHj4.jpg</url>
            <title>Stories by Yosif Yosifov on Medium</title>
            <link>https://medium.com/@yyosifov?source=rss-5de02810b6a3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 15:53:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yyosifov/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[Deploy Nest.js on Vercel]]></title>
            <link>https://yyosifov.medium.com/deploy-nest-js-on-vercel-102f9bfbaf85?source=rss-5de02810b6a3------2</link>
            <guid isPermaLink="false">https://medium.com/p/102f9bfbaf85</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[vercel]]></category>
            <category><![CDATA[nestjs]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[architecture]]></category>
            <dc:creator><![CDATA[Yosif Yosifov]]></dc:creator>
            <pubDate>Tue, 12 Mar 2024 09:07:33 GMT</pubDate>
            <atom:updated>2024-06-17T07:52:17.692Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>When should you consider deploying Nest.js on Vercel?</strong></h3><p>Vercel provides infrastructure and services for quick and easy setup of deployments of Next.js applications. However, it is <strong>serverless</strong> and can be used to host Node.js applications (express or any other framework) or Nest.js, too.</p><p>Vercel <strong>hasn’t been designed to host backend applications</strong>. But, there are a few reasons you might still want to give it a try:</p><ul><li><strong>Next.js</strong> is great for frontend apps, but is <strong>not convenient for robust backend APIs </strong>— a lot of node modules are not running on the Edge (an example is the MongoDB driver).</li><li><strong>Cloud providers</strong> — if you already use Vercel for your Next.js project, it makes sense to try to utilize it for the Backend as far as it suits you. You won’t need to explore the vast options in AWS for example — there you have a bunch of options- ec2, ECS, EKS, fargate, beanstalk, etc.</li><li><strong>Quick and easy setup of deployments </strong>upon push in Git, which works out of the box. This saves you time in thinking/implementing CI/CD actions</li><li>It’s quick for <strong>prototyping</strong> and <strong>getting a project off the ground</strong> when you want to build a product, not invest heavily into architecture from the beginning</li><li>Very <strong>easy setup of domains and SSL certificates</strong> — out of the box, yet again</li><li>Has <strong>neat monitoring</strong> — out of the box provides runtime logs, analytics, and monitoring</li></ul><h3>Deploying a Nest.js Application</h3><p>The easiest way to deploy a Nest.js application is to:</p><ol><li>Add a vercel.json file in the root folder of your Nest.js project. An example config with Nest.js 10</li></ol><pre>{<br>  &quot;version&quot;: 2,<br>  &quot;builds&quot;: [<br>    {<br>      &quot;src&quot;: &quot;src/main.ts&quot;,<br>      &quot;use&quot;: &quot;@vercel/node&quot;<br>    }<br>  ],<br>  &quot;routes&quot;: [<br>    {<br>      &quot;src&quot;: &quot;/(.*)&quot;,<br>      &quot;dest&quot;: &quot;src/main.ts&quot;<br>    }<br>  ]<br>}</pre><p>2. Configure a new Project in Vercel of type “Other” and point it to the directory with your Nest.js project</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*SC9YOOFEZOtkqUwbHxF1fg.png" /></figure><p>3. The settings should be picked up from the vercel.json and you can see this in the Settings tab. To change settings — update the vercel.json instead of using the UI</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*HqMJYTKw7ujyRzZ44jakTQ.png" /></figure><p>4. Configure a custom Domain if you have one and you’re done!</p><h3>CORS</h3><p>If you have a Next.js + Nest.js setup, you’ll need to call the Backend API from the Frontend application from the Browser (with fetch).</p><p>In that case, as they are hosted on different domains, you’d have to configure CORS. It’s a little bit hacky for Vercel, as it wasn’t designed to host backend applications. It took me quite a while to troubleshoot and make it work, so here are the steps:</p><ol><li>Enable the CORS in your next.js application in the bootstrap() of your application like this:</li></ol><pre>app.enableCors({<br>     origin: process.env.FRONTEND_URL, // Add your frontend URL here <br>     methods: [ &quot;GET&quot;, &quot;POST&quot;, &quot;PUT&quot;, &quot;DELETE&quot;,&quot;OPTIONS&quot;, &quot;PATCH&quot;],<br>     allowedHeaders: [&#39;Origin&#39;, &#39;X-Requested-With&#39;, &#39;Content-Type&#39;, &#39;Accept&#39;, &#39;Authorization&#39;],<br>  });</pre><p>Assuming you’re using express in Nest.js, you can see all the different options in the CORS middleware documentation: <a href="https://github.com/expressjs/cors#configuration-options">https://github.com/expressjs/cors#configuration-options</a></p><ul><li>If you need to send the cookies cross-domain, you might need to add these to the cors configuration:</li></ul><pre>credentials: true,<br>allowedHeaders: [&quot;Cookie&quot;, the rest of the headers]</pre><p>2. (HACKY) In order for Vercel to allow CORS you should have an empty /dist folder, which is not produced by the build with Nest.js. To do so you can create a new dist folder with an empty file .gitkeep inside, so that GIT can detect it:</p><pre>md dist<br>cd dist<br>touch .gitkeep</pre><p>Commit and push this folder to git.</p><p>You may need to add to .gitignore to allow tracking this folder, as it might be excluded:</p><pre>!backend/dist/.gitkeep</pre><p>3. After deployment, test the response from the console:</p><pre>curl --dump-header — -o /dev/null https://backend_api -H &quot;Origin: https://frontend_app&quot;</pre><p>It should contain the CORS headers in the response:</p><pre>access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, Authorization<br>access-control-allow-origin: https://frontend_app</pre><h3>And you’re done!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=102f9bfbaf85" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Think like a monk: my Book Notes]]></title>
            <link>https://yyosifov.medium.com/think-like-a-monk-my-book-notes-307d6d0d331f?source=rss-5de02810b6a3------2</link>
            <guid isPermaLink="false">https://medium.com/p/307d6d0d331f</guid>
            <category><![CDATA[books]]></category>
            <category><![CDATA[thinking]]></category>
            <category><![CDATA[negativity]]></category>
            <category><![CDATA[happiness]]></category>
            <category><![CDATA[self-improvement]]></category>
            <dc:creator><![CDATA[Yosif Yosifov]]></dc:creator>
            <pubDate>Sun, 03 Jan 2021 14:35:01 GMT</pubDate>
            <atom:updated>2021-01-03T14:36:34.329Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/325/1*nFBZSa-aLlbt40Aj2bV7IA.jpeg" /><figcaption><a href="https://www.amazon.co.uk/Think-Like-Monk-Train-Purpose/dp/0008386420/">https://www.amazon.co.uk/Think-Like-Monk-Train-Purpose/dp/0008386420/</a></figcaption></figure><h3>Think Like a Monk: The secret of how to harness the power of positivity and be happy now</h3><p>by <strong>Jay Shetty</strong></p><p>How to reduce the negative thoughts and habits, live more up to your values and etc. It has several self-reflection exercises and a lot of quotes.</p><p>My Rating <strong>7/10</strong></p><p>As I took more than 100 notes during reading this book, I’ll post some of them in a RAW format as they appear in the book, without additional context and my interpretations.</p><ol><li><strong>“A layperson who is consciously aiming to be continuously alive in the Now is a monk.”. </strong>Monks can withstand temptations, refrain from criticizing, deal with pain and anxiety, quiet the ego, and build lives that brim with purpose and meaning.</li><li><strong>Fame, money, glamour, sex</strong> — in the end, none of these things can satisfy us. We’ll simply <strong>seek more and more</strong>, a circuit that leads to frustration, disillusion, dissatisfaction, unhappiness, and exhaustion.</li><li><strong>“The one thing that stays with you is your breath.”</strong> This ten-year-old monk added, “When you get stressed — what changes? Your breath. When you get angry — what changes? <strong>Your breath</strong>. We experience every emotion with the change of breath. When you learn to navigate and manage your breath, you can navigate any situation in life.”</li><li>In 1902, the sociologist Charles Horton Cooley wrote: <strong>“I am not what I think I am, and I am not what you think I am. I am what I think you think I am.”</strong> Let that blow your mind for a moment. Our identity is wrapped up in what others think of us — or, more accurately, what we think others think of us.</li><li>He says, <strong>“Your identity is a mirror covered with dust. When you first look in the mirror, the truth of who you are and what you value is obscured. Clearing it may not be pleasant, but only when that dust is gone can you see your true reflection.”</strong></li><li>The movies we watch, the music we hear, the books we read, the TV shows we binge, the people we follow online and offline. <strong>What’s on your news feed is feeding your mind</strong>. The more we are absorbed in celebrity gossip, images of success, violent video games, and troubling news, the more our values are tainted with envy, judgment, competition, and discontent.</li><li>Nothing took the place of these distractions except space, stillness, and silence. <strong>When we tune out the opinions, expectations, and obligations of the world around us, we begin to hear ourselves. </strong>In that silence, I began to recognize the difference between outside noise and my own voice. I could clear away the dust of others to see my core beliefs.</li><li><strong>No matter</strong> <strong>what you think your values are, your actions tell the real story</strong>. What we do with our spare time shows what we value. For instance, you might put spending time with your family at the top of your list of values, but if you spend all your free time playing golf, your actions don’t match your values, and you need to do some self-examination.</li><li>According to the Gita, <strong>these are the higher values and qualities</strong>: fearlessness, purity of mind, gratitude, service and charity, acceptance, performing sacrifice, deep study, austerity, straightforwardness, nonviolence, truthfulness, absence of anger, renunciation, perspective, restraint from fault finding, compassion toward all living beings, satisfaction, gentleness/kindness, integrity, determination.</li><li>The six lower values are <strong>greed, lust, anger, ego, illusion, </strong>and<strong> envy</strong>.</li><li><strong>Who you surround yourself with helps you stick to your values and achieve your goals.</strong> You grow together. If you want to run a 2:45 marathon, you don’t train with people who run a 4:45. If you want to be more spiritual, expand your practice with other spiritual people. If you want to grow your business, join a local chamber of commerce or an online group of business owners who are similarly driven toward that kind of success.</li><li><strong>It feels good to be around people who are good for us; it doesn’t feel good to be around people who don’t support us or bring out our bad habits.</strong></li><li><strong>It is impossible to build one’s own happiness on the unhappiness of others. — Daisaku Ikeda</strong></li><li>I flash back to a class Gauranga Das taught called “<strong>Cancers of the Mind: Comparing, Complaining, Criticizing</strong>.” In the class, we talked about negative thought habits, including gossip. One of the exercises we did was keeping a tally of every criticism we spoke or thought. For each one, we had to write down ten good things about the person.</li><li>More often, <strong>we use gossip to put others down</strong>, which can <strong>make us feel superior</strong> to them and/or bolster our status in a group.</li><li><strong>And the more negativity that surrounds us, the more negative we become. </strong>We think that complaining will help us process our anger, but research confirms that even people who report feeling better after venting are still more aggressive post-gripe than people who did not engage in venting.</li><li><strong>If we try to be problem-solvers, then we become frustrated when people don’t take our brilliant advice. The desire to save others is ego-driven. </strong>Don’t let your own needs shape your response.</li><li><strong>To purify our thoughts, monks talk about the process of awareness, addressing, and amending</strong>. I like to remember this as <strong>spot, stop, swap</strong>. First, we become aware of a feeling or issue — we spot it. Then we pause to address what the feeling is and where it comes from — we stop to consider it. And last, we amend our behavior — we swap in a new way of processing the moment. SPOT, STOP, SWAP.</li><li>To help us confront our own negativity, <strong>our monk teachers told us to try not to complain, compare, or criticize for a week</strong>, and keep a tally of how many times we failed. The goal was to see the daily tally decrease. The more aware we became of these tendencies, the more we might free ourselves from them. Listing your negative thoughts and comments will help you contemplate their origins. Are you judging a friend’s appearance, and are you equally hard on your own?</li><li>When we limit our negative speech, we may find that we have a lot less to say. We might even feel inhibited. Nobody loves an awkward silence, but it’s worth it to free ourselves from negativity. Criticizing someone else’s work ethic doesn’t make you work harder. Comparing your marriage to someone else’s doesn’t make your marriage better unless you do so thoughtfully and productively. <strong>Judgment creates an illusion: that if you see well enough to judge, then you must be better, that if someone else is failing, then you must be moving forward.</strong> In fact, it is careful, thoughtful observations that move us forward.</li><li>Most of the time what we feel is anxiety related to everyday concerns about money, jobs, and relationships. <strong>We allow anxiety — everyday fear — to hold us back by blocking us from our true feelings.</strong> The longer we hold on to fears, the more they ferment until eventually they become toxic.</li><li><strong>When you deal with fear and hardship, you realize that you’re capable of dealing with fear and hardship</strong>. This gives you a new perspective: the confidence that when bad things happen, you will find ways to handle them. With that increased objectivity, you become better able to differentiate what’s actually worth being afraid of and what’s not.</li><li><strong>It’s the same with our emotions — they are something we’re feeling, but they are not us. </strong>Try shifting from I am angry to I feel angry. I feel sad. I feel afraid. A simple change, but a profound one because it puts our emotions in their rightful place.</li><li>The Roman Stoic philosopher Seneca observed that <strong>“Our fears are more numerous than our dangers, and we suffer more in our imagination than reality.”</strong></li><li>Hindu philosopher Bhaktivinoda Thakura describes <strong>four fundamental motivations</strong>. <strong>Fear</strong>. Thakura describes this as being driven by “sickness, poverty, fear of hell or fear of death.” <strong>Desire</strong>. Seeking personal gratification through success, wealth, and pleasure. <strong>Duty</strong>. Motivated by gratitude, responsibility, and the desire to do the right thing. <strong>Love</strong>. Compelled by care for others and the urge to help them.</li><li><strong>“As long as we keep attaching our happiness to the external events of our lives, which are ever changing, we’ll always be left waiting for it.”</strong></li><li><strong>Passion + Expertise + Usefulness = Dharma</strong>. If we’re only excited when people say nice things about our work, it’s a sign that we’re not passionate about the work itself.</li><li><strong>Every day, think as you wake up, today I am fortunate to be alive, I have a precious human life, I am not going to waste it. — the Dalai Lama</strong></li><li>We spend time at work dreaming about going on a beach vacation, but then, on the beach, long-awaited drink in hand, we’re annoyed to find that we can’t stop thinking about work. Monks learn that these two scenarios are connected. <strong>A desired distraction at work bleeds into unwanted distraction on vacation. Distraction at lunch bleeds into the afternoon. We are training our minds to be where we physically aren’t. If you allow yourself to daydream, you will always be distracted.</strong></li><li><strong>Location has energy; time has memory</strong>. If you do something at the same time every day, it becomes easier and natural. If you do something in the same space every day, it becomes easier and natural.</li><li>There are <strong>infinite austerities or challenges you can try</strong>: giving up TV or your phone, sweets or alcohol; taking on a physical challenge; abstaining from gossip, complaining, and comparing.</li><li><strong>When something doesn’t go your way, say to yourself, “There’s more for me out there.” That’s all.</strong></li><li>A well-known poem by Jean Dominique Martin says, <strong>“People come into your life for a reason, a season or a lifetime.”</strong> These three categories are based on how long that relationship should endure.</li><li>There are <strong>five primary motivations for connection</strong> — and note that these don’t exclusively apply to romantic prospects: <strong>Physical attraction</strong>. You like what they look like — you are drawn to their appearance, style, or presence, or you like the idea of being seen with them. <strong>Material</strong>. You like their accomplishments and the power and/or the possessions this affords them. <strong>Intellectual</strong>. You like how they think — you’re stimulated by their conversation and ideas. <strong>Emotional</strong>. You connect well. They understand your feelings and increase your sense of well-being. <strong>Spiritual</strong>. They share your deepest goals and</li><li><strong>Ultimately death can be seen as the greatest reflection point</strong> — by imagining the last moment you can reflect on everything that leads up to it.</li><li>Among the <strong>most common regrets dying people express</strong> are: I wish I’d expressed my love to the people I care about. I wish I hadn’t worked so much. I wish I’d taken more pleasure in life. I wish I’d done more for other</li><li>To imagine your own death gives you a bird’s-eye view of your life. <strong>Try a death meditation whenever you are questioning whether or not to do something</strong> — to make a significant change, learn a new skill, take a trip. I recommend that you always do a death meditation at the beginning of a new year, to inspire new paths in the upcoming year.</li></ol><p>Plus many more interesting passages in the book.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=307d6d0d331f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Radical Focus: my Book Notes]]></title>
            <link>https://yyosifov.medium.com/radical-focus-my-book-notes-e6baaae41fcb?source=rss-5de02810b6a3------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6baaae41fcb</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[goals]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[business]]></category>
            <category><![CDATA[okr]]></category>
            <dc:creator><![CDATA[Yosif Yosifov]]></dc:creator>
            <pubDate>Sat, 04 Jul 2020 05:12:00 GMT</pubDate>
            <atom:updated>2020-07-04T05:12:00.518Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/313/1*g5ph7lQh-BlUMXHTjMZTPQ.jpeg" /><figcaption><a href="https://www.amazon.com/Radical-Focus-Christina-R-Wodtke-audiobook/dp/B01M2V4GAB/ref=sr_1_1?dchild=1&amp;keywords=Christina+R+Wodtke&amp;qid=1593839183&amp;s=books&amp;sr=1-1-catcorr">Buy on amazon</a></figcaption></figure><h3>Radical Focus: Achieving Your Most Important Goals with Objectives and Key Results</h3><p>by <a href="https://www.amazon.com/Christina-R-Wodtke-Books/s?k=Christina+R+Wodtke&amp;rh=n%3A283155">Christina R Wodtke</a></p><p>How to leverage the OKR system to align everyone in your company in the same direction. Set and track your most important goals and know where your time is spent and invested.</p><p>My rating: <strong>7/10</strong></p><p><strong>My notes</strong></p><p>These notes assume that you already know what does OKR (Objectives and Key Results) mean — there’s enough written and spoken on this topic.</p><ol><li>Purpose — give the reason for everyone to get up in the morning and be ready to work hard and effectively. An inspiring Objective will excite your teams and keep them going through tough times.</li></ol><blockquote>I know I’ve got a good Objective when you leap out of bed in the morning eager to make it happen. I know I’ve got the right Key Results when you are also a little scared you can’t make them.</blockquote><p>2. Check-in cadence — to stick to the Objectives you’ve set together, you should track every single week how the progress is going. You can set goals at the beginning of the week and at the end of the week gather with the team and everyone shares what has been accomplished during the week.</p><blockquote>Starting every week with a public setting of priorities is powerful. You commit to the team and to each other to make the Objective occur. A Friday celebration of what’s been accomplished is the second bookend of a high-performing team’s week. This commit/celebrate cadence creates a habit of execution.</blockquote><p>3. Distraction — time flies and eliminating any waste out of your team’s work can be the difference between success and failure. Especially in startups, the competition is fierce, cash is burning fast and the product is developed at a faster pace.</p><blockquote>A startup’s enemy is time, and the enemy of timely execution is distraction.</blockquote><p>4. Prioritize ruthlessly — don’t try to fit everything in the current period of the Objectives. Try to prune as much as possible to leave out the few most important goals.</p><blockquote>There is an old saying, “If everything is important, nothing is important.” Too often we have many competing goals that all seem equally important. And they may feel equally important, but if I asked you to stack rank them instead of choose between them, you could probably put them in order of importance.</blockquote><p>5. Check-ins — the regular rituals around the OKR system are vital. They help you and your team keep an eye on the target. If you lose sight of the OKRs for a longer period you shouldn’t be surprised if you didn’t hit any in the end.</p><blockquote>The original OKR system was just a way to set smart stretch goals. But the system around it — commitment, celebrations, check ins — makes sure you continue to make progress toward your goals even when you feel more like eating a cookie.</blockquote><blockquote>— — — — — — — — — — — — —</blockquote><blockquote>Maybe a company is the opposite, and no one makes their Key Results, because they are constantly over-promising and under-delivering. This is a company lying to itself. It needs to learn what it is actually capable of.</blockquote><blockquote>The most common fail is no follow-through. I’ve seen any number of companies set OKRs, then ignore them the rest of the quarter. When the last week of the quarter shows up, they seem surprised when no progress has been made.</blockquote><p>6. Inspiration — aim for a Big Hairy Audacious Goal (BHAG) set towards your path on your team Mission.</p><blockquote>Once you have a mission, selecting each quarter’s Objctives is straightforward. You are no longer faced with a crazy world of possibilities. You can have a conversation about what will move the mission forward. You can fight about sequencing. But once the dust has settled, you can pick the one big bold thing you will do because you know where you are going.</blockquote><p>7. Team — great teams achieve great things. Building a good and performing team takes time. The time spent together in various activities improves their inner-team trust, motivation, and general attachment to the company and mission.</p><blockquote>Providing beer, wine, cake or whatever is appropriate to your team on a Fridays is also importat to making the team feel cared for.</blockquote><blockquote>—</blockquote><blockquote>Consider this: the humans who work on the project are the biggest asset. Shouldn’t you invest in them?</blockquote><p>8. Clarity — OKRs bring a lot of discussions and check-ins, which should help improve the understanding of your team of the goals and why are you striving to achieve them.</p><blockquote>Leaders often overstimate how well people understand their goals — just 7% of people really do.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6baaae41fcb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Atomic Habits: my Book Notes]]></title>
            <link>https://yyosifov.medium.com/atomic-habits-my-book-notes-9734e4ec947b?source=rss-5de02810b6a3------2</link>
            <guid isPermaLink="false">https://medium.com/p/9734e4ec947b</guid>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[health]]></category>
            <category><![CDATA[habit-building]]></category>
            <category><![CDATA[happiness]]></category>
            <dc:creator><![CDATA[Yosif Yosifov]]></dc:creator>
            <pubDate>Wed, 07 Aug 2019 19:53:56 GMT</pubDate>
            <atom:updated>2019-08-07T19:59:28.884Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/331/1*Q28mc42P1dL0PwKNwBuDRw.jpeg" /><figcaption><a href="https://www.amazon.co.uk/Atomic-Habits-Proven-Build-Break/dp/1847941834/r">https://www.amazon.co.uk/Atomic-Habits-Proven-Build-Break/dp/1847941834</a></figcaption></figure><h3>Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones</h3><p>by <a href="https://www.amazon.com/James-Clear/e/B07DJTJC3X/ref=dp_byline_cont_book_1">James Clear</a></p><p>Habits are a powerful tool in your quest of improving anything — your skills, health, relationships, productivity or happiness. The book gives insights how to establish new habits and get rid of old ones.</p><p>My rating: <strong>10/10</strong></p><p><strong>My notes</strong></p><ol><li>The <strong>definition of a Habit</strong> by the author:</li></ol><blockquote>A habit is a routine or behavior that is performed regularly — and, in many cases, automatically.</blockquote><p>And the most powerful feature that comes with <strong>habits</strong> is that they <strong>have a compounding long-term effect</strong>. Repeating a habit for a day or a week may not be of great advantage, but if you are consistent and persist for a longer period you’ll definitely observe the effects of this habit.</p><blockquote>Habits are the compound interest of self-improvement. The same way that money multiplies through compound interest, the effects of your habits multiply as you repeat them. They seem to make little difference on any given day and yet the impact they deliver over the months and years can be enormous.</blockquote><p>Therefore — <strong>don’t expect immediate results</strong> when starting out or changing a habit:</p><blockquote>Your outcomes are a lagging measure of your habits. Your net worth is a lagging measure of your financial habits. Your weight is a lagging measure of your eating habits. Your knowledge is a lagging measure of your learning habits. You clutter is a lagging measure of your cleaning habits. You get what you repeat.</blockquote><p>2. <strong>Habits are</strong> in everything we do and are — they are <strong>our execution system</strong>. We’ve learned them along the way and apply them without thinking. Their effects are compounding and lead to results in the future.</p><p>Examples where we can find compounding habits:</p><ul><li><em>Productivity compounds </em>— Accomplishing one extra task is a small feat of any given day, but it counts for a lot over an entire career.</li><li><em>Knowledge compounds</em> — Learning one new idea won’t make you a genius, but a commitment to a lifelong learning can be transformative</li><li><em>Relationships compound</em> —People reflect your behavior back to you. The more you help others, the more others help you. Being a little bit nicer in each interaction can result in a network of broad and strong connections over time</li><li><em>Stress compounds</em> — The common causes of stress are manageable. But when they persist for years, little stresses compound into serious health issues.</li><li><em>Negative thoughts compound </em>— The more you think of yourself as worthless, stupid, or ugly, the more you condition yourself to interpret life that way. You get trapped in a though loop. The same is true for how you think about others. Once you fall into the habit of seeing people as angry, unjust or selfish, you see those kind of people everywhere.</li></ul><p>3. <strong>Initiating</strong> or <strong>terminating</strong> a <strong>habit</strong> is not a single step, but a <strong>process</strong>. To increase the odds for success, you should start acting like a person who has the habit you want to establish. This way it’ll get ingrained in your <strong>identity</strong> and perception of yourself and you’ll start believing you’re “that” type of person.</p><blockquote>The most practical way to change who you are is to change what you do.</blockquote><p>Shift your focus from <strong>what you do</strong>, to <strong>what you are </strong>in the moment:</p><ul><li>Every time you <strong>write a page</strong>, you are a <strong>writer</strong></li><li>Each time you <strong>practice the violin</strong>, you are a <strong>musician</strong></li><li>Each time you <strong>encourage your employees</strong>, you are a <strong>leader</strong></li></ul><p>4. <strong>Habits</strong> <strong>are</strong> <strong>decision shortcuts</strong> <strong>which</strong> <strong>frees our mind</strong>, so that we have time, energy and space to think and create.</p><blockquote>If you’re always being forced to make decisions about simple tasks — when should I work out, where do I go to write, when do I pay the bills — then you have less time for freedom. It’s only by making the fundamentals of life easier that you can create the mental space needed for free thinking and creativity.</blockquote><p>5. <strong>Habit stacking</strong> — is one approach to <strong>plug in </strong>new habits. In order to introduce a new habit in your life, it’d be easier if you make it before or after an already existing habit, which you anyway do:</p><blockquote>One of the best ways to build a new habit is to identify a current habit you already do each day and then stack your new behavior on top. This is called habit stacking</blockquote><p>We can build a sentence for ourselves on <strong>when</strong> we’re going to do the new thing — you can use this simple formula:</p><blockquote>After [current habit], I will [new habit]</blockquote><p>For instance, we can tie up the new Meditation activity with something we already do every day:</p><blockquote>Meditation — After I pour my cup of coffee each morning, I will meditate for one minute.</blockquote><p>6. How do we <strong>change behavior</strong>? We’re accustomed to go the <strong>path with the least friction,</strong> therefore we always take the easiest way. In order to facilitate creating new habits, we should make effort to clean up the way and make the habits obvious, easy to execute and attractive. Few ideas how to do that:</p><ul><li><strong>Make</strong> the habit <strong>obvious</strong></li></ul><blockquote>The 1st Law of Behavior Change is to make it obvious. Strategies like implementation intentions and habit stacking are among the most practical ways to create obvious cues for your habits and design a clear plan for when and where to take action.</blockquote><ul><li><strong>Make </strong>the habit<strong> attractive</strong></li></ul><blockquote>The 2nd Law of Behavior Change is make it attractive.</blockquote><ul><li><strong>Surround yourself</strong> with the <strong>right people</strong> or join the <strong>right</strong> <strong>community</strong> in order to have a supporting environment might help</li></ul><blockquote>Surround yourself with people who have the habits you want to have yourself. You’ll rise together.</blockquote><blockquote>Nothing sustains motivation better than belonging to the tribe. It transforms a personal quest into a shared one. Previously, you were on your own. Your identity was singular. You are a reader. You are a musician. You are an athlete. When you join a book club or a band or a cycling group, your identity becomes linked to those around you. Growth and change is no longer an individual pursuit. We are readers. We are musicians. We are cyclists. The shared identity begins to reinforce your personal identity.</blockquote><ul><li><strong>Design</strong> <strong>your</strong> <strong>environment</strong> to prompt you and make your habits easy to sight and execute:</li></ul><blockquote>Create a separate space for work, study, exercise, entertainment and cooking. The mantra I find useful is “One space, one use.”</blockquote><p>And again <strong>make it obvious</strong>:</p><blockquote>If you want to practice guitar more frequently, place your guitar stand in the middle of the living room.</blockquote><p>7. <strong>Chaining</strong> — most often people start using some kind of Habit Tracking system — calendar, mobile application or something else. Basically it’s a tool to <strong>track how many days in a row</strong> (or whatever frequency your habit should be) you’ve kept with your habit. Seeing the progress and how many <strong>consecutive wins</strong> you’ve done makes it <strong>harder to break the sequence</strong>.</p><blockquote>“Don’t break the chain” is a powerful mantra. Don’t break the chain of sales calls and you’ll build a successful book of business. Don’t break the chain of workouts and you’ll get fit faster than you’d expect. Don’t break the chain of creating every day and you will end up with an impressive portfolio.</blockquote><blockquote>A habit tracker is a simple way to measure whether you did a habit — like marking an X on a calendar.</blockquote><p><strong>Breaking the chain</strong> is a <strong>common</strong> thing to happen, so don’t think you’ve failed and get discouraged. A nice rule of thumb is not to abandon the habit, but <strong>start a new chain</strong>:</p><blockquote>Never miss twice. If you miss one day, try to get back on track as quickly as possible.</blockquote><p>8. <strong>Bad habits</strong> take advantage of the <strong>chaining</strong>, too. They get ingrained with many repeats and most of the time they bring <strong>short term happiness</strong> and pleasure which makes them attractive:</p><blockquote>Bad habits are autocatalytic: the process feeds itself. They foster the feelings they try to numb. You feel bad, so you eat junk food. Because you eat junk food, you feel bad. Watching television makes you feel sluggish, so you watch more television because you don’t have the energy to do anything else.</blockquote><blockquote>Habits like scrolling on our phones, checking email, and watching television steal so much of our time because they can be performed almost without effort. They are remarkably convenient.</blockquote><p>The effect of <strong>breaking a bad habit</strong> is usually <strong>underestimated</strong>:</p><blockquote>The average person spends over two hours per day on social media. What could you do with an extra six hundred hours per year?</blockquote><p>Definitely one of my favorite books — fills me with energy and hope that consistently and methodically we can build a better life, without pushing and breaking our physical and mental boundaries.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9734e4ec947b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rework: my Book Notes]]></title>
            <link>https://yyosifov.medium.com/rework-my-book-notes-6ef451a722eb?source=rss-5de02810b6a3------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ef451a722eb</guid>
            <category><![CDATA[business]]></category>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[startup]]></category>
            <dc:creator><![CDATA[Yosif Yosifov]]></dc:creator>
            <pubDate>Sat, 20 Apr 2019 09:53:23 GMT</pubDate>
            <atom:updated>2019-04-20T10:00:08.015Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*JwKLEttHwzQ2_XRCvwsfpw.jpeg" /></figure><h3>ReWork: Change the Way You Work Forever</h3><p>by <a href="https://www.amazon.co.uk/David-Heinemeier-Hansson/e/B001JS19Y8/ref=dp_byline_cont_book_1">David Heinemeier Hansson</a></p><p>The book covers multiple topics, it’s like a mix of essays. I’ve extracted only the ones related to business, entrepreneurship and product building.</p><p>My rating: <strong>10/10</strong></p><p><strong>My notes</strong></p><p><strong>1. How to start a business </strong>—you don’t necessary need to drop off work and start working on your next greatest project or idea. You can try to pull it off in the beginning while having another job, which pays the bills.</p><blockquote>Starting a business on the side while keeping your day job can provide all the cash flow you need.</blockquote><p><strong>2. Don’t be mislead and execute serial failed ventures</strong> — there’s a misconception that when you try to build ventures, you gain much experience and given that in the end you’ll succeed. The statistics though show that in practice it’s not so beneficial to fail and retry.</p><blockquote>But entrepreneurs whose companies failed the first time had almost the same follow-on success rate as people starting a company for the first time: just 23 percent.</blockquote><blockquote>People who failed before have the same amount of success as people who have never tried at all. Success is the experience that actually counts.</blockquote><p><strong>3. At the beginning prefer short-term prioritization.</strong></p><blockquote>Figure out the next most important thing and do that. Make decisions right before you do something, not far in advance.</blockquote><p><strong>5. Deep Work -</strong> is far more meaningful and productive, than just being busy all the time.</p><blockquote>Not only is this workaholism unnecessary, it’s stupid. Working more doesn’t mean you care more or get more done. It just means you work more.</blockquote><p>People who tend to overwork can have bad influence:</p><blockquote>They even create crises. They don’t look for ways to be more efficient because they actually like working overtime. They enjoy feeling like heroes.</blockquote><p>6. <strong>Trim planning, double down on execution.</strong></p><blockquote>What you do is what matters, not what you think or say or plan.</blockquote><p><strong>7. Commit and execute.</strong></p><blockquote>The truth is most people just don’t want it bad enough. Then they protect their ego with the excuse of time. Don’t let yourself off the hook with excuses. It’s entirely your responsibility to make your dreams come true.</blockquote><p><strong>8. Be consistent with your actions</strong>— follow the same principles, vision and mission. Don’t let it diverge.</p><blockquote>When you don’t know what you believe, everything becomes an argument. Everything is debatable. But when you stand for something, decisions are obvious.</blockquote><p>Think of building something that brings value and be sustainable, not only to be sold and make some cash:</p><blockquote>You need a commitment strategy, not an exit strategy. You should be thinking about how to make your project grow and succeed, not how you’re going to jump ship.</blockquote><p><strong>9. Start small </strong>— be forced for creativity and productivity, zero waste.</p><blockquote>Limited resources force you to make do with what you’ve got. There’s no room for waste. And that forces you to be creative.</blockquote><p><strong>10. Less is more</strong> — in Basecamp they build only the things they want to. They don’t overcomplicate the product or bring in features a customer wants, but don’t make enough sense to them:</p><blockquote>Less is a good thing.</blockquote><blockquote>Directors cut good scenes to make a great movie. Musicians drop good tracks to make a great album. Writers eliminate good pages to make a great book.</blockquote><p><strong>11.Only essentials in first versions </strong>— when starting out, have a high barrier on what should be added to the product.</p><blockquote>“If I took this away, would what I’m selling still exist?”</blockquote><p><strong>12. Quick iterations, no compromises.</strong></p><blockquote>When things aren’t working, the natural inclination is to throw more at the problem. More people, time, and money. All that ends up doing is making the problem bigger. The right way to go is the opposite direction: Cut back. So do less.</blockquote><p><strong>13. Sustainable business is based on a solid core:</strong></p><blockquote>The core of your business should be built around things that won’t change. Things that people are going to want today and ten years from now.</blockquote><p><strong>14. Questions to ask when building a product:</strong></p><ul><li>Why are you doing this?</li><li>What problem are you solving?</li><li>Is this actually useful?</li><li>Are you adding value?</li><li>Will this change behavior?</li><li>Is there an easier way?</li><li>What could you be doing instead?</li><li>Is it really worth it?</li></ul><p>I’ve read most of the Basecamp founder’s books and they mostly cover similar principles and ideas. I am big fan of their strategy to build a great product, serving a particular needs, no compromise, full ownership and a small, but dedicated team.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ef451a722eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Power of Habit — my Book Notes]]></title>
            <link>https://yyosifov.medium.com/the-power-of-habit-my-book-notes-9953b657584f?source=rss-5de02810b6a3------2</link>
            <guid isPermaLink="false">https://medium.com/p/9953b657584f</guid>
            <category><![CDATA[habit-building]]></category>
            <category><![CDATA[success]]></category>
            <category><![CDATA[habits]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[self-improvement]]></category>
            <dc:creator><![CDATA[Yosif Yosifov]]></dc:creator>
            <pubDate>Sat, 23 Mar 2019 09:36:13 GMT</pubDate>
            <atom:updated>2019-03-23T09:36:13.460Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Power of Habit — my Book Notes</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/192/1*Ci9hLRqX6j0X7_fJDt4mOg.jpeg" /><figcaption><a href="https://www.amazon.co.uk/Power-Habit-Why-What-Change/dp/1847946240/">https://www.amazon.co.uk/Power-Habit-Why-What-Change/dp/1847946240/</a></figcaption></figure><h4>The Power of Habit: Why We Do What We Do, and How to Change</h4><p>by <a href="https://www.amazon.co.uk/Charles-Duhigg/e/B006X0XPLM/ref=dp_byline_cont_book_1">Charles Duhigg</a></p><p>What are habits? How do they affect our lives. How can we identify them, build new habits or change our old bad habits.</p><p>My rating: <strong>7/10</strong></p><ol><li>Major part of our actions in our lives are dictated by habits. Things we do automatically:</li></ol><blockquote>One paper published by a Duke University researcher in 2006 found that more than 40 percent of the actions people performed each day weren’t actual decisions, but habits.</blockquote><p>2. Although, habits are built over time and then triggered and executed automatically, there is hope for change. To be able to change our habits, we first need to understand what the structure of the habit looks like:</p><blockquote>Habits can be changed, if we understand how they work.</blockquote><p>2. The habits can be decomposed in three stages — <em>cue</em>, <em>routine</em> and <em>reward.</em> They create a loop, which gets repeated every time. The more loops from a habit we do, the more ingrained the habit becomes.</p><ul><li><strong>Cue</strong> — is the trigger of the habit</li><li><strong>Routine</strong> —what we do during the habit</li><li><strong>Reward</strong> — brings us pleasure and confirms that this habit is beneficial to us, so we affirm ourselves we need to do it again and again</li></ul><blockquote>Over time, this loop — cue, routine, reward; cue, routine, reward — becomes more and more automatic.</blockquote><p>3. The problem with habits is that they are so automatic, that we don’t take decisions whether they are good or bad for us, before we execute them:</p><blockquote>The problem is that your brain can’t tell the difference between bad and good habits, and so if you have a bad one, it’s always lurking there, waiting for the right cues and rewards. This explains why it’s so hard to create exercise habits, for instance, or change what we eat.</blockquote><p>Habits tend to strengthen and become more ingrained when executed more often and affirmed that they are good for us:</p><blockquote>Studies indicate that families usually don’t intend to eat fast food on a regular basis. What happens is that a once a month pattern slowly becomes once a week, and then twice a week — as the cues and rewards create a habit — until the kids are consuming an unhealthy amount of hamburgers and fries.</blockquote><p>4. Building habits should be based on the Habit Loop. We need to think about the loop itself and identify the different parts:</p><blockquote>That psychology was grounded in two basic rules: First, find a simple and obvious cue. Second, clearly define the rewards.</blockquote><p>For example:</p><blockquote>If you want to start running each morning, it’s essential that you choose a simple cue (like always lacing up your sneakers before breakfast or leaving your running clothes next to your bed) and a clear reward (such as a midday treat, a sense of accomplishment from recording your miles, or the endorphin rush you get from a jog).</blockquote><p>5. Changing old habits is hard, but possible. We need to identify the Habit Loop elements and replace the routine part, so that we keep the cue and the reward:</p><blockquote>But to change an old habit, you must address an old craving. You have to keep the same cues and rewards as before, and feed the craving by inserting a new routine.</blockquote><blockquote>Often, we don’t really understand the cravings driving our behaviors until we look for them.</blockquote><p>For example:</p><blockquote>Say you want to stop snacking at work. Is the reward you’re seeking to satisfy your hunger? Or is it to interrupt boredom?</blockquote><p>6. We need to build awareness of our habits:</p><blockquote>Understanding the cues and cravings driving your habits won’t make them suddenly disappear — but it will give you a way to plan how to change the pattern.</blockquote><p>7. Some habits are more important than others, because they have bigger influence:</p><blockquote>The habits that matter most are the ones that, when they start to shift, dislodge and remake other patterns.</blockquote><p>From a study:</p><blockquote>Studies have documented that families who habitually eat dinner together seem to raise children with better homework skills, higher grades, greater emotional control, and more confidence.</blockquote><p>8. Habits are very important for professional athletes.</p><p>For example, Michael Phelps were trained to build habits for every part of a race:</p><blockquote>Bowman believed that for swimmers, the key to victory was creating the right routines.</blockquote><blockquote>When Phelps was a teenager, for instance, at the end of each practice, Bowman would tell him to go home and “watch the videotape. Watch it before you go to sleep and when you wake up.”</blockquote><blockquote>Small wins are exactly what they sound like, and are part of how keystone habits create widespread changes.</blockquote><blockquote>When the race arrives, he’s more than halfway through his plan and he’s been victorious at every step. All the stretches went like he planned. The warm-up laps were just like he visualized.</blockquote><p>9. The habit of willpower is an important ingredient to success:</p><blockquote>Dozens of studies show that willpower is the single most important keystone habit for individual success.</blockquote><blockquote>If you knew how to avoid the temptation of a marshmallow as a preschooler, it seemed, you also knew how to get yourself to class on time and finish your homework once you got older, as well as how to make friends and resist peer pressure.</blockquote><p>Building up willpower is possible:</p><blockquote>Willpower is a learnable skill, something that can be taught the same way kids learn to do math and say “thank you.”</blockquote><p>But willpower is considered to act like a muscle. Every day you start with the same level of willpower available, which gets depleted during the day. That’s the reason why at the end of the day it’s harder to hit the gym, although you planned to do so — most often you make up excuses or feel tired of work and convince yourself it’s ok to just skip:</p><blockquote>You want to do something that requires willpower — like going for a run after work — you have to conserve your willpower muscle during the day.</blockquote><blockquote>As their willpower muscles strengthened, good habits seemed to spill over into other parts of their lives.</blockquote><blockquote>“When you learn to force yourself to go to the gym or start your homework or eat a salad instead of a hamburger, part of what’s happening is that you’re changing how you think,”</blockquote><p>10. Parenting — when you’re growing up a kid, you can try to help the kid build good habits:</p><blockquote>“That’s why signing kids up for piano lessons or sports is so important. It has nothing to do with creating a good musician or a five-year-old soccer star,” said Heatherton. “When you learn to force yourself to practice for an hour or run fifteen laps, you start building self-regulatory strength. A five-year-old who can follow the ball for ten minutes becomes a sixth grader who can start his homework on time.”</blockquote><p>11. Our behavioral habits are exploited for marketing purposes. For example, the stores are designed to go through the vegetables and fruits first, then through the junk food — that’s for a clear reason:</p><blockquote>Ff we start our shopping sprees by loading up on healthy stuff, we’re much more likely to buy Doritos, Oreos, and frozen pizza when we encounter them later on. The burst of subconscious virtuousness that comes from first buying butternut squash makes it easier to put a pint of ice cream in the cart later.</blockquote><p>We have behavioral habits built-in ourselves for a reason:</p><blockquote>Behavioral habits prevent us from becoming overwhelmed by the endless decisions we would otherwise have to make each day, listening habits exist because, without them, it would be impossible to determine if we should concentrate on our child’s voice, the coach’s whistle, or the noise from a busy street during a Saturday soccer game.</blockquote><p>12. Observe yourself and your habits, learn, acknowledge and improve</p><blockquote>To understand your own habits, you need to identify the components of your loops.</blockquote><blockquote>Experiments have shown that almost all habitual cues fit into one of five categories: Location Time Emotional state Other people Immediately preceding action</blockquote><p>The book contains many examples for habit loops, which can help you hunt down your own habits. Habits are what makes us who we are for most of the time. Good habits can lift us down and bad habits can ruin our lives. We’d better invest time to improve our life by building up Good habits and fixing our old Bad habits.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9953b657584f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Grit: my Book Notes]]></title>
            <link>https://yyosifov.medium.com/grit-my-book-notes-e56196f8857e?source=rss-5de02810b6a3------2</link>
            <guid isPermaLink="false">https://medium.com/p/e56196f8857e</guid>
            <category><![CDATA[goals]]></category>
            <category><![CDATA[success]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[psychology]]></category>
            <category><![CDATA[motivation]]></category>
            <dc:creator><![CDATA[Yosif Yosifov]]></dc:creator>
            <pubDate>Tue, 19 Mar 2019 12:52:26 GMT</pubDate>
            <atom:updated>2019-03-19T12:52:26.839Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/264/1*2ZpLLfCrBSe9grNv1tfgdQ.jpeg" /><figcaption><a href="https://www.amazon.co.uk/Grit-passion-resilience-secrets-success/dp/1785040200/ref=asap_bc?ie=UTF8">https://www.amazon.co.uk/Grit-passion-resilience-secrets-success/dp/1785040200/ref=asap_bc?ie=UTF8</a></figcaption></figure><h3>Grit: The Power of Passion and Perseverance</h3><p>by <a href="https://www.amazon.co.uk/l/B019S711S0">Angela Duckworth</a></p><p>Outliers, successful people, legends — we’re set on a journey to analyze the common ingredients for success and devise the GRIT Scale and the definition of the word GRIT itself.</p><p>My rating: <strong>9/10</strong></p><p><strong>My Notes</strong></p><ol><li>Talent is not the most important ingredient of success — you cannot confidently rely on talent to assess who has potential. In the Military Academy the candidate score, wasn’t accurate on who will finish the academy.</li></ol><blockquote>Rising to the occasion had almost nothing to do with talent. Those who dropped out of training rarely did so from lack of ability. Rather, what mattered, Mike said, was a “never give up” attitude.</blockquote><p>In other words</p><blockquote>Our potential is one thing. What we do with it is quite another.</blockquote><p>2. What is GRIT?</p><p>Is supposedly the common thing successful people share — that special mix of ingredients.</p><blockquote>In sum, no matter the domain, the highly successful had a kind of ferocious determination that played out in two ways. First, these exemplars were unusually resilient and hardworking. Second, they knew in a very, very deep way what it was they wanted. They not only had determination, they had direction.</blockquote><p>We call it GRIT and by definition</p><blockquote>It was the combination of passion and perseverance that made high achievers special. In a word, they had GRIT.</blockquote><p>3. Grades at tests asses the fixed moment of people’s knowledge and skills — not their potential to learn. An example was David, who always started with low grades, but in the end always finished with high grades. Asked how:</p><blockquote>“I did feel bad — I did — but I didn’t dwell on it. I knew it was done. I knew I had to focus on what to do next. So I went to my teacher and asked for help. I basically tried to figure out, you know, what I did wrong. What I needed to do differently.”</blockquote><p>Years later, the results are surprising.</p><blockquote>Quite literally, the boy who was deemed “not ready” for harder, faster math classes is now a “rocket scientist”.</blockquote><p>4. The “live up” to the expectation syndrome — when teachers meet more talented students, they tend to treat them differently than the other students.</p><blockquote>There’s a vast amount of research on what happens when we believe a student is especially talented. We begin to lavish extra attention to them and hold them to higher expectations. We expect them to excel, and that expectation becomes a self-fulfilling prophecy.</blockquote><p>5. The “naturalness” bias — our bias that if someone has great skills at something we think to ourselves — “he’s born this way”, “it’s in his DNA”, “he’s so talented”.</p><blockquote>If we can’t explain how an athlete, musician, or anyone else has done something jaw-droppingly amazing, we’re inclined to throw up our hands and say “It’s a gift! Nobody can teach you that.” In other words, when we can’t easily see how experience and training got someone to a level of excellence that is so clearly beyond the norm, we default to labeling that person a “natural.”</blockquote><p>But the work and struggle remains hidden.</p><blockquote>“No one can see in the work of the artist how it has become,” Nietzsche said. “That is its advantage, for whatever one can see the act of becoming one grows somewhat cool.”</blockquote><p>Even if we know, why would we fool ourselves?</p><blockquote>“Our vanity, our self-love, promotes the cult of the genius,” Nietzsche said. “For if we think of genius as something magical, we are not obliged to compare ourselves and find ourselves lacking… To call someone ‘divine’ means: ‘here there is no need to compete.”</blockquote><p>Will Smith, the famous actor, who doesn’t consider himself particularly talented explains his success.</p><blockquote>The only thing that I see that is distinctly different about me is: I’m not afraid to die on a treadmill. I will not be outworked, period. You might have more talent than me, you might be smarter than me, you might be sexier than me. You might be all of these things. You got it on me in nine categories. But if we get on the treadmill together, there’s two things: You’re getting off first, or I’m going to die. It’s really that simple.</blockquote><p>Persistence is contained in grit. But grit contains perseverance, too — it’s not only that you should not give up on the treadmill, but that you should always show up on the next day.</p><blockquote>Staying on the treadmill is one thing, and I do think it’s related to staying true to our commitments even when we’re not comfortable. But getting back on the treadmill the next day, eager to try again, is in my view even more reflective of grit.</blockquote><p>6. The Long Term goals can look big and scary. But, if we envision them as the root of a hierarchy, there are many smaller goals we need to accomplish to complete the big long term goal. We can drill-down further goals and decompose them to smaller and easier to tackle goals and tasks, which we can execute daily and make progress toward our big goal.</p><blockquote>Envision goals in a hierarchy</blockquote><p>7. There are 4 GRIT paragons</p><p><strong>Interest</strong></p><blockquote>Passion begins with intrinsically enjoying what you do.</blockquote><ul><li>Whatever you it is that you want to do, you’ll find in life that if you’re not passionate about what is you’re working on, you won’t be able to stick with.</li><li>Research shows that people are enormously more satisfied with their jobs when they do something that fits their personal interest.</li><li>People perform better at work when what they do interests them.</li><li>Interests are not discovered through introspection. Instead, interests are triggered by interactions with the outside world.</li></ul><p><strong>Practice</strong></p><blockquote>So, after you’ve discovered and developed interest in a particular area, you must devote yourself to the sort of focused, full-hearted, challenge-exceeding-skill practice that leads to master</blockquote><ul><li>Simply, more time on task.</li><li>Kaizen is Japanese for resisting the plateau of arrested development. Its literal translation is “continuous improvement”.</li><li>Not just more time on task, but also better time on task (quality matters, not only quantity).</li><li>Experts are logging thousands upon thousands of hours of what Ericsson called deliberate practice.</li><li>After receiving feedback experts do it all over again, and again, and again. Until they have finally mastered what they set out to do. Until what was a struggle before is now fluent and flawless. Until conscious incompetence becomes unconscious competence.</li><li>Deliberate practice is for preparation, and flow is for performance.</li><li>Getting the most out of deliberate practice: Make it a habit. A habit of practicing at the same time and in the same place, every day, you hardly have to think about getting started. You just do.</li></ul><p><strong>Purpose</strong></p><blockquote>What ripens passion is the conviction that your work matters.</blockquote><ul><li>At its core, the idea of purpose is the idea that what we do matters to people other than ourselves.</li><li>A calling.</li><li>Purpose is a final answer to the question “Why? Why are you doing this?”.</li></ul><p><strong>Hope</strong></p><blockquote>Hope is a rising-to-the-occasion kind of perseverance.</blockquote><ul><li>There’s an old Japanese saying: Fall seven, rise eight.</li><li>Hope for gritty people has nothing to do with luck and everything to do with getting up again.</li><li>When you think — “I have no idea what I’m doing! I’m going to fall” it becomes a “self-fulfilling” prophecy.</li><li>Cognitive behavioral therapy — which aims to treat depression and other psychological maladies by helping patients think ore objectively and behave in healthier ways — has shown that, whatever our childhood sufferings, we can generally learn to observer our negative self-talk and change our maladaptive behaviors. As with any other skill, we can practice interpreting what happens to use and responding as an optimist would. Cognitive behavioral therapy is now a widely practiced psychotherapeutic treatment for depression, and has proven longer-lasting in its effects than antidepressant medication.</li><li>When you keep searching for was to change your situation for the better, you stand a chance of finding them. When you stop searching, assuming they can’t be found, you guarantee they won’t. Or as Henry Ford is often quoted as saying, “Whether you think you can, or think you can’t — you’re right”.</li><li>Teaching hope sequence: “growth mindset” -&gt; “optimistic self-talk” -&gt; “perseverance over adversity”.</li><li>If you modify your self-talk, you can learn to not let it interfere with you moving toward your goals. With practice and guidance, you can change the way you think, feel, and most important, act when the going gets rough.</li></ul><p>Besides these notes, there are other interesting topics covered in the book Grit - like parenting for grit and developing growth mindset. Definitely, a hard but worth read book.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e56196f8857e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Essentialism: my Book Notes]]></title>
            <link>https://yyosifov.medium.com/essentialism-my-book-notes-e0b24c9c24da?source=rss-5de02810b6a3------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0b24c9c24da</guid>
            <category><![CDATA[decisions]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[essentialism]]></category>
            <category><![CDATA[wisdom]]></category>
            <dc:creator><![CDATA[Yosif Yosifov]]></dc:creator>
            <pubDate>Sat, 02 Mar 2019 10:29:19 GMT</pubDate>
            <atom:updated>2019-03-02T10:43:45.358Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/332/1*lTdWXW89FwId8d6cKn8tfg.jpeg" /><figcaption><a href="https://www.amazon.com/Essentialism-Disciplined-Pursuit-Greg-McKeown/dp/0804137382">https://www.amazon.com/Essentialism-Disciplined-Pursuit-Greg-McKeown/dp/0804137382</a></figcaption></figure><h3>Essentialism: The Disciplined Pursuit of Less</h3><p>by <a href="https://www.amazon.com/s/ref=dp_byline_sr_book_1?ie=UTF8&amp;text=Greg+McKeown&amp;search-alias=books&amp;field-author=Greg+McKeown&amp;sort=relevancerank">Greg McKeown</a></p><p>Learn how, why and when to say firmly <strong>NO </strong>to opportunities that you don’t need. You cannot have it all — live with it. If you want to get better at everything, all the time in the world won’t be enough. So pick wisely, commit to a time-based period and re-evaluate. Don’t feel bad for missing on opportunities</p><p>My rating: <strong>8/10</strong></p><p><strong>My Notes</strong></p><ol><li>Essential quote from the beginning</li></ol><blockquote>The wisdom of life consists in the elimination of the non-essentials. — Lin Yutang</blockquote><p>2. The author begins with a nice story of an employee, who started protecting his time and saying more often NO, when asked to do something more. Nobody actually resented him, but quite the opposite — they started to value his work more than ever</p><blockquote>In this example is the basic value proposition of Essentialism: only once you give yourself permission to stop trying to do it all, to stop saying yes to everyone, can you make your highest contribution towards the things that really matter.</blockquote><p>3. The main principle of Essentialism can be captured in just three German words</p><blockquote>Weniger aber besser. (in English — Less but better)</blockquote><p>4. An important lesson from the author — if you are available at all the time, everyone will take advantage of you and you lose control</p><blockquote>If you don’t prioritize your life, someone else will.</blockquote><p>it appears once more in the book</p><blockquote>We can either make our choices deliberately or allow other people’s agendas to control our lives</blockquote><p>5. Historically we didn’t have top 3 or top 10 priorities. We had just one <strong>priority</strong></p><blockquote>The word <strong>priority came into the English language in the 1400s. It was singular. It meant the very first or prior thing. It stayed singular for the next five hundred years.</strong></blockquote><p>6. At the end of their lives, people asked shared as one of the top regrets</p><blockquote>I wish I’d had the courage to live a life true to myself, not the life others expected of me.</blockquote><p>which requires to deliberately eliminate the non-essentials</p><blockquote>and not just getting rid of the obvious time wasters, but cutting out some really good opportunities as well.</blockquote><p>This is the trade-off that Essentialism wants you to make</p><blockquote>We can try to avoid the reality of trade-offs, but we can’t escape them.</blockquote><p>Trade-offs are treated and considered as big opportunities, rather than a limitation</p><blockquote>Essentialists see trade-offs as an inherent part of life, not as an inherently negative part of life. Instead of asking, “What do I have to give up?” they ask, “What do I want to go big on?”. The cumulative impact of this small change in thinking can be profound.</blockquote><p>From a management class is the commonly shared thought to choose 2/3 of 4 in order to be successful</p><blockquote>“Imagine a four-burner stove,” she instructs the members of the party. “One burner represents your family, one is your friends, the third is your health, and the fourth is your work. In order to be successful you have to cut off one of your burners. And in order to be really successful you have to cut off two.”</blockquote><p>a nice quote on subtracting</p><blockquote>To attain knowledge add things every day. To attain wisdom subtract things every day — Lao-tzu</blockquote><p>7. When taking new decisions, the author suggest we ask ourselves</p><blockquote>Instead of asking, “Is there a chance I will wear this someday in the future?” you ask more disciplined, tough questions: “Do I love this?” and “Do I look great in it?” and “Do I wear this often?”. If the answer is no, then you know it’s a candidate for elimination.</blockquote><p>further this helps us free space and not think about this anymore</p><blockquote>But if we ask, “Do I absolutely love this?” then we will be able to eliminate the clutter and have space for something better.</blockquote><p>and the fast lane to taking yes/no decisions</p><blockquote>If it isn’t a clear yes, then it’s a clear no.</blockquote><p>what is the meaning of the word decision, though?</p><blockquote>The Latin root of the word decision — cis or cid — literally means “to cut” or “to kill.”</blockquote><p>8. Even after we decided NO some courage is needed to execute</p><blockquote>Have you ever felt too scared or timid to turn down and invitation of request from a boss, colleagues, friend, neighbor, or family member for fear of disappointing them? If you have, you’re not alone. Navigating these moments with courage and grace is one of the most important skills to master in becoming an Essentialist — and one of the hardest.</blockquote><p>because sometimes it’s seen as inappropriate in the society, or as a rebel</p><blockquote>And while conforming to what people in a group expect of us is what psychologists call normative conformity — is no longer a matter of life and death, the desire is still deeply ingrained in us.</blockquote><p>9. Researching the things to do beforehand is quintessential to the process, so that we make the best choices for ourselves</p><blockquote>We are looking for our highest level of contribution: the right thing the right way at the right time.</blockquote><blockquote>Essentialists spend as much time as possible exploring, listening, debating, questioning, and thinking.</blockquote><p>10. Quote on the right timing to take on something</p><blockquote>Nothing is more powerful than an idea whose time has come.</blockquote><p>11. It’s believed that there’s a connection between the efforts and results, and it’s not linear. Certain efforts produce exponentially more results than others. A ex-CTO Microsoft CTO Nathan Mythrvold shared</p><blockquote>The top software developers are more productive than average developers not by a factor of 10X or 100X or even 1,000X but 10,000X</blockquote><p>According to the author, the reality is that almost everything we do in the world is worthless very few things are exceptionally valuable</p><blockquote>You cannot overestimate the unimportance of practically everything. — John Maxwell</blockquote><p>12. The author shares a difference between the two points of view when people listen, observe and perceive.</p><blockquote>Nonessentialists listen too. But they listen while preparing to say something. They get distracted by extraneous noise. They hyperfocus on inconsequential details. They hear the loudest voice but they get the wrong messages. In their eagerness to react they miss the point.</blockquote><p>13. One tool to execute with is to journal your activities, habitually — every day. And every 90 or so days review your journal entries and reevaluate.</p><blockquote>Focus on the broader patterns or trends. Capture the headline. Look for the lead in your day, your week, your life. Small, incremental changes are hard to see in the moment but over time can have a huge cumulative effect.</blockquote><p>14. There are several chapters not directly related to essentialism. The author goes through importance of <strong>Play</strong> as a practice to explore and reduce stress</p><blockquote>Play doesn’t just help use to explore what is essential. It is essential in and of itself.</blockquote><p>Then the importance of <strong>Sleep</strong></p><blockquote>The best asset we have for making a contribution to the world is ourselves. If we underinvest in ourselves, and by that I mean our minds, our bodies, and our spirits, we damage the very tool we need to make our highest contribution. One of the most common ways people — especially ambitious, successful people — damage this asset is through a lack of sleep.</blockquote><p>15. The point that the book wants to make is captured in this quote from it</p><blockquote>An Essentialist produces more — brings forth more — by removing more instead of doing more</blockquote><p>These are only my <strong>essential </strong>notes from the Essentialism book — there are many more interesting topics and thoughts covered inside.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0b24c9c24da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automate your mobile apps release — Part 4 (Wire up with Fastlane)]]></title>
            <link>https://yyosifov.medium.com/automate-your-mobile-apps-release-part-4-wire-up-with-fastlane-10b3e62ac6dc?source=rss-5de02810b6a3------2</link>
            <guid isPermaLink="false">https://medium.com/p/10b3e62ac6dc</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[releases]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Yosif Yosifov]]></dc:creator>
            <pubDate>Tue, 30 Oct 2018 12:30:43 GMT</pubDate>
            <atom:updated>2018-10-30T12:37:55.504Z</atom:updated>
            <content:encoded><![CDATA[<h3>Automate your mobile apps release — Part 4 (Wire up with Fastlane)</h3><p>In the previous posts, we’ve managed to deconstruct our release process and create separate shell scripts for each step.</p><p>Now, we can run these locally and take the Screenshots, the Release files and release them to the App Store / Play Store respectively. We can do that, but we can now use another tool to wire up all the things together in a nice and polished way.</p><p><strong>Enter: </strong><a href="https://fastlane.tools/"><strong>Fastlane</strong></a></p><blockquote><em>fastlane</em> is an open source platform aimed at simplifying Android and iOS deployment.</blockquote><p>Fastlane’s architecture is action-based and there are different actions for each platform (Android/iOS).</p><p>Most actions have equivalents for both platforms, but they are named differently because of the specifics of the platforms. They are all open source and driven by the community. So, changes in the App Stores / Build Tools of the platforms find immediately their way into the Fastlane tools.</p><h3>Tips &amp; Tricks: How to wire-up Fastlane</h3><h3><strong>iOS</strong></h3><ol><li>Update the info.plist before you build your app:<br>- use <a href="https://docs.fastlane.tools/actions/update_info_plist/">update_info_plist</a> to setup the xcodeproject path and the app_identifier<br>- use <a href="https://docs.fastlane.tools/actions/increment_build_number/#increment_build_number">incremental_build_number</a> in order to bust the build number</li><li>Create a repo where you will store your iOS signing certificates — using <a href="https://docs.fastlane.tools/actions/match/">match</a></li><li>Use <a href="https://docs.fastlane.tools/actions/match/#fastlane">match</a> to read the Production Certificates to setup the signing of your mobile app, before building</li><li>Use <a href="https://docs.fastlane.tools/actions/gym/">gym</a> to build the release file</li><li>Use <a href="https://docs.fastlane.tools/actions/deliver/">deliver</a> to upload the app to the App Store</li><li>Bonus: wire up some Slack notifications with the <a href="https://docs.fastlane.tools/actions/slack/">slack</a> action to notify everyone that a new app version is being released.</li></ol><h3><strong>Android</strong></h3><p>The android process is much much simpler, because of lack of certificates</p><ol><li>Use <a href="https://docs.fastlane.tools/actions/gradle/">gradle</a> to automate build your Android App</li><li>Use <a href="https://docs.fastlane.tools/actions/supply/">supply</a> to release the app to the Play Store (NOTE: This works only for subsequent releases. At the time of writing, automatically creating a new App in the Play Store is not possible due to lack of an API)</li></ol><p><strong>Thank you for reading!</strong></p><p>Series list:</p><ul><li><a href="https://medium.com/@yyosifov/automate-your-mobile-apps-release-part-1-ac2afef3945f">Part 1 — Process Overview</a></li><li><a href="https://medium.com/@yyosifov/automate-your-mobile-apps-release-part-2-machine-setup-ae5a3a9506ea">Part 2 — Machine setup</a></li><li><a href="https://medium.com/@yyosifov/automate-your-mobile-apps-release-part-3-generate-your-screenshots-8c5c790a674">Part 3 — Generate your screenshots</a></li><li>Part 4 — Wire up with Fastlane</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10b3e62ac6dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automate your mobile apps release — Part 3 (Generate your screenshots)]]></title>
            <link>https://yyosifov.medium.com/automate-your-mobile-apps-release-part-3-generate-your-screenshots-8c5c790a674?source=rss-5de02810b6a3------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c5c790a674</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[best-practices]]></category>
            <category><![CDATA[releases]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Yosif Yosifov]]></dc:creator>
            <pubDate>Sun, 18 Mar 2018 08:42:42 GMT</pubDate>
            <atom:updated>2018-10-30T12:31:58.457Z</atom:updated>
            <content:encoded><![CDATA[<p>When you upload a new mobile App, you have to create new Screenshots with the latest changes.</p><h3>Manual screenshot generation</h3><p>What we do manually is</p><ul><li>Build the app</li><li>Launch in emulator</li><li>Go through the screens and take screenshots — for both iOS and Android.</li><li>Upload these screenshots to the prepared new version of the app.</li></ul><h3><strong>Automate screenshot generation</strong></h3><p>Following step by step the manual process</p><ul><li>We run automated UI test with <strong>Appium</strong></li><li>Then take screenshots during the test</li><li>And upload the screenshots to the AppStore/Play Store</li></ul><h3>Appium</h3><p>As we’re building a <strong>cross-platform mobile app</strong> we need to generate screenshots for both iOS and Android. Therefore, we need a way to run the mobile app automatically for both platforms.</p><p>We can use <a href="http://appium.io/">http://appium.io/</a> — “Automation for Apps”</p><blockquote>Appium is an open source test automation framework for use with native, <a href="http://appium.io/docs/en/writing-running-appium/web/hybrid/">hybrid</a> and mobile web apps. <br>It drives iOS, Android, and Windows apps using the WebDriver protocol.</blockquote><p>It’s based on the Selenium WebDriver API, so it’s quite familiar for web developers and it’s very fast and easy to begin with.</p><p>You can read more on how it works here: <a href="http://appium.io/docs/en/about-appium/intro/">http://appium.io/docs/en/about-appium/intro/</a>.</p><p>A short summary for me on a high level is:</p><ul><li>Appium launches a new REST Server locally.</li><li>By default the server works on port <strong>4723. </strong>So all requests are against localhost:4723</li><li>Send request for a new session and Appium launches locally a Simulator and runs your app inside it</li><li>Communicate via the WebDriver API and navigate in the app, click UI elements, enter data or take screenshots</li></ul><h3>Appium and app run script</h3><p>We install appium, then build and run our mobile app in the Simulator (iOS)</p><ul><li>Install the <strong>appium</strong> npm package globally</li><li>Launch Appium in the background — <strong>appium &amp;</strong></li><li>Launch the Mobile App in the background — <strong>react-native run-ios — simulator=”iPhone 8 Plus” &amp;</strong></li></ul><p>source: <strong>generate_screenshots.sh</strong></p><pre>echo &quot;install appium&quot;</pre><pre>npm install -g appium@1.7.1</pre><pre><br>echo &quot;run appium&quot;</pre><pre>appium &amp;</pre><pre>appiumPid=$!<br></pre><pre>sleep 10<br></pre><pre>echo &quot;run app&quot;</pre><pre>react-native run-ios --simulator=&quot;iPhone 8 Plus&quot; &amp;</pre><pre>reactNativePid=$!</pre><pre>wait $reactNativePid</pre><p><strong>Run the test and copy screenshots</strong></p><ul><li>Run the Generate Screenshots Test with Mocha</li><li>Copy the Screenshots from the <strong>test output</strong> to <strong>fastlane</strong> <strong>screenshots</strong> directory</li><li>You can add some style to your screenshots by using frameit — <a href="https://docs.fastlane.tools/actions/frameit/">https://docs.fastlane.tools/actions/frameit/</a></li><li>And stop the appium server</li></ul><p>source: <strong>generate_screenshots.sh</strong></p><pre>echo &quot;exec screenshots create&quot;</pre><pre>appPath=$(find &quot;`pwd`/ios&quot; -name &#39;*.app&#39; -print)</pre><pre>export APP_PATH=$appPath</pre><pre>echo $appPath</pre><pre>echo &quot;generating screenshots&quot;</pre><pre>mocha screenshots/ios-take-screenshots.js</pre><pre>ls screenshots/out</pre><pre>cp -R screenshots/out/* ios/fastlane/screenshots/en-US</pre><pre># frame the screenshots</pre><pre>cd ios/fastlane/screenshots</pre><pre>fastlane frameit white</pre><pre># overwrite the originals with the framed</pre><pre>cd en-US</pre><pre>mv first_framed.png first.png</pre><pre>mv second_framed.png second.png<br></pre><pre>cd ../../../../</pre><pre>echo &quot;shutdown appium&quot;</pre><pre>kill -9 $appiumPid</pre><h3><strong>The Generate Screenshot Test</strong></h3><p>The test is a standard<strong> mocha.js </strong><a href="https://mochajs.org/">https://mochajs.org/</a> test.</p><ul><li>Configure the <strong>wd </strong>web driver library — setup the server, the desired Simulator configuration and etc.</li><li>Make a <strong>screenshot</strong> utility function which calls <strong>driver.takeScreenshot().saveScreenshot(…) </strong>and saves the screenshot to the file system</li><li>Creates a <strong>login </strong>function which shows how to find elements on the screen — email and password fields, enter some text there and tapping on the Login button</li><li>Create a test which Logs in, takes a screenshot and finishes</li></ul><p>source: <strong>screenshots/ios-take-screenshots.js</strong></p><pre>const wd = require(&#39;wd&#39;);</pre><pre>const fs = require(&#39;fs&#39;);</pre><pre>const path = require(&#39;path&#39;);</pre><pre>var args = require(&#39;minimist&#39;)(process.argv.slice(2));</pre><pre>describe(&#39;ios - take screenshots&#39;, function() {</pre><pre>    this.timeout(300000);</pre><pre>    const appLocation = process.env.APP_PATH;</pre><pre>    const defaultTimeout = 10000;</pre><pre>    let driver;</pre><pre><br>    // setup the WebDriver configuration to communicate with the server</pre><pre>    before(() =&gt; {</pre><pre>        const serverConf = {</pre><pre>            host: &#39;localhost&#39;,</pre><pre>            port: 4723</pre><pre>        };</pre><pre>        driver = wd.promiseChainRemote(serverConf);</pre><pre>        const desired = {</pre><pre>            browserName: &#39;&#39;,</pre><pre>            &#39;appium-version&#39;: &#39;1.6&#39;,</pre><pre>            platformName: &#39;iOS&#39;,</pre><pre>            platformVersion: &#39;11.1&#39;,</pre><pre>            deviceName: &#39;iPhone 8 Plus&#39;,</pre><pre>            app: appLocation</pre><pre>       };</pre><pre>       return driver.init( desired );</pre><pre>    });</pre><pre>    after(() =&gt; {</pre><pre>        return driver.quit();</pre><pre>    });</pre><pre><br>    // A helper function to take a screenshot and save it to file system</pre><pre>    function screenshot(filename) {</pre><pre>        const dir = &#39;screenshots/out&#39;;</pre><pre>        const filePath = path.join(dir, filename);</pre><pre>        if(!fs.existsSync(dir)) {</pre><pre>             fs.mkdirSync(dir);</pre><pre>        }</pre><pre>        return driver.takeScreenshot().saveScreenshot(filePath);</pre><pre>    }</pre><pre><br>    // Sample login function - find the text fields for email, password - enter data and Tap on login button</pre><pre>    async function login() {</pre><pre>        const l_email = await driver.waitForElementByAccessibilityId(&quot;l_email&quot;, defaultTimeout);</pre><pre>        await l_email.sendKeys(userEmail);</pre><pre>        const l_password = await driver.waitForElementByAccessibilityId(&quot;l_password&quot;, defaultTimeout);</pre><pre>        await l_password.sendKeys(userPassword);</pre><pre>        const l_login = await driver.waitForElementByAccessibilityId(&quot;l_login&quot;, defaultTimeout);</pre><pre>        await l_login.click().sleep(100);</pre><pre>        return l_login.click().sleep(2000);</pre><pre>    }</pre><pre>    it(&#39;should create screenshots for an app&#39;, async () =&gt; {</pre><pre>        console.log(&#39;Take screenshot of Login&#39;);</pre><pre>        await screenshot(&#39;1Login.png&#39;);</pre><pre>        console.log(&#39;Log in the app&#39;);</pre><pre>        await login();</pre><pre>        console.log(&#39;Done!&#39;);</pre><pre>    });</pre><pre>})</pre><p>In the next parts we’ll see how to Generate the mobile app Assets (icons, logo, metadata and etc.) and how to wire all these scripts to a build tool — <a href="https://docs.fastlane.tools/">fastlane</a></p><p>Series list:</p><ul><li><a href="https://medium.com/@yyosifov/automate-your-mobile-apps-release-part-1-ac2afef3945f">Part 1 — Process Overview</a></li><li><a href="https://medium.com/@yyosifov/automate-your-mobile-apps-release-part-2-machine-setup-ae5a3a9506ea">Part 2 — Machine setup</a></li><li>Part 3 — Generate your screenshots</li><li><a href="https://medium.com/@yyosifov/automate-your-mobile-apps-release-part-4-wire-up-with-fastlane-10b3e62ac6dc">Part 4 — Wire up with Fastlane</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c5c790a674" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>