<?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 Dalya Gartzman on Medium]]></title>
        <description><![CDATA[Stories by Dalya Gartzman on Medium]]></description>
        <link>https://medium.com/@dalyag?source=rss-8cb8e88c4f51------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*As3T7Ub8HloYEVemkhDiGQ.jpeg</url>
            <title>Stories by Dalya Gartzman on Medium</title>
            <link>https://medium.com/@dalyag?source=rss-8cb8e88c4f51------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 07:26:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dalyag/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[Uncomfortable]]></title>
            <link>https://dalyag.medium.com/uncomfortable-23bcb0dcb946?source=rss-8cb8e88c4f51------2</link>
            <guid isPermaLink="false">https://medium.com/p/23bcb0dcb946</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[personal-development]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[women-in-business]]></category>
            <category><![CDATA[entrepreneurship]]></category>
            <dc:creator><![CDATA[Dalya Gartzman]]></dc:creator>
            <pubDate>Fri, 09 Jun 2023 05:37:25 GMT</pubDate>
            <atom:updated>2023-06-09T05:37:25.243Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*JTXWI7EgRaBvuweePQiLdg.jpeg" /><figcaption>Me, 24yo, Banda Island, Uganda; many miles away from my comfort zone. Photo: <a href="https://www.roeigreenbergphotography.com/">Roei Greenberg</a>.</figcaption></figure><h4>7(+1) Lessons from my tech career, and how did I even get here?</h4><blockquote>Originally written for and published in “<a href="https://www.amazon.com/dp/1544542992">Woman Up!</a>” By <a href="https://www.linkedin.com/in/anatrapoport">Anat Rapoport</a></blockquote><p>I don’t feel comfortable in my comfort zone.<br>Come to think of it, not sure I ever really had a comfort zone.<br>I remember as a kid hearing something about people being bored sometimes. I never got that. Whenever I got bored, I just found something else to do. Of course, not all my teachers liked it, but I had good grades, so no one cared. The other kids surely didn’t like it as I was the class’s outcast for most of primary school.<br>Luckily, I grew up before ADHD was a thing, so I didn’t have to numb through boring classes.<br>Luckily, I went to university when ADHD was very much a thing, and I could easily get medication, or else an MSc. in Math would never happen.<br>But an MSc. in Math did happen. Or actually, when the time came to focus on a subject for my thesis in Math, I decided to pursue a thesis in computational biology instead. And this was a time when I knew nothing about computers or biology. Talk about imposter syndrome? I WAS an imposter.</p><p>That’s how at the age of 30 I started coding for the first time.<br>And I loved it. I loved applying my theoretical and mathematical education and creating something tangible. I loved the logic, the order, the structure. It became clear to me how code and algorithms are the natural extensions of the language of math.</p><blockquote><strong>That’s how I learned Lesson #1: Making giant leaps out of your comfort zone leads to gigantic growth.</strong></blockquote><p>Then, at the age of 33, when all my friends had already advanced in their careers, I was looking for a “grown-ups” job for the first time.</p><p>And… no one returned my emails.</p><p>So I studied some more. I took online classes, went to meetups, and discovered that the high-tech industry is not gray and dull but actually fascinating and friendly. I spent two months on a challenging hands-on project and gave a talk at a meetup about this project.<br>My proactive approach to my professional development helped me look better on my resume, and I made connections that benefited my search.</p><p>And then. Finally! I could get some interviews. It took me six months from the moment I started looking for a job until I found what was then my dream job — developing algorithms for an established and exciting startup.</p><blockquote><strong>That’s how I learned Lesson #2: It’s never too late to start anything.</strong></blockquote><p>My first year as an algorithms developer felt like I was flying at light speed.</p><p>I talked at conferences about novel algorithms I developed, organized meetups, and even founded a successful meetup for my professional niche. I was wholly immersed in <a href="https://baot.org/baot">Baot</a>, the largest community in Israel for senior developers who are women, mentoring women from across the industry, and even had a majority of women speakers at my events. I also started a tech blog and was probably juggling more extracurricular activities than I can remember. I didn’t go to the beach as much as I wanted, though, so not all was perfect.</p><p>Sadly, all these grand aspirations did not sit well with my position, and I felt my cue to look for bigger shoes to fill. After just over a year, I was ready to make another leap.<br>I left my job without knowing what was next, but I was glad to discover that all the connections I made through my extracurricular activities led to a busy schedule with opportunities.</p><blockquote><strong>That’s how I learned Lesson #3: Your professional karma is the engine that drives your career. Help your peers, share your knowledge, and good things will come your way.</strong></blockquote><p>Nonetheless, looking for a job is hard!<br>The emotional rollercoaster proved to be quite challenging. I know they say “If you get only ‘yes’s it means you’re aiming too low”, and heck, did I get my share of ‘no’s. In addition, I was keen on avoiding the same mistakes — this time, I was looking for the biggest shoes I could find.</p><blockquote><strong>That’s how I learned Lesson #4: When looking for a job, focus on your personal and professional growth, so that as time goes by, you can aim even higher, instead of taking desperate steps.</strong></blockquote><p>Ironically, when an opportunity came by to become the first employee for a tiny startup, I felt it was way out of my league. I was aiming my job search so that my next position would <em>prepare</em> me for being the first employee. Luckily — a friend opened my eyes and told me: “Dalya, this is something typical for women to say. The only thing that can prepare you for being the first employee, is to become the first employee”.<br>So I followed my friend’s advice, took that job, and I was great at it.<br>I took advantage of the fact that I remained in the same algorithmic domain, which gave me confidence and experience to rely on.</p><blockquote><strong>That’s how I learned Lesson #5: Your career can be an adventure! When making adventurous moves, you can lean on a constant factor that will give you confidence.</strong></blockquote><p>After six months, this adventure too came to an end, and after two jobs in two years, I was ready to look for more stability. I conducted a <a href="https://medium.com/swlh/exploration-personalization-connection-my-method-for-finding-a-great-job-9122f9f3c255">rigorous and meticulous job search</a>, especially concerning gender representation. First, I found online sources for hundreds of startups in my region, then I filtered them according to “dry” parameters, such as geography, product, size, and of course — the percentage of women in R&amp;D. Then I contacted women who worked in companies that passed the filter, regardless of whether there was an open position for me or not, and consulted them directly about their jobs. Only companies who passed that filter as well — got my CV.</p><p>Eventually, I found the perfect place (even though there was no open position for me when I first applied) — small startup, new algorithmic domain, endless room for personal and professional growth. I also had the ideal manager (who happened to be a woman), with a majority of women in R&amp;D. Indeed, I had a wonderful time there for almost two years.</p><blockquote><strong>That’s how I learned Lesson #6: Once you know what you are looking for, a proactive and systematic approach can get you there.</strong></blockquote><p>What happened, then, you ask?</p><p>Well, as I initially mentioned, I don’t feel comfortable in my comfort zone.</p><p>During the peak of the worldwide pandemic, the stars began to align on a dream I was getting ready for — becoming an entrepreneur.<br>It started with a random chat with a friend that sparked my imagination. It continued with me devouring literature on entrepreneurship and was intensified by me immersing myself in the Women’s Health domain, which is grossly lacking in innovation.<br>The thought of making Feminism my day job, of applying all my technical background for promoting women’s health, gave rise to new kinds of excitement. I was finally ready for my next adventure.</p><p>So this is pretty much where I am these days when I write these lines.<br>If you read this in the future and already know my name as someone who accomplished remarkable things, now you know how it all started.<br>And if you don’t know my name yet or never will, well, at least you know I tried as hard as I could and that I am having a great time trying.</p><blockquote><strong>That’s how I learned Lesson #7: Only do things you are willing to risk failing at.</strong></blockquote><blockquote>This was the original story, written for and published in “<a href="https://www.amazon.com/dp/1544542992">Woman Up!</a>” By <a href="https://www.linkedin.com/in/anatrapoport">Anat Rapoport</a>. In celebration of the book’s debut, I am adding an apendix/update.</blockquote><p>Since writing these lines, I closed the women’s health startup I was working on; experienced an identity crisis over the failure of my feminist dream; recovered from that crisis to discover I actually learned and accomplished a great deal; met a new co-founder and started working on a new startup in BioTech, which is so much more aligned with my past and my future aspirations, that it feels like everything I did in my life was all in order to lead me here.</p><p>In parallel, approaching age 39, my long-time partner and I decided to expand the family, and it’s like I’m pregnant with extremely non-identical twins — a baby girl and a baby startup. I’ll let you know how it works out.</p><blockquote><strong>That’s how I learned Lesson #8: We are always allowed to change our mind. And change our paths accordingly.</strong></blockquote><figure><img alt="“Be present and the future will come”. In the background — my precious dog and the cliffs of Ada Canyon in Israel." src="https://cdn-images-1.medium.com/max/960/1*sd6NE-kdY5ls6HRgQY2wQQ.jpeg" /><figcaption>A thought I had while walking with my dog in Ada Canyon in Israel.</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23bcb0dcb946" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[4 Things I Learned From Analyzing Menopause Apps Reviews]]></title>
            <link>https://dalyag.medium.com/4-things-i-learned-from-analyzing-menopause-apps-reviews-2cabf9ca9226?source=rss-8cb8e88c4f51------2</link>
            <guid isPermaLink="false">https://medium.com/p/2cabf9ca9226</guid>
            <category><![CDATA[femtech]]></category>
            <category><![CDATA[womens-health]]></category>
            <category><![CDATA[health]]></category>
            <category><![CDATA[menopause]]></category>
            <category><![CDATA[analytics]]></category>
            <dc:creator><![CDATA[Dalya Gartzman]]></dc:creator>
            <pubDate>Thu, 07 Jul 2022 14:24:27 GMT</pubDate>
            <atom:updated>2023-01-29T07:58:25.081Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Word cloud generated from all app reviews" src="https://cdn-images-1.medium.com/max/1024/1*nuPh_lpvkAy80Xwvs3QAgA.png" /><figcaption>Word cloud generated from all app reviews</figcaption></figure><h4>tl;dr Menopause is hard. Women universally struggle with the same issues. If we can make it easier for women to deal with these 4 issues, menopause will be easier.</h4><blockquote>Throughout this post, we use both “women” and “people” to include anyone who might experience menopause-related symptoms.</blockquote><p>I am 38yo and finally know what I want to do when I grow up — impact women’s health worldwide. That is why I co-founded <a href="https://www.linkedin.com/company/sheknows/">sheKnows</a>, where our first order of business is to help women feel better around menopause.</p><p>The menopausal journey is appallingly under-discussed. Substantial hormonal changes start around age 45 and could continue for over 10 years — reverse puberty in the middle of life. Half of the world experience menopause and more than half of menopausal women report life-changing symptoms, with some going on for years before finding a solution. A quarter of the world’s population had, have, or will have a life-damaging experience that most people know nothing about.</p><p>We are here to change that.</p><p>Coming from a technological and analytical background, I came up with the idea to analyze publically available reviews for menopause apps. There aren’t many such apps, that’s part of the reality we are here to change, but for the apps that do exist — users write passionate and enlightening reviews.</p><p>Here’s what I’ve learned from reading and analyzing the reviews.</p><h3>Introduction: Listening to Women</h3><p>To gather data for this research, I collected and read every review of every menopause-related app on Google Play and Apple’s App Store, a total of 1222 reviews for 6 apps.</p><p>The preliminary part of this research was to look for emerging patterns. Indeed, an extensive exploration revealed 4 major themes: <em>understand menopause</em>, <em>understand me</em>, <em>get solutions</em>, and <em>get support</em>.</p><p>Next, I tagged the reviews using these 4 themes. Each phrase or sentence that matched a common theme, received the appropriate tag, and so each review received between 0 and 4 unique tags. Reviews that didn’t get any tag were usually either technical, such as “<em>can’t open the app</em>”, or too general, such as “<em>love this app</em>”.</p><figure><img alt="Distribution of the number of tags per review" src="https://cdn-images-1.medium.com/max/286/1*-vyE7dQslUxB0XIhJiceHg.png" /><figcaption>Distribution of the number of tags per review</figcaption></figure><p>Although there were some differences in reviews of different apps, all apps received all tags, showing the universality of those common themes. Therefore, this research focuses on the 740 reviews (60%) across all apps that received at least one tag.</p><p>The following sections describe what I learned from analyzing each theme.</p><h3>Tag #1: Understand Menopause</h3><figure><img alt="Word cloud generated from sentences tagged with “understand menopause”" src="https://cdn-images-1.medium.com/max/851/0*54GXHEsu1MeAzkTP" /><figcaption>Word cloud generated from sentences tagged with “understand menopause”</figcaption></figure><p><strong>62% of reviewers praised the information given on the app.</strong></p><blockquote><em>“Information is clear and easy to read without leaving you mind-boggled.”</em></blockquote><p>All menopause apps offer information about the menopause journey in some form, and when looking at the data we can understand why. The overwhelmingly most significant feedback regarded the information on the app — 470 (62%) out of 740 tagged reviews, with 192 of them (26%) that had this as the only theme in their review.</p><p>The Menopause journey starts with Peri-Menopause, on average 4 years before the last period, and symptoms last for an average of 7.4 years. This is a dramatic time in a person’s life and yet the menopause journey is hardly talked about. Searching online for information about menopause is confusing — many sources contradict each other, and many are written in professional or medical jargon. The overall experience of trying to learn about menopause online is a flood of information about the most common issues, such as hot flushes and sleep disorders, and a lack of information about anything else.</p><p>Back to the quote above; nothing is obvious when it comes to menopause, even clear information.</p><blockquote><strong>Conclusion #1: Women are seeking validated and trusted information about menopause.</strong></blockquote><h3>Tag #2: Understand Me</h3><figure><img alt="Word cloud generated from sentences tagged with “understand myself”" src="https://cdn-images-1.medium.com/max/851/0*OATxHZAfxlJXlBww" /><figcaption>Word cloud generated from sentences tagged with “understand me”</figcaption></figure><p><strong>37% of reviewers mentioned features on the app that helped them understand what is happening to <em>them</em>.</strong></p><blockquote><em>“It tells me about myself; I understand &amp; own what is happening in my own body”</em></blockquote><p>Reviewers applaud tracking features for irregular periods, symptoms, feelings, and lifestyle. Out of 289 reviews tagged with this theme, 198 (68%) specifically said they use the app to monitor their symptoms.</p><p>Each menopause journey is unique. Yet some completely bizarre-sounding symptoms, such as sweating in your eyelashes (true!), are actually quite common. Perimenopause is the period in life in which estrogen levels start to decline drastically; estrogen participates in biological processes that influence our entire body, and so during perimenopause, each person might experience dozens of different mental and physical changes.</p><blockquote><strong>Conclusion #2: Women are keen to gain understanding and certainty about their own menopausal journey.</strong></blockquote><h3>Tag #3: Get Solutions</h3><figure><img alt="Word cloud generated from sentences tagged with “get solutions”" src="https://cdn-images-1.medium.com/max/851/0*JYXGwEmKwfDvY4bi" /><figcaption>Word cloud generated from sentences tagged with “get solutions”</figcaption></figure><p><strong>33% of reviewers described how the app made an impact on their health. </strong>Furthermore, 30% of reviewers said the app was “useful” or “helpful”, indicating women are turning to menopause apps to get actual results.</p><p>Two strong voices stood out from reviews tagged with this theme.</p><blockquote><em>“This app goes into how to deal with symptoms and gives recommendations that actually help balance hormones”</em></blockquote><p>First, more than 10% of reviewers noted receiving useful tips and advice for managing menopausal symptoms and general lifestyle advice for dealing with this challenging time. This is a figure that should not surprise anyone involved in women’s health. Online forums for women’s health, and menopause in particular, are all about asking and giving advice.</p><blockquote><em>“Sent the report to my doctor before a telephone consult &amp; it made the conversation so much easier!.”</em></blockquote><p>This second figure blew my mind: 13% of reviewers stated that using the data from the app they were able to get better healthcare. As a result of learning about their bodies and their options, women report having more efficient and productive conversations with their doctors, which enabled them to make informed health decisions and find effective solutions.</p><blockquote><strong>Conclusion #3: Women take charge of their health care and want to find effective solutions.</strong></blockquote><h3>Tag #4: Get Support</h3><figure><img alt="Word cloud generated from sentences tagged with “get support”" src="https://cdn-images-1.medium.com/max/851/0*Ji7e20TQOwCnNkyg" /><figcaption>Word cloud generated from sentences tagged with “get support”</figcaption></figure><p><strong>27% of reviewers expressed feeling better emotionally.</strong></p><blockquote><em>“Just knowing there are other people out there going through the same things is a help in itself”</em></blockquote><p>The findings until now revolved around the practical side of menopause. Learn, monitor, solve. This is why it is significant to discover that over a quarter of reviewers explicitly referred to emotional support.</p><p>Menopause, like any life-altering medical condition, comes with its emotional struggles.</p><p>Women often go on for years before finding an effective treatment for their health issues; years of feeling doubted, shamed, and alone. When discovering these apps, women describe they finally realized they were not going crazy and are not the only ones out there.</p><p>It is also relevant to mention in this regard that almost 15% of reviewers specifically remarked the app was easy to use, and this goes for all apps. This is surprising because “easy” is pretty much the opposite of how women describe the menopause journey…</p><blockquote><strong>Conclusion #4: Women just want to feel normal.</strong></blockquote><h3>Our Cause for Menopause</h3><p>When I began this research, I thought it would be casual product research about popular features and market needs. But the more I tuned in to the voices, the more I realized there is a bigger story here.</p><p>The extraordinary evidence shows a coherent voice among reviewers of menopause apps: <strong>women must work hard to feel better. <br>And this is precisely the equation we are aiming to break at sheKnows.</strong></p><p>Women work hard to educate and monitor themselves to understand what is happening to them. <br>Women work hard to be their own case managers and lead the conversations with their doctors to make informed health decisions.<br>Menopause is so shamed and outcasted that women work hard to find more people who feel the same, even though what they are going through is completely normal!</p><p>There has to be a better way.</p><p>As Co-Founder and CEO of sheKnows, I promise you we are the ones who are now working hard to find a solution.</p><p>We believe in a future where women don’t have to work hard to be their healthcare educators, managers, and advocators. <br>We believe in a future where women can easily access personalized facts and solutions, without struggling to navigate the flood of mis/information. <br>We believe in a future where we all feel comfortable talking about our health, especially menopause — which naturally happens to us all. <br>And we believe the latest advancements in artificial intelligence could be a gamechanger in creating this future.</p><p>Women’s health revolution is coming. <br>Would you like to <a href="https://www.linkedin.com/in/dalya-gar/">join me</a>?.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2cabf9ca9226" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Parameters: One Class to Rule Them All]]></title>
            <link>https://dalyag.medium.com/parameters-one-class-to-rule-them-all-34342042291a?source=rss-8cb8e88c4f51------2</link>
            <guid isPermaLink="false">https://medium.com/p/34342042291a</guid>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[oop]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[algorithms]]></category>
            <dc:creator><![CDATA[Dalya Gartzman]]></dc:creator>
            <pubDate>Mon, 11 Jan 2021 06:52:50 GMT</pubDate>
            <atom:updated>2021-01-11T06:52:50.528Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bOvOAJ9T0S4UuyTAvIWz4w.png" /><figcaption>Making the first steps might be hard, but it’s totally worth it.</figcaption></figure><h4>When working on a complex project in Python that has many parameters, it helps to keep all parameters in one place. Read this to learn why, when, and how to best implement it.</h4><p>My philosophy in writing code (and in other facets of life, but that’s for another post) is that I prefer to do <em>some</em> extra work now in order to do <em>much less</em> work later.<br>This is the motivation for creating a class that holds all my parameters in one place.</p><h3>Do I Need This?</h3><p>Not every function you ever write will have its own Params class. The time <strong><em>is</em></strong> right when you have multiple parameters in your project, and when your architecture is non-trivial.</p><p>Let&#39;s ask ourselves two questions to understand if we need this new feature in our project:</p><ol><li><strong>Is my project more than just a simple module?</strong><br>Am I working on a big project that has one (or very few) entry points, and many many (many) internal components?<br>When drawing the architecture of my project, do I have multiple levels in the hierarchy?</li><li><strong>Do I use parameters in my project?</strong><br>Do any of the internal components use “magic numbers” that are hardly ever changed, but I would still like to keep track of?<br>Do any of the internal components use configurable inputs that are trickled down from the main entry point?</li></ol><p>If the answer is “yes” on both items, read on, and learn how to make your project easier to develop, expand, and maintain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B1epM3CISsh_dnJfIUHRVg.png" /><figcaption>If your project looks something like this, you could really use a Params class…</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EJkhKBStifmJDtHUTOFcvQ.png" /></figure><h3>The Params Class</h3><p>Now that we are certain we could use a Params class, how should we implement it?</p><p>I suggest a <a href="https://docs.python.org/3/library/dataclasses.html">dataclass</a>, which becomes even more useful when developing in Python3.6+ that has optional <a href="https://docs.python.org/3/library/typing.html">typing</a>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d7b984df14faf418fc366a4b3efbeede/href">https://medium.com/media/d7b984df14faf418fc366a4b3efbeede/href</a></iframe><p>In this template, I have included a few hard-learned-lessons:</p><ol><li>In dataclass, you don’t have to specify an explicit __init__ method. You list all your attributes “as if” they were <a href="https://medium.com/techtofreedom/differences-between-class-attribute-and-instance-attribute-of-python-1ae61774489c">class attributes</a>. <br>You can either have NO default values or have default values for ALL attributes. I prefer to have default values for all, and use None where needed. Then, in the <a href="https://docs.python.org/3/library/dataclasses.html#post-init-processing">__post_init__</a>, I can handle all None values.</li><li>Since lists are <a href="https://medium.com/@meghamohan/mutable-and-immutable-side-of-python-c2145cf72747">mutable</a>, we don’t want to have a default list value. Instead, let’s use a string of comma-separated-values, and in the __post_init__ we will fill the default value of our “real” list parameter.</li><li>The __post_init__ is also a great place to concatenate paths that we will later want to use in a concise manner. Specifically:</li><li>When I want to keep track of my experiments (and also in production!) I want to make sure that outputs from different runs will not override each other. Every output, whether final or mid-process, that is distinct to a specific run, I will keep in a folder that is marked with a timestamp of the start time. <br>If you want to learn more about keeping track of algorithmic experiments you can read <a href="https://towardsdatascience.com/logging-algorithmic-experiments-in-python-9ab1f0e55b89">this</a>.</li><li>It helps to have an instantiating method from_parser that uses the input from the terminal; read on to learn how and when to use it.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YK8scxi7geRCL4td8EugQQ.png" /><figcaption>The opposite of forgetting is writing (all your parameters in one place)</figcaption></figure><h3>Using the Param Class</h3><p>To use the Params class, instantiate this class outside the scope of the project, and instantiate our project using this existing Params <a href="https://en.wikipedia.org/wiki/Singleton_pattern">singleton</a>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cecad05473c4df65822b3b0b729a0f01/href">https://medium.com/media/cecad05473c4df65822b3b0b729a0f01/href</a></iframe><p>Now if you want to run your project from the terminal, you can do so with a lean runner file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7edce6f51b9a4237177e215bfa4eefa5/href">https://medium.com/media/7edce6f51b9a4237177e215bfa4eefa5/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T0mG6IGEqF4JduzeGkTUhA.png" /><figcaption>When you have all your parameters in one place, you can easily use them where needed.</figcaption></figure><h3>Never Instantiate Mid-Run</h3><p>If you have some mid-process entry point, or if you have some tests you perform on chunks of modules, always instantiate the Params class <strong>outside</strong> the scope of your modules. Explicitly — <strong>never do something like this</strong>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/607f7431a4e5dec32afca4d4fde314e9/href">https://medium.com/media/607f7431a4e5dec32afca4d4fde314e9/href</a></iframe><p>This is bad practice since SomeMidProcessModule expects to have values trickled down to it. If you have <em>non-default</em> values configured, you don’t want to allow this module to use an instance of Params that has only the <em>default</em> values.</p><p>This becomes even worse (don’t ask me how many hours I spent debugging because of this) when some parameters are computed or overwritten mid-run. Then, if you create a new instance of Params mid-run, you lose the most updated values.</p><p>The good practice, in this case, is to force an input of an existing Params instance:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2ded1538e4d1d10e133f727c7fa05656/href">https://medium.com/media/2ded1538e4d1d10e133f727c7fa05656/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-PSuDgKRGVQ_wXRKwaVDZw.png" /></figure><h3>Everything Is So Much Easier Now</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8UnuIxtwVL-XvySFVOnOpA.png" /></figure><p>Now, every time you want to create a new parameter, you only need to do that in <strong>two places — in the Params class and in the “leaf” of the tree.</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/43827e6911a6a144afcf9d7792f31560/href">https://medium.com/media/43827e6911a6a144afcf9d7792f31560/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/0*IjEhb0vXiK5h15MW.jpg" /><figcaption>That’s how you’re going to feel very soon! Good luck y`all!</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34342042291a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploration-Personalization-Connection. My Method for Finding a Great Job.]]></title>
            <link>https://medium.com/swlh/exploration-personalization-connection-my-method-for-finding-a-great-job-9122f9f3c255?source=rss-8cb8e88c4f51------2</link>
            <guid isPermaLink="false">https://medium.com/p/9122f9f3c255</guid>
            <category><![CDATA[career-advice]]></category>
            <category><![CDATA[job-search]]></category>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[job-hunting]]></category>
            <category><![CDATA[jobs]]></category>
            <dc:creator><![CDATA[Dalya Gartzman]]></dc:creator>
            <pubDate>Tue, 09 Jun 2020 05:36:30 GMT</pubDate>
            <atom:updated>2020-06-10T11:41:54.585Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hsUazt9YXjAFMzRpSGPW7w.png" /></figure><h4>A proven method from an experienced job-search mentor. With the Covid-19 outbreak sending so many talented people home, now is the perfect time to share it.</h4><p>This is not a post about <a href="https://startupsventurecapital.com/best-tips-to-prepare-for-the-software-engineering-interview-1c7adeb4bc05">acing</a> <a href="https://www.thebalancecareers.com/job-interviews-4161912">job</a> <a href="https://xkcd.com/1545/">interviews</a> or writing <a href="https://thriveglobal.com/stories/cover-letters-trick-to-get-you-interview-tips/">an</a> <a href="https://dev.to/techdebtor/get-hired-the-storytelling-resume-19ln">impressive</a> <a href="https://medium.com/hackernoon/how-to-write-unreadable-cvs-54cae79013a8">CV</a>. It surely isn’t a post about how to be <a href="https://www.youtube.com/watch?v=kK-Bb3E8uM8">great</a> <a href="https://www.youtube.com/watch?v=bd2cDfqVe60">at</a> <a href="https://www.ted.com/talks/arianna_huffington_how_to_succeed_get_more_sleep">your</a> <a href="https://mastersofscale.com/brit-morin-the-millennial-episode/">job</a>. I assume you are already great. I assume the only thing standing between you and your dream job is that you don’t know <strong><em>where</em></strong> it exists. The goal of this post is to overcome precisely that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*r74JS47rrDglIoObvTDkfA.png" /><figcaption>I assure you, you will <strong>not</strong> feel this way after reading this post.</figcaption></figure><h3>Prologue</h3><p>You might ask yourselves — why should I put such effort into finding a job? There are recruitment companies for that, and even <a href="https://builtin.com/artificial-intelligence/ai-in-hr-recruiting">emerging technologies</a>. Indeed, you are likely to get an <strong><em>OK</em></strong> job by merely sitting on your couch. However, when such an important matter is on the line, I prefer to go the extra mile or ten, to make sure I find a <strong><em>great</em></strong> job.</p><p>Accordingly, the method we are going to cover in this post is based on one basic principle:</p><blockquote>Be Proactive, Not Reactive.</blockquote><p>This method is composed of three actions: Exploration, Personalization, and Connection. Each action is a practical answer to one of three fundamental questions of your job search:</p><ol><li>Now that the <a href="https://www.yellowpages.com/">Yellow Pages</a> are out of style 👉🏿 how can I discover companies/organizations to apply to? <strong>Exploration</strong>.</li><li>Since there are so many possibilities out there 👉🏿 how can I filter out the noise and focus on companies most relevant for me? <strong>Personalization</strong>.</li><li>A personal reference is the best way to apply for a job 👉🏿 what can I do if I don’t know anyone who can pass along my CV? <strong>Connection</strong>.</li></ol><p>There is no one order to apply these actions. You can incorporate all or some of them into your job search routine, and act upon them interchangeably, depending on your mood/muse.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*IqSnHKeZbKt6-00H_S8oFw.png" /><figcaption>Don’t feel discouraged by the volume of work suggested in this post — pick and choose as you please.</figcaption></figure><h3>Exploration</h3><p>The goal of this action is to discover relevant companies that you could potentially work for. The larger your pool of potential companies, the more you optimize the greatness of your future job.</p><p>Here are three examples of sources for exploration:</p><ol><li>My favorite source is conferences and Meetups. You don’t need to physically <em>attend</em> those, especially as these days there aren’t any to attend. This is a pure <em>online</em> source. Google events by the category of your profession, or by a specific domain you are interested in, and browse the speakers and sponsors lists. <br>I am particularly fond of this source for three reasons: (<em>i</em>) it is focused on an area of interest; (<em>ii</em>) companies that encourage their employees to do public speaking are likely to have a culture that promotes self-development; (<em>iii</em>) these events are usually recorded, so you can see the people you are going to work with and learn what they are working on.</li><li>A straightforward source of great companies to work for is PR lists such as “50 most promising startups…” or “Best places to work for in 2020…”.</li><li>An abundant source that maps the options in a specific domain is logo posters, usually published by venture capitals. Search in Google photos for a combination of geography, product domain, or tech domain, and discover countless startups (Check out <a href="https://www.google.com/search?q=mobility+startups+in+europe&amp;tbm=isch&amp;ved=2ahUKEwijhIXr_eXpAhVxBGMBHcFdDFYQ2-cCegQIABAA&amp;oq=mobility+startups+in+europe&amp;gs_lcp=CgNpbWcQAzoECCMQJzoFCAAQsQM6AggAOgQIABBDOgUIABCDAToHCCMQ6gIQJzoHCAAQsQMQQzoGCAAQBRAeOgYIABAIEB46BAgAEBg6BAgAEB5QrB9Y1WFgoGNoD3AAeAGAAdMBiAGvKZIBBjAuNDEuMZgBAKABAaoBC2d3cy13aXotaW1nsAEK&amp;sclient=img&amp;ei=tsTXXqPRPPGIjLsPwbuxsAU&amp;bih=1309&amp;biw=2560">this</a> search for example).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aEUfEMHmMrkuKMydQ0XdCQ.png" /></figure><h3>Personalization</h3><p>The goal of this action is to select companies that you will most likely be happy working for. You can achieve this goal by reading about the company on <a href="https://www.linkedin.com/">Linkedin</a>, <a href="https://techcrunch.com/">TechCrunch</a>, the company’s website, or simply googling the company’s name to see what comes up. This way, you can learn about the company’s product and vision and discover technical details such as geographic location, company size, financial status, and, if available, employee reviews on <a href="https://www.glassdoor.com/index.htm">Glassdoor</a>.</p><p>Furthermore, I like looking for content created by the employees — I google blogs and talks/workshops by company name, or by names of employees I found on Linkedin, that have a similar profession to mine. By tuning in to employee-generated content, you can learn who are the people that work for this company and what are their actual jobs, beyond the title.</p><p>I’ve found this action to be most effective when we first do some soul searching to realize what features are most important to us. For example, I value company culture above all else, but also <em>this</em> feature can mean so many different things to different people… I strongly recommend putting in the time to think about any previous life experiences you had, what you liked, and what you would prefer to avoid in the future. The gist is — to find the perfect job, you first need to define the perfect features. Keep this list as a guiding light for an efficient search, and continue to the next action to learn how you can uncover these subtle features of a company.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*Uehu6AT8dJ10hQUb.jpg" /><figcaption>Your preferences are unique. Don’t just follow the crowd — do what is right for <strong>you</strong>.</figcaption></figure><p>But.<br>The one thing.<br>That will NEVER exclude a company from my list.<br>Is whether they have any open positions.<br>Never.</p><p>Sometimes a company is about to publish the perfect position for you in the next few days, or they just closed a position that is going to reopen in a month. Perhaps they never considered hiring someone like you, but when you describe your potential contribution, it’s clear you could make a brilliant addition to the team! Occasionally, it’s just a small company that doesn’t have any “open positions” — only positions that are already filled and some extra resources in case someone great (you!) comes along.</p><p>Whichever it is, these concerns are not yours to overcome. If you want to work for this company, you do everything you can to get a foot in the door (read on to learn how!). Worst case, there will be no door to put your foot in. But you never know if you never try, right? <br>Remember:</p><blockquote>Be Proactive, Not Reactive.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*FyNKNgzhNrINosy_8Ivdpg.png" /><figcaption>Look for ways in, not excuses to keep out.</figcaption></figure><h3>Connection</h3><p>The goal of this action is to get your foot in the door. We assume that by now you already know which door this is — you have crawled the internet and found a company you will likely want to work for; Unfortunately, you don’t know anyone in this company who can pass along your CV, and as mentioned earlier, probably no open positions to apply to….</p><p>The solution is a straightforward utilization of how social networks work:<br>directly reach out to someone from the company! <br>Send a connection request on Linkedin with a personalized note:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v2TGnW14iCb4m-Bju0Io9w.png" /><figcaption>This note is intentionally displayed in a non-copy-pastable format. I encourage you to find your own words.</figcaption></figure><p>From my experience, most people are responsive and informative, and many are even remarkably helpful. Furthermore, connection requests are most successful when you approach someone who is likely to be a future colleague — someone of a similar position, similar seniority, similar level.</p><p>The goal of this connection is twofold — first, establish a personal relationship with someone who can supply inside information and help you understand if this company is a good match for you, personally and professionally. Then, if the answer is yes, this person can pass along your CV with a personal reference and can be your contact during the recruitment process.</p><p>If there is one thing you remember from this post, please let it be this one — talk to someone from the inside. Always. I usually make an effort to speak to at least two different people before I submit my CV.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/0*E_7u1tT_6vUReBOd" /><figcaption>When you join a company because you trust everything they say on their website.</figcaption></figure><p>I cannot stress this enough. Every hour you spend talking to a past/current employee is an hour you spend either filtering out places that are not right for you or increasing your chances of getting your foot in the door. This is an hour you will never regret spending.</p><blockquote>A note for women and underrepresented minorities: reach out to someone from your sector. It will increase your chances of getting an honest insight into the company culture and how it might affect you.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W-TrA6Ct8zuCUcwmGL2D9w.png" /><figcaption>Snapshot from Pixar’s delightful short film, <a href="https://www.youtube.com/watch?v=B6uuIHpFkuo">Purl</a></figcaption></figure><h3>Epilogue</h3><p>Job seeking is hard. It requires so many skills and so many efforts invested in multiple directions. I wish someone could just tell me, “Here is the perfect job for you!” and save me all this trouble. But life isn’t Netflix, and I need to write my own script if I want my plot to advance. There are countless advice online on how to succeed in this process (I have linked to several myself in the intro), but I couldn’t find any that address the search process itself. I am certain that crawling the web, as described in this post, can vastly increase your chances of stumbling upon your dream job.</p><p>In the past few years, I have been a high-tech job seeker myself a couple of times, and have advised dozens of fellow job seekers. In some cases, it was a single conversation that jumpstarted their job hunt. For some, it was a continuous journey as part of a <a href="https://extend-tech.com/baot">local community’s</a> volunteer mentoring program. After giving repeated similar advice, I have come to realize that on top of specific personal needs, there are universal actions that everyone can take to optimize their job search. I hope you’ve found some of the advice in this post helpful towards the goal of finding the perfect job for you.</p><p>Your next dream job is out there, I assure you. <br>Now go and find it — I believe in you!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Floay2imHq5E%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dloay2imHq5E&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Floay2imHq5E%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/62d2d7528de06632a2cbf73488e2c0e2/href">https://medium.com/media/62d2d7528de06632a2cbf73488e2c0e2/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9122f9f3c255" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/exploration-personalization-connection-my-method-for-finding-a-great-job-9122f9f3c255">Exploration-Personalization-Connection. My Method for Finding a Great Job.</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Squash and Rebase — My Method for Merging Git Branches]]></title>
            <link>https://levelup.gitconnected.com/squash-and-rebase-my-method-for-merging-git-branches-3b43c52675b6?source=rss-8cb8e88c4f51------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b43c52675b6</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[coffee]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Dalya Gartzman]]></dc:creator>
            <pubDate>Sun, 24 May 2020 05:54:29 GMT</pubDate>
            <atom:updated>2020-06-04T05:17:10.719Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*_CqOY6Ox99u2PTJZ1uCshA.png" /></figure><h3>Squash and Rebase — My Method for Merging Git Branches</h3><h4>I find Git to be somewhat like coffee. <br>Once I’ve found a method that works for me - I stick to it.</h4><p>Today I want to share with you my method for merging Git branches (no, this is not another post about <a href="https://dev.to/erikaheidi/pick-squash-drop-rebase-comic-607">merge vs. rebase</a>).<br>Like the first espresso of the day, let’s start by cutting straight to the chase:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/14788684bccfed2726f116eff5560c73/href">https://medium.com/media/14788684bccfed2726f116eff5560c73/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/0*MsbG4sQjH0A3td1E.jpg" /></figure><p>And now, let’s break it down and understand what is happening here.</p><h3>1. Squash All the Commits in Your Branch</h3><p>The way I work with Git is that I open a new branch every time I have a new idea. I can have a main feature branch and some smaller branches for testing new ideas. I make several commits a day; sometimes several commits an hour — every time I manage to make the next step work.</p><p>This habit of frequent commits poses a challenge when I want to merge my branch to master (or my mini branch to the main feature branch) — I then have numerous commits that have no value for the master branch. Furthermore, if I would like to use <em>rebase</em> later, these commits are likely to cause unnecessary conflicts.</p><p>Fortunately, I can discard those expendable commits using a <em>squash</em>. <em>Squashing commits</em> means rewriting Git history to include only the meaningful commits, and I recommend using <a href="https://dev.to/rlxdprogrammer/advanced-git-tutorial-interactive-rebase-369l">interactive rebase</a> (<a href="https://algoritmim.co.il/2020/01/11/make-your-commit-the-best-with-interactive-rebase/">Hebrew</a>) to achieve this.</p><p>To be precise, we are going to:</p><ol><li>Go to the branch we want to merge.</li><li>Open a new branch my_branch_squashed.</li><li>Rebase my_branch_squashed on top of the last commit from master before my_branch.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k6K5DMgGNlGwHxN0P9eimA.png" /><figcaption>Open my_branch_squashed from the latest commit on my_branch. Rebase on the latest master commit before my_branch (m2). After the rebase, the only commits on my_branch_squashed will come straight after m2.</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2e8689e86de0e43f4981154522616a1d/href">https://medium.com/media/2e8689e86de0e43f4981154522616a1d/href</a></iframe><h3>2. Rebase on Master</h3><p>Now that we have a branch with only meaningful commits after master, we are ready to rebase this branch on the latest master commit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*uqikQe2x9WyPpEe1fmQLzA.png" /><figcaption>Open my_branch_squashed_rebased from the latest commit on my_branch_squashed. Rebase on master. After the rebase, the new commits on my_branch_squashed_rebased will come straight after the latest master commit.</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5d77a4b79a3331ff079645cfaa7118e0/href">https://medium.com/media/5d77a4b79a3331ff079645cfaa7118e0/href</a></iframe><blockquote>Note: some would claim that my_branch_squashed_rebased is redundant and that the rebase on master can happen straight from my_branch_squashed. My philosophy is that there are always shortcuts to be made; in Git and generally in software development. I am not looking for shortcuts that will save me little time now; I am looking for methodologies that will (mostly) save me a lot of time, all the time. Applying this philosophy to the merging method in this post: I prefer to have multiple branches with indicative names, than fewer yet meaningless branches.</blockquote><h3>3. Merge With No Conflicts</h3><p>If we did everything right up until now, we have a branch called my_branch_squashed_rebased, that has only meaningful commits on it, that comes after the latest commit on master.</p><p>Now we can effortlessly merge this branch, knowing there will be no conflicts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mwRKjPdsDqZMoyPa-7Uj6A.png" /><figcaption>After merging, you will have added only your meaningful commits to master.</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/28f5938323e1d5e567d45575bc2d0fee/href">https://medium.com/media/28f5938323e1d5e567d45575bc2d0fee/href</a></iframe><h3>4. Bonus Episode — Delete Old Branches</h3><p>Now that we have all these branches… what are we going to do with all that green waste?</p><p>Once I am sure I did everything right, I wait a couple of days to be sure some more, and then I delete my old branches using three simple steps:</p><ol><li>Delete branches from the local repository.</li><li>Delete branches from the remote repository.</li><li><em>Prune</em> branches: delete the memory of the <em>remote</em> branches in my <em>local</em> repository.</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a60ba0b8e872d5b63e45c2c77fbc5da1/href">https://medium.com/media/a60ba0b8e872d5b63e45c2c77fbc5da1/href</a></iframe><h3>Epilogue</h3><p>I enjoy working with Git and find it to be a paramount modern developer tool. But the thing with Git is that I don’t know what I don’t know. And even if I know I don’t know something — it’s difficult to understand what to look for…</p><p>Which is why when I find something that works for me, gets the job done, solves my problems… I stick to it. And I also make an effort to share the knowledge so that other people may benefit from my experience as well.</p><p>So I hope this post helped you!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/228/0*il79CSnqKvspfdB6" /><figcaption>When you need something from Git, but you don’t know what you need from Git.</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b43c52675b6" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/squash-and-rebase-my-method-for-merging-git-branches-3b43c52675b6">Squash and Rebase — My Method for Merging Git Branches</a> was originally published in <a href="https://levelup.gitconnected.com">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“Hello World” in C++]]></title>
            <link>https://codeburst.io/hello-world-in-c-66d9d1b887e1?source=rss-8cb8e88c4f51------2</link>
            <guid isPermaLink="false">https://medium.com/p/66d9d1b887e1</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[installation]]></category>
            <category><![CDATA[cpp]]></category>
            <category><![CDATA[hello-world]]></category>
            <category><![CDATA[c]]></category>
            <dc:creator><![CDATA[Dalya Gartzman]]></dc:creator>
            <pubDate>Sun, 10 May 2020 18:03:31 GMT</pubDate>
            <atom:updated>2020-05-11T14:58:51.509Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rpCmZsoy114bGDPcTNRFuQ.png" /></figure><p>After several years of writing code in Matlab and Python, I honestly didn’t think writing a “Hello World” program in C++ would take me <em>more than two hours</em> to complete. But life is full of surprises, right?</p><p>My goal in this post is to help the next person have a smoother transition to C++ by troubleshooting some of the surprises.</p><blockquote>Note: my OS is Ubuntu 18.04, but from the research I conducted for this post, I suspect that everything here is relevant for other OSs as well.</blockquote><p>The steps we are going to cover in this post are:</p><ol><li>Install <a href="https://code.visualstudio.com/download">Visual Studio Code</a> (VS-Code).</li><li>Install mandatory extensions to run C++ code in VS-Code: <a href="https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools">C/C++</a> and <a href="https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner">Code Runner</a>.</li><li>Write a “Hello World” program in C++.</li><li>Make the program work properly (yes, we need a separate item for this!)</li></ol><h3>1. Install Visual Studio Code (VS-Code)</h3><p>This is luckily an easy one: go <a href="https://code.visualstudio.com/download">here</a>, download the installer compatible with your OS, and install.</p><blockquote>Note: After writing this, I received several recommendations to use <a href="https://www.jetbrains.com/clion/">CLion </a>instead of VS-Code. If I get around to following up on this advice, I will update here :)</blockquote><h3>2. Install Mandatory Extensions to Run C++</h3><p>Although the internet says that VS-Code is a perfect IDE to write C++ code, we still need to install 2 extensions to make this actually work (yeah! I know! they are not built-in!)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*tkxkv10WURjjaZSd2j5dug.png" /><figcaption>What did I ask for? An IDE for C++ that can compile and run C++?</figcaption></figure><h4>2.1 Install C/C++</h4><p>Open VS-Code, go to the extensions manager, search for C/C++ extension, and press “Install.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W0Z2YG_rw2Oivd-DuXiQdw.png" /><figcaption>If this stage did not go smoothly, read on.</figcaption></figure><h4>2.2 Install Code Runner</h4><p>One might speculate that installing a C++ extension is enough to run C++ code. One might be wrong to forget that life is surprising. One also needs to install <a href="https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner">Code Runner</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IrbgMiAXJul_rJgTT10DUQ.png" /><figcaption>After installing Code Runner, you can run your code using Alt+Ctrl+n</figcaption></figure><h4>2.3 Troubleshooting C/C++ installation</h4><p>If the C/C++ installation did not go smoothly, know <a href="https://github.com/microsoft/vscode-cpptools/issues/694">you are not alone</a>!</p><p>For example, you might get the error Error: end of central directory record signature not found which might be followed by this “helpful” note:</p><pre>If you work in an offline environment or repeatedly see this error, try downloading a version of the extension with all the dependencies pre-included from <a href="https://github.com/Microsoft/vscode-cpptools/releases">https://github.com/Microsoft/vscode-cpptools/releases</a>, then use the “Install from VSIX” command in VS Code to install it.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*RSfQOsMtHVFHsI2L.jpg" /><figcaption>Ho! VSIX! not <a href="https://rickandmorty.fandom.com/wiki/Mr._Meeseeks">MEESEEKS</a>!</figcaption></figure><p>mmm….</p><p>Let’s decipher this into clear, actionable items:</p><ol><li>Go <a href="https://github.com/Microsoft/vscode-cpptools/releases">here</a>.</li><li>Scroll down. Below <em>Known Issues,</em> you will see a tiny mysterious tab called <em>Assets</em>. Open it and download the file compatible with your OS.</li><li>What does “Install from VSIX” mean??? Well, you are right to ask! 🧐<br>Open VS-Code, open the extensions browser, press the ... on the top right, select “Install from VSIX”, choose the file you just downloaded, and install.</li><li>Restart VS-Code.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dIp6M4MYfzAUDpb3l0zRng.png" /><figcaption>“Install from VSIX” with “just” 7 simple steps 🙄</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*NVZEkZ-Y2zq9ZwzmKHynkw.png" /><figcaption>Every time I see such a cryptic “help” message, it brings back the dreadful “it’s easy to see…” in math classes.</figcaption></figure><h3>3. Write a “Hello World” Program in C++</h3><p>Now we are finally ready to write our “Hello World” program in C++!</p><p>I just started <a href="https://www.linkedin.com/learning/learning-c-plus-plus-3/how-to-create-a-simple-program">this course</a>, which is free for the first month on <a href="https://www.linkedin.com/learning/">Linkedin Learning</a>, and so far, I like it a lot. It taught me how to write this “Hello World” C++ program:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dfc0dd288dc41d1594951e8fdf007a54/href">https://medium.com/media/dfc0dd288dc41d1594951e8fdf007a54/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*FKtxh5787neTAWcNhfp-1A.png" /></figure><h3>4. Make the Program Work Properly</h3><p>TLDR: You need to save the program every time you make changes!</p><p>After years of developing in PyCharm, which autosaves your every move, the requirement to actively save my program came as a complete surprise to me.</p><p>And how come I discovered this requirement so early into my C++ programming? Well, this one is on me. I am terrible at copy-pasting. Isn’t everyone? 😳<br>I followed the instructions in the course: opened a file called hello_world.cpp, copied into it the content of the example file above, completely missing the line using namespace std;.</p><p>So then, when I ran the code, I got an error:</p><pre>hello_world.cpp:6:5: error: ‘cout’ was not declared in this scope</pre><p>After <a href="https://stackoverflow.com/questions/15185801/cout-was-not-declared-in-this-scope/15186523#15186523">realizing what my problem was</a>, I added the missing line, re-ran the code, and still! Got the same error again!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*OW5ktoz7T32CAr5u" /></figure><p>Only when it occurred to me to <em>save</em> the file, did the program finally run as expected 😅</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uv8gEHM04Z4JSLin2seACg.png" /><figcaption>woohoo!</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/244/0*nLQiDx33HJx8w8Jn" /><figcaption>To prevent this disaster from happening again, you can enable autosave :)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*FjRbzZMcluxJ5G7E" /><figcaption>Finally a Happy Ending :)</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66d9d1b887e1" width="1" height="1" alt=""><hr><p><a href="https://codeburst.io/hello-world-in-c-66d9d1b887e1">“Hello World” in C++</a> was originally published in <a href="https://codeburst.io">codeburst</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Logging Algorithmic Experiments in Python]]></title>
            <link>https://medium.com/data-science/logging-algorithmic-experiments-in-python-9ab1f0e55b89?source=rss-8cb8e88c4f51------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ab1f0e55b89</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[logging]]></category>
            <dc:creator><![CDATA[Dalya Gartzman]]></dc:creator>
            <pubDate>Sat, 25 Apr 2020 15:08:45 GMT</pubDate>
            <atom:updated>2024-01-06T19:30:10.255Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0mAi8wu2qZUJc-hz0zGYGg.png" /><figcaption>Don’t be that person. Read this post and log your experiments properly.</figcaption></figure><h4>When your head is so busy thinking of clever solutions, you forget which clever solution you are trying out now.</h4><p>Researching solutions for a hard problem is a task that holds many challenges. The goal of this post is to eliminate one of those challenges — keeping track of where the heck we are amid all this research.</p><p>In this post, I assume you are working on a piece of code that is under construction, that this code is a standalone piece you run from start to finish (what we call “an experiment”), and that your goal is to keep track of the progress of your research.</p><p>To that end, we will enrich our code with a few useful logs. <br>These logs follow three guiding principles, which derive three action items:</p><ol><li>The input to your algorithm has a significant effect on the output.<br>👉🏾 Log input params.</li><li>If it FEELS like it’s taking too long, it probably IS taking too long.<br>👉🏾 Log runtimes.</li><li>Logs won’t keep the errors away, but they can help contain them.<br>👉🏾 Log Git revision.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*ujywnH7pbTpuqCke8IGl0Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*fyZ8uCoIeQOumjiigbpSRg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/364/1*QqFJxKMJ7-NysumQOoX1YA.png" /></figure><h3>0. Open a Logging Folder for Each Experiment</h3><p>To keep track of our experiments, we will keep all the logs from each experiment in a dedicated folder that will be named using the start time of the experiment:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5c95c5ef135f5201c025fff48c340aed/href">https://medium.com/media/5c95c5ef135f5201c025fff48c340aed/href</a></iframe><p>I will assume you use some sort of logging scheme for your code. For example, you can use <a href="https://codeburst.io/copy-pastable-logging-scheme-for-python-c17efcf9e6dc">this copy-pastable logging scheme</a>. If so, we can initialize our logger to save the log file to this folder.</p><h3>1. Log Input Params</h3><p>If you don’t already do so, I highly recommend you keep <strong>all</strong> the parameters in one class, with meaningful names for each parameter (for example you can use <a href="https://dalyag.medium.com/parameters-one-class-to-rule-them-all-34342042291a">this</a> copy-pastable scheme).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/0*Pa67oCe17qW8Y6lA" /><figcaption>Keep in mind: your logs are not just for you; they are for everyone (mostly future you!).</figcaption></figure><p>Now we can create a dedicated file that will log the input params of each experiment:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b2d09a8f3087fa5a40d4814b06526283/href">https://medium.com/media/b2d09a8f3087fa5a40d4814b06526283/href</a></iframe><h3>2. Log Runtimes</h3><p>When I am working on a complex algorithm, I separate the pipeline into meaningful modules. This structure helps me comprehend my solution, it makes the code more readable and maintainable, and it makes it easier to keep track of runtime and reveal bottlenecks.</p><p>There are countless ways to log runtimes. <br>For example, it’s great once in a while to run a profiler such as cProfile, and illustrate results with <a href="https://stackoverflow.com/a/49173782/2934048">SnakeViz</a>. The downside of such profiles is that they carry a computational overhead that causes inaccuracies, and they also require too much effort to be applied on each run.<br>Therefore, I prefer to maintain my own lean and simple runtime logger:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/747e44aceebf82adfdf686d0e14cb9a2/href">https://medium.com/media/747e44aceebf82adfdf686d0e14cb9a2/href</a></iframe><p>Then, in the main of my algorithm, I use this runtime logger to keep track of both global and module-separate runtimes:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0eaf592cd20610289f2923b94693aa6d/href">https://medium.com/media/0eaf592cd20610289f2923b94693aa6d/href</a></iframe><h3>3. Log Git Revision</h3><p>To be sure we know which algorithm we’re even running, we should log whatever we can about the current state of the code. We could, of course, just save the entire codebase to our logging folder, but…<br>As anticipated, we will use Git features to achieve this goal.</p><blockquote>Note: I know many algorithmaticians refrain from using version control. If you are one of them, I would like to point out that the fact that you stumbled upon this post indicates you could use some help keeping track of your research. Git was invented for this exact purpose!<br>I can personally attest that the overhead of maintaining a revision history fades in comparison to the benefits of an organized system that keeps track of my code.<br>Got you convinced? Start with <a href="https://medium.com/@munniomer/an-intro-to-git-and-github-for-beginners-part-i-tutorial-9be4be9cac8d">this</a> comprehensible tutorial to learn the basics, <a href="https://medium.com/@daphnaregev/git-level-up-bfbd85444622">this</a> for some advanced features, and if you ever find yourself thinking “Ho Shit Git!?!”, just go to <a href="https://ohshitgit.com/">hoshitgit.com</a>.</blockquote><p>I find it useful to log the following details:</p><ol><li>Git branch.</li><li>The short hash of the latest commit.</li><li><a href="https://stackoverflow.com/a/2530012/2934048">Diff</a> between the working directory and the latest commit.</li></ol><p>Before we do this inside our python code, let’s make sure we know how to get what we need from the terminal:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/86402d49c6b539fbcee9f01e8dd108a4/href">https://medium.com/media/86402d49c6b539fbcee9f01e8dd108a4/href</a></iframe><p>Adding -C &lt;path/to/project&gt; makes sure that we can get the desired details from anywhere:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ac8961fd916b8af48c8abe6cfad8fdd3/href">https://medium.com/media/ac8961fd916b8af48c8abe6cfad8fdd3/href</a></iframe><p>Now we’re ready to see how we do this inside our python code, using <a href="https://docs.python.org/3/library/subprocess.html">subprocess</a> built-in package, and <a href="https://docs.python.org/3/library/pathlib.html">pathlib</a> to extract our repository’s path:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a1492209746d5066d3e2210caa71afd2/href">https://medium.com/media/a1492209746d5066d3e2210caa71afd2/href</a></iframe><p>And now that you have all the information at hand, I recommend adding the git_branch and git_commit_short_hash to your input params from section 1, and saving your git_diff to a <a href="https://medium.com/transmute-techtalk/improve-your-commit-hygiene-with-git-add-patch-3b7dd9c117c4">patch</a> file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/506b2a7cf4458d8200f2e9d4f72c3119/href">https://medium.com/media/506b2a7cf4458d8200f2e9d4f72c3119/href</a></iframe><h3>Epilogue</h3><p>If you followed the instructions thus far, then at the beginning of every experiment, you will generate a new folder, log_&lt;start_time&gt;, where you will find the following helpful files:</p><pre>_ log_&lt;start_time&gt;<br>  |_ git_diff.patch<br>  |_ log.txt<br>  |_ params.json<br>  |_ runtime.json</pre><p>And that’s all folks, I hope you found this useful, and that the overhead of all this logging will soon be worth it. <br>I promise, soon you’ll discover you are no longer wasting time and energy on wracking your brains around which piece of code was good, and instead you will be putting all your effort into making awesome algorithms!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*wtpXMSyjT8QLGQs2eCOstQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ab1f0e55b89" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/logging-algorithmic-experiments-in-python-9ab1f0e55b89">Logging Algorithmic Experiments in Python</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Copy-Pastable Logging Scheme for Python]]></title>
            <link>https://codeburst.io/copy-pastable-logging-scheme-for-python-c17efcf9e6dc?source=rss-8cb8e88c4f51------2</link>
            <guid isPermaLink="false">https://medium.com/p/c17efcf9e6dc</guid>
            <category><![CDATA[code]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[logging]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Dalya Gartzman]]></dc:creator>
            <pubDate>Sun, 19 Apr 2020 05:23:52 GMT</pubDate>
            <atom:updated>2020-04-20T06:53:26.896Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wqKmk89DKzUc9uCF4G-D8Q.png" /><figcaption>Photo Credit: <a href="http://www.spockthedog.com/a-gallery-of-funny-awesome-dog-pics/">spockthedog</a></figcaption></figure><h4>The post you were looking for — if you already know some python logging, but lost your favorite logging scheme somewhere in the universe of code.</h4><p>You are here because:</p><ol><li>You want to log your Python module.</li><li>You are already somewhat acquainted with Python <a href="https://docs.python.org/3.6/library/logging.html">logging</a> (if not, I recommend you browse the first half of <a href="https://medium.com/better-programming/power-up-your-python-logging-6dd3ed38f322">this</a> great intro).</li><li>You are looking for a quick copy-pastable snippet to jumpstart your logging.</li></ol><p>And why am I here?<br>Because for the gazillionth time I discovered I left an important code snippet somewhere unknown… Therefore, today I have decided that this will be the very last time I will be reinventing the logging wheel.</p><p>Well then, let’s get right to it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*7zynHi8U8e_areJbmo4hog.png" /></figure><h3>Three Copy-Pastable Steps and Your Logger Is Ready</h3><ol><li>Open a new file for logging utils, where we will initialize our logger, and get our logger from when we need it.</li><li>Initialize your logger in the main of your module.</li><li>Call your logger from any other file where you need it.</li></ol><p>So, without further ado:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0-8ywEzrHXTiUyRglG0_Bg.png" /></figure><h3>1. Open a New File for Logging Utils</h3><p>Let’s open a new python file, logging_utils.py, with the following code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/33eaf6109661acd06fae889cf51e9e5b/href">https://medium.com/media/33eaf6109661acd06fae889cf51e9e5b/href</a></iframe><p>Let’s understand what is happening here:</p><p>We would like to have two outputs for our logger — one that will be printed to console where we run the code (the StreamHandler), and one that will be saved to file (the FileHandler).</p><p>The command logger.propagate = False makes sure that the logs sent to file will <em>not</em> be printed to console.</p><p>We use the Foramtter class to define the format of the logs. <a href="https://docs.python.org/3/library/logging.html#logrecord-attributes">Many options</a> can go here, but what I’ve chosen is to display is:</p><ol><li>The time of the log in a human-readable format, asctime, and I’ve added the pattern at the end to <a href="https://stackoverflow.com/a/3220312/2934048">indicate the specific datetime format</a>.</li><li>levelname is the <a href="https://docs.python.org/3.6/library/logging.html">level of the log</a>, one out of INFO, DEBUG, WARNING, ERROR, CRITICAL.</li><li>The name of the file, filename, from which the log was generated, and the line number, lineno.</li><li>Lastly, of course, the message itself — message.</li></ol><p>Notice that each handler can have a different log level. I prefer to have only INFO logs and above (i.e., also WARNING, ERROR and CRITICAL) displayed in the console, while the file will also include DEBUG logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/0*Zyf1oZFk9U-0DwBx" /><figcaption>Remember: there <strong>is</strong> such a thing as too many logs.</figcaption></figure><h3>2. Initialize Your Logger</h3><p>What is the root access to your project? Is it a script with a main? Is your logger contained in a specific module with a parent class that handles the entire pipeline?</p><p>Whatever the answer may be, let’s initialize the logger there, with the simple command:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/68268e6669c852881ed39b99073c4350/href">https://medium.com/media/68268e6669c852881ed39b99073c4350/href</a></iframe><p>Yup, that’s it. <br>And of course, if you wish, you can customize the log levels here, and remove the save_dir if you only wish to print to console.</p><h3>3. Call Your Logger</h3><p>Now that our logger is initialized, we can call our logger to log all our beautiful logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tHEtkjVfnDh7EZuTtEI6jw.png" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b7fc8f24379eeb514e860d950ddfda91/href">https://medium.com/media/b7fc8f24379eeb514e860d950ddfda91/href</a></iframe><h3>A Note About the Order of Actions</h3><p>If you call your logger without initializing it, the default log_level is WARNING, and the default formatting is empty (just your message). So if you call the function we defined get_logger() before/without ever initializing the logger, then you will get:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/adc4cd376fde4272058005166af54d56/href">https://medium.com/media/adc4cd376fde4272058005166af54d56/href</a></iframe><p>But, since we use everywhere the same name for our logger, LOGGER_NAME, our logger is a <a href="https://en.wikipedia.org/wiki/Singleton_pattern">singleton</a>, meaning the instance we already have at hand is the same one that will get all the features we defined in our init_logger(). Therefore, if we initialize the logger <em>after</em> we already called it, then on the <em>next</em> call, it will be set as desired:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b21fb5cd2937ae7c90ef2b477a1153b5/href">https://medium.com/media/b21fb5cd2937ae7c90ef2b477a1153b5/href</a></iframe><h3>A Final Note About Logging</h3><p>You can get all the architecture right, but at the end of the run, your log message itself is what counts. So make it clear and concise!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*-_odizapBTi78zPG.png" /><figcaption>Joking! This is so not what this post is about… I just saw this funny meme and had to find a context for it. #sorrynotsorry</figcaption></figure><h3>Epilogue</h3><p>This post is a part of my growing collection (mostly drafts for now…) of code snippets that are context-agnostic. The ones I want to take with me every time I start a new job or a new personal project, completely <a href="https://en.wikipedia.org/wiki/Intellectual_property">IP</a>-conscience-free.<br>I hope you benefit from this too!</p><blockquote>And to those reading during the Covid-19 outbreak: if nothing else, I hope you enjoyed the NON-era-related memes 😉</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E49BdKgmVecC7lVOaq3Mbw.png" /><figcaption><a href="https://www.instagram.com/uzidedog/">Uzi</a>, my sunshine during these hard times, after a long day of <a href="https://www.instagram.com/woofing_from_home/">woofing_from_home</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c17efcf9e6dc" width="1" height="1" alt=""><hr><p><a href="https://codeburst.io/copy-pastable-logging-scheme-for-python-c17efcf9e6dc">Copy-Pastable Logging Scheme for Python</a> was originally published in <a href="https://codeburst.io">codeburst</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why You Should Talk in a Meetup]]></title>
            <link>https://codeburst.io/why-you-should-talk-in-a-meetup-3373557a8a7b?source=rss-8cb8e88c4f51------2</link>
            <guid isPermaLink="false">https://medium.com/p/3373557a8a7b</guid>
            <category><![CDATA[inspiration]]></category>
            <category><![CDATA[public-speaking]]></category>
            <category><![CDATA[community]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Dalya Gartzman]]></dc:creator>
            <pubDate>Sun, 26 Jan 2020 05:58:24 GMT</pubDate>
            <atom:updated>2020-01-27T03:14:52.012Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/667/0*bVlb8MU3c6P3Bia4.jpg" /><figcaption>Read this post to find out why it’s actually not such a bad thing...</figcaption></figure><p>Spring 2017. <br>I just received my MSc. in math. <br>Knew nothing of the Real World. <br>Yet.</p><p>The meetup scene I discovered that spring changed the way I see the industry, and has tremendously contributed to the professional and personal growth I experienced since.</p><p>The speaker in me was born with one crazy idea. I was working on my first personal project, and on one inspirational moment I decided to give a talk about this project, thinking that’s how I’m going to find my Dream Job.</p><p>Two months later, I indeed finished the project, <a href="https://youtu.be/8j8vfW94o6Y?t=1181">talked about it in a meetup</a>, and found my Dream Job using connections I made at that meetup.</p><p>Ever since, I just can’t stop talking.</p><p>In the past several years I gave <a href="https://github.com/DalyaG/PublicSpeaking">dozens of talks, on several different topics</a>, and loved every minute of it.</p><p>This led me to share with you why I think you should talk in meetups, too.</p><p>Yeah, sure, finding a job is also a reason, but I’m talking deep stuff here, people. I’m talking about fulfilment, about connection, collaboration, inspiration. I’m talking about stepping out of your comfort zone, integrating your personal self into your professional self, and vice versa.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/0*qlVnSZgL_pzm7bSp.jpeg" /></figure><h3>Everyone Is Rooting for You</h3><p>Giving a talk at a meetup is like preaching to the choir. Nobody comes to a meetup to make tease or to argue, that’s what the university is for. <br>The meetup crowd expects a pleasant, light evening, where they can learn something new in a friendly and casual environment.</p><p>People who go to meetups actively decide at the end of the work day that they are going to extend their brain hours, and they came all the way to listen to YOU, because they WANT to hear what you have to say. They are all rooting for you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*XhjOBfnEsUVxOyOs.jpg" /></figure><h3>What’s the Worst That Can Happen?</h3><p>Nothing. Indeed, that’s the worst that can happen. Nothing. Your talk will be mediocre and no one will remember any of it by tomorrow, and you will go back to your life as if none of this ever happened.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*tjzZYF83GOD6ZSoK.jpg" /></figure><p>What’s the <strong>best </strong>that can happen, you ask? Read on, my friend, read on.</p><h3>Excuse Me, May I Ask a Question?</h3><p>If you planned and practiced well, most chances are that your talk will be just fine (and then some!) for a meetup atmosphere.</p><p>And then, when you get off the stage, that’s when the magic starts to happen.</p><p>The people who approach you after the talk are people you can start a real conversation with. Ask them what <em>they</em> do, what advice can <em>they</em> share. Boost your professional network, and connect with people on an intellectual level.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/0*XZqhRW3sBH8Ops9b.jpg" /></figure><h3>Everyone Hates Mingling</h3><p>Meetups can hard… You must know how it feels to be there on the side, hoping this mingling thing will end and you can take your sit and wait for the talks to start…</p><p>But then, there are all these people talking to each other… probably even having interesting conversations you want to participate in… But how would you even start talking to strangers??</p><p>By being on stage! that’s how!</p><p>When you are the speaker (or if you gave a talk at a previous related meetup) you don’t have to worry about that. People will come to you. They remember your face, they remember what you talked about, and they might even have some questions about it. Next thing you notice, you are having an actual interesting conversation!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*O6oYSgGv-HwAWhgz.jpg" /></figure><h3>Teaching Is the Best Way to Learn</h3><p>Back in ancient Rome, philosopher Seneca claimed that “While we teach, we learn”. You must have experienced this yourself in one form or another - the best way to understand a concept is to explain it to someone else.</p><h3>Dan Abramov on Twitter</h3><p>Those who cannot teach, do.</p><p>The famous proverb says “Those who can, do. Those who can’t, teach.” This might have been true in the past, but in today’s highly connected, rapidly evolving world, it is common practice to do both. When you share your knowledge, both you and your audience become more proficient.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*D10uwxBctTEkMnr6Jzxy1A.png" /></figure><h3>Inspire and Be Inspired - the Best Feedback Loop You Can Get Stuck In</h3><p>Giving a talk about something you are passionate about, in a supportive environment, is just FUN.</p><p>And then having follow-up conversations with strangers and colleagues alike, it’s reassuring and empowering.</p><p>Furthermore, giving a professional talk about a subject you are passionate about, it causes a significant positive impact on how people perceive you. Both at work and in the professional community outside it. And being appreciated is nice, it really is. And it’s not even the whole story. The way I experience this appreciation in the most tangible way, is <strong>the feedback loop of inspiration</strong>.</p><p>When you speak publicly about what you know, people know in what matters to address you. Either you will know how to help, which is fantastic. Or you won’t, and then you learn something new yourself. In any case, both you and the people around you benefit from the fact that you decided to tell the world what you love and what you are good at.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*2MfFnNn45LKFBot7hUUM5A.png" /></figure><h3>OK, Sign Me In, Where Do I Start?</h3><p>As a Meetup organizer myself (<a href="https://www.meetup.com/Algorithms-Israel/">AlgoIL</a>, <a href="https://www.meetup.com/PyData-Tel-Aviv/">PyDataTLV</a>), I can tell you it’s as easy as writing to the organizers.<br>Yup, that’s all it takes.<br>Write a personal message to one of the organizers of a meetup you attend yourself, or even better, address them in person in one of the events, tell them what you are working on and ask whether they would like to give you the stage to share it with the community. It can also be a short lightning talk - many meetups hold such sessions, which can be a great opportunity for first time speakers. If you ask around enough, you will find the right stage for your ideas.</p><p>Good luck, and keep <a href="https://codeburst.io/technical-communications-c457b5c7da">sharing the knowledge</a> :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/0*0b2wqERiQf3nQA8R.jpg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3373557a8a7b" width="1" height="1" alt=""><hr><p><a href="https://codeburst.io/why-you-should-talk-in-a-meetup-3373557a8a7b">Why You Should Talk in a Meetup</a> was originally published in <a href="https://codeburst.io">codeburst</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Plotting with Pandas — Dates and Bar Plots]]></title>
            <link>https://codeburst.io/plotting-with-pandas-dates-and-bar-plots-227f25351274?source=rss-8cb8e88c4f51------2</link>
            <guid isPermaLink="false">https://medium.com/p/227f25351274</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[visualization]]></category>
            <dc:creator><![CDATA[Dalya Gartzman]]></dc:creator>
            <pubDate>Sat, 18 Jan 2020 15:43:17 GMT</pubDate>
            <atom:updated>2020-05-09T20:38:56.399Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gBlbh405bzSAiiWpOMv9ZA.png" /></figure><h3>Plotting with Pandas - Dates and Bar Plots</h3><p>Starting a new job is an exciting phase for me, but it also led me to the following sad realization - I left all my best copy-pastable code snippets behind!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*yYbzYAyPk93hBS5z.jpg" /></figure><p>To avoid such future catastrophes, I decided to start a habit of publicly documenting my favorite (and most non-trivial) code tricks.</p><p>I will start with something I already had to do on my first week - plotting. In this post I will focus on plotting directly from Pandas, and using datetime related features.</p><p>Hope you find this useful as well!</p><blockquote>For the full code behind this post go <a href="https://github.com/DalyaG/CodeSnippetsForPosterity/tree/master/PlottingWithPandas">here</a>.<br><strong>Versions</strong>: python 3.7.3, pandas 0.23.4, matplotlib 3.0.2</blockquote><h3>Step I - setting up the data</h3><p>In this post we will use the <a href="https://www.kaggle.com/aaronschlegel/austin-animal-center-shelter-outcomes-and">Austin pet adoption dataset from Kaggle</a>.</p><p>Let’s start with reading the data, keeping only relevant columns, and making sure that date columns are read as datetime types.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b3212dafebe85e76bada822945e0378c/href">https://medium.com/media/b3212dafebe85e76bada822945e0378c/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/348/1*MAGbM6R6E0a8jhJgOBiSSQ.png" /></figure><h3>Step II - Our Most Basic Plot</h3><p>Let’s make a bar plot by the day of the week.<br>For that, we will extract both the weekday_name and weekday_num so as to make sure the days will be sorted:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/146e86196984e332fa3b3b52252b8b86/href">https://medium.com/media/146e86196984e332fa3b3b52252b8b86/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*JVWPOlv3GQclffwEB6jx9Q.png" /></figure><p>And now we are ready to plot:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/413d72593b1911a65ba7cdfa02c4bbd2/href">https://medium.com/media/413d72593b1911a65ba7cdfa02c4bbd2/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*DOfCCn-NESeSFpvqU8pIUA.png" /></figure><h3>Step 3 - The Birthday Surprise</h3><p><a href="https://en.wikipedia.org/wiki/Birthday_problem">Basic statistics</a> show that in every group of 50 people (or pets) we have a 99% chance of having at least two people (pets) who were born on the same day of the year.</p><p>Let’s test this!</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/746254c4de85900a88029cda88cedd53/href">https://medium.com/media/746254c4de85900a88029cda88cedd53/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*F1ton0B9JzX5gnToz5oafg.png" /></figure><p><strong>Ho my, the dates look all messed up… Let’s try to sort this:</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/77cf17073c5fe3f0a42ee5e435791623/href">https://medium.com/media/77cf17073c5fe3f0a42ee5e435791623/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*eOML4jIZDQqsVF_bKsuDbg.png" /></figure><p>Looking much better now :)</p><h3>Step 4 - Plot by Pet Color</h3><p>Now we are ready for our final plot, showing stacked bars by pet color.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7bd8372eceecf91b3b14f681dacf0c27/href">https://medium.com/media/7bd8372eceecf91b3b14f681dacf0c27/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/257/1*_xJ65o7Oy3cP2whnco-I3A.png" /></figure><p>And now we are ready to make a beautiful plot:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7f7f3596425315267934d400920bfa9c/href">https://medium.com/media/7f7f3596425315267934d400920bfa9c/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*PRe_hAzNfTKaEGM63EppPw.png" /></figure><h3>And that’s it… Hope you found this useful!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/0*gBReTIjRmo77LH8v.jpg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=227f25351274" width="1" height="1" alt=""><hr><p><a href="https://codeburst.io/plotting-with-pandas-dates-and-bar-plots-227f25351274">Plotting with Pandas — Dates and Bar Plots</a> was originally published in <a href="https://codeburst.io">codeburst</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>