Skip to main content

The Power of Habit by Charles Duhigg


Really good book. Author gathered stories and scientific data that covers all aspects of habits. If you have bad habit or you want a new one this book can really help, especially by explaining what works, and what not.
tldr; rating 9/10 fun to read and I have learnt a lot about habits.

First author explains how habits work, why they exists? They are really useful most of the time as you probably know but there is more than you might think. The best thing about habits is that they are not using willpower. Please read more about how willpower is important here: http://oliveremberton.com/2014/life-is-a-game-this-is-your-strategy-guide/. It's really our most important asset so using habits to get the job done and at the same time not use willpower is a great thing about habits!

Above is true of course if you have a good habit, unfortunately not all habits are like that :/ Turns out that most of our habits are pretty hard to get rid of. You need to be conscious about what you doing and spent great deal of willpower to stop bad habit. Fortunately many people have done that before, think about AA, habits are connected to addictions so while fighting with bad habit it's good to know what to do. One unexpected thing that I learn is how to deal with crisis, I have seen many people give up when crisis come. I myself many times fall trying to create new habit or get rid of something at this point.

The end of book is a nice todo list how to deal with habits in your own life. At least you know what to do exactly to master your habits :)

Comments

Popular posts from this blog

How to simulate slow connection (developer proxy in Node.js)

Update: If you use Chrome then you can use "Throttling" so simulate slow network for all your assets. This should be easier than proxy.


Toggle device modeChoose Network type.Refresh the page




https://developer.chrome.com/devtools/docs/device-mode 



Proxy:



For some time I wanted to use some proxy for development and testing of eg. slow internet connection, but it was hard to find something useful and free. I know there is Charles but buy it to use it at most one in a month is not for me.

I started thinking about Node.js, maybe I can write proxy for me? But fortunately I found one.

https://github.com/nodejitsu/node-http-proxy

With this module I can write really short code to create slow server:


var http = require('http'), httpProxy = require('http-proxy'); httpProxy.createServer(function (req, res, proxy) { var buffer = httpProxy.buffer(req); setTimeout(function () { proxy.proxyRequest(req, res, { host: 'localhost', port: 8080, …

How to use NPM packages from private repositories on bitbucket

Using Node.js you want to use NPM packages for reusable parts of the apps you create, that is a common sense. At the same time not everything makes sense as a public module unfortunately. Right now we are using Bitbucket at work for private repositories but there is a problem. How to use them as NPM modules? We do not want to publish them to the public npmjs.org but still want to have an ability to install them easily.

After googling and experimenting I have found simple solution.
First create new user in your organization with obscure password and give it read access to the repo. It is best to assign really obscure password but do not fool yourself. This is convenient but you must sacrifice security a bit. You should always consider how in your context that would be important.

Change example from below to:
user - username
PASS - password of the user
organization - owner of the project (you can find it in bitbucket url to your project)
project - your project name

"dependencies&…