Общо показвания

септември 27, 2011

Transformers (3)

Най-тъпият филм, който съм гледал, с най-неясните ефекти. Това което виждах на екрана беше онова, което виждам като пусна миксера - нещо метално се върти. Толкова. Нищо друго. Гений на компютърните анимации или болен мозък!?

Второто.

Повече никакви трансформатори!

септември 26, 2011

Домашен сладкиш

Ето какво похапваме за "заслаждане" последните дни с Мартин:

Домашен кейк с домашна глазура
Кексчето е много лесно, разбива се без миксер и може да му се правят вариации с плодове:

1 чаша захар
2 чаши брашно
1 бакпулвер
1 ванилия
1/2 чаша мазнина (олио примерно)

Разбивате с бъркалка и изсипвате в намазнена и поръсена с брашно формичка. Печете на силна фурна, както обикновен кекс.

Тук е момента да спомена, че ползвахме пълнозърнесто ръжено брашно, кафява тръстикова захар и зехтин. Това са вариации по неволя, нямахме друго просто. Стремим се в кухнята ни да няма много изкушения.

Консистенцията на изпечения кейк не е като на традиционния кекс, не е така пухкав и мек, прилича повече на плътен хляб. Ето защо след като изстине го нарязвате по удобен начин, според формата за печене, която сте ползвали и намазвате хубаво със смес от добре изцедено мляко и домашно сладко (ние ползвахме от череши, освен това минахме сладкото малко през миксера и оставихме само няколко цели череши вътре, за украса). Оставяте леко да поеме влага и е готово за хапване.

Докато сме на въпроса с десертите, отцеденото кисело мляко е страхотна основа за всякакви вкусни сладкиши. Ние ползваме 1.5% или 2% мляко и го отцеждаме за няколко часа. Водата ползваме като айран, доста е солена между другото, вероятно купуваме мляко, в което добавят сол, макар да не е означено на етикетите.

След като е отцедено разбиваме млякото с нещо сладко, често това е мед или домашно сладко от ягоди, череши или друг леснодостъпен от село плод. Плътният сладък вкус доста добре подтиска глада за млечен шоколад. Ако пък обичате ядки, може да се добавят в сместа, става доста добре, но аз лично не обичам никакви ядки. Консумирам ги само много фино смлени в мюсли или в смеси като тази.

Освен че има по-малко мазнини от обикновения шоколад (калориите в такава смес са около 2 пъти по-малко от колкото в шоколад със същия грамаж, това разбира се не означава да ядем два пъти повече от млечните смески), по-голяма част от калориите са за сметка на протеина, от колкото в шоколадите. При някои хора поемането на протеини подтиска глада за по-дълго време. Простата истина е, че след определена възраст повечето българи просто приемат твърде много калории. Дори и да спортуват, стегнатите мускули са покрити с мазни слоеве. А колко от нас всъщност спортуват до толкова, че да поемат по 500+ калории на ден над норматива си. Аз не!

септември 16, 2011

what good is youtube

Recent check on my old blog (in livejournal) fir 'music' tagged posts reveals the following: 80% ot the linked YoutTube videos are now gone. So what good is youtuube then - you share something from the site and you cannot know how long it will be there! So it is good only for sharing stupid hoe videos, like the kid after dentist appointment! Fuck youtube!

септември 12, 2011

Смотан педал в ефир

Става дума за Миро в предаването "Гласът на България".
Само за една вечер малоумните му коментари минават всяка граница:

Коментар номер 1: "сигурен съм че това зпълнение направи едни "щастливи" хора още по-щастливи (за песен на Лили Иванова)

Коментар номер 2: (към Марто) Неудобно ли ти стана (след като на сцената танцуваха двама полуголи красавци за "украса" на песента на Lady Gaga.

Сценка (не е коментар но си е номер 3): Какви бяха тия заигравки с девойката, опипвания, въздишки и тн? Горещо му станало. Таратанци.

Мирославе! Гей с гей такъв! Престани да се правиш на мъжкар, че вече всички ни е гнус от поведението ти. Водиш по гнусотия дори пред тая кокошка Мариана с нейното "Ами щом хората го харесваааат... аз нямам коментар". Що нямаш? Щото туркиня изпя българска песен за това ли нямаш? Ами за Александър, който изпя турска имаше ли? Тъпа пача. Много разбира от музика вече. Онзи път когато пя с другите ученици видяхме колко струваш. Най-зле пееше от всичките!

Изобщо в България всички са големи разбирачи и разбират от всичко и смятат че трябва да се покажат колко са ербап по национална телевизия. Аз знам, че Мирослава е тъпа овсъ, достатъчно обикаля педерастките чатове, та е налитала и на мои познати. Ама то бива наглост бива... всичко си има граници!

Decision making and MLM

Recently I was about to attend a presentation by Zepter about their Steam vacuum system.

I decided not to attend and instead take the decision in favour or not or the purchase on my own time and by my own means. What I mean by that is the known fact of decision fatigue: this is, when you are tired of comparing options at the end you just give up and you make no rational decision. Which is exactly what the sales representatives want. Of course this post is not to blame them, as anyone has to make their living and does it by its means. However, knowing about the facts on how we make decisions is very important.

I need to clarify that I do use and I do like Zepter products, I have used several and I am very happy with my purchases, I am using the company just as an example here because of their direct marketing strategy which is working partially by pressing the potential buyer into a purchase, part of the methods used derive from decision taking fatigue.

More about the studies can be found here.

How is this performed for Zepter presentations. First of all you are seated for at least one hour, during this time probably someone is cooking something which will be given to taste at the end of the presentation. During this time you are constantly bombarded with "facts" (I put those in commas because the real name of those is "claims", not facts, for example Zepter claim that during cooking all vitamins are preserved in the food which cannot be physically not chemically true, unless during cooking the food is transferred in a parallel universe where the vitamins are not destroyed by the high temperature, for this to be fact there should be some real measurement done by certified laboratory and the data from the tests as well as how the tests were performed should be available to the buyer, this is never the case! Even if it was the case, how many potential buyers would have the possibility to check on th laboratory credentials in this one hour time frame?)

As the products are described one after another and sometimes marvellous qualities and functions are imagined and described with great confidence you start to think that Zepter is selling everything that you need, and mostly what they sell is what you need indeed. As mentioned in the disclaimer above I do use their products, still I am not in agreement with their methods of selling it! At the end you are presented with the astronomically high prices and you have to make the decision. You are now really hungry,  (see reference link) and you have to choose from so many wonderful things! Now is the time when the consultant/manager/whatever uses its powers over you - to push you into a contract. They know what you came for (usually you are invited by a friend or colleague and they know why you are there) and subtly guide you into purchasing it. The beauty of it is that a day later you know you have spent too much money on something you might not really need, buy you are completely sure you have made the right decision. As to quote from the NYT magazine: "By the end, you could have talked me into anything".

Notice that not "decision" fatigue  is the reason you buy, but the slight guidance from the person who sells you the stuff. Also notice that the less money (i.e. less options you have on purchasing everything you liked on a presentation) the easier is to be pushed into making a certain purchase. This is a well known also, rarely people with lots of money attend those parties, unless they are "in the game". If you have the option to purchase anything you could hardly be rushed into purchasing anything. This comes from the fact that we are constantly bombarded with money decisions and we just do not want more of those. Each time you have to think of money it is a decision making. To purchase this or that!? But the money is not the only object, when you do not have enough to make mistakes (i.e. buy the one you randomly choose at the moment, then decide if you like it or not and possibly purchase another one with similar capabilities/qualities).

If you want to go to a presentation on a MLM - go. Here everything you want to hear, take notes and then go home. And forget about it. After a month re-open the notes taken and check all claims (you could start online - it is cheap and easy). Then compare products! Always compare products. Then check your needs. Often you are lead to believe you need all functions/capabilities of a product - usually you do not! Why would you need 2 vacuum cleaners?! Also be aware of the "additional purchase" - if you are offered to buy an item for 1000EU but if you decide to take a second item with face value of 300EU the whole purchase will be 1100EU. This is an easy way to sell things that are actually much cheaper - for the example with the vacuum cleaned you get an ironing board/ladder. Which is priced at 320EURO!! Excuse me! No thanks, I just want the freaking vacuum machine.

Let me tell you a trick in the marketing. Lets say I am seller 1 and I have an item priced at 100$. Exactly the same item is priced at 95$ at seller 2's shop. Now, you can come to me and say: hey, seller 2 sells it for 95$. I will tell - well, okay tell you what, you could pay 100$ here but you get a second item for free, which otherwise would be 15$. So for 100$ you actually get items for 110$!!

And here is the trick. The item actually costs me and seller 2 60$. If you buy it from seller 2 he gets less but I get nothing. So i am offering a second item, which is often with even bigger earning points: lets say 5$ and I put face value of 15$ on it. In the final calculation I have made bigger profit than seller 2 anyway and you get a completely useless second item (a simple example would be a new PC as item 1  and item 2 would be "stereo speakers" - with awful sound quality which is hard to sell anyway).

Lesson number 1: never, ever make the purchase on place. take your notes at home and check out the competitive products. Compare everything you can think of. Then if you doubt about a certain aspect of the product contact the sales person again. And demand for concrete details, not some vague answer like "Ooh, don't worry, it never happens with our products".

Lesson number 2: always refuse the additional products, no matter the "saving" you get. If they are so eager to sell you the expensive item try to negotiate lower price on it instead of taking the "free item".


Lesson number 3: Do not get involved! If you happen to make the purchase anyway and you happen to like the product do not fanatically start to buy anything the company has to offer! And do NOT recommend it blindly. Instead advise the people seeking recommendation to repeat the same process you just read about. For their case this might not be the right purchase.

Lesson number 4: do not over-think it. If you think about a purchase for longer than 3 months you probably can go without it anyway. Also, consider future possibilities. Simple example in those MLMs is introduction of a new product (same example - Zepter vacuum) - price at introduction - 1500Euro. Price after a month 1950Euro. This is a SIGNIFICANT price difference! If you can wait for 3 or more months for a product you can go without it for a while longer and wait for a better deal on it. And no, the new, better model is not from other space. Think how would you have felt if you bought the old model and a month after that there is a new one! Much better. Nah...

So this is it. I hope you think twice next time on those presentation parties. I still do not understand why they call them parties. No one seem to have fun there...

септември 11, 2011

Dietary adjustments

След като се установи, че съм качил, вместо да съм свалил това лято дойде време да се направят няколко промени в храненето и спорта.

Започваме с храненето. Явно ядките на закуска не са най-добрият вариант за човек със седяща работа, независимо колко спортува привечер, а аз не спортувам много. Ядките явно отпадат от плодовите миксове, вместо тях залагам на нискомасленото кисело мляко, къде с "жизненоважните бактерии"® къде без....

Закуска с мляко и плодове
Ето примерна рецепта:
⅓ нискомаслено кисело мляко (обезмасленото има странен вкус, за това не го ползвам)
3 сини сливи, без костилките
1 малка ябълка от сладък сорт, без семките
1 шепа малини
1 лъжица мед (може и стафиди, за повече фибри!)

Смесвам всичко в блендера и voilà!

Ако предпочитате охладен вариант може всичко да е престояло в хладилника, получава се доста приличен "сладолед". Аз не обичам студени храни и напитки, така че го правя със стайна температура. Според мен много ще върви с малко мента тази смес, но нямах и не съм го пробвал.

Освен промяната в закуските мисля да пробвам и промяна в обядите, вместо вуглехидтрати със зърнен произход, ще опитам такива, като картофи и други нещестени зеленчуци. Ще оставя обаче кафевия ориз, защото много го обичам. Мисля да увелича леко и зехтина. Рибата 2 пъти седмично и месото два пъти седмично остават, но напоследък не ме кефи пилешкото, мисля да заложа на телешко този месец.

Мисля да измервам резултата по-строго вече, с взимане на мерки през ден и записване в таблица не само началния и краен резултат, но и междинните такива.

септември 08, 2011

Shareable future?

Alex Steffen talked about shareable future for our cities. At one point of his talk he points out:
The denser the city the lesser the footprint
While this is certainly true the following is also true:
The denser the city the worse the mental health of its residents.
This contrast is easily explained: while we reduce the carbon footprint we endorse the 'people' noise and the stress. Car alarms, crying babies, loud music in the neighbours, a party bellow you, piano player above you, someone making renovation somewhere in the nearby building or worse - in your building. All those things tend to build up and destroy our sense of equilibrium and the more sensible to this stress people (like me) reach a point where everything bothers them! Every little noise, every little nuance with the neighbours, with the loud people walking on the street and so on.

So mr. Steffen, before we can stop stealing your future, you should first propose a viable solution. Because the one you are proposing right now it not good. Increasing the density of the cities is NOT what we need!

(link to the TED video (mp4))

септември 05, 2011

Javascript client-side templates

How to use jade templates on the client side with requireJS.

I am working on a rather big project targeting webkit embedded environment and I was looking for client side templates that can be loaded at runtime (i.e. dynamically) and do not require the loading of iframe (because of some internal requirements posed by an C++/JS extension in the environment ).

I was using jade on node server for some time and I like the clean syntax, I never ever liked HTML syntax.

To use the jade format on the client side you need the jade code:

$ git clone git://github.com/visionmedia/jade.git
Compile the minified or the regular version as needed:

$ cd jade && make jade[.min].js
The compiled version however leaks the 'require' function in the global name space and as we are using requireJS for the project (I recommend it - a lot!) we had to enclose the resulting jade code in a define:
$ echo -n "define(function(){" > requirejs-jade.js && cat jade.min.js >> requirejs-jade.js && echo -n "return require('jade.js');});" >> requirejs-jade.js && mv require-jade.js jade.js
 After that we were able to allow each module to define its own template(s) at load time and use lazy load of all modules as usual:

//module that can be loaded whenever the envoronment needs it
define(['jade.js' , '!text/templates/atemplate.jade'], function(jade, jadetpl) {
    var tpl = jade.compile(jadetpl);
    var data = {/*some data*/};
    $('#container').innerHTML = tpl(data);
    return {/*module's public interface*/};
});
The pre-compiled to JS functions modules can be loaded from the server also! This was tested in Firefox and webkit as those are the environments targeted. I will update once I test it in IE also.

UPDATE:
I have tested it in IE, of course it fails miserably, however the pre-compiled templates work (of course you need to fix the runtime.js as it contains schims for Arrya.isArray and Object.keys which seem to not have been tested (I have reported this in github, the author will fix it soon probably)). If you are looking for working with client side templates in IE environment you will probably need to pre-compile your templates on the server (done only once) and it will turn them into javascript functions. If you want to use those with requireJS you will need to decorate them a little bit, here is my decoration (this is done 'live' on the server as we are still in development phase and we change the templates a lot, so we provide a compiled template on request instead of pre-compiling them all, the pre-compilation should be done in the build however, before deploying):

var a = jade.compile(data, {
      compileDebug: false,
      client: true
});
a = 'define(["support/runtime"],function(jade){' + a.toString() + 'return { render: anonymous }; });';
res.send(a);
And then on the client:

require(['tpl/tplname'], funcrion(tpl) { var html = tpl.render(data)});

As seen, the returned fragment will be requireJS compliant js script, the dependency (runtime.js) also was altered so it does not leak in global namespace (i.e. I made it also requireJS compliant).

In brief: it is possible to use client side templates (regular jade or pre-compiled, depending on how much you are willing to trace the issues in IE). On the performance side I have not yet completed the tests, regardless of the tests however the flexibility templates provide will compensate the slow down, especially with pre-compiled templates (those are very simple scripts and look a lot like the usual string concatenation method).

Happy birthday, Freddie!

Google tribute to Freddie!

freddie doodle

септември 02, 2011

My favourite Firefox add-ons

Over the years I have read many lists of recommended and/or favourite add-ons. For a while I have been using Chrome browser for my everyday browsing, however its lack of support for browsing habits that include 50+ tabs at a time, single window/multiple work spaces (i.e. panorama in Firefox) and other small details like the fact that there is no way I can make chrome open links in new background tab by default (very useful in Google Reader when items are opened with the 'v' shortcut) made me run back to Firefox. And made me look for nice add-ons to make my web experience more pleasant. So here goes my list. Notice that I have installed many many add-ons just to try them and those are the one that stuck.

AdBlock plus: this one should be installed by default with every Firefox installation IMO. It not only blocks ads, it also does good job with unwanted flash ads, which at this point in my browsing habits makes flash block unneeded. However FlashBlock is also great.

Fast dial: One feature I miss from Chrome is the 'app' shortcuts (i.e. not really applications with off-line cache and stuff, but instead simple bookmarks to a URL on the web. Fast dial goes close enough, it is not that pretty (i.e. it does not display the supplied icon, instead it makes a screen grab of the web page by default, which might be a plus or a minus. For example I have had 3 apps in chrome that used the same google reader icon, which is confusing. On the other hand the icons look much nicer.) but does essentially the same thing. And you do not need to go to a web store. It comes very handy when you have multiple very similar bookmarks (like the example above with google reader and google reader player). Fast dial supports icons also, but you need to provide the URL for the icon manually.

Pixlr grabber: Pixlr is a great image editor (much better than the one used by Google Images (aka Picassa). This add-on lets you grab part of any page and edit it in pixlr with one click. Similar to Awesome Screenshot for Chrome and Firefox, but provides much better editing tools. On the other hand if you simple need to make annotations (like pointing out rendering issues to your web designer) awesome screenshot is the better choice.

Quick translator: I use 6 human languages day to day, however I am not so good at all of them and sometimes I need a bit of help with a word or a phrase. Instead of opening new tab with google translate and copy/paste the word I use this tool. Also notice to Chrome - instead of offering to translate each page allow the user to select a text to be translated - less intrusive. Besides google translate is their product also.

New scrollbars
Stylish: I use it a lot to change the fonts in often visited sites mostly, I use it also to change web applications appearance (Perfect dark google reader is awesome! I swear!) I use it also to change the scrollbars of Firefox because I like smaller ones than those provided by the OS. The ones I currently use are displayed on the image.

ScrapBook: this one is probably the most useful for me, as it allows me to do most work. I use dropbox folder (actually encrypted dropbox folder but this is entirely different story) to synchronize my scrapbook across my computers, it would have been nice to have another option for this, for example using google account or other service, but dropbox is just fine for now, providing they do not loose my files. What I like about scrap book is that it allows me to annotate the saved pieces of document, it allows me to keep an entire document, it keeps link to the original URL so I can visit and check for updates (like on forums or blogs) and I have a copy of the content locally, so even if it disappears from the web I can still access it. It allows for folders, exports and other nifty tricks and it more useful than anything I have found thus far. For once I do not need to keep bookmarks to developer sites just to check 3 line of codes I keep forgetting. I just save the parts I like and I can go back to the URL whenever I need to check for updates.


I also use firebug a lot, but this is related too my job. I also use greasemonkey but I write my own scripts, I rarely even search for scripts for domains. Probably I am just happy with what I use as web applications right now.