<?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[Avito - Medium]]></title>
        <description><![CDATA[Avito.ma official medium . - Medium]]></description>
        <link>https://medium.com/avito?source=rss----fa014475ecfc---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Avito - Medium</title>
            <link>https://medium.com/avito?source=rss----fa014475ecfc---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 17:05:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/avito" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Eliminating duplicates in an ever growing content nightmare]]></title>
            <link>https://medium.com/avito/eliminating-doublets-in-an-ever-growing-content-nightmare-f66c784a5a5e?source=rss----fa014475ecfc---4</link>
            <guid isPermaLink="false">https://medium.com/p/f66c784a5a5e</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[content]]></category>
            <category><![CDATA[avito]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <category><![CDATA[product-management]]></category>
            <dc:creator><![CDATA[Adil Houdhoud]]></dc:creator>
            <pubDate>Mon, 18 Dec 2017 12:12:20 GMT</pubDate>
            <atom:updated>2017-12-20T09:26:37.921Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dhbHrqP3trSplLkMs5bwZg.jpeg" /><figcaption>DD engine sorting through the duplicates (copyright Warner Bros)</figcaption></figure><p>Imagine the following: you’re a classified website, you rely on the content created by users to deliver a quality product to the general public with the minimum intervention from your side. Because at the end, you’re just a medium between the buyer and the seller. Now, how would you go about delivering the best user experience while relying totally on the goodwill of the publishers ? that’s a question that we ask ourselves every day of the week (the working days at least) and that is the core of our business as stated by the big boss Rolv Erik Ryssdal</p><p>“Empowering people in their daily life”.</p><p>One of the main inconveniences for our users is the irrelevance of ads, having to go through countless pages of the same repeated ads just to find what you’re actually looking for, sometimes you even give up when the ideal deal is just one page away. just like when you’re googling something and you find yourself reaching the dark and moist realm of what lies beyond the second page of google search results.</p><p>So what do we do? how do we solve this issue with the limited resources that we have?</p><h3>And then it dawned on us</h3><p>We sat for about 10 minutes and the following conversation took place</p><ul><li>Product manager: I keep stumbling upon the same ads again and again, may be we should something about it, users are complaining of the redundancy of certain ads.</li><li>Engineer: Indeed I was looking the other day for a raspberry PI and there was a flood of ads about desktop computers</li><li>Product manager: …</li><li>Engineer: I think we should do something about this…</li><li>Product Manager: what if we block people from reinserting the same ads?</li><li>Engineer: how ?</li><li>Product manager: I don’t want your job</li><li>Engineer: I’m going to compare each newly inserted ad with the rest of the user’s ads and block it if it was a duplicate</li><li>Product manager: sounds good to me, how much time do you need?</li><li>Engineer: two months</li><li>Product manager: One month seems logical</li><li>Engineer: how ?</li><li>Product manager: okay, one month it is</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*nWI8nIbfn9H_2PhEqVZENQ.gif" /><figcaption>The okayest okay</figcaption></figure><p>And then it started, the first version of the duplicate detection project.</p><h3>Vladimir I. Levenshtein</h3><p>Dr. Vladimir Levenshtein is considered the father of coding theory in russia, his contributions are present in many aspects of our everyday lives. One of his most well known creations is the foundation of most of today’s spell checking algorithms: “Levenshtein distance”. And that was the key to solving our problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/216/0*8omDwcFZ0w0rDVGb." /><figcaption>What a great guy!</figcaption></figure><h3>How a spell checker will help detecting duplicates ?</h3><p>Levenshtein distance is a way to measure the similarity between two strings. It works by calculating the changes necessary to go from a string (A) to a string (B). the greater the distance, the more different the more different the texts are.</p><p>Example:</p><p>we have two strings, the initial text (I) and the final text (F), we’ll refer to the Levenshtein distance function as DT.</p><p>If I = “adil” and F= “adil” then dt(I,F)=0 because the transformation from I to F required 0 steps</p><p>If I= “adil” and F= “adim” the dt(I,F)=1 because the transformation from I to F required 1 step (which is l =&gt; m)</p><p>So the greater the distance, the more different the texts are. And this is what we relied on first to detect when and how duplicate ads are inserted.</p><h3>That’s a great idea, let’s ruin it</h3><p>I will illustrate in the following schema how the first iteration of the duplicate detection project was implemented.</p><h4>The short explanation</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*ScxyoZRuSdQv9Em2X1JH6w.png" /></figure><p>Looks pretty basic! but the devil is in the detail, the big box that blatantly states that a check is performed is where the magic happens (or should have happened.. at least) and it’s in there where levenshtein distance is being put to use to solve our duplicate issue.</p><h4>The long explanation</h4><p>First an ad is submitted to the ad-insert process, the necessary checks are being performed (Checking for SQL injections lol!). if an ad is deemed “legit” then it is submitted to the “duplicate detector” process, in which the ad is ran against the database to check if the user is trying to republish that same ad about that damn hideous motorcycle that is way too expensive… anyway… the check is done database wise using a stored procedure that return a “score” ,that score is used to deem the ad “duplicate” or “unique”, here is a heavily edited version of the stored procedure that handled it:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ad7f5d835a41b2ad52f2f84c8f66eac3/href">https://medium.com/media/ad7f5d835a41b2ad52f2f84c8f66eac3/href</a></iframe><p>Lovely isn’t it ? it was a good solution, I will spare you the details on how it was implemented within the huge system and jump right into the what went wrong.</p><h3>(N° of users in a group * N° of ads per user* N° of ad parameters) = timeout</h3><p>So basically, to get a similarity score, the algorithm must compare the new data with the user’s existing data. however, there’s a catch..</p><p>Back in mid 2014 there was a recurring issue regarding the uniqueness of the users. because of the <a href="http://perspective.usherbrooke.ca/bilan/tend/MAR/fr/IT.CEL.SETS.html">rise of the telecom bubble in morocco</a>, getting a new phone number is cheaper than cheese burgers. and since Avito.ma imposes some restrictions regarding the number of ads that can be posted in <a href="https://www.avito.ma/fr/r%C3%A8glement.htm">certain categories</a>, some users resorted to create multiple accounts with multiple phone numbers to post the maximum of ads (users were limited by phone number or by email), so if a user has 3 phone numbers they can create 3 throw away phone numbers and have 3 times the number of allowed ads.</p><p>The solution that we came out with was to add a new concept called “User groups”, this is based on an algorithm that uses “certain” parameters to determine whether or not you are the same user using different accounts or not and places your account in your according group. We let the groups grow on their own with no moderation of human intervention. and it proved to be quite handy.</p><p>Fast forward to the implementation of the 1st duplicate detection project. Things ran smoothly and we reveled watching the N° of duplicates drop, we even built new daring projects on top of the duplicate trap. little did we know that there was a great danger lurking in the shadows of the Database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*frKI4bwBj2kgO-LL610t_g.gif" /></figure><p>Avito.ma is on of the fastest growing websites in morocco, which means that whatever code we write in 2014 will probably have to be optimized again in 2015, 2016.. etc. and this is the trap that we fell right into. the User groups logic yielded some great results but also resulted in one of the most dangerous situations we have ever encountered as a tech team: CONSTANT DATABASE TIMEOUTS. it started in early 2016, we noticed that database queries are taking a bit more time than usual, we snooped around and realized it was the duplicate check that was taking long, some more snooping we figured out something really scary. the grouping algorithm went WILD, instead of grouping accounts it started grouping groups of accounts. so instead of adding one single account to a group, it ads all the accounts in the same group to a new group. and we ended up with groups up to 500 users and some totaling more than 30000 ads per group. and knowing that the duplicate detection system compares all ad data with stored data and assuming that an ad has about 6 parameters (subject, body, price, address…etc) we could have something like (30000 * 6) comparison operations when inserting a single ad. multiplying that with the insane amount of ads posted daily, we come out with a crazy number of operations per day just to ensure the uniqueness of ads. something had to be done… quickly..</p><h3>The incredible super mega engineering task force</h3><p>The CTO called for a task force to be assembled after the day the database gave in and decided to timeout all requests. we were literally removed from our desktops and put on a different floor to fulfill one task: GET THINGS WORKING AGAIN. Initially we were three, 1 super mega devops (AKA the real wonder woman), 1 insane backend developer (Actually insane) and I. We started contemplating different solutions to these multiple issues we’re having… How can we propose one magic solution that will get us out of this mess.. if only there was a system where we can perform rapid comparison operations and where all the necessary data could be stored and retrieved immediately… something completely detached from the Database…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*dicW1Gdt-h0TxhWDv79hyw.png" /><figcaption>Photo taken the day of the assembly</figcaption></figure><h3>Elasticsearch</h3><p>according to their official <a href="https://www.elastic.co/">website</a>:</p><blockquote>Elasticsearch is a distributed, RESTful search and analytics engine capable of solving a growing number of use cases. As the heart of the Elastic Stack, it centrally stores your data so you can discover the expected and uncover the unexpected.</blockquote><p>We studied the idea of implementing Elasticsearch as a duplicate detection system for about two weeks. quick POCs, boring talks, bitter realizations and fruitless meetings… and then we decided we’re going to go all in with this suggestion.</p><p>The project itself was divided into multiple sub projects, each of us was leading a specific aspect of the implementation:</p><ul><li>Setting up elasticsearch cluster and all infra/devops operations (<a href="https://medium.com/u/718550ed946f">Dounia Alla</a>)</li><li>Indexing data in elasticseach (<a href="https://medium.com/u/6a2a089adc50">Adil Houdhoud</a>)</li><li>Using elasticsearch as a duplicate detection engine (<a href="https://medium.com/u/6180698fc71d">Hamza Aid</a>)</li></ul><p>So basically my task was to ensure that all needed data is indexed properly in ES without affecting database performance.</p><h3>Indexing data</h3><p>The first step of indexing the data was to determine which data to be indexed, of course for the sake of duplicate detection we could have indexed just the parameters needed for the check, but that would have been a waste of the potential of this project, so while the project was sold to the management and other stakeholders as a duplicate detection engine, we were secretly working on indexing EVERYTHING we have. For this purpose we needed a good indexing strategy.</p><h4>The different players</h4><p>Here’s an overview of the deployed solution:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*hWyIRVMd7BLW3K2DxgEYBw.png" /></figure><h4>Database</h4><p>A postgresql database, nothing special. though we had a secret weapon that facilitated the indexing process, we keep track of all actions performed on ads in separate tables, each ad change has its unique id, timestamp…etc, which means we could easily fully index the ads and update (reindex) changed ads (edits, deletes, deactivations…etc) on elasticsearch.</p><h4>Notify</h4><p>Postgres provided a cool feature which allows sending notifications when certain events are triggered, the official <a href="https://www.postgresql.org/docs/9.0/static/sql-notify.html">Notify documentation</a>:</p><blockquote>The NOTIFY command sends a notification event together with an optional “payload” string to each client application that has previously executed LISTEN channel for the specified channel name in the current database.</blockquote><p>we setup some triggers to track all changes to data and created and function that gets called every time an action is performed on ad.</p><p>This is an example of an insert</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a98d5e474cda3cc122fc7ba037f38768/href">https://medium.com/media/a98d5e474cda3cc122fc7ba037f38768/href</a></iframe><ul><li>Index_tracking: A table that we use to track all indexing actions.</li><li>NEW.id: the new id of the inserted ad</li><li>‘Notification_channel’: the name if the channel that the indexing daemon is listening to, used by <a href="https://www.postgresql.org/docs/9.0/static/sql-notify.html">pg_notify</a> function</li><li>TG_TABLE_NAME: the name of the table that triggered the event</li><li>TG_OP: the name of the operation performed (insert, update..etc)</li></ul><h4>Indexing Daemon</h4><p>This is a service dedicated to indexing (and reindexing) data. it relies mainly on the ‘notify’ feature of postgres, it listens for the ‘Notification_channel’ we set in the trigger.</p><p>When “notified”, it retrieves the ad’s data from the database using the id sent in the notification, then it sends the new data to elasticSearch for indexing.</p><p>It works using two mods: batch and realtime. for the batch mode it gathers ids sent in the notifications for a specific period of time (usually 10 to 20 seconds) before selecting the data from the DB to be indexed, Realtime mode on the other hand is… realtime.</p><h4>ElasticSearch cluster</h4><p>We’re using <a href="https://aws.amazon.com/elasticsearch-service/">Amazon’s elasticSearch</a> cluster service. Reliable and spares us a lot of hassle in maintaining and configuring the service.</p><ul><li>duplicate Detection microservice</li></ul><p>nicknamed OWL, a REST microservice written in golang (by <a href="https://medium.com/u/6180698fc71d">Hamza Aid</a>) that handles the qualification of duplicates using two phases, first it stars by getting possible similar ads for a given ad from elasticSearch using lucene’s <a href="https://lucene.apache.org/core/3_0_3/api/contrib-queries/org/apache/lucene/search/similar/MoreLikeThis.html">moreLikeThis function</a>, then, it runs the results against the original ad info using a Levenshtein distance function.</p><p>We also experimented with some <a href="https://en.wikipedia.org/wiki/Jaro%E2%80%93Winkler_distance">Jaro-winkler</a> based algorithms (props to <a href="https://medium.com/u/3d1f3c2473f2">Soufiane Mghanen</a>) but at the moment Levenshtein is our favorite.</p><p>Here is a snippet of the <a href="https://en.wikipedia.org/wiki/Jaro%E2%80%93Winkler_distance">Jaro-winkler</a> implementation we’re experimenting with, more at <a href="https://github.com/xrash/smetrics">https://github.com/xrash/smetrics</a>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/eaf0f168d87f4cadd44dd2f0fee6562f/href">https://medium.com/media/eaf0f168d87f4cadd44dd2f0fee6562f/href</a></iframe><h3>And then??</h3><p>Here we have it, some fancy algorithms along with indexed data in elasticSearch. How this system is exploited? and how does it fit within out existing workflow?</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FToMjGpz81S7usvTIM8w%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fhero0fwar-caddy-shack-ToMjGpz81S7usvTIM8w&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FToMjGpz81S7usvTIM8w%2Fgiphy-downsized-large.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="245" frameborder="0" scrolling="no"><a href="https://medium.com/media/8a951ce5f2ffd5d868b27f8ce75e9b3c/href">https://medium.com/media/8a951ce5f2ffd5d868b27f8ce75e9b3c/href</a></iframe><h4>Frontend? backend ?</h4><p>This duplicate detection or DD in short (too late for than now) is implemented in multiple places within our platform(s), I’ll highlight the implementation in two strategic places:</p><h4>Frontend detection</h4><p>The frontline of defense, we call it internally “frontend detection” but in reality it all happens in the backend. this one is triggered when an ad is inserted. Right after clicking the “submit” button, a query is sent to the duplicate detection microservice “nicknamed OWL” to get a score. depending on this score we either accept the ad or reject it and display to the user that he already has a similar ad lurking somewhere (we even point the user to the original ad) and that he can either deactivate the old ad or renew it.</p><h4>The duplicates queue</h4><p>All ads are moderated, some automatically and some manually. for this reason we have set up a duplicate detection module within the moderation system. The DD module crawls the inserted ads for duplicates and flags each one with a specific… flag. there are two flags:</p><ul><li>Black flag: this ad is definitely a duplicate, it is rejected automatically</li><li>Potential duplicates flag: this ad might be a duplicate, it is moderated manually and it’s up to the moderator ( a human being) to judge.</li><li>An ad that is not a duplicate is simply not flagged.</li></ul><h3>Leap of faith</h3><p>The entire project was a leap of faith, we didn’t have much time to contemplate all the possible solutions and we put all the possible faith into this project. and boy oh boy, it did pay off.</p><h4>Database impact:</h4><p>We went from constant 100% CPU usage and none stop timeouts to an average of &lt; 30% at peak hours. the impact was instant, within minutes the drop was noticed.. and virtual champagnes were popped.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*y6m-VAbz97DjTb2MgTIfXg.gif" /><figcaption>Grape juice</figcaption></figure><h4>Impact on the content</h4><p>The amount of complains that we have received after the deployment of the DD project was just… amazing to watch (not from the costumer support perspective of course) The users that were accustomed to spamming the website with duplicates are now furious about the “new” change. The CS team and the content product manager did a great job in raising awareness about the important of having clean content on the website and how beneficial it is for both buyers and sellers.</p><p>Here are some aspects regarding the impact of the DD project on content:</p><ul><li>70% drop of duplicates within one year period</li><li>Improvement of manual moderation time: time spent moderating duplicates is now spent improving the quality of the content</li><li>A slight drop in content but a huge improvement of the content quality</li></ul><h3>And that’s it!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*S5Kj5FQMTGe1goylo-alYw.gif" /><figcaption>Product managers rejoicing after impact study was published</figcaption></figure><p>All in all, the project was ACE! it positively impacted content, moderation, QA, revenues and many other aspects of our daily lives at <a href="http://www.avito.ma/">Avito.ma</a>, it solidified our position as the leader of classified websites in morocco (by far) in both content and quality, and also presented a window for the tech/product team to work on something new and experiment with cutting edge technology.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f66c784a5a5e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/avito/eliminating-doublets-in-an-ever-growing-content-nightmare-f66c784a5a5e">Eliminating duplicates in an ever growing content nightmare</a> was originally published in <a href="https://medium.com/avito">Avito</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Illuminate your path using Kotlin to build your new Android custom components]]></title>
            <link>https://medium.com/avito/illuminate-your-path-using-kotlin-to-build-your-new-android-custom-components-3a30f176bba5?source=rss----fa014475ecfc---4</link>
            <guid isPermaLink="false">https://medium.com/p/3a30f176bba5</guid>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Bachiri Taoufiq Abderrahman]]></dc:creator>
            <pubDate>Thu, 14 Dec 2017 18:42:00 GMT</pubDate>
            <atom:updated>2017-12-14T18:42:00.252Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NFeeHUcGFZmvtnUjf-ol2w.png" /></figure><p>Kotlin is the new chaos that penetrated suddenly all the tech teams all over the world since google have fully supported it and integrated it within their Android Studio IDE and considered it as a stable language, and as as a result of this movement, soft -or even brute- actions need to be considered in order to be fully operational and familiar with Kotlin. To contribute to this movement, I decided to write an article combining android and Kotlin. This isn’t not a step by step Kotlin tutorial, but it’s a kind of helper for Android developers migranting to Kotlin who want to build their new custom views using Kotlin, and also for Android developers who are willing to externalize their custom UI components into a separate library (usually big compagnies do that).</p><p>For the new Kotlin Developers I’ll attach some links for you to unearth and discover.</p><p>I will begin by talking about custom views and how they are developed. Afterwards, I am going to build a custom component using Kotlin and dig into more details about different building blocks of Custom views.</p><h3>Custom views</h3><p>When developing your android application you usually use the built-in widgets, and when you stumble upon a complex UI you feel the constraints and the limitations. So to alleviate the burden and have more freedom, the Android Api gives you the ability to use the already existing widgets and create your own sculptures.</p><p>To create our custom component we can use one of the android UI’s building blocks: Views or ViewGroups. The View is for drawing and event handling, and it’s the base class for all android widgets (Buttons, Imageviews, Space, ProgressBar) , and the ViewGroup is the base class for layouts that can contain and hold other views or view groups. See the picture bellow for more details .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*8Ct6HOmYYkDb5iqIKxreFA.png" /><figcaption>View is the parent of all android UI Components</figcaption></figure><h3>Creating Our custom component Step by Step</h3><p>The Main and important parts of every Android view drawing process are measurements, Laying out and Drawing.</p><p>The <strong>Measure</strong> phase: Each parent (container) gives to it’s children the constraint to respect and the children decide what to occupy vis à vis those constraints.</p><p>The <strong>Layout</strong> phase: Each parent is aware of how the children will be positioned.</p><p>The <strong>Draw</strong> phase: Once M<em>easure</em> and <em>Layout</em> phases are complete, the parent draws itself and requests its children to draw themselves.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*W5OiFW_zxbuU6Z_qG8SNRQ.jpeg" /><figcaption>Measure, Layout, Draw = Measure, layout, Build</figcaption></figure><p>All the three methods above are present in the android API as follows: onMeasure() ,onLayout(), onDraw() .</p><p>you may need to use all the three methods if you are building a fully customized UI component ,but in our examples we are going to be interested in the onDraw method.</p><h4>1. Step one: Overriding the View and customizing it</h4><p>After choosing your custom view (View, Button, Textview), it’s time to inherit its properties and override its methods (I chose Button as the desired view to customize).</p><pre>class CustomButton : Button {//...}</pre><p>The main entries for Views are constructors so we need to override the default constructors:</p><pre>constructor(context: Context) : super(context) {}</pre><p>The one argument constructor is used when creating an instance with the new keyword which means creating the view in code.</p><pre>constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {<br>//...  <br>}</pre><pre>constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs,<br>    defStyleAttr) {<br>  //...<br>}</pre><p>The other constructors -including the two and three arguments constructors- are used when inflating the views from XML, the AttributeSet are the attributes of the XML tag of that view, the defStyleAttr is for styling the component.</p><p>There is a more reduced approach mentioned in this article by <a href="https://antonioleiva.com/custom-views-android-kotlin/">Antonio Leiva</a> for overriding the view constructors using @JVMOverloads Annotation.</p><h4>2. Define your custom attributes</h4><p>When creating a simple built-in view you specify many attributes like the height, the width, the text for text views and so on. Those attributes are already created with the android API, so to create our custom attributes for our custom view, it’s simple:</p><pre>&lt;resources&gt;<br>&lt;declare-styleable name=&quot;CustomButton&quot;&gt;<br>  &lt;attr name=&quot;pressed_color&quot; format=&quot;color&quot;/&gt;<br>  &lt;attr name=&quot;unpressed_color&quot; format=&quot;color&quot;/&gt;<br>  &lt;attr name=&quot;round_radius&quot; format=&quot;dimension&quot;/&gt;<br>  &lt;attr name=&quot;btn_radius&quot; format=&quot;dimension&quot;/&gt;<br>  &lt;attr name=&quot;btn_shape_type&quot; format=&quot;enum&quot;&gt;<br>    &lt;enum name=&quot;circle&quot; value=&quot;0&quot;/&gt;<br>    &lt;enum name=&quot;rectangle&quot; value=&quot;1&quot;/&gt;<br>  &lt;/attr&gt;<br>&lt;/declare-styleable&gt;</pre><pre>&lt;!--.--&gt;</pre><pre>&lt;resources&gt;</pre><p>We have created our custom attributes within the res.xml file</p><p>3- Customize your view</p><pre>&lt;io.bachirio.CustomButton<br>    android:layout_width=&quot;wrap_content&quot;<br>    android:layout_height=&quot;wrap_content&quot;<br>    app:pressed_color=&quot;@color/login_button_pressed&quot;<br>    app:btn_shape_type=&quot;rectangle&quot;<br>    app:unpressed_color=&quot;@color/login_button_unpressed&quot;<br>    /&gt;</pre><p>After defining your desired attributes now you should use your attributes in your XML layout</p><pre>val typedArray = context.obtainStyledAttributes(attrs, R.styleable.<em>CustomButton</em>)<br>pressedColor = typedArray.getColor(R.styleable.<em>CustomButton_pressed_color</em>,<br>    <em>resources</em>.getColor(R.color.<em>pressed_color</em>))<br>unPressedColor = typedArray.getColor(R.styleable.<em>CustomButton_unpressed_color</em>,<br>    <em>resources</em>.getColor(R.color.<em>unpressed_color</em>))</pre><p>We retrieve the xml attributes using the AttributeSet attributes provided via the constructor, we can’t access them directly but we can get them using the above method. In the example above we get <em>btn_shape_type, pressed_color</em> and <em>unpressed_color.</em></p><p>So this is my little story about building a custom view using Kotlin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*6G0bmSdWpI2fVytlbGHRqg.png" /></figure><p>You can find all the code above hosted in my personnel <a href="https://github.com/bachiri/CustomButtonsAndroid">Github</a> repo as a growing Library. The article and Library will be updated regularly.</p><p>Please feel free to reach out to me for any update related to this library, or contribute directly for the hope to make it a reference for customized <strong>dazzling</strong> buttons using Kotlin.</p><h4>Resources to start Learning Kotlin</h4><ul><li>The official website kotlinlang.org.</li><li>Course in <a href="https://www.safaribooksonline.com/library/view/advanced-kotlin-programming/9781491964149/">safariBooks</a> made by Hadi Hariri.</li><li>Useful Articles in Medium .</li></ul><blockquote>The best Thing that will help you grow your coding muscles is by training and doing various coding movement so think about a small project and start Kotling it .</blockquote><h4>Credits</h4><p><em>Figure 2 : </em><a href="http://source http://sabremedia.co/how-to-measure-for-kitchen-cabinets/how-to-measure-for-new-kitchen-cabinet-doors-diy-cabinets-painting-draw-rough-sketch-once-decided-layout-total-space-wall-edge-penin/"><em>Source</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a30f176bba5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/avito/illuminate-your-path-using-kotlin-to-build-your-new-android-custom-components-3a30f176bba5">Illuminate your path using Kotlin to build your new Android custom components</a> was originally published in <a href="https://medium.com/avito">Avito</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevOps in a startup. A myth or a reality]]></title>
            <link>https://medium.com/avito/devops-in-a-startup-a-myth-or-a-reality-5d6f9e7da045?source=rss----fa014475ecfc---4</link>
            <guid isPermaLink="false">https://medium.com/p/5d6f9e7da045</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Dounia Alla]]></dc:creator>
            <pubDate>Fri, 08 Dec 2017 16:02:59 GMT</pubDate>
            <atom:updated>2017-12-08T18:22:51.690Z</atom:updated>
            <content:encoded><![CDATA[<p>What is DevOps ? it’s a way of thinking and a way of working. It’s a blend of the tasks undertaken by the development and operation teams to make application delivery faster and more <strong>effective.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*5-dSGWAM7ec5LEgUzuNZwA.png" /></figure><p>Adapting this new vision in a startup isn’t as simple as it seems to be. Why is that ? In DevOps we can state 3 principles that all the DevOps patterns can be derived from, those principles are :</p><ol><li>Systems thinking : It emphasizes the performance of the entire system, as opposed to the performance of a specific silo of work or department. The focus is on all business value streams that are enabled by IT. The outcomes of putting this principle into practice include never passing a known defect to downstream work centers, never allowing local optimization to create global degradation, always seeking to increase flow, and always seeking to achieve profound understanding of the system (as per Deming).</li><li>Amplify feedback loops : This is about creating the right to left feedback loops. The goal of almost any process improvement initiative is to shorten and amplify feedback loops so necessary corrections can be continually made. The outcomes of this principle include understanding and responding to all customers, internal and external, shortening and amplifying all feedback loops, and embedding knowledge where needed.</li><li>Culture of continual experimentation and learning: This is about creating a culture that fosters two things: continual experimentation, taking risks and learning from failure. But we need to understand that repetition and practice are the prerequisite to mastery, because we need both of them equally. Experimentation and taking risks are what ensures that we keep pushing to improve, even if it means going deeper into the danger zone than we’ve ever gone. And we need mastery of the skills that can help us retreat out of the danger zone when we’ve gone too far. The outcomes of this principle include allocating time for the improvement of daily work, creating rituals that reward the team for taking risks, and introducing faults into the system to increase resilience.</li></ol><p>For a startup choosing among these principles isn’t simple at all, it needs a lot of sacrifices in short term to have a good final result in long term.</p><h4>The Beginning:</h4><p>Hiring a DevOps isn’t just recruiting someone to do the operations and some developments, it needs the implication of the entire organization. In Avito.ma the idea of hiring the first DevOps came with the decision of migrating from a datacenter to the cloud, which in our case was AWS, so we needed someone experienced on the Cloud to manage our stack.</p><p>At first that person started by setting up the stack in the cloud using an in-house tool that took the description of a running system and had the possibility of running the stack of a website / service / application in a cloud platform of choice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*1_M2lXbeJdnwVBP2w6jc4g.png" /><figcaption>Migration tool from Datacenter to Cloud</figcaption></figure><p>After that he did the setup of some basic monitoring using zabbix, but the problem is that the developers were still following the same pace, having the stack in the cloud didn’t change anything for them, PMs too kept dealing with the product as if nothing changed. This is not DevOps.</p><p>As the business started to grow, new features needed to be deployed, and we started having problems, bugs were increasing, performance was going down, time to push anything to production was increasing, deployment was manual, we had a lot of rollbacks, everyone was complaining: Devs, CS, PMs, Salesmen, Managers … We were literally on the pitfall of hell, when someone said “ Let’s go to prod ” it was like suicide for us.</p><p>That’s when our DevOps Engineer took the leadership to change the current state, but a change isn’t done overnight, it takes time and it needs the help from everyone.</p><h4>The Reorganization:</h4><p>The first step towards heaven was reorganization, which helped stabilize the product on the long run. So we started by creating teams with different scopes, this new change created a sense of ownership for the products among the team members (developers, tech lead, product manager). In the meantime we created another team consisting of 2 DevOps whose clients were mainly developers who started delivering quicker than before since now they own a specific scope. The main issue was that with time the technical debt for the DevOps team started to increase, and our job became just fixing problems, dealing with performance and not improving anything. (<em>For those of you who don’t know, technical debt is a debt that you acquire when you don’t do any analysis for capacity and demand before accepting work, which makes you always scrambling, having to take shortcuts which means more fragile application in production, and that implies more unplanned work in the future, and like financial debt the interest cost grows over time.) </em>But like Darwin said:</p><blockquote>It is not the strongest of the species that survive, nor the most intelligent, but the one most responsive to change.</blockquote><h4>Measure anything, measure everything:</h4><p>The second step after the organizational change was the assessment of the current state, as a result we suggested that we need to work on projects with added value to the developers instead of dealing just with support, and that required some compromises from all the teams that became more implicated in the troubleshooting and resolution of all the issues, and whenever they needed a request from the DevOps team, the Teach Lead summited the request and needed to follow a predefined process that had a reasonable SLA.</p><p>Once the DevOps team had enough time, we started doing our real job. And of course the first project that came to our mind was the setup of a good monitoring tool, which needs to cover all the necessary metrics with alerts of course. And when we talk about metrics we need to differentiate between 3 kinds of metrics:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/1*YCTu_PnOdzPkqSWtp6uOYA.png" /><figcaption>Types of metrics</figcaption></figure><p>As for the tools, we chose Datadog and Prometheus/Grafana since each solution has its own usage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*awL9nUkqKLOaWAKPp3AQSg.png" /><figcaption>Datadog Dashboard</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a0lmkqB9-oblwogHgG85sg.png" /><figcaption>Grafana Dashboard</figcaption></figure><h4>Automation everywhere</h4><p>The monitoring is working without problems now, and the next project that comes to mind is automating the deployment, which can be considered as a seed for CI, because we can have beautiful dashboards, but if the deployment/rollback is done manually, everyone will still be afraid to deploy.</p><p>After a little brainstorming DevOps team presented the pipeline to the developers and we discussed with them some important points:</p><ul><li>Difference between flavors during the build</li><li>Ports used for communication between services</li><li>Https and SSL termination</li></ul><p>Working on automating the deployment would require the existence of a QA and a Pre-production environment, with local configuration similar to the Production. The tool that we used for the pipeline was Jenkins that we hosted in our own cloud, we put it under sources control so that we keep track of the changes in the pipeline, that had 7 stages:</p><ul><li>Preparation: prepare the environment used for the build</li><li>Checkout: get the specific branch that needs to be deployed</li><li>Build: build the packages according to the environment variables</li><li>Publish: publish the artifacts to S3</li><li>Deploy: Installed each package in its specific server and restart the services</li><li>Clean up: Clean up the old installed packages</li><li>Notification: Send a notification about the status of the deployment (success or failure)</li></ul><p>But since we weren’t going to deal with a lot of deployments we needed just one master and no slave. And in order to launch the pipeline we needed of course some parameters:</p><ul><li>The environment (QA, Pre-prod, Prod)</li><li>The type of deployment (platform, feature, fix)</li><li>The branch to deploy</li><li>Finally the country, because we were deploying our code for 2 different countries.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HrWT3u-8eQb6TrrxMzd7vQ.png" /><figcaption>Jenkins Deployment Pipeline</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*rkdgrUPQC2CenSxMI-ISzA.png" /><figcaption>Jenkins Pipeline parameters</figcaption></figure><h4>Are we on the right track ?</h4><p>Now that the automating project is finished, our KPIs improved exponentially and our feedback loop with developers became constant:</p><ul><li>Frequency of code deployment: Increased from 1 time per month or 2 weeks, to an average of 3 times per day</li><li>Code deployment lead time: Decreased significantly, since users started receiving rapid bug fixes, and new features started hitting the market right on time and have a big impact.</li><li>Change failure rate: Also decreased, since we started having less and less failures during deployments.</li><li>MTTR (Mean time to repair): Now that developers can deploy quickly, they can fix bugs without delays which decreased the MTTR.</li><li>MTTF (Mean time to failure) and MTBF (Mean time between failure) : We started having less and less failed deployment, and that is caused by the fact of having QA environments close to the Prod environment.</li></ul><p>But having an automatic deployment isn’t everything, we need to reach the final stage of Continuous Integration by integrating more automatic tests, (unit test, integration test, regression test, acceptance test, performance test) because we don’t want our developers to start having the IWOML syndrome (it works on my laptop), even if it’s just with the QA environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/1*XhoOFFPCb4odNvw2ZPoSSQ.gif" /></figure><h4>Monolithic vs Micro-services , are we going back to hell ?</h4><p>Since our platform is monolithic, it was very hard for the developers to add new functionalities, so they started adding micro-services for everything. And for a DevOps handling a lot of micro-services would bring us back to our old nightmare. So we found out that we need to work on a solution that would allow us to :</p><ul><li>Have a dev / QA / prod environment for the microservices</li><li>Allow the micro-services to be discovered and added to the CI server</li><li>Allow the developer to ship the micro-service in a container to a private registry following a naming convention</li><li>Restrict access to authenticated users via VPN</li><li>The provisioning of the platform needs to be automatic</li><li>The platform needs to scale in and out</li><li>We need to monitor the platform : health, metrics, logs</li><li>Secure the communication between all the services</li><li>Assure the High availability of the service.</li></ul><p>After some benchmarks we came to the conclusion of using Kubernetes with Docker:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KNereoUAc2x1rheQyLtgnw.png" /></figure><p>The implementation should allow us to create, update and manage multiple environments of the K8s cluster infrastructure automatically, and we decided to use Terraform as a tool for Infrastructure as a Code, etcd for service discovery, and flannel in order to manage the network. I’ll go more in details about this setup in another article.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*hXc7QvwKOfr-GYOHHxS2HA.png" /></figure><p>We in the DevOps team didn’t have a guideline of projects that we should develop, we started from what we had and then we followed our needs, or more like developers’ needs. We still have a lot of things to improve, but as long as the DevOps mindset is living in the heart of every developer, we won’t have any problem. And like the Godfather of DevOps said:</p><blockquote>“DevOps is not a goal but a never-ending process of continual improvements.” Jez Humble .</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d6f9e7da045" width="1" height="1" alt=""><hr><p><a href="https://medium.com/avito/devops-in-a-startup-a-myth-or-a-reality-5d6f9e7da045">DevOps in a startup. A myth or a reality</a> was originally published in <a href="https://medium.com/avito">Avito</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ils rampent bien délicatement vers vous.]]></title>
            <link>https://medium.com/avito/ils-rampent-bien-d%C3%A9licatement-vers-vous-5ca96bdd44da?source=rss----fa014475ecfc---4</link>
            <guid isPermaLink="false">https://medium.com/p/5ca96bdd44da</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[innovation]]></category>
            <category><![CDATA[bots]]></category>
            <category><![CDATA[avito]]></category>
            <category><![CDATA[startup]]></category>
            <dc:creator><![CDATA[Fatima E. Boutayeb]]></dc:creator>
            <pubDate>Thu, 07 Dec 2017 11:10:12 GMT</pubDate>
            <atom:updated>2017-06-05T14:03:12.309Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Il était un temps où on entendait parler des bots (robots, oui!) dans les films d’action … Maintenant tout le monde commencent à s’intéresser à l’intelligence artificielle, et messenger a ouvert une plateforme dédiée à leur création!</em></p><p>Les bots ne s’en prendront pas directement à nous, et notre travail! Non, non … ils sont bien plus malins que ça! Leur premier défi est de faire des applications mobiles et des sites web des plate-formes caduques et archaïques. Comment pourraient-ils ? C’est ce dont cet article parle!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*WRARyUYME6p1eJ7TFfdN0g.gif" /></figure><h3><strong>Un bot, c’est quoi?</strong></h3><p>Un bot est un programme qui opère comme un agent pour un utilisateur ou pour un autre programme, et parfois pour simuler une activité humaine.</p><h3><strong>The rise of messaging!</strong></h3><p>Vous ne le savez peut-être pas, mais les applications de messagerie ont une croissance incroyablement rapide. Facebook Messenger est utilisé par plus d’un milliard de personnes chaque mois et cette app se développe plus rapidement que Facebook même. Inutile de mentionner Whatsapp, la popularité de ce géant de la messagerie va au-delà des cultures, des langues, et des appartenances de toute forme.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*n9gk4D2iYgHvbE6Bp3wxIQ.png" /><figcaption>Check the <a href="http://www.businessinsider.com/facebook-messenger-and-whatsapp-dominate-2015-9">source</a></figcaption></figure><p>Les applications qui ont les meilleures chances de survivre une désinstallation sont bien les interfaces de messageries instantanées. Ce qui est une très bonne nouvelle pour les Bots, ces interfaces présentent pour eux le terrain fertile dans lequel ils vont pouvoir se développer, et se multiplier.</p><h3><strong>Les bots du début du 21ème siècle.</strong></h3><p><em>Ils répondent tout de suite à vos envies, et ne vous laisseront jamais tomber contrairement aux humains! </em>🤖💙</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/264/1*2_-UXIqaJvVNKFjphYIHBA.gif" /></figure><p>Nous nous familiarisons maintenant avec les Bots à travers des conversations qui servent aujourd’hui de plateforme, plus besoin d’installer une application. Initier une conversation avec un bot comme on le ferait avec un ami suffit pour profiter des services d’une application, ce qui réduit les chances de souffrir du fameux syndrome “app fatigue”. En effet, naviguez d’une application à une autre pour avoir une réponse rapide à créer une demande pour les Bots qui peuvent répondre à ce besoin à travers une conversation sur messenger.</p><p>Alors pourquoi se casser la tête à installer autant d’applications quand on peut; commander à manger, s’acheter ce qu’on veut, réserver une chambre d’hôtel, et pourquoi pas avoir la compagnie de Christian Gray (le personnage principal de la nouvelle Fifty Shades of Gray) sur une seule interface de messagerie?</p><h3><strong>Chaque entreprise va avoir un robot.</strong></h3><p>Construire des applications et les promouvoir devient plus coûteux en plus coûteux dans un marché très compétitif. Pendant ce temps, l’enthousiasme des utilisateurs diminue, car ils trouvent que le téléchargement d’applications et la navigation entre eux devient un problème. Un quart de toutes les applications téléchargées est abandonnées après un seul usage. Aussi, les services à la clientèle pourraient utiliser des robots pour automatiser les demandes répétitives. L’intelligence artificielle actuelle n’est pas encore prête pour automatiser entièrement les services à la clientèle, mais elle va certainement améliorer sa qualité et assurer une présence pour les clients 24/7. À noter aussi que les gens préfèrent contacter les entreprises par des messages plutôt que par téléphone ou courrier en tant que canal.</p><h3>Vont-ils s’en prendre à mon métier?</h3><p>Même si les Bots ont encore du chemin à faire pour remplacer les sites web/applications, ils se sont déjà emparé de certains métiers de façon surprenante ! Vous pouvez maintenant faire une consultation médicale avec un <a href="https://www.buoyhealth.com/">Bot</a>; ça ne vas certainement pas remplacer un médecin, mais c’est plus crédible que les forums qu’on visite au moindre bobo ou doctissimo, et la visite est gratuite ! <a href="https://www.avito.ma/">Avito.ma</a>, le premier site de petites annonces au Maroc, a compris l’importance de se lancer dans cette aventure le plus tôt possible. Son laboratoire d’innovation travaille sur la conception, et la réalisation du premier assistant d’achat marocain. Maintenant, si vous voulez acheter sur Avito, vous pouvez transformer votre expérience d’achat avec <a href="https://www.messenger.com/t/503118316745816">le Bot Avito</a>.</p><p>Vous avez peur pour votre travail ? Petit quiz pour savoir si vous devez commencer à vous inquiéter ou pas -&gt; <a href="https://willrobotstakemyjob.com/">https://willrobotstakemyjob.com/</a></p><h3><strong>Vous voulez peut-être vous y mettre aussi ?</strong></h3><p>Jetez à oeil à cette liste d’outils qui vont vous permettre de construire votre premier robot! Zéro compétences en code requis, et les tests sont gratuits!</p><ul><li><a href="https://api.ai/">https://api.ai/</a></li><li><a href="https://rundexter.com/">https://rundexter.com/</a></li><li><a href="https://flowxo.com/">https://flowxo.com/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ca96bdd44da" width="1" height="1" alt=""><hr><p><a href="https://medium.com/avito/ils-rampent-bien-d%C3%A9licatement-vers-vous-5ca96bdd44da">Ils rampent bien délicatement vers vous.</a> was originally published in <a href="https://medium.com/avito">Avito</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What can weaken your Growth hacking strategy ?]]></title>
            <link>https://medium.com/avito/what-can-weaken-your-growth-hacking-strategy-53f7ab7e8d23?source=rss----fa014475ecfc---4</link>
            <guid isPermaLink="false">https://medium.com/p/53f7ab7e8d23</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[growth]]></category>
            <category><![CDATA[retention]]></category>
            <category><![CDATA[marketing]]></category>
            <category><![CDATA[growth-hacking]]></category>
            <dc:creator><![CDATA[Badr El Fahim]]></dc:creator>
            <pubDate>Thu, 07 Dec 2017 11:09:03 GMT</pubDate>
            <atom:updated>2017-09-16T22:50:16.398Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3khRACMfqImFo-UYt_s2DA.png" /></figure><p>Usually we see startups and companies basing their growth hacking strategies of what another company has done or of one A/B experiment that worked for them one time .We ended up by reading headlines like “How these folks improves their retention by 800% with this strategy .”</p><p>What you don’t see, is what number of companies attempted that same strategy and didn’t perceive any results. whether, they lost money or they invested such a great energy in it without any outcomes. Similarly, if you’re making a decision based on one experiment that worked one time for you but failed ten others, you’re making a decision based only on what survived and are ignoring data from failed attempts and this called the survivorship bias.</p><p>In case you’re not aware what is survivorship bias, it is best clarified with the act of drawing conclusions from an incomplete set of data because that data has ‘survived’ some selection criteria.</p><p>Survivorship bias is one of the susceptible mistakes to make in when you are basing your growth strategy. In growth , there are a various ways that can prove itself. Let’s take a better look of how I’ve seen survivorship bias misconceive people’s cognition of growth and growth strategies.</p><h4><strong>Why Conversion Rates start to decompose !</strong></h4><p>One of the ways survivorship bias can manifest is when conversion rates decay over time. Let’s suppose you launch a new signup box on the landing page or another activation email that is essentially helps your conversion rate. Quickly after you deploy the experiment , everything looks awesome. However, when you return a 6 months later, you see that the conversion rate has relentlessly dropped back to your initial baseline from before the experiment deployment. What is going on here?</p><p>Well, when you initially deployed the new signup box, it was something new that nobody has seen before. Some percentage of users seeing the box for the first time decided to sign up . Those people are currently no longer part of the segment seeing the box since they have accounts. From that point, a part of people seeing the box for the second time chooses to sign up. Again, they are now expelled from the segment.</p><p>For who are growing at scale, in the end you’re left with a segment of who may have just seen that specific box 5 or 6 times and weren’t persuaded within those initial 5 times and will probably keep not be convinced from seeing the same box. What this means for a Growth team is they need to budget time to revisit important conversion prompts with the expectation that as users get acclimated to the prompt, its effectiveness will start to decline. On a broader scale, it might also mean you need to change up your entire conversion strategy as you move further along the S-curve of adoption.</p><h4><strong>Push Notifications Unsubscribes :</strong></h4><p>in this case I will discuss where survivorship bias can misdirect you is when its comes to push notifications engagement. A major area in email/push notifications is deciding the ideal frequency to notify users. Startups and retention folks frequently take a look at the notifications and email engagement of their current users to define what the ideal frequency to send. In any case, this can be a biased approach, in light that you’re existing users who are still getting notifications have decided that they are Ok with this frequency .Most who detested the frequency are already uninstalled or stop using your product .</p><p>To really find the ideal frequency to notify users , you have to test on a clean unbiased segment : new users that just joined. Just by experimenting on new users, who have never received messages/notifications from you recently, you will be able to figure out what the ideal retention frequency for your product .</p><h4><strong>The existing user base are biased :</strong></h4><p>Another way that survivorship bias can show itself is in your active user base. Each active user you have today has made sense of how to use your product and is getting enough value to keep on using it. Every other person that didn’t get it has likely already churned.</p><p>Experiments and A/B testing on new users will show you that your existing users had effectively made sense and figured out how to use the product and built up the propensity. Everybody who hadn’t made sense of that had already stop using your product. this made a lot of sense that the Experiments and A/B testing should be done on new users .</p><h4>About The Author :</h4><p>Badr El Fahim is a Growth Hacking Manager at <a href="http://www.avito.ma/">Avito.ma</a> , the leading classified website in Morocco and part of <a href="http://www.schibsted.com/">Schibsted Media group</a>, an international group with employees in over 30 countries.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=53f7ab7e8d23" width="1" height="1" alt=""><hr><p><a href="https://medium.com/avito/what-can-weaken-your-growth-hacking-strategy-53f7ab7e8d23">What can weaken your Growth hacking strategy ?</a> was originally published in <a href="https://medium.com/avito">Avito</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>