<?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 Rustem Mustafin on Medium]]></title>
        <description><![CDATA[Stories by Rustem Mustafin on Medium]]></description>
        <link>https://medium.com/@rulikkk?source=rss-4e6d4dffe91------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*VDfDE_HMCzjsD3lL4QMSeg.jpeg</url>
            <title>Stories by Rustem Mustafin on Medium</title>
            <link>https://medium.com/@rulikkk?source=rss-4e6d4dffe91------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 17:57:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rulikkk/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[Coding Music & Radios List]]></title>
            <link>https://medium.com/@rulikkk/coding-music-radios-list-56c661ca087b?source=rss-4e6d4dffe91------2</link>
            <guid isPermaLink="false">https://medium.com/p/56c661ca087b</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[focus]]></category>
            <category><![CDATA[music]]></category>
            <dc:creator><![CDATA[Rustem Mustafin]]></dc:creator>
            <pubDate>Mon, 16 Nov 2020 12:33:38 GMT</pubDate>
            <atom:updated>2020-11-16T12:33:38.962Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*o6AL2kpv85053Jia" /><figcaption>Photo by <a href="https://unsplash.com/@lazycreekimages?utm_source=medium&amp;utm_medium=referral">Michael Dziedzic</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Since I like listening to music, sometimes, I find radios or streams of music, built for coding/development. I like listening to those, so I keep a collection.</p><blockquote><em>Originally published at </em><a href="https://rmust.me/coding-music-radios-list"><em>rmust.me</em></a><em> — I’ll be adding more items there!</em></blockquote><h4><a href="https://www.youtube.com/watch?v=vAKtNV8KcWg">FreeCodeCamp Radio</a></h4><p>— an endless Youtube stream of “jazzy beats” for coding.</p><h4><a href="https://codingradio.xyz/">CodingRadio</a></h4><p>— Playlists for coding, named like “Focus on Deadline”, “Debugging Battles”, etc.</p><h4><a href="https://musicforprogramming.net/">musicForProgramming</a></h4><p>— One to two hour long sets of tracks for programming. List is being updated. Cool design.</p><h4><a href="https://soundcloud.com/anjunadeep">Anjunadeep</a></h4><p>— cool electronic music. Not specifically named to be “programming radio”, but sounds really good. This blog is partially done while listening to this.</p><h4><a href="https://zavtracast.ru/tunes">Zavtratunes</a></h4><p>— sets of cool electronic music. This one also does not name itself “music for programming”, but I think it fits.</p><h4><a href="https://brain.fm/">Brain.fm</a></h4><p>— Paid music service: “We use our patented AI music engine and scientific research to create music to help you improve the activities you already do in 15 minutes or less.”</p><h4><a href="http://listentothe.cloud/">Listen to the Cloud</a></h4><p>— Ambient music mixed with flight radio.</p><h4><a href="https://poolside.fm/">Poolside FM</a></h4><p>— Poolside FM was conceived one awfully rainy summer in the Highlands of Scotland — a virtual vacation, if you will. The audio and video streams are curated to inject a healthy dose of serotonin into your brain.</p><h4><a href="https://play.endel.io/">Endel</a></h4><p>— Endel is a technology that creates personalized soundscapes to reduce stress, increase focus, and improve sleep. It is supported by neuroscience. Completely aligned with the circadian rhythm, the sounds are generated in real-time basing on various inputs such as your location, time zone, weather, and heart rate.</p><h4><a href="https://open.spotify.com/user/dewanderer/playlist/601WLbJ3Vj91XIugGUJNUe?si=nGWvm759SGCIVir6vY5Kug">Coding / Hacking / Felling like a 80’s sci-fi superhero</a></h4><p>— Spotify playlist with retro-wave / lo-fi sounds collection. If you like Kavinsky — Nightcall, you will like this, too!</p><p><strong>PR Request</strong>: Want to add your link or to turn this page into a working radio? <a href="https://github.com/Rulikkk/Rulikkk.github.io/blob/master/content/2018-12-17%20Coding%20Music%20Radios%20List/index.md">Feel free to send a PR</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56c661ca087b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Уровни изоляции транзакций]]></title>
            <link>https://medium.com/pseudo-blog/%D1%83%D1%80%D0%BE%D0%B2%D0%BD%D0%B8-%D0%B8%D0%B7%D0%BE%D0%BB%D1%8F%D1%86%D0%B8%D0%B8-%D1%82%D1%80%D0%B0%D0%BD%D0%B7%D0%B0%D0%BA%D1%86%D0%B8%D0%B9-87cd2b129de1?source=rss-4e6d4dffe91------2</link>
            <guid isPermaLink="false">https://medium.com/p/87cd2b129de1</guid>
            <category><![CDATA[transactions]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Rustem Mustafin]]></dc:creator>
            <pubDate>Tue, 24 Jul 2018 12:41:01 GMT</pubDate>
            <atom:updated>2018-12-20T11:18:15.476Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ERPJrUm5I4UDoi__MoRLlg.png" /></figure><h4>— в деталях, но простыми словами.</h4><blockquote>Если понять 50%, а запомнить хотя бы 10% этой статьи, то на интервью ответить не составит труда.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J7xNGSNIPVO_Mo1ubBKy5A.png" /></figure><p>В <a href="http://akvelon.com/">Аквелоне</a> мы часто готовимся (и готовим) к различным проектам и интервью. Иногда всплывают темы, которые хотелось бы знать точнее, детальнее. Именно из такого исследования принципов ACID, а именно изолированности, и родилась эта статья.</p><p><em>Примечание: побочные эффекты и уровни изоляции параллельных транзакций в этой статье описаны согласно стандарту ANSI SQL. Способы реализации взяты из MS SQL.</em></p><h3>Зачем это надо, и как оно появилось?</h3><p>При изучении любого феномена, важно осознать в каких условиях он возник, что было “вокруг него” — тогда будет ясна мотивация создателей и цели, которые они преследовали.</p><p>За точку отсчёта возьмём начало семидесятых, когда <a href="https://en.wikipedia.org/wiki/Raymond_F._Boyce">Рэймонд Бойс</a> (англ. <em>Raymond Boyce</em>, 1947–1974) и Дональд Чемберлин (англ. <a href="https://en.wikipedia.org/wiki/Donald_D._Chamberlin"><em>Donald D. Chamberlin</em></a>) (род. 1944), работая в IBM, создают язык запросов SEQUEL (тот самые “сиквел”), позднее переименованный в SQL и впервые стандартизированный в 1986 как “SQL-86”.</p><blockquote>Кстати, Бойс — это человек, придумавший <a href="https://ru.wikipedia.org/wiki/%D0%9D%D0%BE%D1%80%D0%BC%D0%B0%D0%BB%D1%8C%D0%BD%D0%B0%D1%8F_%D1%84%D0%BE%D1%80%D0%BC%D0%B0_%D0%91%D0%BE%D0%B9%D1%81%D0%B0_%E2%80%94_%D0%9A%D0%BE%D0%B4%D0%B4%D0%B0">нормальную форму Бойса-Кодда</a>, которую мы все учили. В общем-то, и сам SQL появился, когда Рэй и Дональд узнали от Кодда про <a href="https://ru.wikipedia.org/wiki/%D0%A0%D0%B5%D0%BB%D1%8F%D1%86%D0%B8%D0%BE%D0%BD%D0%BD%D0%B0%D1%8F_%D0%BC%D0%BE%D0%B4%D0%B5%D0%BB%D1%8C_%D0%B4%D0%B0%D0%BD%D0%BD%D1%8B%D1%85">реляционную модель данных</a>, которую тот придумал. А ещё чуть позднее, Кодд придумал NULL и его особенности, из-за которых нам теперь приходится писать IS NOT NULL.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*FRO4DR4RV1KFvBPerTbKBg.jpeg" /><figcaption>Дональд Чемеберлен, соавтор SQL, photo by Dicklyon — Own work, CC BY-SA 4.0, <a href="https://commons.wikimedia.org/w/index.php?curid=63380467">https://commons.wikimedia.org/w/index.php?curid=63380467</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*2j1huEQmzw5r3uWXFpY-zg.jpeg" /><figcaption>Рэй Бойс, соавтор SQL, photo from <a href="https://alchetron.com/Raymond-F-Boyce">https://alchetron.com/Raymond-F-Boyce</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*YQ3-STSsVV1qlmhc6sCwkw.jpeg" /><figcaption>Тед Кодд, который всё это затеял, photo from <a href="https://freefeast.info/personality-motivation/famous_it_personalities/invention-of-relational-model-for-database-ted-codd/">https://freefeast.info/personality-motivation/famous_it_personalities/invention-of-relational-model-for-database-ted-codd/</a></figcaption></figure><p>Далее — понеслось. Сама IBM в этот язык и реляционную модель не поверила, зато её взяла за основу компания “Relational Software”, ныне всем известная как Oracle.</p><p>К середине восьмидесятых технический прогресс обеспечил возможность повсеместного использования реляционных БД, а к началу девяностых (рискну сказать “и по сей день”) они уже доминировали на рынке масштабного хранения и обработки данных.</p><p>Ещё тогда эти ребята придумали концепции транзакций, их свойства (ACID), и так далее. Одна из секций стандарта SQL как раз посвящена уровням изоляции, и даёт ответы на два главных вопроса:</p><ol><li>Что может пойти не так, если две транзакции будут в недостаточной мере изолированы друг от друга? Виды этих ошибок называются “побочные эффекты”.</li><li>Как избежать всех побочных эффектов пункта (1), при этом не создав взаимных блокировок (deadlock) и не ухудшив производительность?</li></ol><h3>Побочные эффекты</h3><p>Стандарт даёт описания пяти побочных эффектов, сначала идут простые, затем более сложные. Под “сложностью” побочного эффекта я имею ввиду “сложнее его отловить и исправить”. Например отсутствие LOST UPDATE обеспечить проще, чем отсутствие DIRTY READ. Для понимания этих эффектов, надо держать в уме, что речь всегда идёт о взаимодействии двух и более транзакций одновременно, а сам побочный эффект — это когда желаемый результат не совпал с реальным.</p><h4>Потерянное обновление / Lost Update</h4><p><strong>Когда </strong>несколько транзакций что-то обновили в БД, но по итогам результат такой, будто отработала лишь часть транзакций.</p><p>Самый опасный побочный эффект, по сути, полное отсутствие изоляции транзакций — две транзакции читают одну ячейку, записывают изменённое значение (одна вычитает стоимость мороженого, другая плату за квартиру). В итоге в ячейке значение от второй транзакции, а первой как будто и не было.</p><h4>Грязное чтение / Dirty Read</h4><p><strong>Когда </strong>ваша транзакция может прочитать данные, которые были добавлены/изменены другой транзакцией, пока та ещё не вызвала COMMIT этих данных (ещё другая транзакция могла что-то удалить, тогда ваша транзакция перестанет это видеть).</p><p>Тоже опасный эффект—одна транзакция читает ячейку, обновляет её, другая считывает обновлённое значение, изменяет его, в это время первая транзакция откатывается, а вторая записывает результат, будто обе транзакции отработали.</p><h4>Неповторяющееся чтение / Non-Repeatable Read</h4><p><strong>Когда</strong> одинаковый запрос в одной транзакции может вернуть разные данные; NON-REPEATABLE READ касается лишь только набора данных, который однажды уже был прочитан в транзакции — это значит, если вы прочитали первые 10 строк таблицы А, то NON-REPEATABLE READ случится, если вы заново прочитаете первые 10 строк таблицы А и получите другой результат;</p><p>Это уже менее опасный эффект, но более сложный в понимании. Допустим, одна транзакция считает полную стоимость услуги на основе тарифов, а другая меняет параллельно эти тарифы. Non-repeatable read случится, если последовательность действий будет такова:</p><ol><li>Первая транзакция рассчитала полную стоимость.</li><li>Вторая транзакция изменила тариф, и полная стоимость тоже изменилась.</li><li>Первая транзакция вычла с баланса пользователей “по старым тарифам”, а если бы считала эту стоимость ещё раз — то получила бы другой результат.</li></ol><h4>Фантомное чтение / Phantom Reads</h4><p><strong>Когда:</strong> одинаковый запрос может вернуть НОВЫЕ строки, которые были закомичены из другой транзакции. Отличие от NON-REPEATABLE READ в том, что строки, которые мы уже разок прочитали остаются такими же, соответствнно здесь нет NON-REPEATABLE READ. Но при этом, запрос который сначала вернул 5 строк, может вернуть эти же пять строк, плюс ещё две свежие строки из другой транзакции — это PHANTOM READ;</p><p>Это ещё менее опасный эффект. Возникнуть он может в похожем на предыдущий примере, но если первая транзакция ещё ищет скидки, которые можно применить. Если сначала она найдёт три скидки, то Phantom Read возникнет, когда, впоследствии, этот же запрос может вернуть те же три скидки плюс одну новую.</p><h3>Уровни изоляции</h3><p>Уровни изоляции тоже описаны в стандарте, и они гарантируют отсутствие разных (с каждым разом всё более сложных) побочных эффектов.</p><p>При этом, “простые” эффекты включают в себя все более сложные, то есть если есть шанс на DIRTY READ, то и всё что сложнее его — можно тоже спокойно получить.</p><p>В прошлом сообщении эти эффекты описаны как раз в порядке возрастания “сложности”:</p><p>LOST UPDATE &lt; DIRTY READ &lt; NON-REPEATABLE READ &lt; PHANTOM READ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*aVUjZGDsABi9ajwxLggKlQ.jpeg" /><figcaption>Таблица уровней изоляции и побочных эффектов, которые могут возникнуть (прим: все режимы гарантируют отсутствие потерянных обновлений)</figcaption></figure><p>Исходя из этой таблицы можно определить режимы изоляции транзакций. Например: режим REPEATABLE READ — это такой режим, где гарантируется отсутствие любых побочных эффектов, кроме фантомных чтений.</p><blockquote>Чем сложнее побочный эффект, тем сложнее его избежать. Соответственно, чем сильнее уровень изоляции, тем меньше производительность БД — потому что транзакциям чаще приходится ждать друг-друга.</blockquote><h3>Подходы к реализации уровней изоляции</h3><p>Существует два глобально различных подхода к реализации изолированности: блокирование и версионирование.</p><p><strong>Версионирование (snapshot) </strong>означает, что транзакции будут работать со своей копией данных, не влияя друг на друга, но впоследствии несколько изменённых копий надо будет как-то слить в одну. Строгость версионирования регулирует моменты (когда) и размеры (сколько данных копировать) этих копий.</p><p><strong>Блокирование (lock) </strong>означает, что одна транзакция будет ждать другую, чтобы избежать побочных эффектов, в зависимости от строгости уровней изоляции этих транзакций. Различные виды блокировок обеспечивают более гранулярное блокирование, например, только по строкам, или только на небольшой кусочек транзакции, а не на всю.</p><p>В описаниях блокировок часто всплывает понятие <strong>оптимистичной и пессимистичной блокировки. </strong>Это два высокоуровневых термина, которые обозначают следующее:</p><ul><li><strong>Пессимистичная блокировка </strong>происходит как можно раньше, чтобы предотвратить как можно больше побочных эффектов, но транзакции чаще ждут друг-друга. Например, блокирование на обновление строк, которые прочитала транзакция в режиме read committed — это пессимистичная блокировка, потому что она происходит, как только ваша транзакция прочитала строки, <em>не смотря на то, будет ли их кто-то обновлять или нет</em>.</li><li><strong>Оптимистичная блокировка</strong> происходит как можно позже, чтобы транзакции реже ждали друг-друга. <em>Плата за такой вид блокировки — необходимость обрабатывать “конфликт обновления”.</em> Конфликт обновления происходит, например, когда “ваша” транзакция прочитала строки и хочет их обновить, но другая транзакция их уже обновила — при оптимистичной блокировке эта ошибка возникнет в “вашей” транзакции и её надо корректно обработать: как минимум, повторить транзакцию позже, как максимум, обработать ошибку прямо в коде транзакции.</li></ul><p>Далее, рассмотрим подходы к блокировке/версионированию в MS SQL.</p><h3>Реализация уровней изоляции в MS SQL</h3><p>Давайте посмотрим, как уровни изоляции реализованы в Microsoft SQL Server.</p><p><em>Примечание 1: здесь начинается слабодокументированная зона, и я могу ошибаться, но готов вносить исправления и улучшать.</em></p><p><em>Примечание 2: возможно, эта глава будет расширена описанием shared-, exclusive-, range-locks: что это такое, в каком режиме и как оно используется.</em></p><h4>Read Uncommitted</h4><p>Ничего не происходит в режиме read uncomitted. То есть ничего не блокируется и не создаются снэпшоты, транзакция просто читает всё что хочет. По смыслу, этот режим можно отнести к (очень) оптимистичному — блокировки редки и коротки.</p><h4>Read Committed</h4><p>Read committed (то есть отсутсвие dirty reads) обеспечивается блокировкой на запись данных (строк), которые мы пытаемся прочитать. Эта блокировка гарантирует, что мы подождём завершения транзакций, которые уже меняют наши данные, или заставим их подождать, пока мы будем читать. В итоге, мы точно прочитаем только данные, которые были закоммичены, избежав тем самым грязное чтение. Этот режим — типичный пример пессимистичной блокировки, так как мы блокируем данные на запись, даже если в них никто реально не пишет.</p><h4>Read Committed Snapshot</h4><p>Read commited snapshot (второй способ избежать dirty reads) обеспечивается версионированием блока данных, который мы читаем. Любое его параллельное изменение на затронет нашу версию, и нам достанутся данные на момент начала чтения. Таким образом грязное чтение отсутствует, и ещё отсутствуют какие-либо блокировки*. Этот режим скорее оптимистичный, так как заранее ничего не блокируется, и тут как раз может быть конфликт обновления.</p><h4>Repeatable Read</h4><p>Repeatable read (то есть отсутствие всего, кроме фантомных чтений) обеспечивается почти как read commited, за тем исключением, что блокировка на запись работает до конца транзакции, а не отдельной операции. Единожды “коснувшись” блока данных, транзакция блокирует его изменение до конца работы, что обеспечивает отсутствиуе dirty reads и non-repeatable reads. Это более пессимистичный вид блокировки, чем read committed, так как блокировка держится ещё дольше.</p><h4>Serializable</h4><p>Serializable (нет никаких побочных эффектов) обеспечивается блокировкой и на запись, и на чтение любого блока данных, с которым мы работаем. Блокируется даже вставка данных, которые могут попасть в блок, который мы прочитали. Таким образом, за счёт низкой конкурентности, обеспечивается отсутствие даже фантомных чтений. Это более пессимистичный вид блокировки, чем repeatable read, так как блокировка держится ещё дольше.</p><h4>Snapshot</h4><p>Snapshot обеспечивается созданием нашей отдельной версии данных, с которыми мы работаем, без блокировок*. Другие транзакции не будут иметь доступ к нашей версии, чем и обеспечивается отсутствие всего вплоть до фантомных чтений. Это оптимистичный вид блокировки, но менее оптимистичный, чем read committed snapshot, так как больше шансов получить конфликт обновления.</p><h4>Примечания</h4><ul><li>При любом использовании read committed snapshot и snapshot, необходимо обеспечить правильную обработку конфликтов изменений, либо через повтор транзакции, либо через обработку конфликта внутри транзакции;</li><li>Вот как выглядит текст ошибки конфликта (врага надо знать в лицо!):</li></ul><blockquote>Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table ‘dbo.Table’ directly or indirectly in database ‘DB’ to update, delete, or insert the row that has been modified or deleted by another transaction. Retry the transaction or change the isolation level for the update/delete statement.</blockquote><ul><li>В режимах read committed snapshot и snapshot, в момент коммита транзакций всё-таки будут установлены блокировки, чтобы избежать конфликтов записи — это написано в документации. Также, логично предположить, что некие блокировки всё же будут установлены на время создания снэпшота;</li><li>В MS SQL snapshot-режимы по умолчанию вообще отключены;</li><li>В MS SQL существует более 20 видов блокировок (locks), некоторые из которых лишь вскользь упомянуты в этой статье;</li><li>В рамках одной транзакции можно переключать (!!!) режим изоляции, за исключением режима snapshot: переключение в snapshot из любого другого режима вызовет откат транзакции, только если транзакция изначально не была в режиме snapshot — тогда сработает;</li><li>Блокировки в режиме serializable могут быть взяты на всю таблицу, вместо конкретного набора строк. Это происходит в случае, если на таблице нет индекса, который мог бы быть использован для обеспечения такой блокировки. Очевидно, что это ещё сильнее скажется на производительности — чем больше блокировок, тем медленнее.</li></ul><h3>Заключение</h3><ul><li>Разные уровни изоляций обеспечивают контроль целостности БД, через устранение различных побочных эффектов.</li><li>Чем более строгий уровень изоляции выбран, тем больше шансов, что транзакции будут заблокированы, и тем меньше общая производительность системы.</li><li><strong>Контроль над уровнями изоляции дан разработчикам, чтобы выбрать наилучший баланс между строгостью контроля целостности и производительностью системы.</strong></li><li>Побочные эффекты: LOST UPDATE, DIRTY READ, NON-REPEATABLE READ, PHANTOM READ.</li><li>Уровни изоляции: Read Uncommitted &lt; Read Committed (Snapshot) &lt; Repeatable Read &lt; Serializable / Snapshot.</li><li>Чем раньше блокировка происходит и чем дольше держится, тем более пессимистичной она считается. Соответственно, чем позже и меньше — тем более оптимистичной.</li></ul><h3>Обо мне</h3><p>Меня зовут Рустем, последние несколько лет работаю проект-менеджером в Аквелоне. Ещё у меня более 10-ти лет опыта разработки софта и других классных штук. Связаться со мной можно через <a href="http://twitter.com/rulikkk">twitter.com/rulikkk</a> или подписаться на мой канал в tg: <a href="http://t-do.ru/techno_ru">techno_ru</a>.</p><h3>Полезные ссылки</h3><p>По этим ссылкам, а также пользуясь здравым смыслом, я и собрал статью:</p><ul><li><a href="https://en.wikipedia.org/wiki/Donald_D._Chamberlin">https://en.wikipedia.org/wiki/Donald_D._Chamberlin</a></li><li>Wiki: <a href="https://ru.wikipedia.org/wiki/%D0%9A%D0%BE%D0%B4%D0%B4,_%D0%AD%D0%B4%D0%B3%D0%B0%D1%80">Эдгар Кодд</a></li><li>Wiki: <a href="https://ru.wikipedia.org/wiki/%D0%91%D0%BE%D0%B9%D1%81,_%D0%A0%D1%8D%D0%B9">Рэй Бойс</a></li><li><a href="https://docs.microsoft.com/en-us/sql/t-sql/statements/set-transaction-isolation-level-transact-sql?view=sql-server-2017">https://docs.microsoft.com/en-us/sql/t-sql/statements/set-transaction-isolation-level-transact-sql?view=sql-server-2017</a></li><li><a href="https://docs.microsoft.com/en-us/sql/connect/jdbc/understanding-isolation-levels?view=sql-server-2017">https://docs.microsoft.com/en-us/sql/connect/jdbc/understanding-isolation-levels?view=sql-server-2017</a></li><li>Wiki: <a href="https://ru.wikipedia.org/wiki/%D0%A3%D1%80%D0%BE%D0%B2%D0%B5%D0%BD%D1%8C_%D0%B8%D0%B7%D0%BE%D0%BB%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D0%BE%D1%81%D1%82%D0%B8_%D1%82%D1%80%D0%B0%D0%BD%D0%B7%D0%B0%D0%BA%D1%86%D0%B8%D0%B9">Уровни изолированности транзакций</a></li><li><a href="http://aboutsqlserver.com/2011/04/14/locking-in-microsoft-sql-server-part-1-lock-types/">http://aboutsqlserver.com/2011/04/14/locking-in-microsoft-sql-server-part-1-lock-types/</a></li><li><a href="https://www.sqlshack.com/locking-sql-server/">https://www.sqlshack.com/locking-sql-server/</a></li><li><a href="https://habr.com/company/infopulse/blog/261097/">https://habr.com/company/infopulse/blog/261097/</a></li><li><a href="https://www.interfacett.com/blogs/understanding-isolation-levels-sql-server-2008-r2-2012-examples/">https://www.interfacett.com/blogs/understanding-isolation-levels-sql-server-2008-r2-2012-examples/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87cd2b129de1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/pseudo-blog/%D1%83%D1%80%D0%BE%D0%B2%D0%BD%D0%B8-%D0%B8%D0%B7%D0%BE%D0%BB%D1%8F%D1%86%D0%B8%D0%B8-%D1%82%D1%80%D0%B0%D0%BD%D0%B7%D0%B0%D0%BA%D1%86%D0%B8%D0%B9-87cd2b129de1">Уровни изоляции транзакций</a> was originally published in <a href="https://medium.com/pseudo-blog">Pseudo Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bitcoin Puzzle #1: Building Blocks]]></title>
            <link>https://medium.com/pseudo-blog/bitcoin-puzzle-1-building-blocks-92b8fbbb583a?source=rss-4e6d4dffe91------2</link>
            <guid isPermaLink="false">https://medium.com/p/92b8fbbb583a</guid>
            <category><![CDATA[assymmetric-encryption]]></category>
            <category><![CDATA[hash-function]]></category>
            <category><![CDATA[blockchain-technology]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[Rustem Mustafin]]></dc:creator>
            <pubDate>Tue, 29 May 2018 16:55:38 GMT</pubDate>
            <atom:updated>2018-05-29T16:55:38.383Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lwrSuMKYmLUa3uAfbSJ6cg.jpeg" /></figure><h4>This is a first part in a series, that describes way Bitcoin is built and how different technologies work together inside it. This part will introduce you to the most important building blocks, which are assembled together in Bitcoin, and how they work.</h4><p>Here, at <a href="https://akvelon.com/">Akvelon</a>, we often do free-form talks related to interesting technology or interesting development approach used in one of projects. This series is based on an internal talk/presentation, that I did to describe blockchain technology and how it was utilized to start Bitcoin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*TLtT1HXEYCXm2pfxp8QFJg.png" /><figcaption>Akvelon likes Bitcoin and blockchain!</figcaption></figure><p>The main goal of the talk was to show, which building blocks are used in top cryptocurrency and how they interact with each other in its implementation. This talk and series’ intended audience is developers of all levels, since we are development company.</p><p>The goal for this story is to build a basis for the “Bitcoin Puzzle” series, that will provide deeper technical and economical dive into the new world of cryptocurrencies and ways they can change our lives.</p><p>But for now, let’s start building Bitcoin!</p><h3>Hash Functions</h3><p>One of the very basic block to build Bitcoin is a “hash function”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RCntWRL8U5okbdnoPIc-9w.png" /><figcaption>Image from <a href="https://en.wikipedia.org/wiki/Hash_function">Wikipedia</a>. Note, that same input always produces same hash, while some different inputs might have same hashes.</figcaption></figure><p>The main purpose of hash function (according to Wikipedia) is to map an arbitrary size data to a fixed size value. This mapping should follow simple rules:</p><ul><li><strong>Determinism:</strong> Same input <strong>must</strong> produce same output.</li><li><strong>Uniformity:</strong> Different inputs <strong>should</strong> produce different output, that are uniformly spread across function’s range. Since hash function’s range is usually fixed and small, it is impossible to strictly follow this rule, so <strong>collisions, </strong>when hash(a) = hash(b), are always possible.</li><li><strong>Avalanche effect: </strong>Even minor change in input <strong>should </strong>lead to significant change of output — this rule is not always true, however, hash functions used in Bitcoin follow it. <br><em>If you’re interested in counter-example: in “perceptual hash” functions similar inputs produce similar outputs. This property is called “continuity”.</em></li><li>It should be really-really hard to find a collision. Depending on what data is used to search for collision, such property is called: <br>- “<em>Pre-image resistance</em>” — if you know the hash value, it is impossible to calculate message, such that hash(message) = value.<br>- “<em>Second pre-image resistance</em>” — if you know message, it is impossible to calculate another message, such that hash(message) = hash(another_message).<br>- “<em>Collision resistance</em>” — it is impossible to find two messages with same hash.</li></ul><p>The combination of all these four properties allows us to be quite certain, that nobody can change our data, without also changing its hash. In such case, the hash function is called “<strong>cryptographic hash function</strong>” and its value is called “<strong>digest</strong>”.</p><blockquote><strong>Homework question</strong>: when receiving data (message and its digest), is correct to claim that data is not changed by a third party, if cryptographic_hash(data.message) equals data.digest?</blockquote><blockquote><a href="https://gist.github.com/Rulikkk/b4eb48d67a0af85689882291f487c214">Check your answer here</a>.</blockquote><h3>Asymmetric Cryptography</h3><p>Nowadays, everyone has heard of public/private keys and algorithms like RSA (named after surnames of authors Rivest, Shamir, Adleman) or ECC (Elliptic Curve Cryptography). Those are also used in Bitcoin and we will now describe ideas of asymmetric encryption and way it is implemented.</p><p>The key idea under asymmetric encryption is, that one key is used to encrypt message and only its’ sibling key from the pair can be used to decrypt. Usually, you keep one of keys safe — that’s private key. The other one is shared — public key. In case someone wants to securely send you a message, your public key is used to encrypt the message, and only you can decrypt it. Cool, right?</p><p>Here is a complex image that does not really help to understand details of RSA, but I will explain:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vhilEMOD2rzuWQn3rtL2IA.png" /><figcaption>Source: <a href="https://hackernoon.com/how-does-rsa-work-f44918df914b">https://hackernoon.com/how-does-rsa-work-f44918df914b</a></figcaption></figure><p>In the image above, it is assumed that “HELLO” is translated in our computer as number “2”. The public key is a pair of numbers (5, 14) and the encrypt function is (X⁵ mod 14). The private key is (11, 14). Now, after encryption, source message becomes “4” and, after decryption, it is back “2”. You can check this with any other number (less than 14), e.g. (11⁵ mod 14) = 9 and (9¹¹ mod 14) = 11, decrypted back. <em>Note: in real life the all the numbers (5, 11, 14) are calculated using a pair of enormously large primes and are even bigger, than those primes.</em></p><p>Most of asymmetric encryption algorithms are based on <strong>trapdoor functions.</strong> These are functions, which are:</p><ul><li><strong>Easy to calculate forward</strong>, e.g. 2⁵ mod 14 = 4.</li><li><strong>Hard to calculate back</strong>, e.g. hard to find X, such that X⁵ mod 14 = 4.</li><li><strong>Easy to calculate back, if you know some additional info</strong>, called <strong>“trapdoor”</strong> and equal to 11 in our case. So, to find X, such that X⁵ mod 14 = 4 we use formula X = 4¹¹ mod 14 = 2.</li></ul><h4>Elliptic Curve Cryptography</h4><p>The key difference between RSA and ECC is the trapdoor function used, in RSA it is (x^a mod b), while ECC is more complex. Here is one more image:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*ZrzlOZDcYIFVwpypm4w7TQ.gif" /><figcaption>Source: <a href="https://arstechnica.com/information-technology/2013/10/a-relatively-easy-to-understand-primer-on-elliptic-curve-cryptography/2/">https://arstechnica.com/information-technology/2013/10/a-relatively-easy-to-understand-primer-on-elliptic-curve-cryptography/2/</a></figcaption></figure><p>The function (red) is an elliptic curve: y^2 = x^3 + ax + b.</p><p>The black dot, moving around the curve is our “trapdoor function value”, that is calculated forward. Each function step is drawing a line from point “A” and projecting new point of curve intersection to another half of the curve (up or down). It turns out, that given many steps, it is very hard to find the starting point, so this function is hard to calculate back. But, there is also a trapdoor possible, which allows to find the starting point easily (trapdoor explanation is too heavy to explain here).</p><h4>How private and public keys are used</h4><p>Using someone’s public key, you can securely message someone. But, since it all is based on functions, <strong>you could also use private key to encrypt something</strong>.</p><blockquote><strong>Homework question</strong>: what is the point of sending private-key-encrypted message to someone, given that anyone could intercept and decipher it, using your public key?</blockquote><blockquote>See answer just below!</blockquote><p>When private key is used to encrypt something, it is quite obvious, that anyone can decrypt it. But this situation gives one good benefit: it is you and only you, who could encrypt the message in such way, that your public key decrypts it. It means, that if you share your message along with its encrypted version, then anyone can check the <strong>authenticity </strong>of the message, by comparing deciphered message value to publicly shared one. This is how <strong>digital signatures</strong> work. And, by the way, in real-world only hash of message is encrypted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*krAiI5IRqTNcJyyyQV_cLQ.png" /><figcaption>Source: <a href="https://commons.wikimedia.org/wiki/File:Digital_Signature_diagram.svg">https://commons.wikimedia.org/wiki/File:Digital_Signature_diagram.svg</a></figcaption></figure><blockquote>Asymmetric cryptography and <strong>digital signatures</strong> are two major building blocks of Bitcoin.</blockquote><h3>Blockchain</h3><p>The blockchain is the most popular, yet by far the simplest concept , used in Bitcoin:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*DdJzZUrvyO49UgA1cfLTBA.png" /><figcaption>Source: <a href="https://medium.com/@lhartikk/a-blockchain-in-200-lines-of-code-963cc1cc0e54">https://medium.com/@lhartikk/a-blockchain-in-200-lines-of-code-963cc1cc0e54</a></figcaption></figure><p>Blockchain is just a data structure, that <strong>usually implies</strong> following properties:</p><ul><li>Can keep anything in “data” field (there are limitations in real life).</li><li>Hash of previous block is part of current block hash, just like all other fields. And they use cryptographic hash function here.</li><li>Resistant to modifications, since all chain of hashes after updated block will change.</li><li>Distributed and has consensus algorithm (this will be described later).</li></ul><blockquote>I say “usually implies”, since blockchain is not a well-defined data-structure or concept, like a queue or a tree. That is why there’s no exact definition. Some people might always think that “blockchain is distributed”, while others treat it more just like a linked-list.</blockquote><p>This is just as simple as above, there is really nothing special in this idea, besides its impressive use in Bitcoin and other cryptos.</p><blockquote>Blockchain is a core concept of Bitcoin. We have now discussed all the building blocks of Bitcoin, now it is time to dive into putting all the parts of the puzzle together. See you in the next part!</blockquote><p>I am Rustem Mustafin, PM at Akvelon and a fan of IT and management worlds and a developer with 10+ years of experience. Feel free to contact me on twitter <a href="https://twitter.com/rulikkk">@rulikkk</a>, or just leave a comment here. Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92b8fbbb583a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/pseudo-blog/bitcoin-puzzle-1-building-blocks-92b8fbbb583a">Bitcoin Puzzle #1: Building Blocks</a> was originally published in <a href="https://medium.com/pseudo-blog">Pseudo Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure Analysis Services Web Designer]]></title>
            <link>https://medium.com/pseudo-blog/azure-analysis-services-web-designer-2641f451f630?source=rss-4e6d4dffe91------2</link>
            <guid isPermaLink="false">https://medium.com/p/2641f451f630</guid>
            <category><![CDATA[analysis-services]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[akvelon]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[microsoft]]></category>
            <dc:creator><![CDATA[Rustem Mustafin]]></dc:creator>
            <pubDate>Fri, 01 Dec 2017 13:25:44 GMT</pubDate>
            <atom:updated>2017-12-15T10:10:10.919Z</atom:updated>
            <content:encoded><![CDATA[<p>Azure Analysis Services Web Designer is a new browser-based experience, that will allow developers to start creating and managing Azure Analysis Services (AAS) semantic models quickly and easily. Available at <a href="http://analysisservices.azure.com/">https://analysisservices.azure.com/</a>;</p><p><strong>From </strong><a href="https://www.linkedin.com/feed/update/urn:li:activity:6293939248093626368"><strong>Akvelon’s LinkedIN</strong></a><strong>:</strong></p><blockquote>Our amazing developers worked with Microsoft on this web application released today which allows users to easily update their production models on a daily basis for the most relevant information to everyone on an account and all through a web browser. Great work!</blockquote><p><strong>And </strong><a href="https://www.linkedin.com/feed/update/urn:li:activity:6296051895748431872"><strong>one more</strong></a><strong>:</strong></p><blockquote>We are proud to have worked on the Azure Analysis Services Web Designer!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*u4Nn4LEXMaViiB6g.jpg" /><figcaption>AS Web Designer interface screenshot</figcaption></figure><p>As a person, directly involved in the development process, I am really happy to share several bits from project story, social media reaction to it, and even a little technical background.</p><h3>Story</h3><p>Development was started in the first quarter of 2017 and the idea crystallized and was implemented in summer.</p><p>AS Web Designer was introduced on MS Data Insights Summit <strong>(June 12, 2017),</strong> by Josh Caplan (<a href="https://twitter.com/joshcaplan1984">@JoshCaplan</a>, Program Manager at Analysis Services in Microsoft). Check out the video:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fvh-NXHaI9VU%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dvh-NXHaI9VU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fvh-NXHaI9VU%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/69d9d81507519cf8eb762ade5c6e2dbf/href">https://medium.com/media/69d9d81507519cf8eb762ade5c6e2dbf/href</a></iframe><p>We were also tweeted about:</p><h3>Kasper de Jonge on Twitter</h3><p>Importing the powerbi desktop file into as azure!!</p><h3>Josh Caplan on Twitter</h3><p>Got to introduce this new experience today at #MSDataSummit. #Azure #AnalysisServices #MSdatainsights</p><h3>Public availability</h3><p>On <strong>July 20, 2017</strong> public URL was introduced to the designer and a post was published in Azure blog: <a href="https://azure.microsoft.com/en-us/blog/introducing-the-azure-analysis-services-web-designer/">https://azure.microsoft.com/en-us/blog/introducing-the-azure-analysis-services-web-designer/</a></p><p>Web Designer is now also accessible <strong>directly from Azure Portal</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tf64htdAVLFePzQI.png" /><figcaption>Open AS Web Designer by clicking “Open” in the bottom-right corner</figcaption></figure><p>If you have any suggestions to AS Wizard’s features, please use <a href="https://feedback.azure.com/forums/556165-azure-analysis-services">Azure Analysis Services feedback forum</a>.</p><p>There is also a video of Web Designer at Azure Friday with Josh Caplan and Scott Hanselman. Skip to 6:00 for Web Designer demo:</p><h3>Josh Caplan on Twitter</h3><p>Demo of the new web designer for #Azure Analysis Services https://t.co/98MvCjBf7v</p><p>Documentation, showing how to create mode via the new Web Designer is here: <a href="https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-create-model-portal">https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-create-model-portal</a>.</p><h3>August update</h3><p>Since the public release, Web Designer was <a href="https://azure.microsoft.com/ru-ru/blog/august-updates-to-the-azure-analysis-services-web-designer/">updated in August</a>. New features are: DAX syntax highlighting for measures; New mini-map in JSON editor; Display folder and and hierarchy support in the query designer; Table relationships editor; Copy server name.</p><p>Other reviews of Web Designer:</p><ul><li><a href="http://www.jamesserra.com/archive/2017/08/azure-analysis-services-web-designer/">http://www.jamesserra.com/archive/2017/08/azure-analysis-services-web-designer/</a></li><li><a href="https://sqlofthenorth.blog/2017/07/26/azure-analysis-services-web-designer/">https://sqlofthenorth.blog/2017/07/26/azure-analysis-services-web-designer/</a></li></ul><h3>Technology background</h3><p>The solution is a modern single-page application, based on Angular in the front-end and .NET Core in the backend. Typescript and C# are used for development.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/0*JPpNBHQsuePBKbpB.png" /><figcaption>Solution Design Diagram</figcaption></figure><p>It’s hosted fully in Azure, providing scalability and high availability. Visual Studio Online services are used to track project status and tasks.</p><p><em>Note: this post was written in August and now the update is coming! Join my telegram channel </em><a href="https://t.me/techno_ru"><em>techno_ru</em></a><em> for updates.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2641f451f630" width="1" height="1" alt=""><hr><p><a href="https://medium.com/pseudo-blog/azure-analysis-services-web-designer-2641f451f630">Azure Analysis Services Web Designer</a> was originally published in <a href="https://medium.com/pseudo-blog">Pseudo Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[100 coins cheat-sheet]]></title>
            <link>https://medium.com/pseudo-blog/100-coins-cheat-sheet-ec0078258488?source=rss-4e6d4dffe91------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec0078258488</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[cheatsheet]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Rustem Mustafin]]></dc:creator>
            <pubDate>Wed, 29 Nov 2017 11:38:11 GMT</pubDate>
            <atom:updated>2017-11-29T11:38:11.396Z</atom:updated>
            <content:encoded><![CDATA[<p>Found a good roundup here <a href="https://techcrunch.com/2017/11/19/100-cryptocurrencies-described-in-4-words-or-less/">https://techcrunch.com/2017/11/19/100-cryptocurrencies-described-in-4-words-or-less/</a></p><p><em>This list doesn’t mean you should trust these coins.</em></p><pre><strong>Name            | Sym.  | Description                              </strong><br>----------------|-------|------------------------------------------<br><strong>Bitcoin</strong>         | BTC   | Digital gold                             <br><strong>Ethereum</strong>        | ETH   | Programmable contracts and money         <br><strong>Bitcoin</strong> <strong>Cash</strong>    | BCH   | Bitcoin clone                            <br><strong>Ripple</strong>          | XRP   | Enterprise payment settlement network    <br><strong>Litecoin</strong>        | LTC   | Faster Bitcoin                           <br><strong>Dash</strong>            | DASH  | Privacy-focused Bitcoin clone            <br><strong>NEO</strong>             | NEO   | Chinese-market Ethereum                  <br><strong>NEM</strong>             | XEM   | Batteries-included digital assets        <br><strong>Monero</strong>          | XMR   | Private digital cash                     <br><strong>Ethereum</strong> <strong>Classic</strong>| ETC   | Ethereum clone                           <br><strong>IOTA</strong>            | MIOTA | Internet-of-things payments              <br><strong>Qtum</strong>            | QTUM  | Ethereum contracts on Bitcoin            <br><strong>OmiseGO</strong>         | OMG   | Banking, remittance, and exchange        <br><strong>Zcash</strong>           | ZEC   | Private digital cash                     <br><strong>BitConnect</strong>      | BCC   | Madoff-like investment fund              <br><strong>Lisk</strong>            | LSK   | Decentralized applications in JavaScript <br><strong>Cardano</strong>         | ADA   | Layered currency and contracts           <br><strong>Tether</strong>          | USDT  | Price = 1 USD                            <br><strong>Stellar</strong> <strong>Lumens</strong>  | XLM   | Digital IOUs                             <br><strong>EOS</strong>             | EOS   | Decentralized applications on WebAssembly<br><strong>Hshare</strong>          | HSR   | Blockchain switchboard                   <br><strong>Waves</strong>           | WAVES | Decentralized exchange and crowdfunding  <br><strong>Stratis</strong>         | STRAT | Decentralized applications in C#         <br><strong>Komodo</strong>          | KMD   | Decentralized ICOs                       <br><strong>Ark</strong>             | ARK   | Blockchain switchboard                   <br><strong>Electroneum</strong>     | ETN   | Monero clone                             <br><strong>Bytecoin</strong>        | BCN   | Privacy-focused cryptocurrency           <br><strong>Steem</strong>           | STEEM | Reddit with money voting                 <br><strong>Ardor</strong>           | ARDR  | Blockchain for spawning blockchains      <br><strong>Binance</strong> <strong>Coin</strong>    | BNB   | Pay Binance exchange fees                <br><strong>Augur</strong>           | REP   | Decentralized prediction market          <br><strong>Populous</strong>        | PPT   | Invoice trading futures                  <br><strong>Decred</strong>          | DCR   | Bitcoin with alternative governance      <br><strong>TenX</strong>            | PAY   | Cryptocurrency credit card               <br><strong>MaidSafeCoin</strong>    | MAID  | Rent disk space                          <br><strong>BitcoinDark</strong>     | BTCD  | Zcoin close                              <br><strong>BitShares</strong>       | BTS   | Decentralized exchange                   <br><strong>Golem</strong>           | GNT   | Rent other people&#39;s computers            <br><strong>PIVX</strong>            | PIVX  | Inflationary Dash clone                  <br><strong>Gas</strong>             | GAS   | Pay fees on Neo                          <br><strong>TRON</strong>            | TRX   | In-app-purchases                         <br><strong>Vertcoin</strong>        | VTC   | Bitcoin clone                            <br><strong>MonaCoin</strong>        | MONA  | Japanese Dogecoin                        <br><strong>Factom</strong>          | FCT   | Decentralized record keeping             <br><strong>Basic</strong> <strong>Attention</strong> | BAT   | Decentralized ad network                 <br><strong>SALT</strong>            | SALT  | Cryptocurrency-backed loans              <br><strong>Kyber</strong> <strong>Network</strong>   | KNC   | Decentralized exchange                   <br><strong>Dogecoin</strong>        | DOGE  | Serious meme bitcoin clone               <br><strong>DigixDAO</strong>        | DGD   | Organisation manages tokenized gold      <br><strong>Veritaseum</strong>      | VERI  | Vaporware                                <br><strong>Walton</strong>          | WTC   | IoT Blockchain                           <br><strong>SingularDTV</strong>     | SNGLS | Decentralized Netflix                    <br><strong>Bytom</strong>           | BTM   | Physical assets as tokens                <br><strong>Byteball</strong> <strong>Bytes</strong>  | GBYTE | Decentralized database and currency      <br><strong>GameCredits</strong>     | GAME  | Video game currency                      <br><strong>Metaverse</strong> <strong>ETP</strong>   | ETP   | Chinese Ethereum plus identity           <br><strong>GXShares</strong>        | GXS   | Decentralized Chinese Equifax            <br><strong>Syscoin</strong>         | SYS   | Decentralized marketplace                <br><strong>Siacoin</strong>         | SC    | Rent disk space                          <br><strong>Status</strong>          | SNT   | Decentralized application browser        <br><strong>0x</strong>              | ZRX   | Decentralized exchange                   <br><strong>Verge</strong>           | XVG   | Privacy Dogecoin                         <br><strong>Lykke</strong>           | LKK   | Digital asset exchange                   <br><strong>Civic</strong>           | CVC   | Identity and Authentication App          <br><strong>Blocknet</strong>        | BLOCK | Decentralized exchange                   <br><strong>Metal</strong>           | MTL   | Payments with rewards program            <br><strong>Iconomi</strong>         | ICN   | Digital asset investment funds           <br><strong>Aeternity</strong>       | AE    | Decentralized apps (prototype)           <br><strong>DigiByte</strong>        | DGB   | Faster Bitcoin                           <br><strong>Bancor</strong>          | BNT   | Token Index Funds                        <br><strong>Ripio</strong> <strong>Credit</strong>    | RCN   | Co-signed Cryptocurrency Loans           <br><strong>ATMChain</strong>        | ATM   | Advertising network                      <br><strong>Gnosis</strong>          | GNO   | Decentralized prediction market          <br><strong>VeChain</strong>         | VEN   | Supply chain item IDs                    <br><strong>Pura</strong>            | PURA  | Cryptocurrency                           <br><strong>Particl</strong>         | PART  | Privacy marketplace and chat             <br><strong>KuCoin</strong> <strong>Shares</strong>   | KCS   | Profit-sharing exchange fees             <br><strong>Bitquence</strong>       | BQX   | Mint for cryptocurrency investments      <br><strong>FunFair</strong>         | FUN   | Decentralized casino                     <br><strong>ChainLink</strong>       | LINK  | External data for contracts              <br><strong>Power</strong> <strong>Ledger</strong>    | POWR  | Airbnb for electricity                   <br><strong>Nxt</strong>             | NXT   | Cryptocurrency and marketplace           <br><strong>Monaco</strong>          | MCO   | Cryptocurrency credit card               <br><strong>Cryptonex</strong>       | CNX   | Zerocoin clone                           <br><strong>MCAP</strong>            | MCAP  | Mining investment fund                   <br><strong>Storj</strong>           | STORJ | Rent disk space                          <br><strong>ZenCash</strong>         | ZEN   | Privacy-focused Bitcoin clone            <br><strong>Nexus</strong>           | NXS   | Bitcoin clone                            <br><strong>Neblio</strong>          | NEBL  | Decentralized application platform       <br><strong>Zeusshield</strong>      | ZSC   | Decentralized insurance                  <br><strong>Streamr</strong> <strong>DATAcoin</strong>| DATA  | Real-time data marketplace               <br><strong>ZCoin</strong>           | XZC   | Private digital cash                     <br><strong>NAV</strong> <strong>Coin</strong>        | NAV   | Bitcoin with private transactions        <br><strong>AdEx</strong>            | ADX   | Advertising exchange                     <br><strong>Open</strong> <strong>Trading</strong>    | OTN   | Decentralized exchange                   <br><strong>SmartCash</strong>       | SMART | Zcoin clone with rewards                 <br><strong>Bitdeal</strong>         | BDL   | Bitcoin clone                            <br><strong>Loopring</strong>        | LRC   | Decentralized exchange                   <br><strong>Edgeless</strong>        | EDG   | Decentralized casino                     <br><strong>FairCoin</strong>        | FAIR  | Bitcoin that rewards savers</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec0078258488" width="1" height="1" alt=""><hr><p><a href="https://medium.com/pseudo-blog/100-coins-cheat-sheet-ec0078258488">100 coins cheat-sheet</a> was originally published in <a href="https://medium.com/pseudo-blog">Pseudo Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Мой Март]]></title>
            <link>https://medium.com/series/%D0%BD%D1%83-%D0%B3%D0%BB%D1%8F%D0%BD%D0%B5%D0%BC-e470fba906ee?source=rss-4e6d4dffe91------2</link>
            <guid isPermaLink="false">https://medium.com/p/e470fba906ee</guid>
            <dc:creator><![CDATA[Rustem Mustafin]]></dc:creator>
            <pubDate>Thu, 02 Mar 2017 19:58:22 GMT</pubDate>
            <atom:updated>2017-03-31T23:50:52.520Z</atom:updated>
            <content:encoded><![CDATA[<p>Сейчас будет лицо после 10,5 часового рабочего дня –</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cbGRfe2aF-tmSQatqhycdg@2x.jpeg" /></figure><p>12 марта, подводим итоги дня.</p><p>Сегодня явно не день день Дильбар (забыла кучу вещей на прогулку, разбила что-то и вообще), но зато мы весело и удачно погуляли в парке «Чёрное озеро».</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dqy9Db1JMYYb_I2LOMGsdA@2x.jpeg" /></figure><p>16 марта, утро, вся семья.</p><h3>👪</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E3CWeFgpyQDaHMpUIkEipw@2x.jpeg" /></figure><p>18 марта, кафе «Мари Мадлен».</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BscHKAEBCI7zOiVQtVhClA@2x.jpeg" /></figure><p>19 марта, после обеда.</p><p>День в бегах.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NZVbJxY_U8xaDB7g5hkFPg@2x.jpeg" /></figure><p>19 марта,</p><p>Искандер и бабушки.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pu7axKXFqjJaQeudlj2ElQ@2x.jpeg" /></figure><p>25 марта, проснулся после сна после завтрака.</p><h3>Вот и закончился мой март</h3><p>В апреле у меня есть идея на другой тип истории, будем смотреть, получится ли.</p><blockquote>Спасибо и до новых встреч!</blockquote><h3>🎉</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e470fba906ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[On Proactivity and Proactive Way]]></title>
            <link>https://medium.com/pseudo-blog/on-proactivity-and-proactive-way-63d025ec3279?source=rss-4e6d4dffe91------2</link>
            <guid isPermaLink="false">https://medium.com/p/63d025ec3279</guid>
            <category><![CDATA[jobs]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[hiring]]></category>
            <category><![CDATA[getting-things-done]]></category>
            <dc:creator><![CDATA[Rustem Mustafin]]></dc:creator>
            <pubDate>Tue, 28 Feb 2017 23:50:25 GMT</pubDate>
            <atom:updated>2017-02-28T23:50:25.358Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*PlOWfD9q8D9dc2JW3m8BIg.png" /><figcaption>Source: <a href="http://www.rabbit-comics.org/index.php?number=2688">rabbit-comics</a></figcaption></figure><p>How often have You typed or read that word: <strong>“proactive”</strong>? It is a really common one, but I do not feel it is correctly understood. Let us review it in job descriptions. Here is the first text right from Google:</p><blockquote><em>The Proactive Engineer is responsible for proactively providing remote monitoring and management (RMM) of client IT infrastructure’s while providing prompt, courteous support service.</em></blockquote><p>So, what does “proactive” mean here and what is the difference between “proactive monitoring” and usual one?</p><p>If I were the one to write down such sentence, I would mean something like:</p><blockquote>If your monitoring shows something, do not wait till I notice that same thing and push you to fix it or take whatever action required. You should know what to do — and do it.</blockquote><p>It is like imagining that the thing you monitor is your own one, and you would never want it to be down, unresponsive or in any other bad condition.</p><p>So, what should proactive engineer do, to be truly proactive? Well, at first I would expect a whole lot of questions to be asked:</p><blockquote><em>— What does this yellow circle mean?</em></blockquote><blockquote><em>— Can we put a timer here?</em></blockquote><blockquote><em>— What if I restart just this one thing?</em></blockquote><p>I call this period “diving deep”. The fun thing is, that for many people, there are weeks or even years, until “diving deep” even starts. Alternatively, in some places, you never “dive deep”. You just ask nice questions, do a thing or two and get another working area.</p><h3>The next thing</h3><p>The next thing is, he sholud get into the business:</p><blockquote><em>— We would need a new disk drive in around a week here. I’ve sent an email.</em></blockquote><blockquote><em>— This thing is not backed up. We lost some data last week and last month already. I am asking for new backup service.</em></blockquote><blockquote><em>— If only I had this thing logged, I could see a real reason for an issue.</em></blockquote><p>All in all, do you think we are still “proactive”? I would say, yes.</p><p>Here is what happens after the “deep dive”: its outcomes turn into pure experience, that we posess. Now, in most cases, it depends on person’s internal (guess what?) proactivity—to go with you or to stay. I have seen numerous times people being in “post-deep-dive depression”, which, displays itself as a state of mood, when you know what to do, but just keep calm, since you have done that a thousand of times and have already been in, virtually, any possible situation, that might happen:</p><blockquote><em>— Just call Mike, he’s the only one who can do it.</em></blockquote><blockquote><em>— Cheapest drives are here. Buy three, just in case.</em></blockquote><blockquote><em>— The won’t increase backup storage space. Don’t bother knocking their emails.</em></blockquote><p>This is definitely not “proactive”. On the other hand, your internal proactivity might lead to giving up such an occupation and find out some other place, where you could “get into the business” and “dive deep”. What could be the proactive way? It turns to me, that a person should once again “get to know”, but this time on a whole new level:</p><blockquote><em>— That junior, John, could I ask him to buy some drives? I could improve X during that time.</em></blockquote><blockquote><em>— We could get add the following requirement. A and B could probably even pay for it.</em></blockquote><p>Does this look proactive enough? I would say a big “yes”.</p><h3>The Takeout</h3><p>Try to always figure out: are you in “get to know” or “dive deep” position? Should you ask questions or provide ideas? And, at any time, should you stay calm for at least an hour — that is not proactive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*j4CxymJK-iud2Bky10jinA.jpeg" /><figcaption>The Proactive Way</figcaption></figure><p>Also, a simple-stupid side note: all real and important things happen in-between you taking those proactive decisions. It happens, while you actually do those proactive things. You may sometimes miss but you will hit at least once, which is a big win. So, do not spend much time on being proactive, just pick the best thing and do it.</p><h3>Higher Level Takeout</h3><p>Are you the one, who asked for a proactive engineer? The one who typed that word, without actually figuring out, what you expect? Here is a Wikipedia definition for you:</p><blockquote>Proactivity or proactive behavior by individuals refers to anticipatory, change-oriented and self-initiated behavior in situations. Proactive behavior involves acting in advance of a future situation, rather than just reacting. It means taking control and making things happen rather than just adjusting to a situation or waiting for something to happen. Proactive employees generally do not need to be asked to act, nor do they require detailed instructions.</blockquote><blockquote>— Looks good, just hire some proactive people and they will get things done!</blockquote><p>Correct? NO!</p><p><strong>You are responsible for making sure, each one you asked to be proactive, has a chance to be proactive.</strong> You received that responsibility, when you typed the word. You should transfer your understanding and vision to them, make sure all “get to know” questions are answered and all ideas from “deep diving” are reviewed. You should also know, what to do with them in “post-deep-dive” period (no advice here). And keep in mind: they are not proactive for you, they are generally proactive, they want and will be.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63d025ec3279" width="1" height="1" alt=""><hr><p><a href="https://medium.com/pseudo-blog/on-proactivity-and-proactive-way-63d025ec3279">On Proactivity and Proactive Way</a> was originally published in <a href="https://medium.com/pseudo-blog">Pseudo Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Site Proposes to Hack Almost Any Popular Messenger and Social Network]]></title>
            <link>https://medium.com/@rulikkk/site-proposes-to-hack-almost-any-popular-messenger-and-social-network-20a36636030c?source=rss-4e6d4dffe91------2</link>
            <guid isPermaLink="false">https://medium.com/p/20a36636030c</guid>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[news]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Rustem Mustafin]]></dc:creator>
            <pubDate>Mon, 23 Jan 2017 17:29:12 GMT</pubDate>
            <atom:updated>2017-01-23T17:29:44.849Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rCHo8K8EhMXXzyir2TrMkQ.png" /></figure><h4>An email hit my inbox lately, that said: “Gonna order your hack?”</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*x1N9Fe1NPnQcbFkrxKkmUw.png" /><figcaption>“From” and “To” addresses were removed</figcaption></figure><p>“Gonna order your hack”—this was an email that I have received recently. At first, I almost deleted it, but the message contained no body, which was quite surprising. I tracked the gmail account in google and found a site, which proposes to hack almost any kind of messenger and social network that I could imagine. I will not refer this site, but I think it can be easily discovered.</p><p>I was also quite surprised by the fact, that the email contained the name of person; site “whois” info contains reference to another person, mobile phone and event the city. I expected hackers to hide their identity, while this one apparently does not, so the trust level fell even below zero.</p><p>Hacking any messenger or social network account is even more surprising, because almost all of these services claim to be super-secure and really care about our privacy. So the question is: what does the site really propose?</p><p>It seems the price starts at around $50 and you can ask for a history of your victim’s messages for some period of time. There is another interesting option: you get full control of your victim’s account, including sending/receiving messages and posting content. They even promise, that the victim may <em>know</em> or may <em>not know</em> about the hack—it is up to the customer to choose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lUbqToDxZIf8zFX0efBcbQ.jpeg" /></figure><p>Looks really scary, but <strong>there is no confirmation that this works</strong>. Anyone wants to test that?</p><p>My suggestion would be to start with Durov’s account in Telegram—he offered a good prize. However, there were some examples of successful attempts, that were not accepted as “security breaches” by telegram tech team.</p><p>So:</p><ul><li><strong>Do not, even in case of strong desire, use this. </strong>Most likely, you will just loose your money, but will harm only yourself. Less likely, you will break into someone’s private space, and then, who knows how harmful this might get. 😬</li><li>Let’s hope there is someone who will confirm this is just another fraud and our private photos are still private. 😇</li><li>Still, use real-world talk or enterprise (company) email account for sensitive data; use good password and do not miss security warnings. 😎</li><li>Did you notice, that Skype is not on the list? I will cover known Skype breach next time. There is one that you might not know yet—and it’s confirmed to work. 😕</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20a36636030c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deluge and rtorrent: my story]]></title>
            <link>https://medium.com/pseudo-blog/deluge-and-rtorrent-my-story-b51f27d9f730?source=rss-4e6d4dffe91------2</link>
            <guid isPermaLink="false">https://medium.com/p/b51f27d9f730</guid>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[torrent]]></category>
            <category><![CDATA[home]]></category>
            <category><![CDATA[deluge]]></category>
            <category><![CDATA[servers]]></category>
            <dc:creator><![CDATA[Rustem Mustafin]]></dc:creator>
            <pubDate>Fri, 06 Jan 2017 07:24:50 GMT</pubDate>
            <atom:updated>2017-01-06T07:24:50.669Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iCovvdsdD1d9CiFUv2xXDg.jpeg" /><figcaption>Meaningless image that I still like. It kinda describes torrent swarm…</figcaption></figure><h4>The simple way and the hard way</h4><blockquote>TL;DR: Ladies and gentlemen, use deluge over rtorrent: it is way easier and more stable (in my env). Use docker where possible.</blockquote><p>When I finally decided to resurrect my home torrent setup, my eye fell upon a lightweight app rtorrent. I already had an old laptop with server Ubuntu (32-bit due to small amount of RAM, <strong>never use 32-bit, don’t repeat my mistake</strong>), attached to router by cable, with a 1TB USB hdd, which became the victim of this experiment.</p><h3>rtorrent and rutorrent</h3><p>At first I decided to go “minimal way” and install rtorrent with its widely praised web interface rutorrent. There is a good guide on doing that in rutorrent’s <a href="https://github.com/Novik/ruTorrent/wiki/WebSERVER">GitHub</a>, besides the fact, that it’s hidden in the wiki and spread to several pages.</p><p>Here the endless configuration journey begins. At first, I found out that rutorrent won’t work without a webserver (<em>hey, it’s 2017 — firing up a web server is as easy as python one-liner, express.js multi-liner, etc.</em>) but that’s ok: I can and like doing Nginx configuration.</p><p>So, couple ten-minute intervals later, I have a working web-server in default /var/www/html with ruTorrent’s subdirectory (not mentioning PHP installation for Nginx and all such things). Do you think that was enough?</p><p>No. Actually, I could access ruTorrent, but it said that “share” folders are not accessible and therefore, I cannot use torrents, yet. Also, a bunch of messages about inaccessible apps like curl, stat and such” showed up, hinting, that the app is almost useless yet. So, “share” folders were resolved by chown-ing the share folder with www-data user (<em>I don’t know where from I know that</em>) but the “curl/stat” issue was not known to me. Couple more ten-minutes later, googling showed that it is magically resolved by configuring direct path to those things inside rutorrent, instead of hoping it can find them in PATH (<em>they are there, I’ve tested</em>). Still, rutorrent finds all other stuff in PATH, like ffmpeg, mediainfo, etc. Now, do you think this was enough?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*v9m6sxqLnrzpiRPjSLaaTg.png" /><figcaption>Well, it did finally work… (image from theprofoundprogrammer.com)</figcaption></figure><p>No. I had to make sure someone launches rtorrent for rutorrent. Ok, I believe this was covered somewhere inside wiki, I mentioned earlier, and after using couple systemctl calls (again, it did not work with default googled scripts, because killall returns non-zero exit code if nothing was killed, but I could fix that), I had rtorrent always running inside screen, available to rutorrent’s web interface. Did it start working?</p><p><strong>Finally, it did.</strong> Well, there was on thing which did not work: my copy-here-to-download folder, configured in rtorrent, stopped magically working with rutorrent, but I decided to resolve that later.</p><h3>The big fail</h3><p>I started downloading a 5Gb single-file thing to my external drive. Speed was high on a nice chart in rutorrent’s interface. File was downloaded in 30 minutes or so. Then, it checked if file was OK by re-hashing. File was not OK on around 20% mark:</p><blockquote>Inactive: Hash check on download completion found bad chunks, consider using “safe_sync”.</blockquote><p>Well, things happen (although, I heard that torrent protocol checks and re-checks every chunk it works with). Let’s just download that small thingy once again and fix it all, by restarting the download. <strong>Didn’t work: </strong>it even decided to download the whole remaining part and again failed with same error on same 20%. Well, let’s try using that “safe_sync” setting. Didn’t work. Ok, let’s try downloading the whole thing once again. Same thing.</p><h3>😳</h3><p>Let’s thoroughly google the error. It’s partially covered on these links:</p><ul><li><a href="http://nerdbynature.de/s9y/2013/04/01/rTorrent-Hash-check-on-download-completion-found-bad-chunks,-consider-using-safe_sync">rTorrent: Hash check on download completion found bad chunks, consider using &quot;safe_sync&quot;</a></li><li><a href="https://dev.openwrt.org/ticket/4420">#4420 (rtorrent shows error when checking single file bigger than 4GB) - OpenWrt</a></li><li><a href="https://ubuntuforums.org/showthread.php?t=1186176">[ubuntu] rtorrent - hash check and bad chunks</a></li><li><a href="https://github.com/rakshasa/rtorrent/issues/438">Last chunks download / check error · Issue #438 · rakshasa/rtorrent</a></li></ul><p>And even rtorrent’s own repo, where it gets closed, with no understandable fix to me. I have tried all solutions that were mentioned there. Nothing helped.</p><p>Now, there’s only one way out. Remove the whole thingy and choose something else.</p><h3>Deluge setup</h3><p>After all previous trial-and-error steps, setting up deluge is just apt-getting two packages (deluge and its www interface) and running them as services.</p><p>On the first open of deluge-www, you get to configure all folders (even “copy-here-to-download” now works) and ready to go. Hooray 🎉!</p><p><strong>And it got 5Gb file in same time.</strong></p><h3>Next steps</h3><p>I plan setting up my home-telegram-bot, that would control deluge. Maybe migrate the whole setup to docker.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b51f27d9f730" width="1" height="1" alt=""><hr><p><a href="https://medium.com/pseudo-blog/deluge-and-rtorrent-my-story-b51f27d9f730">Deluge and rtorrent: my story</a> was originally published in <a href="https://medium.com/pseudo-blog">Pseudo Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SPA]]></title>
            <link>https://medium.com/pseudo-blog/spa-b0b385b2c738?source=rss-4e6d4dffe91------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0b385b2c738</guid>
            <dc:creator><![CDATA[Rustem Mustafin]]></dc:creator>
            <pubDate>Mon, 29 Jul 2013 13:49:07 GMT</pubDate>
            <atom:updated>2013-07-29T19:04:22.199Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dvT08sp64k27LJBi.jpeg" /><figcaption>HTTP://WWW.PALAZZOARZAGA.COM/SPA/</figcaption></figure><h4>Single page applications</h4><h3>Что мы о них знаем?</h3><p>SPA — это приложения для браузера, работающие на одной странице.</p><p>Странно выходит, но многое, что мы делаем как раз попадает под это определение: список проектов на C# и phonegap.</p><p>Про них даже есть книга <a href="http://singlepageappbook.com/">http://singlepageappbook.com</a>! Кто-то использует их в <a href="http://www.codeproject.com/Articles/596712/Enterprise-SPA-Single-Page-Applications">Enterprise</a>. Кто-то только о них и <a href="http://www.johnpapa.net/spa/">говорит</a>.</p><h3>Архитектура</h3><p>Вот какая архитектура для этих приложений предлагается в книге:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/0*XOMd9IxA7EuOzfK8.png" /><figcaption><a href="http://singlepageappbook.com/goal.html">singlepageappbook.com</a></figcaption></figure><p>А вот базовые принципы, которых нам так не хватало:</p><ol><li><strong>Write-only DOM.</strong> Вы не имеете права читать состояние модели, или чего-либо ещё из DOM.</li><li><strong>Models are source of truth. </strong>Брать информацию можно только из моделей. Представления всего лишь отражают текущее состояние моделей.</li><li><strong>Views observe model changes. </strong>Представления наблюдают за моделями, от которых зависят. Если у одной модели несколько представлений — она от этого не усложняется.</li><li><strong>Decoupling, etc.</strong> Делайте маленькие модельки с маленькими вьюшками, скрывающими реализацию и представляющими маленькие интерфейсы внешнему миру. Если что-то поменяется — будет проще.</li><li><strong>Minimize DOM-dependent code.</strong> Весь код, который зависит от DOM, может сломаться в других браузерах. Его стоит минимизировать, а то что всё равно нужно — изолировать. Неплохая аналогия для такого кода — неуправляемый код в приложении .NET (такой код никто не любит).</li></ol><h4>А что контроллер?</h4><p>По идее он отвечает за события из DOM, события моделей, переходы по страницам (когда надо показать новые вьюшки), изменения глобального состояния (кончился интернет), обработку отложенных ответов AJAX, асинхронных событий (webSockets), создание экземпляров моделей и представлений.</p><p>Не слишком ли много для одной сущности?</p><p>Определённо, каждая из этих задач должна решаться по-своему, и не надо смешивать всё это в один GOD CONTROLLER.</p><h3>Code-base или как нам хранить исходники</h3><p>Используйте require.js (и постарайтесь разобраться с её билд-системой). Храните темплейты в отдельных файлах.</p><p>Namespaces из kt.js — это плохо. Вот почему:</p><ul><li>Они не обеспечивают истинного ограничения видимости, всё что раз было положено в App.* доступно всем и всегда. Ты никак это не контролируешь.</li><li>Очень легко получить зависимость от глобального состояния App.*, в то время как её не должно быть. Кто-то посчитает, Очень легко там что-то изменить, хотя такое вообще не должно быть возможным.</li></ul><p>Но это также и хорошо:</p><ul><li>Не надо каждый раз давать имя зависимостям из require.</li><li>У каждого класса есть своё место и имя.</li></ul><h3>А что в реальности?</h3><p>Вот как это выглядит в одном из реальных приложений:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/0*7kv8wTRIUG37ccms.png" /><figcaption>TempHire</figcaption></figure><h3>Что нам даёт Джон Папа</h3><p>Он сделал шаблон для SPA приложений, который назвал Hot Towel (“тёплое полотенце” — потому что в СПА без него никак). Это приложение включает в себя несколько вещей, на которых обязательно надо остановиться.</p><h4>Bundles</h4><blockquote>using System.Web.Optimization;</blockquote><p>Кто-то уже придумал за нас, как сжимать код в приложении на C#. Для этого создаются “Bundles” — наборы js и css файлов, которые можно вставить в страницу и в зависимости от настроек (которые можно менять согласно конфигурации Debug/Release) они либо будут сжаты, либо нет. Профит.</p><h4>Breeze.js — Nhibernate in javascript</h4><p>Работает EF, для варианта code-first просто сказка: любая модель тут же становится доступна на стороне клиента через один новый метод контроллера Web API:</p><blockquote>[HttpGet] public IQueryable&lt;User&gt; Users() { return context.Context.Users; }</blockquote><p>А на клиенте:</p><blockquote>var q = EntityQuery.from(‘Users’).where(‘…’).select(‘…’); //query<br>manager.Execute(q, done, error); //node style</blockquote><p>Сохранение всех сущностей — это вообще один метод в контроллере на сервере и один — на клиенте:</p><blockquote>[HttpPost]<br>public SaveResult SaveChanges(JObject saveBundle) { return context.SaveChanges(saveBundle);<br>}</blockquote><blockquote>// javascript<br>manager.saveChanges().then(saveSucceeded).fail(saveFailed);</blockquote><p>Также в комплекте:</p><ol><li>Локальный кеш (и сохранение в localStorage!)</li><li>Отслеживание изменений моделей</li><li>Модели — готовые ViewModels для Angular/Knockout</li><li>Запросы/обращения к связанным моделям с Lazy/Eager loading</li></ol><h4>Durandal.js</h4><p>Автоматически соотносит ViewModels и Views. Views — это HTML с привязкой данных через knockout. Есть роутер через хеш (можно юзать свой). Для каждой ViewModel вызывает методы на вход/выход, проверку “хотите покинуть страницу?” и т.д. Есть свои диалоги и MessageBox.</p><h4><a href="http://codeseven.github.io/toastr/demo.html">Toastr</a></h4><p>Простая библиотека для всплывающих уведомлений. Написана им самим.</p><h3>Вердикты</h3><ul><li>Принципы построения — <strong>must have</strong></li><li>Bundles — <strong>must have (C#)</strong></li><li>Breeze — <strong>C# must have</strong> / node.js maybe</li><li>Durandal — must have for knockout</li><li>Toastr — maybe</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0b385b2c738" width="1" height="1" alt=""><hr><p><a href="https://medium.com/pseudo-blog/spa-b0b385b2c738">SPA</a> was originally published in <a href="https://medium.com/pseudo-blog">Pseudo Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>