<?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 Piotr Misiurek on Medium]]></title>
        <description><![CDATA[Stories by Piotr Misiurek on Medium]]></description>
        <link>https://medium.com/@piotrmisiurek?source=rss-fa34890f8158------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*8mJ_rDmBse0IUZax.</url>
            <title>Stories by Piotr Misiurek on Medium</title>
            <link>https://medium.com/@piotrmisiurek?source=rss-fa34890f8158------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 21:17:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@piotrmisiurek/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[Code your own bitcoin transaction]]></title>
            <link>https://medium.com/ragnarson/code-your-own-bitcoin-transaction-e7d49b5a4e83?source=rss-fa34890f8158------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7d49b5a4e83</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[Piotr Misiurek]]></dc:creator>
            <pubDate>Thu, 06 Apr 2017 00:00:00 GMT</pubDate>
            <atom:updated>2017-04-07T06:28:27.148Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MBqMH4WJuidaM76B.png" /></figure><p>Today we will code our first bitcoin transaction. To achieve this goal we will use JavaScript library called <a href="https://github.com/bitpay/bitcore-lib">bitcore</a>. JavaScript is the most popular, modern programming language and almost every developer knows it, so it makes this article universal and useful for the wider audience.</p><p>Before you continue to read the article, you should have at least basic technical knowledge about how bitcoin blockchain works. If not please dedicate a few minutes to read <a href="https://blog.ragnarson.com/2016/12/01/blockchains-a-brief-introduction.html">brief introduction to blockchain</a>. If you have more time, like a few hours, I recommend you to read <a href="https://github.com/bitcoinbook/bitcoinbook/tree/develop">Mastering Bitcoin</a>.</p><p><a href="https://docs.npmjs.com/cli/init">Let’s start with a new NPM project</a> with following dependencies:</p><pre>[...]<br>&quot;dependencies&quot;: {<br>    &quot;bitcore-explorers&quot;: &quot;^1.0.1&quot;,<br>    &quot;bitcore-lib&quot;: &quot;^0.13.19&quot;<br>}<br>[...]</pre><p>Open index.js file and import bitcore library:</p><pre>var bitcore = require(&quot;bitcore-lib&quot;);</pre><p>To spend bitcoins we need an address that contains bitcoins and a private key that allows us to spend it. We will import the private key in WIF version. WIF is an abbreviation of Wallet Import Format. It is in use to easily import keys between bitcoin wallets. Then we will create a testnet address from that private key:</p><pre>var privateKeyWIF =      &#39;cQN511BWtc2dSUMWySmZpr6ShY1un4WK42JegGwkSFX5a8n9GWr3&#39;;<br>var privateKey = bitcore.PrivateKey.fromWIF(privateKeyWIF);<br>var sourceAddress = privateKey.toAddress(bitcore.Networks.testnet);</pre><p>WARNING! In that example, I share with you my private key. You shouldn’t do that in real life. The one who has the private key is the owner of the bitcoins allocated to address made from this key. It is a sign of the ownership.</p><p>In this case, I just shared with you the key used to create a testnet address. Testnet is a bitcoin network created for software and scripts testing. It doesn’t contain real bitcoins, only the test ones. You can gain them for free. Even if someone steals them it is not a big deal. I can take that risk to provide you a working out of the box example.</p><p>If someone used/stole all test bitcoins from this address you can recharge it. Copy the address mibK5jk9eP7EkLH175RSPGTLR27zphvvxa and <a href="http://tpfaucet.appspot.com/">paste it in the form</a></p><p>It is time to create our targetAddress where we want to sent our test bitcoins.</p><pre>var targetAddress = (new bitcore.PrivateKey).toAddress(bitcore.Networks.testnet);</pre><p>Let’s check our source address if any bitcoins remained there. Bitcoin network use UTXO to store that information. UTXO is an abbreviation of <a href="https://bitcoin.org/en/glossary/unspent-transaction-output">Unspent Transaction Output</a>.</p><p>Houston, we have a problem. We don’t have a bitcoin network client. The full node requires at least 125 GB of hard drive space which is too much for my poor MacBook Air. We have to find a workaround. We have to ask someone to read the Bitcoin network for us. And to broadcast our transaction as well.</p><p>In this case, we are losing the biggest advantage of bitcoin blockchain. The architecture of the system makes us don’t have to trust any parties. The network consensus, the math and the encryption make the data stored in blockchain trusted. But now we are asking middleman to read this data for us. He might provide us fake or outdated data.</p><p>We will use Insight from bitcore-explorers library. As it is quite popular and we are only learning here we can assume it can be trusted. The final solution should be to have our own Bitcoin full node.</p><p>Ok, let’s use Insight to check how many Bitcoins we have to spend.</p><pre>var Insight = require(&quot;bitcore-explorers&quot;).Insight;<br>var insight = new Insight(&quot;testnet&quot;);<br><br>insight.getUnspentUtxos(sourceAddress, function(error, utxos) {<br>  if (error) {<br>    console.log(error);<br>  } else {<br>    console.log(utxos);<br>    // transaction code goes here<br>}</pre><p>The output of UTXOs is an array. Each of its element contains info about the address that is a owner of UTXO and an amount of Satoshis (1 Satoshi = 0.00000001 Bitcoin). It looks like this:</p><pre>[ &lt;UnspentOutput: dbe9ce2ae27d7ffcba40195e7ee628e9165568115931386b27b0c0674fa019c5:1, satoshis: 5047177248, address: mibK5jk9eP7EkLH175RSPGTLR27zphvvxa&gt; ]</pre><p>It is time to create our transaction:</p><pre>var tx = new bitcore.Transaction();</pre><p>Let’s set the received UTXOs as an input of the transaction. An important thing to notice: we are not getting bitcoins from address but from UTXOs</p><pre>tx.from(utxos);</pre><p>Let’s set the receiver of our transaction and amount we want to deliver to him. The amount is given in Satoshis, the smallest unit of Bitcoin: 1 Satoshi = 0.00000001 Bitcoin. This is the output of our transaction:</p><pre>tx.to(targetAddress, 10000);</pre><p>It is time to talk about the change. UTXOs are the output from transactions that point to our address and have not been spent yet. UTXOs are like a bank note. If you have 5 dollar note in your pocket and want to buy 2$ beer you don&#39;t cut a part of the bill and give it to a cashier. You give the 5$ note and receive 3$ change. It works exactly the same with UTXOs. You have to use entire UTXO in a transaction and specify the change value and address then the change should be returned.</p><p>WTF? Do I have to specify the change value? In shop when I buy 2$ dollar beer with 5$ note then I receive 3$ change in return. It is obvious. Nothing to be calculated.</p><p>In Bitcoin, there is a little difference. In reality, the change is just another output of a transaction. And the sum of outputs should be a little smaller than the sum of input. The difference is called mining fee. You pay it to the miners to be included in the transactions block. The wallets or libraries like bitcore.io estimate the mining fee for us. So in our case, we just specify the address where change should be returned.</p><pre>tx.change(sourceAddress);</pre><p>You can notice that we use our sourceAddress. As a result, some of existing UTXOs for this address disappear (they will be spent already), but there will also be a new one created(the one from the change).</p><p>In real life, the wallets are using a new address for each of your transactions. The goal of that is to improve anonymity. How is it possible that from one private key the wallet is able to create many public keys and addresses? <a href="https://en.bitcoin.it/wiki/Deterministic_wallet">Read about Deterministic wallet to find the answer</a></p><p>Great! Everything is set! The only thing we have to do right now is to sign the transaction with our private key and send it to the Bitcoin blockchain. As I mentioned before we don&#39;t have our own bitcoin client. We use external tool to communicate with the blockchain. The question is: can we put trust in it. When we broadcast transaction there is no risk that the tool will capture private key or manipulate the transaction (change targetAddress for example). If the tool makes any changes listed above, then the signature will not be valid any more and transaction will be rejected. The only risk is that the tool won&#39;t sent the transaction at all. But we can verify it in a second with any blockchain explorer. So without fear, we can use Insight again:</p><pre>tx.sign(privateKey);<br>tx.serialize();<br><br>insight.broadcast(tx, function(error, transactionId) {<br>  if (error) {<br>    console.log(error);<br>  } else {<br>    console.log(transactionId);<br>  }<br>});</pre><p>That’s all folks! The transaction is broadcasted to the network. If everything goes well we will receive transaction id. Then copy and paste it in <a href="http://tbtc.blockr.io/">bitcoin blockchain explorer</a> to see if it really works.</p><p><a href="https://github.com/PiotrMisiurek/screw-it-lets-do-it/blob/829ae579c52112e216ed348cda15ed555744eccf/index.js">The entire code is available on GitHub</a></p><h3>What is next</h3><p>In the next bitcoin episode, we will code the <a href="https://en.bitcoin.it/wiki/Multisignature">multi-sig transaction</a></p><p>You are welcome to leave a tip, if you like the content:</p><ul><li>BTC: 14DgncjAnqM3Wd2pYyoJTXckSXuVv43cNx</li><li>ETH: 0x3e6bE376ef37D96bd3E7F792098c90B87B84B042</li></ul><p><em>Originally published at </em><a href="https://blog.ragnarson.com/2017/04/06/code-your-own-bitcoin-transaction.html"><em>blog.ragnarson.com</em></a><em> on April 6, 2017.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7d49b5a4e83" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ragnarson/code-your-own-bitcoin-transaction-e7d49b5a4e83">Code your own bitcoin transaction</a> was originally published in <a href="https://medium.com/ragnarson">Ragnarson</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“By order of the Peaky fuckin’ Blinders” — how to do dirty work and don’t get caught — episode 2]]></title>
            <link>https://medium.com/ragnarson/by-order-of-the-peaky-fuckin-blinders-how-to-do-dirty-work-and-don-t-get-caught-episode-2-acd23d09c3ce?source=rss-fa34890f8158------2</link>
            <guid isPermaLink="false">https://medium.com/p/acd23d09c3ce</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Piotr Misiurek]]></dc:creator>
            <pubDate>Fri, 03 Mar 2017 00:00:00 GMT</pubDate>
            <atom:updated>2017-03-03T12:17:24.588Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VksqOrz4-1pZJw2Y.png" /></figure><blockquote><em>“Intelligence is a very valuable thing, innit, my friend? And usually it comes far too fucking late.”</em></blockquote><p><em>Alfie Solomons</em></p><p>This time is different. Intelligence comes in the right time. In <a href="https://blog.ragnarson.com/2017/02/14/by-order-of-the-peaky-fuckin-blinders-how-to-do-dirty-work-and-dont-get-caught-episode-1.html">the previous episode</a>, we learned how is “our” API working. It is time to code the scraper that will use this API to get the data we want. Unfortunately, the API provider probably doesn’t want us to get this data. He will ban us as soon as he will notice our unwelcome activities. Good news is that we will be smart from the beginning and prevent being noticed and banned :)</p><p>What are the factors that can give us away?</p><ul><li>A lot of traffic from specific IP address</li><li>A lot of traffic from countries where the app is not in use</li><li>Invalid / inconsistent requests headers</li><li>Increase in traffic load at specific time</li></ul><p>Let’s solve them one by one.</p><h3>Use proxies to not increase traffic from one specific IP address</h3><p>The IP address check is the easiest way to notice suspect traffic in API logs. IP ban is also the easiest way to avoid this kind of activities. You can avoid this situation in two ways:</p><ul><li>Write your scraper in master/slaves architecture</li><li>Use external proxy providers to make API requests</li></ul><p>In the first case, you need to write a few apps (slaves) that are sending requests to the API. The data from parsed responses is sent to one central app (master) which is responsible for data storage. Each slave has his own unique IP address which limits the number of requests made from one IP address.</p><p>In the second case, you have only one app that is responsible both for sending requests to the API and for the storage of parsed responses in our database. The app is configured to use a proxy. The app is sending a request to the proxy, the proxy in making this request to the API and then return the response to our app. If you choose good proxy it will use a wide range of IPs to make requests. So the number of requests made from one IP address is very limited.</p><p>We decided to use the second approach. It looks less time consuming, cheaper and giving better results.</p><p>It is less time consuming because you write a single app and configure it in a few lines of code to use proxy service. In another case, you have to write two apps (master and slave) and implement communication layer between them. You also have to setup up and maintain infrastructure for them.</p><p>The developer working time is one of the most important costs. If he will spend significantly less time on development, than the cost also will be smaller. Even if we have to pay for an external proxy service. You can use this kind of services in a subscription model. You can get a solution for the monthly price of 1 or 2 developer working hours. In the case of master/slaves architecture, you will probably have to invest more money in the infrastructure (hosting and IP addresses).</p><p>In master/slaves architecture, the efficiency of the system depends on the number of slave apps. You can increase the number of slaves to reduce the amount of request made from single IP address. With a few slaves, the number of request from one IP address can still be quite significant and can be noticed by APIs admin and banned. Every ban has to be discovered and solved by our own.</p><p>If you use proxy service provider he will provide you dozens, hundreds or even thousands of IP address that will be randomly (or as they usually say: by smart algorithms) assigned to your requests. None of them will make a significant amount of requests so they should be not banned. But even if some IPs are banned for some reason you still have a lot of other to use and you don’t have to take any action. Most of the providers recognize bans on themselves. They retry banned request on another IP address and blacklist the IP to not be used for your request in the future. The cool thing is that the developer and the product owner don’t have to even know about it. From outside perspective, it just works.</p><h3>Crawlera</h3><p>In this article, we will use proxy service called Crawlera. Which I prefer, because it offers good quality and all required options by reasonable price. By required options I mean: * Large monthly limit of request (150k in the cheapest plan, millions in other plans) * Wide range of IP addresses * Concurrent requests * Customization of user agent * You can limit IP address you want to use to selected countries * Sessions support (you can pass many related requests via the same IP address)</p><p>To make a request via Crawlera you just have to use it as a proxy and provide your API KEY. With curl it will look like this:</p><pre>curl -U API_KEY -x proxy.crawlera.com:8010 <a href="http://blog.ragnarson.com/">http://blog.ragnarson.com</a></pre><p>It works the same in the app code. You just have to specify a proxy for your request.</p><p>We have a rails app that uses Typhoeus gem to make HTTP requests to the API. To make a standard GET request you have to call:</p><pre>Typhoeus.get(“http://blog.ragnarson.com&quot;)</pre><p>To use Crawlera you have to also specify proxy and proxyuserpwd options:</p><pre>Typhoeus.get(“http://blog.ragnarson.com&quot;, { proxy: ‘proxy.crawlera.com:8010’, proxyuserpwd: ‘API_KEY’ })</pre><p>You can specify proxy options globally (for example in an initializer) by setting:</p><pre>Typhoeus::Config.proxy = ‘proxy.crawlera.com:8010’</pre><p>Unfortunately, we can not do the same with proxyuserpwd. It has to be added to each request.</p><h3>Be country specific if necessary</h3><p>If we want to scrape API that is in use by an app that works only on specific markets (countries). In that cases, you should use only IP addresses from those countries. You should consider it during research which proxy provider you would like to use. In Crawlera you can specify countries list during the app creation in its web interface.</p><h3>Use proper headers</h3><p>In the previous episode, you get to know how APIs request should look like. Which headers should be attached to them. It is time to use this knowledge.</p><p>Again your requests should not look like send from one device. You should store at least a few user agent headers and pick one of them for each request. If the API requires also a header with API key or sth like that you also should use at least a few of them. The best option is to pair them with user agent header. As a result, you will always use the same user agent header with the same API key. It looks normal, not suspicious.</p><p>It is a good practice to change the user header and api_key from time to time. Especially when a new version of the API’s app is released. It is a good time to use the tools from the previous episode and see what has been changed.</p><p>If you use Crawlera you should use X-Crawlera-UA header. It allows you set the user agent:</p><ul><li>The one you set in the header</li><li>Random mobile user agent</li><li>Random desktop user agent</li></ul><p><a href="https://doc.scrapinghub.com/crawlera.html#x-crawlera-ua">See more in their docs</a></p><h3>Use the same IP address for requests connected with each other.</h3><p>If requests are related to each other, for example, one has to be done before the second, you should send them with the same IP address (and headers). We have many cases like this. For example, you need to get a token that allows you to perform any API action. Or you need to get search results to be able to see any search details.</p><p>With Crawlera we just can to use their sessions feature. To start a new session you just have to send a POST request to proxy.crawlera.com:8010/sessions. As a response you will receive a session id, that has to be attached to request headers:</p><pre>X-Crawlera-Session: SESSION_ID</pre><p>All requests with the same SESSION_ID will be sent from the same IP address. You can read more about <a href="https://doc.scrapinghub.com/crawlera.html#sessions">crawlers sessions in their docs</a></p><h3>Divide your work and schedule it in a smart way</h3><p>Another risk factor is that the API provider will notice in the log a huge traffic every single night at 2.a.m. Because you decided it will be better to schedule background job as usually in the night. When there is no traffic and we have free resources that can be used to process the background jobs. So you scrape entire data from the API at 2 a.m. Wrong! It is not a smart move.</p><p>You should divide your task into as small chunks as possible. It depends on the API you scrape and your business needs and can be sometimes hard. But let’s take a quite popular case. We use the API that allows to search for something in the cities. You pass a keyword and city to receive a list of something match to the keyword in the city. To handle it well you should create a search model with keyword, city and next scraping time. Each record is scheduled for background job. As soon as it is scraped it schedule next scraping time. It will be a random time tomorrow. You can limit the time range to the hours while the biggest traffic in the API’s app.</p><h3>What’s more?</h3><p>I have no idea. If you have some tips for dirty scraping work, please leave them in the comments below.</p><p><em>Originally published at </em><a href="https://blog.ragnarson.com/2017/03/03/by-order-of-the-peaky-fuckin-blinders-how-to-do-dirty-work-and-dont-get-caught-episode-2.html"><em>blog.ragnarson.com</em></a><em> on March 3, 2017.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=acd23d09c3ce" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ragnarson/by-order-of-the-peaky-fuckin-blinders-how-to-do-dirty-work-and-don-t-get-caught-episode-2-acd23d09c3ce">“By order of the Peaky fuckin’ Blinders” — how to do dirty work and don’t get caught — episode 2</a> was originally published in <a href="https://medium.com/ragnarson">Ragnarson</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“By order of the Peaky fuckin’ Blinders” — how to do dirty work and don’t get caught — episode 1]]></title>
            <link>https://medium.com/ragnarson/by-order-of-the-peaky-fuckin-blinders-how-to-do-dirty-work-and-don-t-get-caught-episode-1-a32c1e24db04?source=rss-fa34890f8158------2</link>
            <guid isPermaLink="false">https://medium.com/p/a32c1e24db04</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[scraping]]></category>
            <dc:creator><![CDATA[Piotr Misiurek]]></dc:creator>
            <pubDate>Tue, 14 Feb 2017 00:00:00 GMT</pubDate>
            <atom:updated>2017-02-16T13:07:04.021Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yVYFP6Sct8YZKfFL.png" /></figure><blockquote><em>“Everyone’s a whore, Grace. We just sell different parts of ourselves”</em></blockquote><p><em>Thomas Shelby</em></p><p>Life is not always nice, simple and easy. Sometimes is more complex. Sometimes you are its lawful citizen. Sometimes you break the rules and do some dirty, shady things. Sometimes you are a copper. Sometimes you are a scoundrel. One day you are writing an API and taking care of its protection. Another day you are receiving the task to use someone else API without permission. It is not a thing you should do, but in startups game sometimes you have to do whatever it takes. It is possible to do that if the API is protected by basic auth. I will help you to do it right and won’t be caught.</p><h3>Draw the map to the princes’ bedroom</h3><blockquote><em>“Do you have a map? Because I’m not going to be able to find my way in the dark. You see, at midnight, I’m going to leave my wing and I’m going to come find you. And I’m going to turn the handle of your bedroom door without making a sound and none of the maids will know.”</em></blockquote><p><em>Thomas Shelby</em></p><p>Every single day hundreds or even thousands of new mobile apps are released. The majority of them are using APIs to get some data. Like information about events nearby or trains timetables. Let’s assume that we really need such data. And there is no free nor even paid sources of the data. But thank God, there is an app for that (that is using this data). Let use its API.</p><p>The first thing we have to do is to figure out how the API works. How requests and responses look like. To achieve this goal we have to see how the app is communicating with the API. The things will be required:</p><ul><li>To establish a proxy on our machine that will allow us to see communication between the app and the API</li><li>To configure our iPhone to use this proxy</li></ul><h3>Establish the proxy</h3><p>There are many ready to use proxy solutions on the market. Like <a href="https://portswigger.net/burp/">Burp Suite</a> or <a href="https://mitmproxy.org/">mitmproxy</a>. We will use the second one because it works from a console. It will make this article to look more geeky and professional.</p><p>Mitmproxy is written in Python, so we will install it via Python’s package manager PIP:</p><pre>pip install mitmproxy</pre><p>If you don’t have Python installed on your machine you can <a href="https://www.python.org/downloads/">download it from here</a>. It doesn’t matter if you install Python-2.7 or Python-3.5. Just pick one of them.</p><p>If you need more info or you have any problems during mitmproxy installation then, please follow the <a href="http://docs.mitmproxy.org/en/stable/install.html">installation guide</a>.</p><p>After installation, you can call mitmproxy from the console mitmproxy As you can see in the left bottom corner the proxy is available at port 8080. Now it is time to…</p><h3>Configure your iPhone to use our proxy</h3><p>Let’s start with the Captain Obvious: connect your iPhone to the same wi-fi network as your computer.</p><p>The second thing is to check your computer’s internal network IP. You can find it in your network preferences.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/0*74kblcE_Vd47Vvmq.png" /></figure><p>Now you have to set up your iPhone to use this proxy. Go to Settings -&gt; Wi-Fi then go to current network details. And the bottom there are proxy settings. Click the manual tab and provide proxy server IP you got in the previous step and its port which is 8080. And it works! Now you can go to the iPhone browser and visit any page. Then you will see the request in mitmproxy. Use arrows to navigate on requests list. Press enter to see the request details. Press q to go back to the list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*U1mNLRcD523YN4CM.png" /></figure><h3>The SSL traffic</h3><p>You can see some cases when the proxy it not working. Some websites or apps are not working. The data is not loaded for them and you can’t see their request in proxy logs.</p><p>The reason is simple. The SSL clients don’t trust our proxy. To solve that issue we have to install mitmproxy CA certificates on the phone. To do this open web browser in your iPhone and visit special mitmproxy page: <a href="http://mitm.it/">http://mitm.it</a>. Then click the icon of your platform, you will be asked to confirm certificate installation. And it is done. Now all https traffic is working and you can see it on the proxy.</p><h3>What we can see here</h3><p>It is time to use the app that is using the API that we are interested in. Make some requests and see their details in mitmproxy.</p><p>The most important parts are:</p><ul><li>which URLs are requested for each action</li><li>how does each request look like?</li><li>which HTTP method is in use</li><li>how the params look like</li><li>how the body looks like</li><li>which headers are sent with the request? What are their values? You would like to send the same headers with your requests. Special interesting will be headers with API key or user ID. If you find them and the API use only basic authentication you are at home. You can save them and use in your future requests. If API is protected with a more sophisticated protocol like OAuth then I’m not able to help you. Find another API or article :)</li></ul><p>You can also see how the response looks like. Which format is in use? How is data organized? Etc. This knowledge will be useful to write good parsers on your site.</p><p>Now we have all required info: how the requests should look like? Which headers are sent? You are ready to write your own scraper of this API. In the next episode, we will talk about things you need to focus on to do it right and won’t be caught.</p><p><em>Originally published at </em><a href="https://blog.ragnarson.com/2017/02/14/by-order-of-the-peaky-fuckin-blinders-how-to-do-dirty-work-and-dont-get-caught-episode-1.html"><em>blog.ragnarson.com</em></a><em> on February 14, 2017.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a32c1e24db04" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ragnarson/by-order-of-the-peaky-fuckin-blinders-how-to-do-dirty-work-and-don-t-get-caught-episode-1-a32c1e24db04">“By order of the Peaky fuckin’ Blinders” — how to do dirty work and don’t get caught — episode 1</a> was originally published in <a href="https://medium.com/ragnarson">Ragnarson</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blazer — a great tool to see what (data) you get]]></title>
            <link>https://medium.com/ragnarson/blazer-a-great-tool-to-see-what-data-you-get-77a7e3e1b022?source=rss-fa34890f8158------2</link>
            <guid isPermaLink="false">https://medium.com/p/77a7e3e1b022</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[rails]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <dc:creator><![CDATA[Piotr Misiurek]]></dc:creator>
            <pubDate>Tue, 31 Jan 2017 00:00:00 GMT</pubDate>
            <atom:updated>2017-02-01T05:47:34.292Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/0*ENPjAKbgE95CZz5a.png" /></figure><p>No matter what kind of online business you run, you also collect some data. To be honest we collect and store more and more data nowadays. The problem is that almost no one understands collected data and it cannot be used to make better business decisions.</p><p>The reason is simple. Database tables are hard to read. It is not easy to see trends and makes assumptions based on the raw table view.</p><p>You can think you need a data scientist to get a useful knowledge of your data. It is not true. You just need to see it in a new way. Visualize it to help you understand what is hidden in the data.</p><p>In rails world, we have some free gems that can be useful. Like administrate or active_admin. They can display data in a nice table. You can use filters and search on them. But it is basically all. The work with data can be a little easier, but still quite hard.</p><h3>Hero</h3><p>It is time to introduce our hero. Blazer — a gem that makes business intelligence simple.</p><p>It allows you to execute SQL queries on your database from the web panel and visualize the data in a convenient and clear way. If you are not good at SQL you can ask your dev team to write some fundamental queries. Save them and use them on your own.</p><p>Another cool and useful blazer’s features are:</p><ul><li>Checking for anomalies in data — to let you know (by email for example) if there is something wrong with new data you are collecting</li><li>Works with many data sources. You make your queries with SQL so it looks familiar and it works fine with most popular SQL-based databases (like Postgres, MySQL or SQL server). What is more interesting there is also beta support for MongoDB or ElasticSearch!</li></ul><h3>Action</h3><p>Let’s see blazer in action. You can install it in standard rails way by adding it to Gemfile</p><pre>gem &#39;blazer&#39;</pre><p>Then run an install generator and migrations created by it:</p><pre>rails g blazer:install rake db:migrate</pre><p>The last you have to do is mount blazer in config/routes.rb</p><pre>mount Blazer::Engine, at: &quot;blazer&quot;</pre><p>Then go to /blazer and take your first actions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xE-jE6A0M3Y3Cdxz.png" /></figure><h3>See more</h3><ul><li>Visit <a href="https://blazerme.herokuapp.com/">https://blazerme.herokuapp.com</a> to play with blazer demo</li><li>Visit <a href="https://github.com/ankane/blazer">https://github.com/ankane/blazer</a> to learn more about gem itself</li></ul><p><em>Originally published at </em><a href="https://blog.ragnarson.com/2017/01/31/blazer-a-great-tool-to-see-what-data-you-get.html"><em>blog.ragnarson.com</em></a><em> on January 31, 2017.</em></p><ul><li>Visit <a href="https://github.com/ankane/blazer">https://github.com/ankane/blazer</a> to learn more about gem itself</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=77a7e3e1b022" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ragnarson/blazer-a-great-tool-to-see-what-data-you-get-77a7e3e1b022">Blazer — a great tool to see what (data) you get</a> was originally published in <a href="https://medium.com/ragnarson">Ragnarson</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Being productive is not productive. Being content is productive]]></title>
            <link>https://medium.com/ragnarson/being-productive-is-not-productive-being-content-is-productive-26c7edb75737?source=rss-fa34890f8158------2</link>
            <guid isPermaLink="false">https://medium.com/p/26c7edb75737</guid>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[healthy-lifestyle]]></category>
            <category><![CDATA[work-life-balance]]></category>
            <category><![CDATA[happiness]]></category>
            <dc:creator><![CDATA[Piotr Misiurek]]></dc:creator>
            <pubDate>Wed, 23 Nov 2016 00:00:00 GMT</pubDate>
            <atom:updated>2016-11-23T19:01:48.340Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*8p4ejhIyNsRla_Cb.png" /></figure><p><em>Have a productive day!</em></p><p>That was the way that one of our clients used to finish daily stand-up calls.</p><p>From my point of view, that was one of the worst wishes you could ever receive.</p><p>You may ask why?</p><p>Because productivity is not a core value for humans beings.</p><p>If your main life goal is to be productive, I think there is probably something wrong. And probably you are not so productive at all.</p><p>The society says: work hard to become a successful person. Then, when you succeed you will be happy.</p><p>But this is bullshit. Bad assumption. Being rich and successful can have a positive impact only in a short term. But in a long time perspective, there is no difference. You can see it in gossip portals. Many famous, successful people are unhappy. They are overdosing drugs or abuse alcohol to kill unpleasant feelings.</p><p>Positive psychology confirms that issue. The explanation is simple. Since you can always be more successful and richer. There is always another goal to achieve. To be richer. To be more successful. To work harder. To be more productive.</p><p>It looks like the formula work hard -&gt; be successful -&gt; be happy is not working at all. And this is good news. Because it is really hard to work with 100% productivity all the time. It is impossible to win all the time. So it is good news that it is not required to be happy.</p><p>So what we have to do to become happy?</p><p>The positive psychology says that there is only one factor required to be happy. It is to be happy. It is an internal decision. Your internal feeling. The state of mind that doesn’t have many connections with the outside factors.</p><p>In short term success can make you happier. At the same time, hard circumstances probably will make you unhappy in the short term.</p><p>But not in the long perspective. Researchers show that there is no difference in the subjective level of happiness. Disabled person and lottery winner will feel the same way one year after their life changing experience.</p><p>It shows that people on the quite opposite spectrum of the life circumstances can be equally happy. It also works another way. You and your friend can have very similar life factors. One of you can be happy with this. The second one can judge it as a poor life.</p><p>The conclusion is being productive, hard working and being successful is not the way to be happy.</p><p>But what if being happy is the way to be successful?</p><p>Positive psychology states that’s true. If you are happy your brain and body work more efficiently. Low level of stress allows you to focus and use your entire energy on your task. Your happiness is the internal drive to take actions.</p><p>And there are 5 habits that help you build your internal happiness</p><h3>Gratitude</h3><p>Our economy is built on the creation of lack in people. Creation of new needs that promise you happiness as soon as you fulfill them. But there will be a next one. And a next one. Avoid commercials, celebrities or Instagram photos. Their role is to tell your ego that there is something missing in you.</p><p>Gratitude is opposite. It helps you to see all things you already have and be thankful for them. Remind yourself about three things: people, memories or experiences you are grateful for. You will focus on the things you have, not on a lack created by media.</p><p>Start and finish your day with finding 3 things you feel gratitude for.</p><h3>Write your own journal</h3><p>It helps you to have a better understanding of yourself. It helps to have a better connection with your values, dreams and goals. A journal is a form of a dialog with yourself. It allows you to see some patterns or needs that were hidden on a regular basis.</p><p>It will also be a reminder of your good moments. The best emotions and feelings you experienced. They are now on a paper (or in the cloud) so you can go back to these memories in hard times to find your power again.</p><p>A journal is also a good teacher that will help you to avoid repeating the same mistakes again, and again… and again</p><h3>Exercise</h3><p>For thousands of years, our survival depended on our strength, endurance and agility. Everyday activities required some physical action to be taken.</p><p>But in the last 200 years things changed a lot. Some days opening a beer and changing the TV station are your all activities.</p><p>We feel good when we are in motion. When our lungs and blood deliver more oxygen and energy to our brain, muscles and other organs. We are offspring of those who were running, climbing or swimming. The ones who were just sitting died eaten by predators.</p><p>Start with small steps like daily 20 minutes walk. You will feel a difference and start wanting more. To be more active. To be happier :)</p><h3>Meditation</h3><p>We have thousands of thoughts every single day. Most of us believe in thoughts. That they are true. That the world is exactly as our mind describes it. It is not true. We all live in the same world, but have different thoughts describing it. The territory is the same for all of us, but each person has a unique map of it in the mind. None of them are true. Most of them are even not ours. We took them unconsciously from our parents, school, society traditions, ads or politics propaganda.</p><p>Meditation helps us dissociate from thoughts. You will start to just observe them, not believe in them. Start with 5 minutes meditation per day. Just sit (it doesn’t have to be a lotus pose) and observe your thoughts. Don’t try to avoid them. Just notice there is some thought and don’t go deeper inside. For example, you can start thinking about dinner. Just notice this, don’t go deeper to think about who you should eat with, what and where.</p><h3>Being kind to others</h3><p>Kindness is good for you and your happiness for three strong reasons.</p><p>Psychologic theory of reciprocity is the first thing working for you. It states that people will repay you what you provided to them. If you are kind to others you can expect most of them will be kind to you as well.</p><p>The way how we look at the universe is the same we look at ourselves and vice versa. If we are kind to others we also think that other people and the world are kind as well.</p><p>Finally, you will like yourself more because you are a good kind of person. How can you not like such a good person as you?</p><h3>TL;DR</h3><p>Don’t struggle to be more productive. Focus on being more happy and content with your life.</p><p>Sources and recommendations:</p><ul><li><a href="http://nymag.com/scienceofus/2016/01/classic-study-on-happiness-and-the-lottery.html">http://nymag.com/scienceofus/2016/01/classic-study-on-happiness-and-the-lottery.html</a></li><li><a href="https://www.youtube.com/watch?v=8KkKuTCFvzI">https://www.youtube.com/watch?v=8KkKuTCFvzI</a></li><li><a href="http://www.forbes.com/sites/georgebradt/2015/05/27/the-secret-of-happiness-revealed-by-harvard-study/#667d4bd02c9f">http://www.forbes.com/sites/georgebradt/2015/05/27/the-secret-of-happiness-revealed-by-harvard-study/#667d4bd02c9f</a></li></ul><p><em>Originally published at </em><a href="https://blog.ragnarson.com/2016/11/23/being-productive-is-not-productive-being-content-is-productive.html"><em>blog.ragnarson.com</em></a><em> on November 23, 2016.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26c7edb75737" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ragnarson/being-productive-is-not-productive-being-content-is-productive-26c7edb75737">Being productive is not productive. Being content is productive</a> was originally published in <a href="https://medium.com/ragnarson">Ragnarson</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How product management can help developers to work in the flow state (and be productive as fuck)]]></title>
            <link>https://medium.com/ragnarson/how-product-management-can-help-developers-to-work-in-the-flow-state-and-be-productive-as-fuck-57eaef8ebb41?source=rss-fa34890f8158------2</link>
            <guid isPermaLink="false">https://medium.com/p/57eaef8ebb41</guid>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[product-management]]></category>
            <dc:creator><![CDATA[Piotr Misiurek]]></dc:creator>
            <pubDate>Thu, 17 Nov 2016 00:00:00 GMT</pubDate>
            <atom:updated>2016-11-17T13:05:00.717Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*4SGqwFcNBAobge2s.png" /></figure><p>From When involvement rhymes with enjoyment article we know that there are 7 factors to achieve the flow state. This state is ultimate effective when we are fully engaged in the activity.</p><p>Today, we focus on which of the factors can be activated by having a good product management. And how this activation can be achieved.</p><p>The main goals for the project management are getting sure that:</p><ul><li>Developer is completely involved in the thing he is doing</li><li>Developer knows exactly what he needs to do and how well he is performing</li><li>Developer is confident that he can accomplish the task at hand</li></ul><p>The main factor influences it is the way we organize tickets and work in our team. The tickets should be well and precisely described. In this way, a developer knows exactly what is his goal.</p><p>The creation of well-described tickets is a process. The first iteration is probably just a headline. It describes a feature from the high level of abstraction. It can look like this: “User should be able to send a private message to another user”. In the next iteration, we should decide how exactly this feature should work in all aspects. It should be also divided into smaller tickets, that can be done in an hour or two.</p><p>Your goal for ticket description is to write it in the way that the developer and QA won’t have to ask you any question. You can also use old startups trick. Show the ticket to your grandma and ask if she understands everything.</p><p>During the sprint meeting, we need to be sure that all developers understand tickets. Too often it looks like this:</p><ul><li>Is everything clear?</li><li>Yes</li></ul><p>Or like this:</p><ul><li>Any questions?</li><li>No</li></ul><p>In this way, it doesn’t mean that developers understand. It just means they think that they understand. Or they don’t want to talk about this more right now.</p><p>How to be sure that everyone really understands the task? Use double confirmation technique. The main idea is not to ask if someone understands. Instead of that, ask how he understands it. In our case to say with our own words what and how should be done. If the developer is saying just general statements you can ask more specific questions. We are working on the description as long as both sides are sure they understand it in the same way.</p><p>We like to work on things we choose. Allow developers to take tickets their like. It will improve their intrinsic motivation.</p><p>It allows them to choose the goal from areas they like and can be a challenge for them.</p><h3>TL;DR</h3><p>Divide and describe your tickets with high precision. Use double confirmation to be sure that developers really know what to do. Allow them to choose tickets to improve their intrinsic motivation.</p><p><em>Originally published at </em><a href="https://blog.ragnarson.com/2016/11/17/how-product-management-can-help-developers-to-work-in-the-flow-state-and-be-productive-as-fuck.html"><em>blog.ragnarson.com</em></a><em> on November 17, 2016.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57eaef8ebb41" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ragnarson/how-product-management-can-help-developers-to-work-in-the-flow-state-and-be-productive-as-fuck-57eaef8ebb41">How product management can help developers to work in the flow state (and be productive as fuck)</a> was originally published in <a href="https://medium.com/ragnarson">Ragnarson</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Code The Flow — How To Write Code In More Productive And Fun Way]]></title>
            <link>https://medium.com/ragnarson/code-the-flow-how-to-write-code-in-more-productive-and-fun-way-f84a77d544a4?source=rss-fa34890f8158------2</link>
            <guid isPermaLink="false">https://medium.com/p/f84a77d544a4</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Piotr Misiurek]]></dc:creator>
            <pubDate>Tue, 08 Nov 2016 00:00:00 GMT</pubDate>
            <atom:updated>2016-11-11T11:23:01.983Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*A0qJFZU-LABoB47O.png" /></figure><p>Spend less than 2 minutes to discover three simple tricks that will help you to be in the coding flow! Write the code in the more effective way. Code with better quality. Be more satisfied with the time spent on programming.</p><h3>One little thing aka single responsibility principle</h3><p>Have you ever heard about Single Responsibility Principle (SRP)? It states that there should be only one reason to change the code of a class. If there is only one reason to change, it means that this class has only one responsibility. It is doing one simple thing.</p><p>SRP can help us to be in the flow. When writing small classes with a simple purpose, you know exactly what to do. It helps you to be present — you have only one next step — write this simple class with the clear goal of existence. Since it is just a simple class it makes you confident that you can accomplish this task.</p><h3>Behaviour Driven Development / Test Driven Development</h3><p>One of the biggest obstacles to being in the flow is uncertainty. You can avoid it by knowing two things: how your software behaves with user interactions and what results it should return.</p><p>In one sentence: write your tests before you start writing the code.</p><p>What is more, tests can help you focus on the next step that has to be done. You just concentrate on the current reason why the test fails. It gives you instant feedback what is working and what is not.</p><h3>Pair programming</h3><p>Coding with someone else is another way to receive instant feedback about our ideas and code. The second coder immediately shares with us his/her opinion. In this way, we can make an improvement and solve the problem better and faster. It also helps both programmers to focus on the task. We have the same goal. We motivate each other to focus deeply. Human to human interaction helps us to forget about the outside world.</p><h3>Summary</h3><p>With these 3 simple techniques of coding, you can activate 4 out of 7 flow factors. As usual I recommend you to implement them one by one. Make small constant changes that will improve your productivity and happiness in a longer perspective.</p><p><em>Originally published at </em><a href="https://blog.ragnarson.com/2016/11/08/code-the-flow-how-to-write-code-in-more-productive-and-fun-way.html"><em>blog.ragnarson.com</em></a><em> on November 8, 2016.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f84a77d544a4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ragnarson/code-the-flow-how-to-write-code-in-more-productive-and-fun-way-f84a77d544a4">Code The Flow — How To Write Code In More Productive And Fun Way</a> was originally published in <a href="https://medium.com/ragnarson">Ragnarson</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flow daily routines — create habits that boost your productivity]]></title>
            <link>https://medium.com/ragnarson/flow-daily-routines-create-habits-that-boost-your-productivity-6cbc9475f8e3?source=rss-fa34890f8158------2</link>
            <guid isPermaLink="false">https://medium.com/p/6cbc9475f8e3</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[time-management]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Piotr Misiurek]]></dc:creator>
            <pubDate>Tue, 11 Oct 2016 00:00:00 GMT</pubDate>
            <atom:updated>2016-10-14T11:15:46.232Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*wdPb3UwmfSjoI9_O.png" /></figure><p>This article is the next episode in our Flow series. You can find <a href="http://blog.ragnarson.com/2016/04/08/when-involvement-rhymes-with-enjoyment.html">the first episode here</a>. In this part, we will talk about daily routines that can help you go into the flow state</p><h3>How you start is how productive you are</h3><p>The most effective ways to enter the flow state are focus and involvement. This is why it is so important to start in a good way. It has a critical impact on your productivity and state during the entire day.</p><h3>Home is the place where productivity is born</h3><p>Let’s start at your house. You should take care about your night sleep. Don’t listen to all these crazy folks saying: “Be more productive, sleep less”. Bullshit. Sleep as long as you need. Even one-day sleep deprivation may cause impaired concentration for the entire day. What is better: be at work at noon in a good mood and productive state. Or maybe be at 9 a.m. and be able to do nothing for an entire day.</p><p><strong>Achievement unlocked:</strong></p><p><em>If you are employed make an appointment with your boss. Tell him you want to talk about your working hours. You want to make them flexible. Tell him it will be profitable to him and send him this article as a proof. He won’t probably read this but still you have some proof/papers you can refer to.</em></p><p><em>If he will be against the idea make him second offer. Little flexible working hours. You can start/finish your work +/- 2 hours once or twice a week. In reference to psychology, he should agree to the second smaller one. Then show him you are more effective during the flexible days. After a few weeks go back to him with the first proposal.</em></p><h3>The Office — one of the biggest enemies of your productivity</h3><p>Let’s go to your office. It is also very important how you start here. What are the first things you do after entering the office?</p><ul><li>Chatting with friends?</li><li>Checking the email?</li><li>Visiting social media?</li><li>Showing the latest news?</li><li>Scrolling the internet?</li><li>Watching porn?</li></ul><p>None of them is the best way to starting your work day. None of them is even a good one.</p><p>You can ask: what is a good way?</p><p>The answer is very trivial.</p><p><strong>Do your work</strong>. Immediately after you enter the office.</p><p>To be honest, start work even earlier. The day before. When you are finishing the work day prepare yourself for an easy start for the next day. Think a little what will you do and how you can start it. Just a minute or two. It will make you calm and give you an internal peace. You will know that everything is under control. It also makes it easier to start your next day. You don’t have to think and figure out what to do first. You already knew so you can start your work from the first minute in the office.</p><p>What can be our obstacles here?</p><p>The noise! The disruptions!</p><p>These issues come up during our working time so we dedicate them an entire section</p><h3>The disruptions kill your productivity</h3><p>The main disruption factor is people. They can disrupt us directly. But most of them are not able to do that. The biggest group of them is far away from us. The second is too shy or too afraid of our amazing personality. The thing that connects these groups is that they use technology to inject disruption to our life.</p><p>Every single interruption can cost you a few minutes to go back to the stage of mind you were just before. Even if the break was less than one minute. Yes, recovering from the break can take longer than the break itself. I know what I’m talking about, I had two interruptions during this writing. Two short breaks, around 30 secs each, in two minutes, and I can not get back to the writing flow after 12 minutes(!).</p><h3>How we can defend ourselves!</h3><p>The are some strategies that we can apply.</p><p>No disruption mode is productive mode</p><p>All mobile devices or even computers have no disruption mode. Turn it on. No notification, no emails, no calls are allowed.</p><p>You can think: what if I will miss something important? A critical message from the boss or very important call from your family. And you are right. One percent of things you will miss will probably be important. But the rest of them, the 99%, will be a regular waste.</p><p>For the last one percent establish special emergency channels. Let’s say your company communication base on emails and slack. Let’s turn off notifications from not relevant channels. I allow slack just to show me the sign on the page title, that there is a new private message or I was mentioned by someone. Then inform your team that they should call you in a case of emergency. As an emergency, I mean something like critical problems on production. You should add your boss phone number to the whitelist that allows to reach you at all times. Don’t whitelist all your coworkers, because they can overuse this privilege.</p><h3>Silent hours are productive hours</h3><p>Silent hours means the time when no one is talking to anybody. You can know it from your relationship. When something went wrong, you have pretensions against your partner. And you decided to not talk to each other.</p><p>Is not the best time in a relationship. But it is the best time in your work.</p><p>In job context, it means the time when people shouldn’t talk to each other. No meetings, no questions to ask, no discussions. Just pure work.</p><p>Some companies have silent hours in their DNAs. You are lucky if you work in one of them. You don’t have to do anything to enjoy silent hours because it is a part of the company culture.</p><p>Most of us are not so lucky. But we can still organize this amazing time for yourself:</p><p><strong>Official way</strong>: discuss it with your boss, client and coworkers. You can start with a small proposal. Two silent hours at the beginning or the end of a workday. Sell it as a one/two weeks experiment.</p><p><strong>Unofficial way</strong>: make it for yourself without asking anyone. The best way is to start work earlier than anyone. Or work at night. As a result, you will have a few working hours when no one else is working so they can not disturb you.</p><p>To be able to just work without asking questions you have to discuss your tickets, your tasks. Think a little about potential critical points and discuss them with the product owner. If you don’t have the clear plan of implementation you should discuss it with one of your coworkers.</p><p>Silent hours are good and useful for developers. But I would not recommend it for product owners. They should be available for developers all the time in case of any questions.</p><h3>Pink noise can cut you off and free your internal productivity</h3><p>When you work in the office or coworking space you are surrounded by other people. The noise they make can disrupt you and hinder your focus.</p><p>That is why many developers, consider headphones as a critical tool for their work. It helps them to isolate from outside world and focus on their work.</p><p>I would like to draw attention to the things we play with our headphones. Most of us use music to cut off outside worlds.</p><p>Unfortunately in most cases is not a good solution. Rhythm and melody can very easily influence our emotions and moods. High level of emotions can make our work less effective. It decreases our focus. Even worse if we have some memories related to the tune. In this case, our mind is taken by the song for an exciting time travel full of memories and strong emotions. Your work is not a part of this trip.</p><p>The new songs are not better. The new things are always attractive for our mind. It makes sense from an evolutionary point of view. The new means it can be dangerous. Or it can be a new source of pleasure and good feelings. Our brain has to identify the new sounds and categorize it. It requires some resources that cannot be used allocated to our work. Our focus is getting down. Even worse if the song contains the words in the language we understand. It is another task for our mind: to understand what it is all about.</p><p>Thank God there are some music genres take can increase our productivity. Search Youtube or Spotify for heroic music, epic music or focus music to experience the examples. But again we can start feeling too epic so we start dreaming instead of working.</p><p>The best sounds that help me focus and cut off from the office noises are other noises. If there are neutral and uniform noises then they can cover the sound pollution without disrupting your attention. The one that works best for me is called pink noise. <a href="https://www.youtube.com/watch?v=ZXtimhT-ff4">You can check 10 hours example</a> or use one of the many noise-generator apps. My favorite one is <a href="https://simplynoise.com/">simplynoise</a></p><h3>Measure your time — when you are productive and when not</h3><p>In the previous article, I showed you the pomodoro technique. It helps us to divide time between real productive work and relaxing breaks. I like to say it is a quantity tool. It helps you to manage how much time you spend on your work. What about the quality of this time?</p><p>Pomodoro helps a little with this aspect. The rule is work during working time, relax during the breaks. But I needed something more. Something that gives me feedback about the quality of time I spend on my work.</p><p>And I found a great tool. It is called the chart of commitment and you need only paper and pen to use it.</p><p>Take a piece of paper and draw two-dimensional chart. Put time on horizontal axis and scale from 1 to 10 on the vertical one. Set the recurring reminder on your phone for around 10 minutes. When you see reminder then rate your commitment to the thing you SHOULD do. 1 is the lowest and 10 is the highest. Draw a dot corresponding to your rate on the chart. At the end of the day, you have the chart of your daily commitment. What are your profits from it:</p><p>Asking yourself a question makes you more aware of yourself and things you are doing. This in itself increases your focus and commitment.</p><p>You can observe patterns on your commitment chart. For example, a time ranges when your commitment are extra high/low. With that knowledge, you can discover what makes you more effective and what is your obstacle. You can also find the time when working is the easiest for you. Try to do the hardest stuff at this time. You will probably also find a time when you have big difficulties to focus. It is normal. You can use this knowledge to avoid hard tasks at this part of the day. Or even decide to don’t work at this time at all. Breaks are good and productive!</p><h3>Listen to yourself, you can not be productive all the time</h3><p>This post is all about daily routines that help you achieve flow more frequently. At the end, I want to say don’t try to use these routine all the times. Don’t force yourself to be 100% strict to all of them all the time. There will be a day when you will be able to work effectively for 12 or even more hours. But there will be also a time when you will be less productive. Don’t force yourself to hard work at this time. It won’t help. It will just make you feel worse. Accept that you are a human, not a machine. If you can’t focus then take a nap, go outside or start chatting with your friends. If you went sleep later yesterday allow yourself to sleep longer today. Especially if you had been on a party yesterday. It will help for your productiveness and happiness</p><h3>What you should do next to boost your daily productivity</h3><p>That is all for today! I encourage you to test routines I described above. Try them one by one, and check what works for you. Don’t try to implement all of them at once. It will only result in chaos and your frustration. Go step by step. Take one technique, one routine and test for 2–3 weeks. Then test another one.</p><p>In next episode, we will focus on coding. How the way you code can help you achieve the flow?</p><p><em>Originally published at </em><a href="http://blog.ragnarson.com/2016/10/11/flow-daily-routines-create-habits-that-boost-your-productivity.html"><em>blog.ragnarson.com</em></a><em> on October 11, 2016.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6cbc9475f8e3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ragnarson/flow-daily-routines-create-habits-that-boost-your-productivity-6cbc9475f8e3">Flow daily routines — create habits that boost your productivity</a> was originally published in <a href="https://medium.com/ragnarson">Ragnarson</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why we go to Euruko and why you should go as well]]></title>
            <link>https://medium.com/ragnarson/why-we-go-to-euruko-and-why-you-should-go-as-well-52132ed39abd?source=rss-fa34890f8158------2</link>
            <guid isPermaLink="false">https://medium.com/p/52132ed39abd</guid>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[work-life-balance]]></category>
            <category><![CDATA[conference]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Piotr Misiurek]]></dc:creator>
            <pubDate>Thu, 08 Sep 2016 00:00:00 GMT</pubDate>
            <atom:updated>2016-09-08T13:25:44.584Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*MHdR1rc4lfLAcUZI.png" /></figure><p>EuRuKo is the annual European Ruby conference, launched for the first time in Karlsruhe (Germany) in 2003. The first four editions were organized in Germany. Since 2007 it’s moved from city to city across Europe. At the end of each event, people vote for the next edition’s host city.</p><p>In 2010, EuRuKo was organized in Kraków, Poland. It was my first time at this conference.</p><p>I still remember two things from the conference:</p><p>Firstly all these famous people who I knew only from their Github nicknames were talking to me from the stage:</p><ul><li><a href="https://twitter.com/yukihiro_matz">Matz</a> — the creator of ruby.</li><li><a href="https://twitter.com/svenfuchs">Sven Fuchs</a> — responsible for rails i18n project!</li><li><a href="https://twitter.com/mislav">Mislav Marohnić</a> — whose pagination plugin, will_paginate, was being used at this time in 95% of rails projects.</li><li><a href="https://twitter.com/wycats">Yehuda Katz</a> — who was showing his new kid Bundler</li></ul><p>You were able to understand more from their way of thinking. From their way of writing code. Even more, you were able to chat face to face with them during the breaks or after-parties. All lecturers, organizers, and attendees were so open and friendly, creating a great atmosphere.</p><p>The second memorable thing during my first EuRuKo was that it was the first time I met my co-workers face to face. I was a remote junior rails developer at Ragnarson and it was my first occasion to meet almost the entire company. Playing poker till 3am in the hostel room was an amazing opportunity to meet each other and build connections between us. People stopped being just a nickname or avatar on the internet. They became REAL PEOPLE, FRIENDS to me.</p><p>Both of these things are still relevant in 2016.</p><p>We have great speakers again. We will see on this year’s stage Ruby world rock stars like <a href="https://twitter.com/yukihiro_matz">Matz</a>, <a href="https://github.com/josevalim">José Valim</a>, <a href="http://arko.net/">André Arko</a> or <a href="https://twitter.com/apotonick">Nick Sutterer</a>. They will talk about interesting subjects like modern single page apps, the way sprockets work or about the future of Ruby (and how to become a core member). All of this in a friendly, open atmosphere and at a very good price. It is still a conference organized by the community, not a commercial project. By people, for people.</p><p>It will again be a good opportunity to meet my co-workers. I work at Ragnarson as a remote developer again. In company we only have a few occasions every year to meet each other. One of those opportunities is the conferences, especially if they have such a good atmosphere and not so expensive tickets, like <a href="http://euruko.org/">EuRuKo</a> or <a href="http://www.wrocloverb.com/">wroc_love.rb</a>.</p><p>It is also a great occasion to meet folks I used to work with in the past. Or people I met at previous conferences. Some people have a habit of meeting each other once a year — during EuRuKo :)</p><p>The interesting lineup and the opportunity for good company and community integration are strong reasons to go to EuRuKo. But there is one more reason. A private reason. An individual goal for all of us at Ragnarson.</p><p>Before I started this article, I asked my friends from Ragnarson “why do you go to EuRuKo?”. Almost all of them talked about the interesting line up, good atmosphere, and opportunities for good integration. But they all say something more. Something unique for each person. Something that connects the conference with their private life, their hobbies, and their goals.</p><p><a href="https://github.com/mandaryn">Mandaryn</a> connects the conference with the Swing Festival. <a href="https://about.me/oskarszrajer">Oskar</a> has good memories from Sofia. His Aikido organization has its headquarters there so it will be a great opportunity to meet his friends again. <a href="https://twitter.com/wijet">Wijet</a> has a tradition to be on all EuRuKos and has been since 2008. <a href="https://twitter.com/rrrodrigo">Marcin</a> wants to visit the picturesque Rila mountains. <a href="https://about.me/kwawer">Krzysztof</a> has a goal to visit a abroad Ruby conference this year. And for <a href="https://about.me/piotrmisiurek">me</a>, it will be a first step in my operation “Winter is not coming” — to spend this autumn and winter in warm, sunny places.</p><p>It is a great gift if you can connect you professional and private life. If your work helps you achieve your goals from other areas. If you can make a business and have pleasure at the same time.</p><p>So, what is your personal and unique reason for going to <a href="http://euruko.org/">EuRuKo</a>?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/238/0*ygQoLaRMAdokOaJR.png" /></figure><p><em>Originally published at </em><a href="http://blog.ragnarson.com/2016/09/08/why-we-go-to-euruko-and-why-you-should-go-as-well.html"><em>blog.ragnarson.com</em></a><em> on September 8, 2016.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52132ed39abd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ragnarson/why-we-go-to-euruko-and-why-you-should-go-as-well-52132ed39abd">Why we go to Euruko and why you should go as well</a> was originally published in <a href="https://medium.com/ragnarson">Ragnarson</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When involvement rhymes with enjoyment]]></title>
            <link>https://medium.com/ragnarson/when-involvement-rhymes-with-enjoyment-2b53bba47182?source=rss-fa34890f8158------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b53bba47182</guid>
            <category><![CDATA[work-life-balance]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[time-management]]></category>
            <dc:creator><![CDATA[Piotr Misiurek]]></dc:creator>
            <pubDate>Fri, 29 Jul 2016 09:35:19 GMT</pubDate>
            <atom:updated>2016-07-29T09:35:19.473Z</atom:updated>
            <content:encoded><![CDATA[<p><em>“If you do what you love, you’ll never work a day in your life.”</em></p><p>I’m sure you’ve heard this quote more than once. This popular saying, from Steve Jobs (or Albert Einstein or Marc Anthony depending on which ‘reliable’ internet source you use), illustrates how important it is to choose the right thing to do in your life.</p><p>If you make the right choice, then your life will be paradise. You will spend every single day doing something you love. You will greet every single day with a smile.</p><p>If you choose wrongly, then every single day you will struggle to do things you don’t like just to earn money. It will be hell on earth!</p><p>It’s like being in a relationship. If you find your perfect match — your soulmate, the love of your life — then you will always be happy, and all your problems will disappear. You will understand each other without words, and there will be no arguments, and no silent treatment.</p><p>Bullshit!</p><p>Even if you are in a relationship with someone you truly love, there will still be problems and hard times.</p><p>Even if you do the job you love, there will also be problems, hard times and periods when you will struggle and even hate your job.</p><p>That is why as soon as you find the person or job you love, you should start asking yourself: <em>How should I do this job (love)?</em></p><p>That was the question that Mihaly Csikszentmihalyi had been asking himself for years. He had been trying to figure out what makes an activity, and our entire life, enjoyable. After many years of research he developed a theory of optimal experience, also called the <em>flow</em> state.</p><p>There are 7 factors that show whether or not you are in the flow:</p><ol><li>You are completely involved in the thing you are doing;</li><li>You experience a sense of ecstasy — you are beyond the everyday problems and ways of thinking;</li><li>You know exactly what needs to be done and how well you are performing;</li><li>You are confident that you can accomplish the task at hand;</li><li>You feel serene — you have no worries about yourself, you’re reaching beyond the ego;</li><li>You have a sense of timelessness — you focus on the present, you’re in the here and now. You can work for hours but it feels like five minutes;</li><li>You have intrinsic motivation.</li></ol><p>These factors can apply to any activity.</p><p>I will describe the application of these principles for developers in my lecture during the <a href="http://2016.4developers.org.pl/en/">4Developers</a> conference on 11th April in Warsaw.</p><p>If you are not able to be there with us, don’t worry. I will describe the most important points from my presentation here on the blog.</p><p>Let’s start right now with the first point:</p><p>You are completely involved in the thing you are doing.</p><p>Here are the three most important techniques that will help you to focus on the things you want to do.</p><h3>Pomodoro technique.</h3><p>This is something that is very easy to use and you can start right now. With this technique you will see your productivity increase straight away.</p><p>You should split your time into periods of work and breaks.</p><p>The working period should last around 20–25 minutes. After each period of work you should take time for a short break of around 5 minutes. Every 3rd or 4th break should be longer: from 15 to 20 minutes.</p><p>In my case it looks like this:</p><ol><li>Work (25 minutes)</li><li>Break (5 minutes)</li><li>Work (25 minutes)</li><li>Break (5 minutes)</li><li>Work (25 minutes)</li><li>Break (5 minutes)</li><li>Work (25 minutes)</li><li>Break (15 minutes)</li><li>Repeat from the beginning</li></ol><p>You can experiment with the length of each cycle to find what works best for you.</p><p>The key point is that during the work period you<strong> really do the work</strong> and during the break you <strong>stop doing any work</strong>.</p><p>You can learn more about this technique <a href="http://pomodorotechnique.com/">here</a>.</p><h3>Internal clock</h3><p>All living organisms (humans included) have their own internal clock. This clock is ticking inside you all the time. It decides when is the best time to work and when is the best time to rest (sleep).</p><p>Based on the nature of their internal clock, humans can be divided into two basic types: the larks and the owls.</p><p>The larks wake up around 5–7 a.m. and they are most productive around 11 a.m. After this their productivity starts to decrease, reaching its lowest point at around 3 p.m. This is the best time to take a nap. Around 5–6 p.m. you are back in productive mode, which reaches a peak at around 8 p.m. After that, it will gradually decrease, allowing you to easily fall asleep at around midnight.</p><p>The owls, on the other hand, like to wake up later, at around 10 a.m. They need some time (and coffee) to become productive and they are most effective during the late afternoon, evening and even during the night.</p><p>Observe yourself to find out which type you are so you can then adjust your work-style to your internal clock.</p><p>Work at the time when the force is with you.</p><p>I am a lark. I have no difficulty in waking up at around 6 a.m. without an alarm.</p><p>I work from 8 a.m. to 1–2 p.m. After this time, thinking becomes difficult and even painful for me. This is when I switch to less demanding activities: going to the gym, having meetings, taking a nap. If I still have something to do, I return to my productive mode at around 5–6 p.m. for the next 2–3 hours.</p><h3>Meditation</h3><p>Nowadays we live in a highly disturbing environment. Every second we are attacked by dozens of stimuli — requests from co-workers, domestic issues, advertisements, social media activities, unexpected phone calls or all those important push notifications from every single app you have.</p><p>With all this stimulus no wonder our mind cannot focus on one thing for longer than a minute or two.</p><p>But there is a solution!</p><p>You can train your brain not to follow all the thoughts that appear in your mind.</p><p>You can do this by using meditation. Basically the only thing you have to do during meditation is to sit and observe your thoughts. Allow them to come but don’t go deeper into them. Don’t try to avoid any thoughts — you are human and it’s ok to have them. Just don’t allow them to take control of your mind. For example, if you meditate in the morning, thoughts about work appear in your mind. Say to yourself: ‘Oh, that’s a thought about work — nice,’ and allow it to pass. Don’t start worrying about your work day, such as, ‘I have to do this, this and that. How can I cope with it?’ Allow your thoughts to pass one by one.</p><p>You can start this daily routine by taking 5–10 minutes and extend this by a minute or two every week. You can start on your own, just sitting, or you can use one of the meditating apps, like <a href="https://www.headspace.com/headspace-meditation-app">Headspace</a> or <a href="http://stopbreathethink.org/">Stop, Breathe And Think</a>.</p><p>After a week or two you will begin to see the benefits of meditation. It will be easier to focus, and your thoughts won’t be so disturbing. The stress in your life and work will decrease and you will feel happier.</p><p>If you want to know more about meditation in modern society i recommend you the book: <a href="https://www.goodreads.com/book/show/18505796-10-happier">10% happier</a>.</p><p>That’s all for now! If you want to know more about how to increase your involvement and other flow factors please join us for my lecture at the <a href="http://2016.4developers.org.pl/en/">4Developers</a> conference on 11th April in Warsaw.</p><p>Or wait for my next blog post.</p><p>See you!</p><p><em>Bibliography:</em></p><ul><li><a href="https://www.goodreads.com/book/show/18505796-10-happier"><em>10% Happier: How I Tamed the Voice in My Head, Reduced Stress Without Losing My Edge, and Found Self-Help That Actually Works</em></a><em> </em>by Dan Harris</li><li><a href="https://www.goodreads.com/book/show/21354477-night-school"><em>Night School: Wake up to the power of sleep</em></a><em> </em>by Richard Wiseman</li><li><a href="https://www.goodreads.com/book/show/66354.Flow"><em>Flow: The Psychology of Optimal Experience</em></a><em> </em>by Mihaly Csikszentmihalyi</li><li><a href="https://www.goodreads.com/book/show/18222878-the-rise-of-superman"><em>The Rise of Superman: Decoding the Science of Ultimate Human Performance</em></a><em> </em>by Steven Kotler</li></ul><p><em>This post originally appeared on the </em><a href="http://blog.ragnarson.com/2016/04/08/when-involvement-rhymes-with-enjoyment.html"><em>blog of Ragnarson</em></a><em>, a Ruby/Rails software development agency.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b53bba47182" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ragnarson/when-involvement-rhymes-with-enjoyment-2b53bba47182">When involvement rhymes with enjoyment</a> was originally published in <a href="https://medium.com/ragnarson">Ragnarson</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>