Inspiration from books

Recently I started to read a lot (thanks to Kindle text-to-speech feature) and I can see how books are broadening my mind. There is a lot of inspiration in (good) books, ideas and concepts you would not otherwise think about.  I want to share some of these great books. They are: Rich Dad, Poor Dad by Robert Kiyosaki (see related post here) Moonwalking with Einstein by Joshua Foer Road to Serfdom by Friedrich Hayek Lucid Dreaming by Robert Waggoner There is no need to comment on Rich Dad Poor Dad, as there was already written a lot. Even thou I don’t agree …

Continue Reading

Little jQuery.extend gotcha

jQuery.extend() is a very powerful function for merging two objects or for extending jQuery with custom plugins. There is but one little gotcha to think about: as in most function calls the order of parameters matters 🙂 Following two fragments of code yields different objects var a = { aa : ‘1’ , bb : ‘2’ , cc : ‘3’ }; var b = { aa : ’11’ , bb : ’22’ , dd: 3 }; var result_a = $.extend({}, true, a, b); var result_b = $.extend({}, true, b, a); The result will be this: Notice that I use $.extend({}, …

Continue Reading

Criticism of AmWay, HerbaLife and Kiyosaki’s followers in general

Motto “Man speaks about what he doesn’t live” I am reading Kiyosaki’s famous book Rich Dad, Poor Dad and I find it very inspiring. Kiyosaki is also the author of board game Cashflow. Both book and game are very good. But to play the game I had to find someone who has it. I met a group of people studying Kiyosaky’s books. They were members of some company but I did not find the actual name. I was told that the name is changing quite often, and that there is no single company but whole family of companies. They claim …

Continue Reading

Convert local time to UTC time in Javascript

This might come in handy. Simple function which converts local time to UTC (Universal Coordinated Time). It accepts single argument of type Date. //converts local time to UTC (Universal Time) function toUTC(/*Date*/date) { return Date.UTC( date.getFullYear() , date.getMonth() , date.getDate() , date.getHours() , date.getMinutes() , date.getSeconds() , date.getMilliseconds() ); } //toUTC()

Continue Reading

Proposal for WordPress plugin – customScript

<script src="http://demos.davidjs.com/customScript/raphaeljs.js"></script><script type="text/javascript"charset="utf-8">window.onload=function(){var r=Raphael("holder",640,480),p=r.path("M295.186,122.908c12.434,18.149,32.781,18.149,45.215,0l12.152-17.736c12.434-18.149,22.109-15.005,21.5,6.986l-0.596,21.49c-0.609,21.992,15.852,33.952,36.579,26.578l20.257-7.207c20.728-7.375,26.707,0.856,13.288,18.29l-13.113,17.037c-13.419,17.434-7.132,36.784,13.971,43.001l20.624,6.076c21.103,6.217,21.103,16.391,0,22.608l-20.624,6.076c-21.103,6.217-27.39,25.567-13.971,43.001l13.113,17.037c13.419,17.434,7.439,25.664-13.287,18.289l-20.259-7.207c-20.727-7.375-37.188,4.585-36.578,26.576l0.596,21.492c0.609,21.991-9.066,25.135-21.5,6.986L340.4,374.543c-12.434-18.148-32.781-18.148-45.215,0.001l-12.152,17.736c-12.434,18.149-22.109,15.006-21.5-6.985l0.595-21.492c0.609-21.991-15.851-33.951-36.578-26.576l-20.257,7.207c-20.727,7.375-26.707-0.855-13.288-18.29l13.112-17.035c13.419-17.435,7.132-36.785-13.972-43.002l-20.623-6.076c-21.104-6.217-21.104-16.391,0-22.608l20.623-6.076c21.104-6.217,27.391-25.568,13.972-43.002l-13.112-17.036c-13.419-17.434-7.439-25.664,13.288-18.29l20.256,7.207c20.728,7.374,37.188-4.585,36.579-26.577l-0.595-21.49c-0.609-21.992,9.066-25.136,21.5-6.986L295.186,122.908z").attr({stroke:"#666",opacity:.3,"stroke-width":10}),over=r.path().attr({stroke:"#fff"}),e=r.ellipse(295.186,122.908,5,5).attr({stroke:"none",fill:"#fff"}).onAnimation(function(){over.attr({path:"M295.186,122.908L"+this.attr("cx")+","+this.attr("cy")+"z"});});e.clone();e.attr({rx:7,ry:3});var rotateAlongThePath=true;function run(){e.animateAlong(p,2e4,rotateAlongThePath,function(){e.attr({cx:295.186,cy:122.908,rotation:0});setTimeout(run);});rotateAlongThePath=!rotateAlongThePath;};run();var logo=r.set(r.rect(13,13,116,116,30).attr({stroke:"none",fill:"#fff",rotation:45,opacity:.2}),r.path("M129.657,71.361c0,3.812-1.105,7.451-3.153,10.563c-1.229,1.677-2.509,3.143-3.829,4.408l-0.095,0.095c-6.217,5.912-13.24,7.588-19.2,7.588c-3.28,0-6.24-0.508-8.566-1.096C81.19,89.48,66.382,77.757,59.604,60.66c3.65,1.543,7.662,2.396,11.869,2.396c15.805,0,28.849-12.04,30.446-27.429l22.073,22.072C127.645,61.351,129.657,66.201,129.657,71.361zM18.953,85.018c-3.653-3.649-5.663-8.5-5.663-13.656c0-5.16,2.01-10.011,5.661-13.656l14.934-14.935c-3.896,13.269-5.569,27.23-4.674,40.614c0.322,4.812,0.987,9.427,1.942,13.831L18.953,85.018zM44.482,46.869c3.279,25.662,23.592,50.991,47.552,57.046c3.903,0.986,7.729,1.472,11.432,1.472c0.055,0,0.107-0.005,0.161-0.005l-18.501,18.503c-3.647,3.646-8.498,5.654-13.652,5.654c-3.591,0-7.021-0.993-10.01-2.815l0.007-0.01c-1.177-0.78-2.298-1.66-3.388-2.593c-0.084-0.082-0.176-0.153-0.26-0.236l-3.738-3.738c-7.688-8.825-12.521-21.957-13.561-37.517C39.736,70.853,41.149,58.578,44.482,46.869").attr({fill:"#f89938",stroke:"none",opacity:.5}),r.circle(71,32,19).attr({stroke:"none",fill:"#39f",opacity:.5}));logo.translate(245,177);};</script> You will only see the demo animation if you click link to this post Motivation For this blog I am using WordPress and I am quite happy with it, but I miss one feature – the ability to add custom javascript code to given post. I do not want to have separate demo pages when I am want to demostrate some piece of code or something. Sometimes I need it to modify the Html structure of page, or add a simple animation or for whatever just crosses my mind:) I’ve tried to write my …

Continue Reading

Problem with printing background images

I have recently wasted almost two hours trying to figure out why some HTML based report wont display logo in its header. I am quite sure this will make someone else’s life easier, so I am sharing it. The problem is that most browsers ignore background-image and background-color. So whatever I did I could only set border, width, heights etc but not the image. At first I thought the problem was in wrong path to background image.  It wasn’t but I found that it is not possible (at least as I know) to inspect DOM elements in print-preview. Something like …

Continue Reading

Amazon Kindle – personal review

I’ve bought Amazon Kindle about a month ago, so it is about time to write some review. Generally I am very satisfied with it. I don’t think I should  repeat all the positive reviews available on the Net, it would be quite unnecessary. So just to sum it up: Buying books to Kindle from Amazon with it’s “one-click” feature is awesome and very convenient. In less then five minutes I had the book in my Kindle.  Then I plugged in my headphones, turned on the “text to speech” function, put my baby in the pram and started walking. As for me this …

Continue Reading

So, is the world really faster?

Every now and then I hear people complaining that the world is now much faster than it used to be in time of our grandparents. But is it really so? Did people complain about that very fact in their time? Another common complain is that parents now have less time for their children or their partners. I don’t agree with this. I think that generally we work less now, don’t we have 8 hours long work day? Problem is that we have now too many options to choose from. It is difficult to choose and be happy with your choice, …

Continue Reading

Environment and productivity

What kind of environment is best for work? Do you work in such? When I worked for IBM I was confined in a cubicle in a big open-space.  It was an experience I don’t want to go through again. The environment was “noisy by default”, there was a continuous sound-spam of chatting people. It was really difficult to concentrate and be productive.  The only way how to avoid it was to put on headphones and listen to some music.  But still I was disturbed by IM notifications and other crap. Now I work in a small office in a team …

Continue Reading

I’ve started using Memolane

Recently I have stumbled across an interesting startup called Memolane. It is an unorthodox aggregator of various social media sites, YouTube, RSS feeds et cetera. I find it very useful. We all publish and share bits of our life to various sites, with different groups of friends, and Memolane collects them all back together, so everything is lucid and “defragmented”.  Everything on one place. You can see what you did in the past, how your interest changed, or what things have influenced you on your way…. Your tweets are there, facebook statuses, favourite videos, everything.  And their UI is simple and intuitive, …

Continue Reading