16 December 2014

Living with histamine intolerance and other things, part 3: How to be a professional patient

You might want to read part 2 first.

Last year a doctor told me to take histamine antagonists every day and I lowered the dosage almost immediately to about 20%, because taking it every day was too much. This worked well for about a year but I was slowly acquiring debt that I had to pay back later. Histamine is essential for the body and if you start messing with it, the body fights back. I tried to get off the medication, but then I couldn't sleep instead. At the same time my stomach problems got worse. Sometimes I had to give lectures and I could only do a good job if I didn't eat for 18 hours. Paradoxically, my stomach didn't like food.

I started taking too many sick days. It reached a point when I felt truly powerless and I cried for the first time in ages. But as one of the best amateur psychologists Louis CK says, you are lucky to live sad moments (the important bit starts at 1:11, but you should watch the whole video).


When you have the three basic F's—family, friends and F-You money—you have absolutely nothing to worry about and the sadness will quickly disappear.

After this moment I went on a sick leave for a couple of months. My suspicion for stomach problems turned out to be correct when I received a new stomach diagnosis while visiting my parents in Slovakia. I don't see a point of revealing this one, so I just call it diagnosis X. After starting the treatment, I have immediately gained 4 kilograms, although there are still some unresolved issues and I have a suspicion that there is a deeper problem causing both histamine intolerance and diagnosis X.

I am still taking very cold showers and try to exercise, but I have to agree with the guy who once said:
Cold showers are a great tool, but they are not a solution to all your problems. – Lukáš Poláček
I know, I know, I'm quoting myself, but that is not the first time I have done that, so you have to deal with it.

It was time to go back to Sweden. This time I came back prepared for the Swedish doctors.

Professional patient

A few years ago a private company mailed my blood to Germany for a histamine intolerance test, because the diagnosis is mostly unknown in Sweden. In the next couple of years I got used to explaining the diagnosis to the Swedish doctors. This year after getting my diagnosis X in Slovakia, my general doctor told me that Sweden doesn't have a tradition of treating it. Cool, now I can educate the Swedish doctors about 2 diagnoses at once!

Even though I have read quite a lot about my problems, I decided to do much more and become a professional patient. I started by reading some medical books as well as various internet resources. Recently I have also started to read scientific papers in medicine. If you ever plan to be sick, don't be scared of medical textbooks, they are quite readable and often have nice pictures.

The doctors of course don't like patients who self-diagnose themselves and I'm not encouraging you to do the same. When you are in a restaurant, you don't go to the kitchen and show the cook how to sear a steak; but when you order Château Lafite year 1869 and get 1898 instead, you immediately recognize the difference in taste and complain. A doctor once tried to give me medicine that would not work. After telling him that, he admitted I was right and referred me to a specialist instead.

I think most doctors take this self-education well. One time I couldn't recall the Swedish word for a certain body part, so I used the Latin word instead and the doctor asked me if I study medicine. I think that actually helped my interaction with him.

I want to thank my friend Miro who has been a professional patient for a long time and has been an inspiration to me.

Misaligned incentives

When it comes to saving for retirement, I advise my friends to manage the savings themselves, because whether you leave it to the government or a private company, they will not act in your best interest. The problem is that their incentives are not aligned with yours (except for Vanguard, whose founder should get a medal). If you don't want to get screwed, you should educate yourself or ask a friend whom you trust.

You will encounter misaligned incentives in the health care, too. For a doctor paid by the government you are an expense, so they might make as little effort as possible. A private doctor might keep you sick, so that you return many times and keep paying. And then there are various scammers trying to sell you expensive placebos. Believing that the government will act in your best interest is as naive as believing that a private company would put your interests before their profit.

So far the only solution I found to this problem is self-education. This is not the first time that reading about economics and game theory helped me solve some real life problems. That's why you should read non-fiction books too.

Swedish health care

Sven C. Larsson in the book Remaking America mentions examples of patients treated badly by the Swedish health care system. He compares some situations with the removal of life boats from Titanic, because not enough are available for all the ship's passengers.

A sure way to achieve equality is to make everyone suffer. But once people know about it, they start to cheat. They would bring inflatable life boats on Titanic in their baggage. I brought my inflatable life boat by getting a diagnosis in the Slovak health care system and educating myself. This is to be expected, since equality is an unstable equilibrium.

I'm not saying private doctors are perfect; they have made mistakes too. Two months ago, I borrowed a medical book that was co-written by a private doctor that I visited before. Apparently he's an expert on the topic and he is often interviewed in the national media. Despite all this he also didn't find diagnosis X.

Experts will continue making mistakes, but the government-funded system does very little to counteract them. You might meet a doctor that can't help you and then you need to wait 2 more months for another one, while you continue to suffer. If you are in Sweden, buy private insurance; it's cheap and worth it.

There are some positive things about the government-funded system, for example it's world-class when it comes to preventing people from dying. However, people who are not in the immediate danger of dying need to wait for a long time and are often given a bad service.

After 4 years of lousy treatment and low quality of life, I don't trust the Swedish doctors anymore whether they are private or government-funded. I would appreciate any tips for other countries with a functioning health care system.

My PhD

With all these health problems and uncertainty, I decided not to finish my PhD. The sick leave that I accumulated over the years and working 20% at Spotify would still give me about a year to finish, but health is a top priority now. I am still taking a couple of sick days every month and I am slowly writing a small thesis to finish with a smaller degree called licentiate (the degree is almost unknown outside of Sweden).

Even if I won't finish with a degree I wanted, all the scientific education has proved useful when reading scientific papers in medicine. And I have probably read more medical than computer science papers this year, so I already feel like I switched fields. Recently I have seen some exciting studies done on rats, guinea pigs and cows that show that some of my problems might be treatable. It's time to replicate these studies on humans.

30 October 2014

The importance of F-You money

In the previous year, I have given advice to many people about saving and investing, so I thought I would put some useful tips into one post. I don't consider myself an expert on the topic, so it's mostly links to other blogs and books. Enjoy!

Introduction to F-You money

Having F-You money brings your stress level down and makes you happier. Once you have enough of it, you can say F-You to your boss and do nothing for the next couple of months. Or say F-Everyone and retire when you are half the age of other retirees, but getting there takes longer. Just don't say F-You too often, most people don't like it.
It’s a big beautiful world out there. Money is a small part of it. But F-You money buys you the freedom, resources and time to explore it on your own terms. Retired or not.Jim Collins
By having F-You money, you are becoming one of the bad rich guys: your savings help some companies create new jobs, expand or innovate. While doing that, you are refraining yourself from consumption and helping our poor planet.

How do you do it?

Forget your bank's mutual funds where you get a worse product for higher price. Real (wo)men buy cheap index fund ETFs on the stock exchange. Every couple of months I take some money and buy ETFs on Berlin or New York stock exchange, while ignoring the price. I also own some bond funds. I buy mostly Vanguard. I never sell and I don't keep an eye on the stock market. Trying to outsmart a random walk is very risky.

The most bulletproof strategy for saving each month is to take money from your salary on the pay day and move it to an account that is not connected to a debit or credit card. You might have been told that you have already made a good investment by buying your house, but that might have been a huge mistake.

When talking to my friends about saving some F-You money, their most common excuses are "I have a girlfriend" or "I can't downgrade my lifestyle". Well, you can talk to your spouse and you should know that luxury is just another weakness. You don't need the new iPad. While changing your mindset, you can go further and upgrade your philosophy and become happier in the process.

For all the Slovaks

One of the typical Slovak pastimes is complaining. Slovaks are so poor that when you go to any shopping mall, it's always full of people. And for them I have one message: as shocking as it sounds, the only way to get richer is to save. The politicians tell you the opposite – they tell you the economy needs more consumption. But what they mean is that they get richer from your consumption through taxes. What your (and my) country needs is capital. So instead of complaining, go ahead and do something about it; save 20% of your salary each month, that's a good start.

Further reading

09 October 2014

Nordic championships in programming 2014

The Nordic championships in programming (NCPC) and UK/Ireland championships (UKIEPC) 2014 took place last Saturday. For the second time I was the head of the jury together with Michał Pilipczuk from University of Bergen (now at Warsaw). This was one of my most memorable contests as a jury member, so I wanted to share some things that happened behind the scenes.

First some interesting facts about the contest.
  • We had 257 teams in NCPC and 68 teams in UKIEPC. Most teams had 3 people, so we had almost 1000 people participating in 7 different countries!
  • The jury could solve the whole contest (11 problems) in 463 lines of code. Something to brag about: 4 of the shortest solutions were mine.
  • The winning team, Omogen Heap, solved all 11 problems 80 minutes before the end, when the second team only had 9 solved problems. These are the guys I have been coaching since high school and I have mentioned them in one of my previous posts.
  • The hardest problem Basin City Surveillance had 33 solutions from the judges: 11 correct, 9 wrong and 13 slow ones. There were 76 test cases, most of them hand-crafted.
Now let me talk more about the hardest problem.

Basin City Surveillance

The problem: check if there is an independent set of size k in a bounded degree graph, where each vertex has at most 4 neighbors. See problem B here for the full problem statement. Initially, the upper limit on k was 11, which allowed 5k algorithms to pass.

On the last Sunday before the contest, I sat down to write a random solution that seemed too simple to pass: it adds a random vertex into the independent set and erases its neighbors, and repeats this until there are no vertices left. If it fails to find k independent vertices, it restarts from the beginning with an empty set.

I was expecting such algorithm to require too many restarts, but only 100 restarts were enough to solve all the current test cases. I constructed some test cases that required 300 restarts, but my solution was still the fastest by far.

At about the same time, Per Austrin sent an e-mail suggesting that we raise the upper limit on k to 15, because he wrote a 3k solution and thought the whole contest was too easy otherwise. Interesting! Per's and mine solutions were intriguing enough that falling asleep on Sunday took me too long.

Michał was against raising the limits at first, but at Monday lunch we decided to go for it to make the contest more interesting, even though there were only a few days left. The next couple of days we were all busy writing all kinds of solutions and test cases killing those solutions; that's why we had 76 test cases and 33 solutions. In the mean time, we also managed to prove that my random solution needs on average at most 3k restarts.

Why the random solution needs only 3k restarts?

First we need to prove a lemma that is important when you want to speed up the 5k algorithm to 3k. For a vertex u we have two options: either it is in some maximum independent set or it isn't. If it isn't, at least two of its neighbors are. One can prove this by contradiction. If only one neighbor v is in an optimal set, then we can substitute v for u and get an optimal solution with u in it – a contradiction. And if none of u's neighbors are in an optimal set and neither is u, then this can't be an optimal set: we could add u to it to make it larger. Again a contradiction.

Using this lemma one can write a 3k backtracking algorithm, that either picks a particular vertex or two of its neighbors. With a little more insight this can be sped up to 2.31k.

By the way, this been the first and probably the last time I have written a program with complexity 2.31k. The slides contain the recurrence that leads tosuch complexity. If you want to be able to solve such recurrence, Concrete Mathematics is the recommended reading.

With some more work, the lemma above also implies that my random algorithm has 1/3chance of succeeding. The following proof is by Per Austrin. We call a vertex good if it is in some maximum independent set and bad otherwise. Let G be the fraction of good and B be the fraction of bad vertices, so we have G + B = 1. The claim is that there is at least one third of good vertices: G ≥ 1/3.

Let us count the number of edges L that connect good with bad vertices. By the lemma, a bad vertex has at least two good neighbors, so L ≥ 2Bn (n is the total number of vertices). We have a bounded degree graph, so each good vertex has at most 4 bad neighbors, 4Gn ≥ L. From these two observations, 4Gn ≥ 2Bn and 2G B. Since G + B = 1, G ≥ 1/3.

At each step my algorithm has 1/3 chance of picking a good vertex, so in total it has 1/3k chance of succeeding. The average time complexity is therefore 3when an independent set of size k exists.

Omogen Heap's solution is also 3k

Omogen Heap first submitted a slow 2n solution with a very small optimisation. In the next submission, they randomized their choices and added a cutoff: after 50 million iterations exit and print "impossible". They got accepted, solving everything 80 minutes before the end.

At first I thought the solution was too slow and our test data too weak, because I have overlooked the randomisation part. I told them that they got lucky. But with randomisation such solution actually has the same running time as my random algorithm, since the chance of stumbling upon a solution is high, 1/3k.

30 September 2014

Kayaking on a mirror

A couple of months ago me and Benny took a boat from Stockholm to Ingmarsö and then paddled for a couple of hours in the outer Stockholm archipelago. Even though we got soaking wet in the rain, it was a great experience and we had to come back. This time for two days.
The whole trip. We started in the south-west corner and slept on the big island in the north-east corner. About 30 km in total. By the way, the OSM map misses some islands and some are too big.
After two hours of paddling we found an awesome place for camping but we decided to continue a bit farther. And it was worth it, because we found paradise on Earth: Idskär is a small island of size 500 × 200 metres, so it's only inhabited by trees, birds and spiders. There were no mosquitoes or annoying ants. A couple of meters from our private beach was a luxurious thick soft moss where we pitched the tent (I ended up sleeping outside of the tent anyway).
Our private beach on Idskär with our kayaks.
It was still too early, so we went for a short ride before the sunset. The sunset was stunning.
Saturday was without a cloud and with a slight wind, while Sunday was with clouds and without wind. We had to paddle on a mirror.
We also found a very old wooden ship wreck in need of exploring.
This trip has exceeded my already high expectations. Great weather, a lot of solitude and an awesome sunset. I would like to come back as soon as possible but unfortunately the winter is coming.

As always, full album is on Google Photos.

09 September 2014

Selected moments from Loptoši™ 2014

Our holiday Loptoši™ 2014 to Slovenia and Northern Italy was a great success. Here is a list of highly memorable moments from it.



  • After a long and steep bike ride from Bled we were rewarded with an awesome view from the Talež hut (and cheap and tasty food).
  • We had some more great views from Mala Mojstrovka (2332 m).
  • Petrž, Palo and me tried to sleep without a tent every night. One night in camping I couldn't fall asleep when a fox stopped just 1 meter from me. I woke Palo up: "We are all going to die! There's a fox!" He told me to go to sleep. And so I did. In the morning none of our body parts was missing. Lesson learned: always listen to your older brother.
  • Roman, Veronika, Petrž and me bathed in Soča river that had 8.5 degrees. The fast flow made it colder, similar to wind chill effect.
  • Palo and Roman tried to catch a bug (cockchafer) with a string, so that they could keep him as a flying pet. It felt like being 8 years old again. They failed, by the way.
  • We had fun on the beach while the rest of the world hid before the storm.
    On another beach we had some more fun burying Veronika, while the rest of the world followed us after realizing their mistake from the day before.
  • Some of us climbed their first via ferrata to Paternkofel (2744 m).
  • No Loptoši™ holiday is complete without skinny dipping, because otherwise we would lose the trademark. Besides, who wants to get their swimming suit wet? The lake was conveniently cooled down by ice floes. Still it was 10 degrees Celsius, a piece of cake compared to Soča.
    The lake had an island in the middle of it, a perfect place for artistic photos.
  • We woke up at 4:30 am to watch a breathtaking sunrise from Oberbachernspitze (2677 m).
  • We had our first real-world encounter with llamas.
  • We drank at least 15 litres of Granko (cocoa-flavored milk) in a week.
  • Even though I was the one planning the whole trip, I was surprised that it cost only 230 euros per person (for transport and accomodation for 9 days). After all, the best experiences of the trip were free: ice-cold water, the Alps and the sunrise.

    Check Google Photos for an album merged from 4 cameras including 3 videos. Since this is Loptoši™, beware of too many posed photos.

    19 June 2014

    6 non-fiction books that changed my life

    Throughout my life I have read plenty of non-fiction books that changed the way I think about everything. Most of them are based on scientific research, although many ideas are just theories in need for more testing. Your parents, teachers, friends and even politicians taught you many false beliefs. By changing them to something more scientific, you will experience much less cognitive dissonance, which is the mental stress you experience when reality doesn't match your beliefs. Your mind will be more at peace.

    The effects of my reading so far have been far-reaching:
    • Reading a blog about financial freedom helped me cope with my health diagnosis.
    • Being honest and vulnerable is great not only for your personal life, but your professional life as well. For example, your colleagues will respect you more if you don't hesitate to admit a mistake.
    • Reading economic theories made me adjust my moral values and philosophy; see for example this blog post.
    I'm not saying that these books contain the ultimate answers, but by reading them I have become slightly less wrong about everything.
    Every step of the way I was wrong. About everything. All throughout my life, I was flat-out wrong about myself, others, society, culture, the world, the universe, everything. And I hope that will continue to be the case for the rest of my life.
    ...
    There's that famous Michael Jordan quote about failing over and over and over again, and that’s why he succeeds. Well, I am always wrong about everything, and that's why my life improves.


    Mark Manson in Why I’m Wrong About Everything (And So Are You)
    If you are a fan of political correctness, many of these books will disappoint you. Reality doesn't care about offending someone; reality just is. For each book I tried to list one idea that stuck with me the most from the book.

    The Happiness Hypothesis: Finding Modern Truth in Ancient Wisdom, by Jonathan Haidt

    This is my number one book that I have read about 5 times over the years. Whenever I'm facing a big decision like choosing a place to live or a job, I consult the book to see how it will affect my happiness. Happiness comes mostly from other people and if you want to be happier by means of money, buy experiences, spend it on others or don't spend it.

    The book looks at different philosophies through the lens of science and how they affect happiness. It turns out that a large part of the Greek or Buddhist philosophies survived scientific tests. The book also tells a lot of fascinating results in psychology, not necessarily related to happiness.

    One idea: Suppose there are two people, one has just won one million dollars in lottery and the other has just become quadriplegic, so he can't move from his neck down. Who will be happier one year from now? Surprisingly, they will be on about the same level. Our minds are very adaptive and they get used to new situations quickly.

    Models: Attract Women Through Honesty, by Mark Manson

    Even though this is a book about women, it had big effect on other aspects of my life as well. If you ignore the parts specifically about women, it reads as an excellent lifestyle guide. Better relationships and friendships are then by-products of improved lifestyle and behaviour and they seem almost effortless. The book also taught me how to be more assertive, expressive and confident.

    A large part of the book is devoted to vulnerability and honesty which are two necessary qualities for stable relationships. Being vulnerable doesn't mean showing weakness, it signals inner strength and is therefore very manly (here is an excerpt of the book about vulnerability).

    One idea: Polarization – don't be afraid to admit that you have listened to Britney Spears' song Toxic more times than appropriate 10 minutes into a conversation (alright, alright, that's me!). This will push away some people very quickly, but you will also find the ones you like quicker.

    P.S. Mark Manson has an awesome blog (gender-neutral these days), where he writes about everything life-related often backed up by research in psychology. He's the guy I cited in the beginning of this post.

    Financial Freedom through Badassity, by Mr Money Mustache

    I'm cheating a bit here, since this is not a book but a blog. Before reading it, I used to save about 20% of my income but now it's up to 50% even with a lot of travelling. And if you save 50%, you can retire in 17 years. You will also become happier by spending less and saving more. Retiring early doesn't mean that you stop working, you can work for less or for free (volunteering).

    If you are interested in how it can be done, go to the "start here" menu item or read my favourite post.

    One idea: Nothing beats the stock market when it comes to long term returns. Stock market is volatile and sometimes you gain 0% in 10 years, but over 25-30 years the yields are better than for any other form of investment.

    Is there anything good about men?: How Cultures Flourish by Exploiting Men, by Roy Baumeister

    After reading this book I understand myself and other men much better. It explains why evolution made us behave the way we do. The book also debunks most of the myths that modern (third-wave) feminism is built on.

    There are two main differences between the two genders: nature rolls the dice more with men and different genders have different motivations. For example, men and women have similar IQ on average, but men are overrepresented among people with high IQ as well as among people with low IQ. Men also have different motivations, like willingness to take big risks. Cultures have been exploiting this – big risks often led to great results but many men have died while taking risks, or became very poor and homeless.

    One idea: I used to think that women are more social than men. If being social is good, why hasn't evolution made men as social as women? Evolution actually did make men social but in a different sense. Women prefer few intimate one-on-one relationships while men prefer plenty of shallow relationships.

    P.S. You can read an invited address that Baumeister gave at a meeting of the American Psychological Association. The book expands on the topics in the talk.

    Capitalism and Freedom, by Milton Friedman

    I like to think about capitalism using a sharp knife metaphor. So far we haven't found a better tool for cutting food than knives. Their greatest strength, sharpness, can also lead to injuries. This book talks about why capitalism is a sharp tool and how to avoid injuries. It is very old and economics has made a lot of progress since then, but I still like it a lot for how it changed my world view and moral values.

    Capitalism and high levels of freedom don't mean that there is no welfare. The Economist recently wrote: "When it comes to choice, Milton Friedman would be more at home in Stockholm than in Washington, DC." Historically, Sweden has been very free and capitalist. Milton Friedman was also a proponent of negative income tax, a very simple welfare program that is more efficient than what most countries have now.

    One idea: Government should be organized on multiple levels. If possible, a government function should be done at the lowest level. It's easier for you to influence a local politician and if you don't like it, you can move 10 km to another town. Things that require a lot of coordination or are inefficient on a local level, like the military or taxing pollution, need to be done at the highest levels.

    P.S. Milton Friedman has brilliant rhetoric skills. Even if you don't like freedom or capitalism, I suggest watching some of his videos on YouTube.

    Predictably Irrational: The Hidden Forces That Shape Our Decisions, by Dan Ariely

    This book saved me a lot of money. It explains many of the psychological tricks that marketers are trying to play on us. Stay cautious every time you see the word free or there are too many options given to you.

    Experiences are affected by our expectations. A fancy meal eaten in McDonald's will appear tasteless while the same meal eaten in a fancy restaurant will appear excellent. Similar thing is true for many things ranging from music to pills, so you can improve your perception by increasing your expectations.

    One idea: Sellers are trying to trick you by having expensive items that no one buys. Suppose a restaurant has meals costing between 10 to 20 euros. Now suppose they add a couple of meals that cost 30 euros. Nobody will ever order those, but people will spend more now than before.

    Other great books

    The following books were not that life-changing but they are still great. Perhaps they would be life-changing if I read them 5 years earlier.

    28 April 2014

    Why Slovakia and Sweden are two superwealthy countries

    According to Wikipedia, "at the most general level, economists may define wealth as anything of value". But what is value?

    People mistake price for value. Why would you do that, if you don't plan to sell your stuff? I paid a lot for my skiing and mountaineering equipment, but I would be willing to pay 5 times as much, since it had brought so much fun to my life. And I would feel even more wealthy, if I lived closer to mountains and could use it more often.

    Most of my skiing and mountaineering equipment on one pile
    On the other hand, I wouldn't pay even 1/10 of the price of some other things, because they have very little value to me. Diamonds are a good example: I have seen more beautiful stones in nature and they are overpriced anyway, thanks to a cartel and heavy marketing.

    We also value things that don't have a price attached to them, like friends and family. It's impossible to sell a friendship, yet we benefit a lot from it.
    Not everything that can be counted counts, and not everything that counts can be counted. – William Bruce Cameron
    If you ask me which countries are superwealthy, I might say 30% of them. The world is a great place right now:
    • Global poverty has been decreasing faster than ever. In 1950, the average American household spent 30% of its budget on food while it's only 13% now (I suspect similar progress in the rest of the world, too).
    • The world is most probably the safest it has ever been. Even with the two world wars, the 20th century was mostly likely the most peaceful century so far. If you were a man in a hunter-gatherer society more than 10 000 years ago, you had about 25% chance of being killed by someone else. This number has been estimated to be at most 3% in the 20th century and it will mostly likely be lower in the 21st century.
    • We live longer and we almost eradicated some diseases through vaccination at some places.
    • Societies around the world are more tolerant and free. A few centuries ago you were stuck in the same social class as your parents. In the 1950's in the US, black people were still subject to heavy discrimination. If you lived in the communist block in 1989, you could not travel out of your country freely.
    With so much prosperity and development, it's surprising to me that we keep consuming and working so much. One measure that is not getting better, is happiness and a contributing factor is materialism.
    I hope everybody could get rich and famous and will have everything they ever dreamed of, so they will know that it's not the answer. – Jim Carrey
    We also keep hearing that we need consumption to keep the economy going, but this is one of the most common economic fallacies. Mr. Money Mustache wrote a great explanation of it in What if Everyone Became Frugal?. The world gets richer by saving, not by consuming.

    Slovakia and Sweden are two countries where I have been living permanently, so I know them pretty well. Here are a few reasons why they are superwealthy in my opinion and it has little to do with material wealth.

    System for talented students, a point for Slovakia

    TopCoder is an American company organizing regular programming competitions. Each person has a rating, similar to the one used in chess or tennis. If you have rating above 2200, you reach red color, which is a status that only about 300 people on Earth have at one time. A couple of years ago, someone made a ranking of countries by the number of red programmers per capita and Slovakia was first. I don't think this is a coincidence.

    Slovakia has a great system for talented high schoolers in many scientific disciplines. This tradition started already when Slovakia was part of the Austrio-Hungarian Empire. In the historical rankings of International Mathematics Olympiad, Hungary is number 4 and in International Olympiad in Informatics, Slovakia is number 7. Both countries are very small compared to other countries in top 10 (Russia, China and USA are dominating both).

    This system is so great that I decided to contribute 1% of my income forever to Trojsten (thanks Kubo for inspiration). Trojsten is a foundation that organizes competitions and training camps in math, programming and physics for high schoolers. When I was at university, I helped running it, giving back what I got when I was in high school.

    Additionally, my alma mater, Comenius University, was very good. Sometimes the talented Swedish high schoolers ask me for school recommendations and I half-jokingly recommend Comenius even before MIT or Oxford. At Comenius you are not swamped with homeworks and projects, so you have plenty of time to do other things, like volunteering or part-time work. Even though the course load was low, we still learned a lot from the courses.

    Psychologists claim that children these days spend too much time in organized activites and play too little, leading to underdeveloped social skills and creativity. I think there is too little play even among university students. Some of them spend a lot of time in classroom, while they could be doing something else, learning valuable skills that can't be learned while sitting in the classroom. When we organized our week-long training camps, there was often noone older supervising us. This was our way of playing and we had a lot of fun doing that. In many ways, what I learned there is now more valuable than my formal university education.

    As you can see, if you are a talented student in Slovakia, you have plenty of opportunities for development, but unfortunately such system for talents doesn't work in Sweden. For example, the Swedish programming olympiad gets only very little money from the state (33% of my income taxes last year).

    I have been told that the reason is the famous Swedish striving for equality. As is often the case, the Swedes get the equality wrong: since we are all equal, there are no talents. Contrary to this statement, the Swedish state supports sports and young talented sportsmen with a lot of money. I have been competing at international level in both sports and programming/math and I think there is very little difference between the two. Talent is very important but you also need to train a lot, you need a good coach and a community of other competitors to stay motivated.

    At KTH Royal Institute of Technology in Stockholm, there is such a community for university students with coaches supported by the university. A couple of years ago I invited few high school students living in Stockholm to our trainings at KTH. These students are so talented and hard-working, that they already won the Nordic Championships in programming, beating all university students in Scandinavia, while still being in high school.

    Ironically, the Swedish equality ideal only leads to inequality of opportunities. If you are a talented high school student living in Stockholm, you are lucky and can get great coaching and meet other talented programmers. We want to improve this by organizing a training camp where students from the rest of Sweden could come, but getting money for it is hard.

    Level of trust, a point for Sweden

    Last fall I spent a couple of weeks in Berkeley and one weekend we decided to go to Yosemite. We booked a car and the rental company was supposed to pick us up and drive us to the rental station on the other side of town. They were late, so I called them twice and they promised the car would be there soon. The car didn't arrive, so I called again and it turned out that they were lying to me, the car was not on the way and we had to take a bus instead.

    How could anyone lie to me like that? Then I realized that I have been in Sweden for too long. In Scandinavia people don't lie that much and there is little corruption, which leads to trust in strangers and public institutions. Scandinavian countries top the list of countries by the level of trust.

    When people don't lie, steal and corrupt, there are very few lawsuits, they don't have to install expensive protection in their houses and the government is more efficient. In the end people are more productive and can work less than in countries with lower trust. Such countries are in fact richer even with a slightly lower GDP.

    Slovakia is far behind in this regard but things are improving. During communism corruption was often the only way to get things done, but the number of people giving bribes has been steadily declining for a while.

    Nature, points for both

    Both countries have amazing nature. Here are two photos made by me for illustration.
    My friend Martin and Tatras, the highest Slovak mountain range.
    Frozen lake in Tyresta national park. In winter a ski track is prepared on the lake.
    Nature has many benefits even though we don't have to pay for using it. You can have a week long camping vacation in the mountains for free, provided you have the right equipment. Such a holiday would be more fun for me than a lazy week on the beach that costs a lot. Spending time outdoors in nature also has many measurable benefits, like improved mood and concentration.

    Conclusion

    This was a highly subjective list but as I said earlier, each person can define wealth in their own way. For example, the value of the Trojsten community is that it gave me many great memories and valuable friendships. I'm excited to meet many of them in a couple of days in Italy.

    02 April 2014

    Ski touring in Silvretta

    Another trip proved that ski touring is the most fun sport ever invented.

    Thursday

    Our plan for Thursday was to go to Chammona Tuoi hut first and maybe do some light skiing afterwards. The plan quickly changed after Martins hyperglycemia, so we took a rest at the hut but we did some avalanche rescue training after dinner.


    Friday

    On Friday, we climbed Hintere Jamspitze (3156 m) without trouble in great weather with awesome views.
    Great view
    On the way down I made one of my best ski runs ever on an untouched steep slope (about 36 to 38 degrees). The snow was getting wet and heavy and I fell in the middle of it, but it was pure joy and I had to shout at the whole valley when it was over.
    You can see the place where I fell
    Even though we were taking it easy today, we were already at the hut at 1 pm and just relaxed before the big trip the next day.

    Saturday

    We woke up at 5 am to get an early start. I made a mistake of not looking into the map for 2 hours and just followed the main ski track on the La Cudera glacier. We crossed the wrong saddle and ended up under a peak we didn't plan to climb – Silvrettahorn (3244 m). In the end it turned out to be a very lucky mistake! We wouldn't be able to climb Piz Buin (3312 m) with our equipment anyway; our plan was to climb as far as possible and for Silvrettahorn we only needed an ice axe and crampons. The view was breathtaking.

    Piz Buin (3312 m) and Ochsentaler Gletscher
    Piz Linard (3410 m)
    The return back to the hut was a bit too long and annoying, especially with the wind blowing snow on our faces on the glacier. At least the last meters were a very enjoyable downhill ride. After returning back to the hut, I learned some useful facts about Kussmaul breathing which you get during diabetic ketoacidosis. Luckily Martin didn't die in the end, so we survived another great trip in the mountains!

    As usual, a selection of my photos is on Flickr and an album merged from 2 cameras is on Google Photos (with David Hasselhoff).

    09 March 2014

    How to shuffle songs? – A blog post I wrote for Spotify

    I improved Spotify's shuffling algorithm and wrote a blog post about it. Enjoy!

    20 February 2014

    Square Hot Dog Day

    On February 21, 2009 I created a square hot dog. Exactly 5 years have passed, so I would like February 21 to become Square Hot Dog Day from now on. It's going to be a thing. Feel free to join millions of people on Earth making this delicious meal tomorrow. The recipe is straightforward, just look at the photo. Vegetarians and vegans are also welcome with their soy wieners. I won't join you, since sausages contain too much histamine, but I wish you all the best!

    Sorry for the bad photo quality
    By the way, February 21 is already "International Mother Language Day", but I think we can celebrate two things, since one year only has 365 days and there are too many good things (like a square hot dog).

    11 January 2014

    Ski mountaineering in Žiarska dolina

    Every year around New Year me and my friends go to the mountains. This time me, Martin and Kolo chose Žiarska dolina in West Tatras in Slovakia. The weather before our trip was very hot and most of the snow disappeared from the mountains. As we approached Tatras and saw the grassy slopes, I became quite sceptical about the conditions, but in the end it turned out to be one of my best ski touring trips.

    Sunday

    We first went to Smutné sedlo (1965 m, sad saddle in Slovak), to do an easy ride and check the snow conditions. The ascent was icy and Martin had some trouble, since he didn't have ski crampons. We had to wait for him and Kolo used this opportunity to make two rides from the saddle.


    Since the weather was great and the snow was okay in the upper parts, we decided to go to Hrubá kopa (2166 m). The ascent was very steep and again, Martin was a bit slower, because he didn't have an ice axe but Kolo created nice snow stairs for him and me.

    Climbing the chute using stairs in the snow. We skied down the same way.
    Western view with Baníkov (2178 m)
    The descent has been my hardest ride ever. I had ice on my binding and it released once in the beginning because of that. I carefully cleaned it but after that I wasn't confident enough to do quick turns down the steep 40-degree chute on hard packed snow. A small mistake and released binding would send me onto the surrounding rocks.

    The sky turned orange after we skied the chute.


    Monday

    We decided on an easy trip to Žiarske sedlo (1917 m), since we didn't see snow elsewhere. While approaching, we saw that the nearby peak Plačlivô (2125 m) was completely covered in white and looked easy to ski. Martin was afraid of getting hypoglycemia, so he staid in the saddle and took awesome pictures, while me and Kolo went up. We had breathtaking views from the top and there was almost no wind, a perfect day in the mountains!

    Kolo and me climbing up with ice axes. We skied the same line.
    Sea of clouds with Kráľová hoľa in the background
    The ride was less steep than the previous day and the snow much better. As a bonus, we had the whole mountain and surrounding valley only for ourselves. Žiarska dolina is full of great ski lines, so we have to return some day.

    Small selection of my photos is on Flickr and an album merged from 3 cameras is on Google Photos.

    04 January 2014

    Crisis of men

    A severe crisis of men has been happening in the last 3 decades and perhaps even longer. You probably don't know what I'm talking about and are as surprised as I was 2 years ago when I first heard about it. Psychologists and sociologists write books about it but nobody else seems to care. There is plenty of publicity on breast cancer, abortions, unrealistic beauty standards for women but very rarely you hear about men's problems. Don't get me wrong, women's problems are important and we should talk about them, but why is everyone ignoring problems of half of our population? Aren't we striving for gender equality?

    Symptoms of the crisis include
    • rising levels of depression, social anxiety and addictions among men
    • men's unemployment has worse tendencies than women's
    • men feel lack of life purpose
    • average testosterone levels are 20% lower than they used to be 20 years ago
    • men are dropping out of college more than before
    • more and more women are asking "Where are all the men? I only meet boys."

    Causes

    What is the cause of all this? It's probably several things and different people have different opinions.

    Some people blame addictions to drugs and arousal addictions (video games, porn, internet). This is a worse problem for men, since men's brains are more prone to addictions. Have the drugs, video games and porn got more addictive in the recent years? Maybe.

    Other people blame technology. Men used to do most of the manual work but now it's done by machines, so many men lost their jobs and feel not needed anymore.

    It might also be the testosterone dip. However, this is a typical correlation versus causation case and it's hard to see what comes first.
    • Maybe the testosteron dip is the effect of the crisis and not the cause. After all, low testosterone can be caused by stress, lack of sleep and exercise.
    • Maybe there are some toxins in the air, water and food that cause low testosterone levels. We also move less, eat bad stuff, sleep too little and that has bad effects. Lower testosterone levels cause depression, decrease focus, lower confidence, so they could actually lead to the crisis.

    Create more, consume less

    Boys used to become men by getting a job and providing for their families. This is not good enough anymore, since families can now function without large contributions from men. These men lack life purpose and often turn to consumption which can lead to addictions.
    A woman simply is, but a man must become. Masculinity is risky and elusive. It is achieved by a revolt from woman, and it is confirmed only by other men. – Camille Paglia
    One of the proposed solutions I really like is to create more and consume less:
    • Instead of watching football on TV, organize a game every weekend with your friends.
    • Instead of buying fast food on your way home, cook dinner for you and your friends.
    • Instead of playing video games, create one.
    • Instead of paying someone else for your vacation, plan your own road trip.
    • Instead of complaining about your employer, start your own company.

    Culture(s) at fault

    It has been an evolutionary advantage for men not to show emotions in front of their enemies and competitors. However, we still have emotions and I think we are perfectly capable of expressing them to the people closest to us. We were told that "men don't cry" but I think that is too simplistic and harmful. I would change it to "men don't cry before strangers".

    Some cultures have a tradition of shaming which is also harmful. Suppose a guy asks a girl out but gets rejected. A typical response of his friend is "What did you think, she's way out of your league!?". This is true especially in the Western world, but less so in Slovakia for example. Try saying "I know how you feel, let me buy you a drink" instead. And if your friend's company goes bankrupt, say "That sucks" instead of "Your business idea was stupid".

    Apparently failure is considered a bad thing but in reality it's necessary for progress.
    Here's an unavoidable truth: You are going to screw up. Everyone  including very successful people  makes boatloads of mistakes. The key to success is, as everyone knows, to learn from those mistakes and keep moving forward. But not everyone knows how. Self-compassion is the how you've been looking for. So please, give yourself a break. – From To Succeed, Forget Self-Esteem
    Men might consume so much these days, because they are afraid of failure. Everyone makes mistakes while creating, but it's very hard to fail to consume.

    If your friends fail to build a company, learn a new skill or beat their addiction, give them encouragement and support. Men need that now more than ever.

    Don't blame feminisim

    It would be easy to blame feminism for all of this. Mark Manson said it well.
    Feminists were often (and still are) perceived to be “the enemy,” scapegoated for the tattered state of modern masculinity. But if you take the time and side-step past the rape culture paranoia, some of the patriarchy lunacy, and a lot of unnecessary soap-box speeches, then you get to the heart of that movement: economic and social realities forced women to confront and transcend what defined them as women, and now it is time for men to do the same thing. And right now we’re sucking at it. – Mark Manson: A New Masculinity
    Men face a similar struggle as women did couple of decades ago. We should deal with it and not blame others.