<?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 Dmitry Rybin on Medium]]></title>
        <description><![CDATA[Stories by Dmitry Rybin on Medium]]></description>
        <link>https://medium.com/@dmitrika?source=rss-20a47303a5af------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*MJWjSHBwL11JegV5qku8Kw.jpeg</url>
            <title>Stories by Dmitry Rybin on Medium</title>
            <link>https://medium.com/@dmitrika?source=rss-20a47303a5af------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 03:04:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dmitrika/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[Complaint is the greatest feedback]]></title>
            <link>https://medium.com/@dmitrika/complaint-is-the-greatest-feedback-ed661e72425e?source=rss-20a47303a5af------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed661e72425e</guid>
            <category><![CDATA[customer-service]]></category>
            <category><![CDATA[product-management]]></category>
            <dc:creator><![CDATA[Dmitry Rybin]]></dc:creator>
            <pubDate>Sun, 22 Jan 2017 16:29:09 GMT</pubDate>
            <atom:updated>2017-01-22T16:51:02.065Z</atom:updated>
            <content:encoded><![CDATA[<p>Every time I’m not happy with a product, I wish to make a complaint. In this post I’ll answer why this is a great kind of feedback and will make sense in long run.</p><h4>Products designed to solve your problems, not to cause them</h4><p>In an ideal world when you use any product, I’ll never face any issue. If you did — something had gone wrong and it’s perfect time to open an issue or make a complaint.</p><p>But, actually, If you feel angry or very dissapointed, first of all try to calm down! After that you’ll able to figure out how to describe your negative experience in the way, that will be helpful to prevent the problem in the future.</p><p>I’m a client of two Russian banks: Tinkoff and Alfa. Few weeks ago I blocked my credit cards in both banks, because I had lost my wallet with them inside. In the Tinkoff bank card reissue had taken two days and one phone call, after they delivered it to my place. In the Alfabank I waited nearly two weeks and had had gone to their office to make the reissue request and next time to get a brand new card.</p><p>So, you see a completely different customer experience here. I was very dissapointed with Alfabank service and informed them by calling customer service hotline.</p><h4>Every complaint is a bugfix or feature request</h4><p>Products evolves by realeasing a new features and fixing bugs in the old ones. But how product owner will understand what is important and what to do first?</p><p>Yes, you can help a lot ! The best feedback and feature requests comes from real customers. That’s why every complaint helps to improve product and as a result provide you a better experience.</p><h4>Issues takes time</h4><p>The lower the priority issue has, the longer it will be solved. The more efforts new change requires, the longer it will be solved again.</p><p>And it’s ok! Just keep in mind, that you complaint could be the last drop to increase the priority and get things done.</p><p>Even if a small bug will be noticed by sufficient number of customers — it will be fixed faster!</p><p>In case of websites, patch could be delivered within an hour. But if it’s about the next iPhone, for example… Huh, it could get much more time, but anyway — don’t give up.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed661e72425e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Higher-Order Component for SVG icons]]></title>
            <link>https://medium.com/@dmitrika/react-higher-order-component-for-svg-icons-61efc0f1f671?source=rss-20a47303a5af------2</link>
            <guid isPermaLink="false">https://medium.com/p/61efc0f1f671</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[functional-programming]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Dmitry Rybin]]></dc:creator>
            <pubDate>Sun, 21 Aug 2016 12:08:59 GMT</pubDate>
            <atom:updated>2016-08-21T12:20:50.581Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently I’ve started to learn Functional Programming and found its basic implementation in React. Let’s take a look what benefits we can get from functional composing in a real life React app.</p><p>It’s a great idea to use SVG icons as React components in your app. You can just name them this way &lt;MyIcon width=20 height=20 fill=‘#ccc’ /&gt;. Then a component’s code will look like:</p><pre>export default createClass({</pre><pre>render() {<br>  return (<br>   &lt;svg // you can add as many props, as you needed<br>     viewBox={this.props.viewBox}<br>     width={this.props.width}<br>     height={this.props.height}<br>     fill={this.props.fill}<br>   &gt;<br>    &lt;path d=&quot;...&quot; fillRule=&quot;evenodd&quot; /&gt;<br>   &lt;/svg&gt;<br>  );<br> },<br>});</pre><p>Great, it works perfectly, you can apply any classes, change size and other stuff by props. But every time when you create a new Icon, you will duplicate &lt;svg&gt; code and props validation. Once you’ve realized it, it’s time to create a higher-order component, which will take a response for repeating code.</p><p>Let’s repeat what HOC is:</p><blockquote>A higher-order component is just a function that takes an existing component and returns another component that wraps it.</blockquote><p>Here we go, our higher-order component for SVG icons:</p><pre>const createSVG = (Icon) =&gt; createClass({<br> render() {<br>  const {classes, fill, height, width, viewBox} = this.props;<br>  return (<br>   &lt;svg<br>    className={classes}<br>    fill={fill}<br>    height={height}<br>    width={width}<br>    viewBox={viewBox}<br>   &gt;<br>    &lt;Icon /&gt;<br>   &lt;/svg&gt;<br>  );<br> },<br>});</pre><pre>export default createSVG;</pre><p>It’s an arrow function, which takes an Icon component (within all Icon’s props) as an argument and returns new React Class, where we have Icon component itself wrapped by &lt;svg&gt; tag with the proper attributes.</p><p>Now we can declare our Icon component:</p><pre>import createSVG from &#39;../createSVG&#39;;</pre><pre>const Icon = () =&gt; &lt;path d=&quot;...&quot; fillRule=&quot;evenodd&quot; /&gt;;</pre><pre>export default createSVG(Icon);</pre><p>Looks better now, right?</p><h4>Let’s recap how we did our component better!</h4><p>We are composing our Icon component with a higher-order component createSVG, by calling createSVG with Icon component as an argument.</p><pre>export default createSVG(Icon);</pre><p>The createSVG is a simple arrow function, which returns new React Class, where all Icon’s state and props are scoped, so we can manipulate them as we wish.</p><pre>const createSVG = (Icon) =&gt; createClass({</pre><p>That’s how we can reuse code and simplify our components with a functional programming approach.</p><h4>Further reading</h4><ul><li><a href="https://medium.com/@dan_abramov/mixins-are-dead-long-live-higher-order-components-94a0d2f9e750">Mixins Are Dead. Long Live Composition</a></li><li><a href="https://facebook.github.io/react/blog/2016/07/13/mixins-considered-harmful.html">Mixins Considered Harmful - React Blog</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61efc0f1f671" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use smartcrop.js bypassing CORS]]></title>
            <link>https://medium.com/@dmitrika/how-to-use-smartcrop-js-bypassing-cors-88f640891e3b?source=rss-20a47303a5af------2</link>
            <guid isPermaLink="false">https://medium.com/p/88f640891e3b</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[cors]]></category>
            <dc:creator><![CDATA[Dmitry Rybin]]></dc:creator>
            <pubDate>Sun, 14 Aug 2016 08:46:58 GMT</pubDate>
            <atom:updated>2016-08-14T08:46:58.628Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently I’ve met <a href="https://github.com/jwagner/smartcrop.js">smartcrop.js</a> library made by <a href="https://github.com/jwagner">@jwagner</a> and now I want to share my experience.</p><p>The idea was to place an image url into the input and get a smartcropped version of the original image. Sounds quite simple and clear, but there were a few new things for me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*vsWlbdGte77mcnzOM3L9qg.png" /><figcaption>Smartcrop.js in action</figcaption></figure><h3>CORS</h3><p>Smart crop takes for input HTMLImageElement, HTMLCanvasElement or HTMLVideoElement. You can simply grab an image from a side server via url and convert it to canvas. But if this server doesn’t have any appropriate Access-Control-Allow-Origin headers, canvas will become “tainted”. This means that you can store and display data, but you aren’t able to manipulate the context.</p><p>However sharing services like Dropbox, Imgur and etc, allow you to download and manipulate canvas as you wish, because they enable cross-origin resource sharing.</p><p>To get more info about CORS and “tainted” canvas check out <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image">MDN CORS article</a>.</p><h3>Save images on your side</h3><p>In my case, I couldn’t use Imgur API, because it’s available only for non-commercial usage. The solution that I eventually came to was to save the image on a server. Once you saved the image from a side url, you could create a new image with <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/Image">Image constructor</a> and src attribute as your local address. Then you can send this Image to smartcrop to proceed cropping.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88f640891e3b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Краткое руководство по чтению технических блогов на русском языке]]></title>
            <link>https://medium.com/@dmitrika/%D0%BA%D1%80%D0%B0%D1%82%D0%BA%D0%BE%D0%B5-%D1%80%D1%83%D0%BA%D0%BE%D0%B2%D0%BE%D0%B4%D1%81%D1%82%D0%B2%D0%BE-%D0%BF%D0%BE-%D1%87%D1%82%D0%B5%D0%BD%D0%B8%D1%8E-%D1%82%D0%B5%D1%85%D0%BD%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B8%D1%85-%D0%B1%D0%BB%D0%BE%D0%B3%D0%BE%D0%B2-%D0%BD%D0%B0-%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%BE%D0%BC-%D1%8F%D0%B7%D1%8B%D0%BA%D0%B5-6d658bbebe48?source=rss-20a47303a5af------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d658bbebe48</guid>
            <dc:creator><![CDATA[Dmitry Rybin]]></dc:creator>
            <pubDate>Tue, 09 Aug 2016 19:18:55 GMT</pubDate>
            <atom:updated>2016-08-09T19:18:55.659Z</atom:updated>
            <content:encoded><![CDATA[<p>Краткое руководство по чтению технических блогов на русском языке</p><ol><li>Открываем блог, например <a href="http://frontender.info/">http://frontender.info/</a></li><li>Находим ссылку на оригинал статьи</li><li>Кликаем на нее</li><li>Читаем оригинал</li></ol><p>На самом деле достаточно подписаться на несколько первоисточников и вы будете наблюдать, как громкая новость или пост будет раскатываться от одного паблика к другому, а через месяц-два, ее переведут на русский.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d658bbebe48" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[С чистого листа. О сборщиках]]></title>
            <link>https://medium.com/@dmitrika/%D1%81-%D1%87%D0%B8%D1%81%D1%82%D0%BE%D0%B3%D0%BE-%D0%BB%D0%B8%D1%81%D1%82%D0%B0-%D0%BE-%D1%81%D0%B1%D0%BE%D1%80%D1%89%D0%B8%D0%BA%D0%B0%D1%85-5b511bd4f7b2?source=rss-20a47303a5af------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b511bd4f7b2</guid>
            <dc:creator><![CDATA[Dmitry Rybin]]></dc:creator>
            <pubDate>Sun, 07 Aug 2016 16:10:20 GMT</pubDate>
            <atom:updated>2016-08-24T16:51:01.983Z</atom:updated>
            <content:encoded><![CDATA[<p>Представим, что вы верстаете одну промо-страницу. Дизайнер прислал скетч-файл с макетами, текстом и шрифтами. Остается только сесть и верстать… И тут я понимаю, что дизайн для мобильных и планшетов отличается, css заменить бы на sass и, возможно, это не глупая html страничка, а SPA приложение.</p><p>Переводить sass в css, потом минифицировать js и все остальное руками — рабский труд. Спасают, автоматизируют, ускоряют и выполняют рутинные задачи сборщики проектов. Такие как Webpack, Gulp, Grunt и др. Для них у меня есть минимальные требования:</p><ul><li>Sass</li><li>autoprefixer</li><li>simpleHTTPServer</li><li>autoreload</li></ul><p><em>При верстке удобно иметь 2 экрана. На одном править код, а на другом сразу же видеть результат в браузере.</em></p><p>Если нам нужнем JavaScript, то его следует минифицировать и писать хочется не просто JS, а именно ES2015. А когда он применился мы не хотим перезагружать страницу, а хотим, чтобы сборщик сделал это сам, благодаря HotReload.</p><p>Если вы новичок, то стоит все-таки разобраться, как работает webpack, gulp или grunt. Я именно так и делал, собирал проект с самого начала. Но потом, каждый раз писать конфигурацию с чистого листа — отстой.</p><p>Быстрее будет, если найти StarterPack — проект, где начальную структуру и список инструментов продумали заранее и свели установку к одной строке:</p><blockquote>npm i superStarterPack</blockquote><p>Я пока попробовал только 2 коробочки:</p><ul><li><a href="https://developers.google.com/web/tools/starter-kit/?hl=en">WebStarterKit</a></li><li><a href="https://facebook.github.io/react/blog/2016/07/22/create-apps-with-no-configuration.html">Create React App</a></li></ul><h4>WebStarterKit</h4><p>Если вы не будете использовать Material Design, а писать свои стили, то придется потратить время на вырезание ненужных файлов. Еще есть файлы-манифесты, где надо будет поменять часть дефолтных значений на свои. Пак годится для сборки простых промо-страниц или писем. Для статического сайта уже не хватает шаблонизатора, а для JS приложения считай все придется собирать с нуля.</p><h4>Create React Ap</h4><p>Вау! Пожалуй, если вы хотите создать быстро приложение на Реакте — это лучший выбор. Очень порадовал Flow в консоли и поддержка всех нужных мне фитч, за исключением Sass. В основе лежит webpack, который сложноват в настройке, но крайне продуктивен после. Сторонние пакеты устанавливаются как dev зависимости и доступны через import — каеф!</p><p>Экономьте свое время. Для быстрого старта — используйте готовые сборки. Для изучения — используйте готовые сборки или проекты и учитесь по ним и статьям, документация к сборщикам годится лишь для уточнения. Для серьезных проектов заложите время и соберите всю структуру с чистого листа, так вы будете знать что к чему и уверены, что у вас нет ничего лишнего.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b511bd4f7b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>