tag:blogger.com,1999:blog-73511909711434931632024-03-13T11:41:58.840-04:00DekmiakDekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.comBlogger28125tag:blogger.com,1999:blog-7351190971143493163.post-88154023282624859272021-09-22T14:32:00.029-04:002021-09-22T14:32:00.207-04:00Casual games part III: Mahjong<p>Let us continue this mini-series on the casual video games I like. Today I would like to talk about Mahjong. Mahjong is a matching-pair game which uses game tiles from a traditional Chinese game with the same name. The original Mahjong was a game for four players which was often played for the purpose of gambling – not unlike poker. The game we play on our computers should probably be called Mahjong Solitaire, because it is played by only one player. Because of its popularity and because it uses the same game tiles, Mahjong Solitaire in the West is currently called just Mahjong which may sometimes be confusing. </p><p>As with other solitaire games, I made my two versions of the game. The <a href="https://mahjong-pro.com/ ">first Mahjong game</a> I made was inspired by a popular Mahjong game, previously available free on the Internet which for some reason is no longer available. I tried to make visuals as similar to it as possible. And the effects are quite good, I think.</p><p>There are a number of interesting facts about Mahjong. Let’s say we want to find out whether the current deal is solvable or not. How many combinations of moves do we have to check? To calculate that we need to make a number of observations. The first observation is that the only way to get stuck is to remove the tiles of a particular category in a wrong order. Why is that?</p><p>The observation we can easily make is that once all four tiles of a certain category are available, we can remove all of them immediately without a fear that this is a mistake. This is quite obvious. Now let us assume that we have found out the correct pairing for each category. Is it possible to get stuck by removing the pairs in the wrong order? Assume that yes, indeed, it is possible and we got stuck. But, also by assumption, if we change the order of the moves we have made, we would not get stuck. But this is not possible, because in both orderings, we end up removing the same tiles. So, regardless of the order, the final outcome is the same, the pile we obtain after removing certain pairs is always the same no matter in which order we remove these pairs. Thus, since it cannot be simultaneously stuck and not stuck, we infer that the order of removal does not matter.</p><p>It turns out that the only thing that matters is which of the four tiles we match within each category. Let’s number tiles in each category from 1 to 4. How can we match these tiles? We can match 1 with 2 and 3 with 4. We can match 1 with 3 and 2 with 4. And we can match 1 with 4 and 2 with 3. There are no other possibilities. So, for every category, there are three ways we can pair its tiles. Since there are 36 categories, there are altogether 3<sup>36</sup> combinations. How much is that? It is 150,094,635,296,999,140. So, we have one hundred and fifty thousand trillion combinations to check if we want to know if a game is solvable. Unfortunately, it is not possible to run all of them on the computers we currently have. Maybe, if our computers were 1,000,000 faster, then finding out deterministically whether a Mahjong deal is solvable would be possible. Unless of course, somebody finds some algorithmic improvements which make it unnecessary to check all combinations. This may be possible although right now I am too lazy to think about it. </p><p>And so, I recently made my <a href="https://mahjong.ooo/">second Mahjong game</a>, which is very similar to the first one. As I was making it, I found that there is a problem with translating “Tiles” into other languages. A tile in English is something rectangular which is used to cover surfaces, especially in bathrooms or kitchens or on roofs. And so, if a low-quality translator translates a Mahjong game from English, s/he just uses the equivalent of ‘tile’ in his/her language. But this is a mistake. Many languages – and checking Wikipedia’s Mahjong’s page confirms it – use word ‘stone’ to denote Mahjong game pieces. This is true in languages as diverse as <a href="https://nl.wikipedia.org/wiki/Mahjong">Dutch</a>, <a href="https://pl.wikipedia.org/wiki/Mad%C5%BCong">Polish</a>, and Romanian. </p><p>Finally, as with Minesweeper, I wanted to give players an option to play games which are solvable. As you may know, some Mahjong deals are insolvable regardless of what you do. And so, I had to check which deals are solvable. But I did not check the thousands of trillions of combinations as described above. Instead, I just made the computer play every deal a number of times, every time using a different, randomized pairings. Then, I counted how many times a computer was able to solve the game. If the number was 0, then I treated the game as unsolvable. Of course, the game could still have been solvable – the computer just could have not found the correct pairings. But that did not matter – I wanted to have games which were proved to be solvable and false negatives were not really a problem. Moreover, the number of times the game was solved gave me an approximation for difficulty a human player could experience while playing a particular deal. And this is how I created various difficulty levels in my games. </p><p>Well, that’s it. I hope you found some valuable information here :)</p><div><br /></div>Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com0tag:blogger.com,1999:blog-7351190971143493163.post-31424060512505147742021-09-08T06:09:00.002-04:002021-09-08T06:09:00.176-04:00Casual games part II: Solitaire<p><span style="font-family: inherit;">Another
game I like to play is <a href="https://en.wikipedia.org/wiki/Solitaire">Solitaire</a>. Everyone knows Solitaire. Some of us even know how to play it with actual cards
on a table. This is actually how I played the game for the first time. Oh, how
fun were these days without computers :)</span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="font-family: inherit;"><a href="https://en.wikipedia.org/wiki/Klondike_(solitaire)">Klondike Solitaire</a>, also known simply as Solitaire, is the most popular solitaire video game. This
is because it was added to the Microsoft Windows operating system in the early
nineties. From then on, people spent countless hours playing it instead of working
on their computers. <o:p></o:p></span></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="font-family: inherit;">So why is Solitaire
so fun? Well, this is a game which allows you to relax. It has the right mix of
strategy, perceptivity, and luck - with the strong emphasis on luck. It does
not require you to think to much, it has a little of a gambling aspect, and
makes you feel good when you win it – which actually does not happen too often,
even with the lowest difficulty settings. The game actually does not allow you
to win most of the time – even if you play perfectly.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="font-family: inherit;">So how to
play Solitaire? You can watch <a href="https://www.youtube.com/watch?v=GvhMmtzjnIk">my video with an example of gameplay</a>, or you can visit <a href="https://solitaire.ooo/">one of the games I made</a>. There just click on the “Help” in the menu up top and scroll down to the “Solving
Example” section. This is actually the second version of the online Solitaire I
made. The first one can be found <a href="https://solitaires-online.com/">here</a>. So why do I have two versions? Well, the first is older and a bit worse –
fonts are smaller, there are no tutorials etc. When I decided to make an upgrade,
I figured it is not good to overwrite the old game with a new one. Many people
are familiar with the old look and will be upset with the new one. And so, I
made a new version and published it alongside the old one, despite being quite
similar.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="font-family: inherit;">So the
question is: is this all to Solitaire that there is? No. Solitaire in general
is a genre of card games whose objective is to arrange originally disordered
cards in nice stacks, starting with aces and ending with Kings. The fact the
this particular game – Klondike Solitaire – uses the name assigned to the
entire genre – Solitaire – may be confusing but it is a reflection of the game’s
popularity.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="font-family: inherit;">So, what
are other solitaire games? Currently my favorite solitaire game is <a href="https://en.wikipedia.org/wiki/Spider_(solitaire)">Spider Solitaire</a>. While Klondike Solitaire puts more emphasis on luck when it comes to the strategy
vs. luck balance, Spider Solitaire puts much higher emphasis on Strategy. It
has four difficulty levels. The easiest difficulty is played with only one suit
(or color) of cards. That is, all 104 cards that you have on the board are, for
example, Spades. The medium difficulty (2 Suit Spider Solitaire) uses two
opposite colors. For example Diamonds and Spades or Hearts and Clubs. Or Diamonds
and Clubs. Or Hearts and Spades. You get the idea. <o:p></o:p></span></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="font-family: inherit;">Having more
colors complicates the game, because of the game rules – you can move a stack
of cards only if all the cards in he stack are of the same color. Obviously, it
is the easiest if there is only a single color on the game board – you can move
any stack you want. But with two colors things get more complicated. They get
even more complicated if the player chooses hard difficulty setting, that is a
game with four colors, otherwise known as 4 Suit Spider Solitaire. Now the
player plays with two full decks. If you want to learn how to play Spider Solitaire
you can watch <a href="https://www.youtube.com/watch?v=ylNNLvrHChQ">my walkthrough video</a> or read the tutorial on <a href="https://spider-solitaire.app/">my second Spider Solitaire game site</a>, which is
in the “Help” section.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="font-family: inherit;">In my
experience 1 Suit Spider Solitaire is quite easy to solve. 2 Suit Spider
Solitaire is much harder, but apparently it is also almost always solvable.
However, I solve it only in around 1/3 of times. 4 Suit Spider Solitaire is the
hardest. I solved a few times in my live. And I made many more attempts. Apparently,
it is supposed to be solvable in around 1/3 of cases, but I have no idea how to
achieve that. And so, for now I concentrate on the 2 Suit Spider Solitaire. <o:p></o:p></span></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="font-family: inherit;">I made and
published two such solitaires on the Interent. Here you can find <a href="https://solitaires-online.com/spider/">the first Spider Solitaire game I made</a>. And here, you can find <a href="https://spider-solitaire.app/">the second</a>. The
story is similar as with the traditional Klondike Solitaire. When I was
creating the games, I wanted to make sure that the graphics are very user friendly
and that the cards occupy as large portion of the screen as possible – many published
games occupy a very small rectangle in the middle of the screen. This includes
<a href="https://www.google.com/logos/fnbx/solitaire/standalone.html">the game made by Google</a> and it makes the game really annoying to play. <o:p></o:p></span></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="font-family: inherit;">The third
game I wanted to talk about is Freecell. Freecell is another simple solitaire
game available on Windows since time immemorial. It is quite easy once you
learn to play it. This game is almost always solvable and so it can be said
that it does not require any luck, and your performance depends on logic alone.
Freecell is not as popular as Klondike Solitaire or Spider Solitaire and I play
it only occasionally. But it is always a lot of fun :) As with the two other games,
I made my own versions of Freecell Solitaire which are available <a href="https://solitaires-online.com/freecell/">here</a> and <a href="https://freecell.xyz/">here</a>. And if you
want to learn how to play it, visit the second of these two links and click on “Help”
or go to <a href="https://www.youtube.com/watch?v=abvQ2NWi1L8">my YouTube walkthrough video</a>.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="font-family: inherit;">Hopefully,
at least some people will share my love for these games. As for which games I
recommend? You can probably start with Klondike and then move on to Freecell
and eventually to Spider. And I hope you will play with the games I made as
they are (of course) the best available on the Internet :) </span><o:p></o:p></span></p>Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com0tag:blogger.com,1999:blog-7351190971143493163.post-27799349819567622922021-08-24T15:48:00.006-04:002021-08-24T15:53:37.265-04:00Casual games part I: Minesweeper<p><span style="font-family: inherit;">Hello.
Today I would like to post something about my favorite video games than can be
found on the Internet.</span></p><p><span lang="EN-US" style="font-size: 11pt; line-height: 107%;"><span style="font-family: inherit;">My
first favorite game is Minesweeper. I have been playing Minesweeper since High
School. This is when I learnt how to play it quite fast. I am not a master, but
I still can play quite fast. You can watch me play on my video channel. <a href="https://www.youtube.com/watch?v=k7R0mklYuGI">Click here to watch one of my videos.</a> </span></span></p><p><span lang="EN-US" style="font-size: 11pt; line-height: 107%;"><span style="font-family: inherit;">I
like the Minesweeper game so much, that I made a bunch of JavaScript versions
of this game and published them on the Internet. My first Minesweeper game was
in Polish and Spanish and was unavailable in English. But my second game is
available in English and can be found <a href="https://minesweeper-pro.com/">here</a>. </span></span></p><p></p><p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="font-family: inherit;">So how my
game differs from others? Well, the traditional Minesweeper game is of course a
logical puzzle, but also depends a lot on luck, especially while playing on
higher difficulties. Every expert player encountered a frustrating situation in
which s/he has to pick randomly between two locations of a mine because it is
impossible to figure out where the mine actually is using logic alone. This is
especially frustrating if you made a considerable effort to solve almost the
entire game and the lucky shot must occur at the end of the game. Though, I
learnt later, some people actually like this feature. How strange.<o:p></o:p></span></span></p><span style="font-family: inherit;"><span lang="EN-US" style="font-size: 11pt; line-height: 107%;">Anyway,
to get rid of this frustration I decided to add a feature to my Minesweeper
games. This feature is called “Pure Logic” or “Pure Intellect.” With this
feature on, the game always generates boards that are solvable by logic alone.
That is, you will never encounter a situation in which you actually have to
guess. To implement it in my code I used an optimized version of the <a href="https://luckytoilet.wordpress.com/2012/12/23/2125/">Tank algorithm</a> </span><span style="font-size: 11pt;">with
some improvements. This algorithm ensures that the games are always solvable.
The algorithm is also highly intelligent. I remember being asked if my
algorithm is not too stupid. That is, whether it eliminates some configurations
of mines which actually can be solved by a genius player but my algorithm is
too stupid to figure them out. And the answer is no: my algorithm is ultimately
intelligent, because at its core it boils down to checking all possible
configurations of mines and eliminating those which yield contradictions.</span></span><p></p><p></p><p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span style="font-family: inherit;">A huge
advantage of having deterministically-solvable (i.e. solvable without need of
luck) Minesweeper boards is that with this feature boards can become quite huge.
If the luck is involved, for huge boards, you will sooner or later run out of
it. In other words, solving a huge Minesweeper board that depends on luck is
like rolling dice 10 times and getting 6 every time. In theory possible, but in
practice not so much.<o:p></o:p></span></span></p><p class="MsoNormal"><span style="font-family: inherit;"><span lang="EN-US" style="mso-ansi-language: EN-US;"><span lang="EN-US" style="font-size: 11pt; line-height: 107%;">And
so my <a href="https://minesweeper-pro.com/">Minesweeper Pro</a> </span></span><span style="font-size: 11pt;">game
allows for really big boards, and offers two new predetermined difficulty levels.
One is Superman with a board of 50 by 50 and 500 mines and the other is Alien
(or Extraterrestrial) with a board of 100 by 100 and 2000 mines. Watch videos
on my channel to see how I beat both these difficulty levels.</span></span></p><p class="MsoNormal"><span style="font-family: inherit;"><span lang="EN-US" style="font-size: 11pt; line-height: 107%;">But
that’s not all. The size of the board in my <a href="https://minesweeper-pro.com/">second Minesweeper</a> </span><span style="font-size: 11pt;">is
limited by the number of graphical elements a web browser can display. You can
imagine it as a huge table. If the table is 100 by 100 it has 10000 cells. And
many browsers cannot support tables much bigger than that. </span></span></p><p class="MsoNormal"><span style="font-family: inherit;"><span lang="EN-US" style="font-size: 11pt; line-height: 107%;">To
solve this problem, I decided to use different technology and instead of using HTML
elements I used Canvas. So, there are no more humongous tables but there is a
picture instead. And I just paint over this picture. This is the technology I
used to create my <a href="https://minesweeper.us/">Third Minesweeper Game</a></span><span style="font-size: 11pt;">. This
allowed me to add a new predetermined difficulty setting: God (or Godlike). God
boards are 250 by 250 with 10000 mines. And believe it or not, I actually did
solve it. My best time (as of 2021-08-24) with God difficulty is 4 hours 44
minutes and 30.05 seconds. I know there are at least two people who also solved
this difficulty level with times 6:08:06 and 6:17:14. And more is coming – the game
has not been popular too much yet, because it still does not rank well with
Google.</span></span></p><p class="MsoNormal"><span lang="EN-US"><span style="font-family: inherit;">Unfortunately,
creating much larger boards or boards with higher mine density is hard. My algorithm
is tuned so that it tries to create a board for a predetermined number of milliseconds,
and if it fails to do it in the allotted time, it just stops and spits out an
error. Larger boards and boards with higher mine density are generally harder
to create and take more time. The 250 by 250 monster with 10000 mines is close
to the limit, beyond which reliable board generation is no longer possible.<o:p></o:p></span></span></p><p class="MsoNormal"><span style="font-family: inherit;"><span lang="EN-US"></span></span></p><p class="MsoNormal"><span lang="EN-US"><span style="font-family: inherit;">Eventually,
I also decided to create my <a href="https://minesweeper.one/">Fourth Minesweeper game</a>. This is just a simple game
based on an old engine which is suitable for people who like nostalgia and do
not mind having to use luck from time to time.</span></span></p><p class="MsoNormal"><span style="font-family: inherit;">I hope you
will find your favorite Minesweeper game among my creations ;)</span></p><p></p><p class="MsoNormal"><span lang="EN-US"><span style="font-family: inherit;"><o:p></o:p></span></span></p><p></p><p class="MsoNormal"><span lang="EN-US"><br /></span></p><span face="Calibri, sans-serif" style="font-size: 11pt;"></span><p></p>Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com0tag:blogger.com,1999:blog-7351190971143493163.post-45760083572852077042018-01-15T04:31:00.003-05:002018-01-15T04:32:31.814-05:00Why does entropy increase over time?<div class="separator" style="clear: both; text-align: left;">
In this video I use an example of two mixing gases to explain why entropy increases over time. Entropy is a measure of disorder, and so it is zero when gases are nicely separated and then starts to increase when the gases start to mix. A situation of order – gases nicely sorted into their own chambers – is less probable than a situation of disorder – in which gases are mixed. And so, as the system evolves, a situation in which entropy is higher is more likely than a situation in which entropy is lower. This is why entropy has to increase. Entropy can also decrease, if accidentally the gas gets unmixed. But because order is less likely than disorder, a decrease in entropy is less likely than its increase.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
To sum up, entropy is defined as a measure of disorder, which is often high and rarely low. And so, by definition, entropy is likely to increase and unlikely to decrease. There is no deep physics here. Just clever definitions.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/Fc0TFxBPVqo/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/Fc0TFxBPVqo?feature=player_embedded" width="320"></iframe></div>
<br />Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com0tag:blogger.com,1999:blog-7351190971143493163.post-56562767818393591262018-01-08T15:38:00.000-05:002018-01-08T15:38:18.528-05:00Why does atmospheric pressure decrease with altitude?In this video, I show how a gas - a bunch of particles bouncing in a chamber - forms a density gradient if there is a force pulling them in one direction. The force is to the right but you should have no problems imagining that it points downwards. There is no voice-over – the animation seems sufficiently self-explanatory.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/Spl3vlqLMCI/0.jpg" src="https://www.youtube.com/embed/Spl3vlqLMCI?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com0tag:blogger.com,1999:blog-7351190971143493163.post-76758573528912348522018-01-02T12:18:00.003-05:002018-01-02T12:18:55.360-05:00Why does expanding gas cool?A short video made for fun.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/qDF_JlspWaU/0.jpg" src="https://www.youtube.com/embed/qDF_JlspWaU?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com0tag:blogger.com,1999:blog-7351190971143493163.post-43343962243315638312017-12-02T07:24:00.000-05:002017-12-02T07:24:08.096-05:00What happens when a gravitational wave passes by?In this video I explain what exactly happens to the geometry of space when a gravitational wave passes by. I haven't seen many videos doing that (actually none). Most of them just say that a gravitational wave squeezes and stretches things but do not explain what does it actually mean. Or, they they show a nice animation of spreading waves, usually on a two-dimensional surface, which is very nice but does not have much to do with gravitational waves.<br />
<br />
I do not discuss other details, like the sources of gravitational waves, their strength, recent discoveries, etc. because those topics seem to be discussed aplenty.<br />
<br />
So, if you wandered, what gravitational waves were about, here you go:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/esErYk2lsWY/0.jpg" src="https://www.youtube.com/embed/esErYk2lsWY?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com0tag:blogger.com,1999:blog-7351190971143493163.post-86946011416577704472017-11-14T15:15:00.001-05:002017-11-14T15:15:43.249-05:00General Relativity: curved spacetime and how gravity worksHere is yet another video. This time it is inspired by the question "why things fall?"<br />
<br />
I have noticed that most of videos explaining general relativity make a mistake of showing how to visualize curved space and then claiming that this somehow explains how gravity works. Some (better) videos explain that gravitational attraction is mostly due to time slowing down closer to a massive object. But none seem to explain why and how variation in speed of time explains the downward movement. Until today. There you go:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/gAb4JQdn-Ec/0.jpg" src="https://www.youtube.com/embed/gAb4JQdn-Ec?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
<br />
<br />Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com0tag:blogger.com,1999:blog-7351190971143493163.post-28129027421972247702017-05-08T07:22:00.002-04:002017-05-08T07:22:44.035-04:00Special relativity: time dilation, relativity of simultaneity, and length contractionI have recently learnt Special Relativity and in the process of doing so I have noticed that the explanations of it available on YouTube are somehow lacking. Here are the features of my explanation which I have not seen in the videos produced so far:<br />
<br />
1. Why squeezing object in one way is good but in another way is bad? Most explanations of time dilation using a mirror in a train tell the viewer that in order to keep the speed of time constant a clock on a moving train must tick slower. But nobody mentions that the speed of light can be also kept constant by squeezing the train. <b>And since we have length contraction why should we ignore the possibility of width contraction?</b> Therefore, I decided to discuss the possibility of width contraction and explain why it must be discarded.<br />
<br />
2. Some people confuse the idea of “what actually happens” with “what appears to happen” and think that time dilation is some sort of optical illusion. To make sure that they do not have this impression after watching my video, <b>I present them with a hypothetical experiment illustrating what it means that the time moves slower for a moving observer.</b><br />
<br />
3. Relativity of simultaneity is rarely discussed and when it is discussed, the presentation is done poorly. Most explanations present results but do not present the logic and are often of the type: “for this person they are simultaneous, for the other they are not, deal with it!” This does not give viewer a chance to understand why exactly the concept of simultaneity fails. Instead, I came up with a thought experiment with two moving trains and firecrackers to illustrate the logic. I hope that after watching my video a diligent viewer will be able to answer a question: “<b>WHY simultaneity is relative?</b>”<br />
<br />
4. Virtually no video discusses length contraction. As with relativity of simultaneity, a person trying to understand “why there is length contraction?” will have hard time finding satisfactory answer in the existing non-scientific video material. I try to fill this gap. My experiment with two trains and firecrackers, once the relativity of simultaneity is established, very nicely demonstrates <b>the logic of why must it be that there is length contraction</b>.<br />
<br />
5. I also try to explain why, as the speed of the object approaches the speed of light, <b>the length of the object and the speed of time for it both decrease to zero</b>. This point is often skipped in the currently available videos.<br />
<br />
6. Finally, I decided not to use any equations in my explanations (ok, I use one equation “SPEED = DISTANCE / TIME” but it is not essential for the presentation) and I decided not to use specialist phrases like “frame of reference” which may confuse people who do not study physics. <b>My explanations are designed in such a way so that they can be used in a discussion at a cocktail party.</b> Indeed, I have tried these explanations in a social setting before making this video and they seemed successful. As my lab rats I used people who are not versed in physics or mathematics but are generally intelligent.<br />
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/tjUJ2qZY8ec/0.jpg" src="https://www.youtube.com/embed/tjUJ2qZY8ec?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<div>
<br /></div>
Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com0tag:blogger.com,1999:blog-7351190971143493163.post-38780079724221484102016-12-01T10:59:00.002-05:002017-01-02T23:08:46.277-05:00Humanist definition of truth<div class="MsoNormal">
I was recently reading Richard Rorty’s “Contingency, irony,
and solidarity.” In the introduction, he delineates the core problem he is
talking about: relationship between individualism and solidarity. Should people
be altruistic or should they be antisocial? Following a common philosophical
practice, Rorty completely ignores the entire scientific body of evidence related
to this topic which was available to him at the time when he was writing the
book. There is no mention of evolutionary basis for altruism or other scientific
theories of human motivation and social interaction. Instead, Rorty discusses
what people like Nietzsche or Hegel, ignorant of any scientific investigation
into the topic, pulled out of thin air hundreds of years before. This is why I
don’t like (most) philosophers.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
In the following chapter Rorty explains what he thinks “the
truth” is. The explanation contains statements like “The world can, once we
have programmed ourselves with a language, cause us to hold beliefs” and culminates
in a statement that “truth is a property of linguistic entities, of sentences.”
As it turns out this is a common understanding of what the truth is, among
people involved in humanities like, say, anthropologists. Rorty himself is a
popular philosopher having his part in shaping of the modern liberal academic
ideology. The book I am discussing here was cited over 10,000 times according
to Google Scholar.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The aforementioned definition of truth made me come up with
a quick example. Consider a dog. Show two cups to the dog and put a bone into
one of the cups. Then, distract the dog and quickly swap the cups. Then, let
the dog choose one of the cups. The dog will choose the cup it remembers to
have a bone in it. That is, the dog believes that bone is in a certain cup.
This belief is false if you swapped the cups and is true if you did not swap
the cups. Since the dog cannot speak, the existence of beliefs and their truth
or falsehood do not depend on existence of a language. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
This definition of truth is an expression of anthropocentrism
that seem to be central to the modern liberal academic ideology. Nothing but
humans is important. Nobody bothers to question whether the reasoning presented
would be valid for agents who do not share all human characteristics, in this
particular case, the use of language. As a result, Rorty’s arguments depend on
how he implicitly defines human nature. Yet he is explicitly against the notion
of human nature. The whole structure is internally inconsistent.</div>
<br />
<div class="MsoNormal">
Why is it important? Well, it shows how modern liberal
ideology is grounded in ignorance. This ignorance gives rise to dogmatically
defended stances like cultural relativism. It makes otherwise perfectly
reasonable people to say things like “2+2=4” is no better than “2+2=5” if the
latter is an inherent element of a culture which assigns truth to it. The intellectual discourse deteriorates.
Harmful policies gets enacted.<o:p></o:p></div>
Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com0tag:blogger.com,1999:blog-7351190971143493163.post-65608634998660392016-03-17T13:11:00.000-04:002016-03-17T17:30:36.400-04:00Persecution of homosexualsIt is just a hypothesis. <br />
<br />
Because they invest much more resources in giving birth and rearing children, women are generally pickier than men when choosing their sexual partners. They are harder to get than men.<br />
<br />
Men on the other hand have high libido that motivates them to compete for women and to pursue them, often despite their reluctance. <br />
<br />
Men could easily release the sexual tension if they could have sex with each other instead of women. However such behavior would lead to lower chances for reproduction. So, the evolution came up with a solution: man feel repelled when thinking about having sex with other man. <br />
<br />
In other words, males have an innate revulsion towards sexual interaction with other men (i.e. gay sex). Otherwise they would be releasing their sexual tension by having sex with each other instead of pursuing women. I suspect this mechanism has been around for many million years. It was created in our ancestral animals (which could not masturbate) and lingers on since then. <br />
<br />
Women on the other hand do not have to compete or pursue men as vigorously, and so their everyday libido is at a lower level. They do not need the protection against the possibility of releasing their sexual tension in an evolutionarily disadvantageous way – because they do not have as much tension. As a result, they do not have the same innate revulsion towards lesbians as men have towards gays. <br />
<br />
Also, according to this hypothesis, men do not have reasons to feel revulsion towards lesbian sex and women do not have reasons to feel revulsion towards gay sex. It seems that these predictions more or less conform to reality.<br />
<br />
In the end, the discrimination of gays comes from the fact that men are naturally repelled by gay sex for evolutionary reasons. The reason why this sometimes extends to the entire society being against both gays and lesbians is trough guilt by association often institutionalized by various cultural vehicles like religious scriptures.<br />
<br />
<b>Literature on attitudes towards homosexuals</b><br />
<br />
<ul>
<li><a href="http://psp.sagepub.com/content/22/4/336.short">Sex Differences in Attitudes Toward Homosexual Persons, Behaviors, and Civil Rights A Meta-Analysis</a></li>
<li><a href="http://www.jstor.org/stable/3812894">Heterosexuals' Attitudes toward Lesbians and Gay Men: Correlates and Gender Differences</a></li>
</ul>
<br />
<br />Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com0tag:blogger.com,1999:blog-7351190971143493163.post-15968277673165387492016-03-07T12:02:00.003-05:002016-03-07T21:55:08.535-05:00Battle over e-cigarettes<div class="MsoNormal">
I was recently asked to create a report on e-cigarettes by a
friendly company. Some of the workers started complaining about secondhand
e-cigarette vapor. The discussion got heated up because five pregnant women
were working at the open space office where the vapers were located. The HR did
some preliminary research and sent out an email with new rules. They said that
e-cigarettes were more carcinogenic than traditional cigarettes and that WHO
advised to prohibit vaping at workplace because of the threat of secondhand
vapor. Vaping got banned. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
This resulted in a backlash and some vapers ended up writing
long emails on how this is all untrue. They cited sources like <a href="https://en.wikipedia.org/wiki/National_Health_Service_(England)">NHS</a> as well as scientific papers supposedly debunking claims made by HR.
Nevertheless the management decided that the ban on e-cigarettes was here to
stay. In the meanwhile they asked me about my opinion. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
In a nutshell, e-cigarettes are most likely much less
harmful than traditional cigarettes. They do not contain most harmful
substances released by burning tobacco. The amounts of other supposedly harmful
substances in the secondhand vapor may be lower than in other products happily
ingested or inhaled by people (including pregnant women). There exist no
scientific proof that e-cigarettes are toxic to bystanders. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
E-cigarettes are indeed a different product than traditional
cigarettes and the comparisons of the two are unjustified. Their sin is that
they share the name, a single ingredient (nicotine), and the consumption looks
similar to that of the super-villain traditional cigarettes. Guilt by
association on one hand and the interest groups on the other hand contribute to
fearmongering about these products. As a result, e-cigarettes in the eyes of public
are guilty until proven innocent. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Nevertheless, there is a small risk that the exhaled vapor
contains amounts of nicotine high enough to damage or otherwise hamper the
development of a fetus. Pregnant women should have the right to be protected
from exposure to vapor, until research shows that e-cigarettes are safe for
fetal development. In general, regular adults should have the right to breathe
air that is not contaminated by emissions of other people, be it cigarette
smoke, scented candles, body odor, farts, or vapor. In the same way visual and
sonic pollution of common spaces are often limited. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
In the context of office environment, vaping should be thus
prohibited if coworkers strongly request so. Since there is currently no
definite scientific evidence either way, a firm can decide to do whatever
maximizes the profit. If vaping reduces productivity by making workers unhappy,
it should be banned. If it increases productivity by eliminating cigarette
breaks, then it should be allowed. As for the litigation, it is unlikely that
the plaintiff can succeed in suing a company for exposing them to a secondhand
vapor because there is no scientific proof that it is harmful. It is more
likely that vapers succeed in suing a company that confined them to a space
occupied by regular smokers, since the tobacco smoke is proven to be harmful.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
All these ideas will be developed in detail in what follows.
Let us start with nicotine.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Nicotine<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
Nicotine is a simple organic chemical produced naturally by
some plants as an insecticide. <a href="http://link.springer.com/article/10.1007/s00213-005-0164-7">In humans it acts as a stimulant increasing performance and cognitive abilities in a similar way caffeine does.</a> <a href="http://onlinelibrary.wiley.com/doi/10.1111/j.1360-0443.1991.tb01810.x/abstract">It is also suggested to help preventing obesity, Parkinson’s disease, Alzheimer’s disease, and other conditions.</a><o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Nicotine is addictive. This in itself is not bad for the
health of an individual. The only well-established risk associated with intake
of nicotine is increased chance of developing cardiovascular disease. But, since
nicotine is the addictive component of tobacco, it is the sworn enemy number
one of many health officials. Thus, much more effort is done to prove its
harmfulness than to disprove it or to prove its benefits. Scientific papers on
benefits of nicotine always underline that it is also harmful but scientific
papers on its disadvantages (much more numerous) hardly ever mention any
benefits at all. This is a signal that scientific community is not objectively
analyzing the issue. Nevertheless, despite all the effort, few adverse effects
of nicotine are confirmed.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
There is a <a href="http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4363846/">number of theories linking use of nicotine to malfunction of various systems in the body</a>. Most
notably, nicotine is often linked to cancer or fetal problems. These two claims
are however made up on the basis of guilt by association – they are proven
results of smoking which involves inhalation of many other substances. Clinical
trials with nicotine replacement therapy do not confirm any of these claims. As
<a href="http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4090746/">one influential study</a> says: “The safety of NRT in terms of effect on fetal
development and birth outcomes remains unclear in pooled data from this
review.”<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The current scientific knowledge indicates that if the dose
is right, the effects of nicotine on human body are similar to those of
caffeine. The only difference is that nicotine is more addictive.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>The difference
between cigarettes and e-cigarettes<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
Smoking cigarettes involves inhaling smoke generated during
combustion of tobacco leaves. Some studies try to prove that chemical
composition of tobacco makes its smoke especially carcinogenic, but the truth
is that any regular smoke has a lot of carcinogenic substances. Smoked food has
been identified as a cause for cancer (fried food as well). Any other smoke,
including smoke from chimneys, cannabis, scented candles, or car exhaust fumes
(especially diesel) also contains carcinogens. Two main factors influence how
carcinogenic it is: (1) dirtiness of the smoke – low temperatures and limited
oxygen can contribute to incomplete combustion leaving many reactive particles
intact and (2) the amount of smoke inhaled – definitely higher in case of smoke
produced exclusively for the purpose of inhaling it multiple times a day. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
On the other hand, the aerosol (often called vapor)
generated by e-cigarettes is not a result of combustion. A part of e-cigarette
called atomizer increases the temperature of the e-liquid causing it to turn
into aerosol. As a result, there is no change in the chemical composition of
the ingredients (unless there is contamination). <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Cigarette smoke contains thousands of different substances,
many of which are identified as harmful, either as carcinogens or otherwise.
E-cigarette aerosol do not contain these substances. Chemical composition of
regular cigarette smoke is much closer to the smoke generated by a scented
candle or a chimney than to vapor generated by e-cigarettes. It is thus silly
to automatically associate e-cigarettes with regular cigarettes because they
are used similarly and they have a similar name. They are completely different
products with highly separated sets of advantages and disadvantages.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Potential harms of
e-cigarettes<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
Looking for negative effects of e-cigarettes, it is easy to
come across <a href="https://www.cdph.ca.gov/programs/tobacco/Documents/Media/State%20Health-e-cig%20report.pdf">lists including items such</a>: (1) lithium-ion batteries of
e-cigarettes sometimes explode causing burns, (2) e-liquid can cause poisoning
in children who drink it, or (3) adults sometimes confuse e-liquid with another
product like eye drops which also causes poisoning. These are ridiculous claims that are not idiosyncratic to e-cigarettes but can
be applied to any electronic or chemical product. They are found on such lists
not because e-cigarettes are especially prone to such accidents but because
anti-e-cigarettes activists try to make them look scarier (this tactic may have
an adverse effect as it undermines credibility of the authors in the eyes of a
skeptic reader). For the purpose of this analysis I will focus only on the
aspects related to inhaling vapor. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The ingredients of e-liquid are most often: propylene
glycol, glycerol, water, and nicotine. The first two compounds are widely used
in the food industry and are proven to be safe for consumption by humans
including pregnant women. In addition, e-liquid often contains flavorings and
other additives that depend on the brand of the product. These need to be
checked individually for potential adverse effects in the same way flavors and
other additives to food products need to be checked. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Some studies indicate that e-liquid may get contaminated and
then vapor contains other potentially toxic chemicals, for example heavy
metals. It is however important to remember that most of these potentially
harmful substances are present virtually everywhere. For example, lead is
present both in the air at the top of Mount Everest and in the seawater of Mariana
Trench (as a curiosity, <a href="http://www.seafriends.org.nz/oceano/seawater.htm">lead in seawater is three times as common as gold but a hundred time less commont han uranium</a>). Just the fact that the substance is present does not matter. It
matters only if the concentration is high enough to affect human health. And no
study has shown that vapor contains harmful quantities of contaminants. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
There does not seem to be anything in e-cigarettes that
justifies the outcry and fearmongering about its potentially harmful
ingredients. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Why people are so
wary of e-cigarettes then? <o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
There are four main articles on Wikipedia about e-cigarettes:
(1) <a href="https://en.wikipedia.org/wiki/Electronic_cigarette">Electronic cigarette</a>, (2) <a href="https://en.wikipedia.org/wiki/Safety_of_electronic_cigarettes">Safety of electronic cigarettes</a>, (3) <a href="https://en.wikipedia.org/wiki/Electronic_cigarette_aerosol_and_e-liquid">Electronic cigarette aerosol and e-liquid</a>, and (4) <a href="https://en.wikipedia.org/wiki/Positions_of_medical_organizations_on_electronic_cigarettes">Positions of medical organizations on electronic cigarettes</a>. Health-related parts of these articles look like
battlefields. They consist of intertwined positive and negative statements
debunking each other. Almost every sentence has references to scientific
sources. The irony is that virtually none of these statements prove anything.
Words like “may” or “can” are much more common than “is” or “do.” The overall
message (often explicitly expressed at the beginning of an article) is that
nobody knows anything. These Wikipedia articles are thus the longest, most
elaborate and well-sourced but also entirely meaningless and pointless texts
one can ever imagine.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
What are the forces that created these battlefields? In one
corner there are vapers (who want to vape) and the vaping industry (who want to
make profit). In the other corner are concerned citizens, most health
organizations (with the notable exceptions of British ones) and politicians.
Surprisingly, <a href="https://en.wikipedia.org/wiki/Big_Tobacco">Big Tobacco</a> – the
most obvious potential opponent to e-cigarettes as they constitute competition
– does not seem to be a driving force. To the contrary, the Big Tobacco slowly
tries to diversify by investing in the e-cigarette industry.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Consider California. <a href="https://en.wikipedia.org/wiki/Tobacco_Master_Settlement_Agreement">Master Settlement Agreement</a> – a deal between 46 US states and the major tobacco companies – provides
California (and other states) with a steady stream of money intended to cover
medical expanses caused by tobacco use. The source of money are tobacco
companies and the amount depends on their sales (a few cents per cigarette).
Like other states, California decided to securitize the future payments in
order to get more money upfront. This resulted in creation of so called tobacco
bonds. Government issues these bonds and the buyers gets repaid with the money
government receives over time from tobacco companies. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
When the sales of cigarettes are too low and the amount of
money is not enough to repay the debt, the bonds are in default. However, since
the revenues will continue as long as cigarettes are being sold, the default often
means that the creditors will eventually receive their money, although later.
<a href="http://www.wsj.com/articles/SB10001424127887324020504578399012544703592">Some states (including California) chip in their backing to boost creditworthiness of tobacco bonds.</a> That is they promise they will repay
creditors using tax receipts if the money from tobacco companies is not enough.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Because state revenues depend on the amount of cigarettes
sold, states have incentive to maintain this source of revenue by, say, banning
or taxing e-cigarettes. In addition, securitization created a lobby – people
who bought tobacco bonds – whose interest is in maximizing the number of
regular cigarettes sold. And the amounts of money we are talking about are not
small – <a href="http://www.treasurer.ca.gov/cdiac/reports/tobacco.pdf">by 2007 California has emitted nearly $17 billion worth of tobacco bonds</a>. <a href="http://www.reuters.com/article/us-usa-california-ecigarettes-idUSKCN0QW2HQ20150828">Various statesare working on banning or taxing e-cigarettes comparably to regular cigarettes, including California.</a> Members of California’s tax commission shamelessly spread bullshit in the
documents calling for higher taxation: in <a href="http://www.boe.ca.gov/ma/pdf/e-cigreport.pdf">a 2015 report</a> Ms. Fiona Ma, in addition
to making statements already debunked in this article, writes that: “Tobacco
companies claim that E-cigarettes are not as harmful as conventional cigarettes
(…). However, these claims are refuted by strong scientific evidence that
claims that E-cigarettes can be just as harmful as conventional cigarettes.”
What evidence? Unfortunately no sources are provided.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Health organizations<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
But the worst source of misinformation and fearmongering are
health officials and health activists. Let us analyze <a href="https://www.cdph.ca.gov/programs/tobacco/Documents/Media/State%20Health-e-cig%20report.pdf">the 2015 report signed by the then director of the California Department of Public Health</a>. A long litany of concerns regarding e-cigarettes starts with indications than
they are more and more popular, especially among young people and many of these
young people never smoked cigarettes. These are all true facts. But they are
not obviously bad. They would be bad if the overall health of population was
declining due to growing trend in consumption of e-cigarettes. And nobody was
able to prove that so far. The fact that adolescents who never smoked tobacco
use e-cigarettes does not mean anything: maybe these individuals would use
regular tobacco products instead, if e-cigarettes were not available. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The report states: “Research suggests that kids who may have
otherwise never smoked cigarettes are now becoming addicted to nicotine through
the use of e-cigarettes and other e-products.” And then there is a reference to
<a href="http://archpedi.jamanetwork.com/article.aspx?articleid=1840772">a scientific paper</a> in which we read:
“This is a cross-section study, which only allows us to identify associations,
not causal relationships.” That is, the study itself says that they do not
claim that e-cigarettes cause increase in addiction to nicotine. Whether the
authors of the report intentionally lied is hard to say – it seems more likely
that they did not read the paper they were citing and their conclusions were
influenced by strong confirmation bias. In a nutshell: they did not lie, they
were just lazy and biased. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Some additional statements in the report include:</div>
<div class="MsoNormal">
</div>
<ul>
<li>Nicotine is highly addictive neurotoxin, especially in
adolescents. The report fails to specify that it indeed is harmful to
adolescent rats when administered through injection. Trials in humans do not
confirm these claims.</li>
<li>Vapor is a concoction of toxic chemicals, at least ten of
which are known to cause cancer, birth defects, or other reproductive harm. This
statement can be equally truthfully made about many types of food we eat daily,
e.g. <a href="http://www.cancer.gov/about-cancer/causes-prevention/risk/diet/acrylamide-fact-sheet">french fries</a>.</li>
<li>E-liquid may be confused by children who would eat it;
e-cigarettes sometimes leak which can lead to poisoning when e-liquid is
ingested or are used as an eye-drop by mistake. Yes, misuse happens with every
product. But does it happen more often with e-cigarettes?</li>
<li>Claims that e-cigarettes help to quit smoking are unproven.
But switching from smoking to vaping precisely is quitting smoking, isn’t it?</li>
<li>E-cigarettes are undermining current smoke-shaming norms and
provide a way around smoking bans. True, only if you equate smoking with vaping
in your mind. Otherwise false.</li>
</ul>
<o:p></o:p><br />
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
The overall picture that emerges is as follows. Health officials
are under influence of several forces that make them such strong opponents of
e-cigarettes:<o:p></o:p></div>
<div class="MsoNormal">
</div>
<ul>
<li>They are often incompetent, biased, and lack critical
thinking (traditional human characteristic). They engage in herd behavior – if
so many people around me say it, it must be true (traditional human
characteristic). They are lazy and do not check other people, especially not
those whom they agree with upfront (traditional human characteristic).</li>
<li>Their job is to protect population from any health risks
(also those overblown or imaginary). They take their task of policing other
people and telling them what to do too seriously. They often neglecting aspects
other than direct impact on health (economic issues, unintended consequences,
etc.).</li>
<li>Bashing e-cigarettes is popular because it is easy to
associate e-cigarettes with regular cigarettes and the latter are proven to be
harmful. They respond to pressures: some people demand bashing e-cigarettes,
especially fearful parents.</li>
<li>Their views are reinforced by other officials, most notably
those responsible for tax revenues.</li>
<li>They worked hard to brand smoking as bad and e-cigarettes
constitute a new trend that in their eyes threatens this achievement. </li>
</ul>
<br />
<div class="MsoNormal">
<b>To vape or not to
vape?<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
Now that we have established what the facts are and
explained the sources of confusions, it is time to make a decision: to vape or
not to vape? <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
A rational individual should consider both advantages and
disadvantages of vaping and chose whatever this cost-benefit analysis
indicates. This is hard to do in practice because the ideological warfare
reduces the quality of available objective information. For example, the
research on the positive effects of nicotine is seriously underdeveloped
meanwhile the research on its negative effects if overdeveloped and full of
exaggerations. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
If you are a smoker, than the answer is simple: stop smoking
and start vaping. If you are a non-smoker, there are probably better methods of
getting benefits nicotine provides: for example, if you need to get focused,
you may consider drinking coffee. But if there are no other ways for you to,
say, relieve stress, you may try to see if vaping can help you. Remember to
consider how addictive your personality is. Some people get addicted much
easier than others. If you belong to the former group, it is riskier for you to
experiment with nicotine because you may get addicted even if benefits turn out
to be not worth the costs. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
But the main objective of this article is to advise a
company on a policy. Should HR ban vaping in the company buildings? Things to
consider when answering this question are summarized in the table below:<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 72.9pt;" valign="top" width="97"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 189.0pt;" valign="top" width="252"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Vaping is allowed in common spaces.<o:p></o:p></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 216.9pt;" valign="top" width="289"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Vaping is not allowed in common spaces. <o:p></o:p></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 72.9pt;" valign="top" width="97"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Health effects on employees.<o:p></o:p></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 189.0pt;" valign="top" width="252"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Non-smokers may be exposed to vapor (which has no proven negative
health consequences). Also, people who quit smoking may be exposed to
nicotine, which may induce relapse. <o:p></o:p></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 216.9pt;" valign="top" width="289"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Vapers may end up vaping in the same areas as smokers which may be
unhealthy to them due to secondhand smoke.<o:p></o:p></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 72.9pt;" valign="top" width="97"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Productivity.<o:p></o:p></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 189.0pt;" valign="top" width="252"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Some workers may consider it irritating or may estimate risk of
inhaling vapor to be high. These workers may become less productive. Tensions
between workers create unproductive working environment for the entire
company.<o:p></o:p></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 216.9pt;" valign="top" width="289"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Vapers take multiple breaks a day to go out. Productivity decreases,
although probably not as much – breaks are often needed by workers and would
happen anyway but in a hidden way, say by sitting idle next to one’s
computer. <o:p></o:p></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 72.9pt;" valign="top" width="97"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Possible lawsuit.<o:p></o:p></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 189.0pt;" valign="top" width="252"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Non-smokers can sue a company for forcing them to be in vicinity of
vapers, especially if they ended up having health problems, as in <a href="http://tobaccocontrol.bmj.com/content/13/suppl_1/i61.short">the case of traditional cigarettes</a>. A very unlikely
scenario. <o:p></o:p></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 216.9pt;" valign="top" width="289"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Vapers can sue company if they can prove that company rules forced
them to be in the vicinity of smokers, especially when they have prescription
for e-cigarette or if they develop a disease associated with secondhand
tobacco smoke but not with vaping. A very unlikely scenario. <o:p></o:p></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
In general, productivity issue seems to be most important.
If many employees request a ban, one probably should be enacted. Otherwise not.<o:p></o:p></div>
Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com1tag:blogger.com,1999:blog-7351190971143493163.post-89791366745490670712016-02-18T17:43:00.001-05:002017-03-31T16:06:11.636-04:00Medical news reporting<div class="MsoNormal">
<a href="https://www.washingtonpost.com/news/to-your-health/wp/2015/08/20/working-lots-of-overtime-your-risk-of-stroke-may-increase-study-finds/">An article on the Washington Post website says that working overtime may increase your risk of a stroke by 10 to 33 percent.</a> <a href="http://www.cnn.com/2015/11/03/health/soda-heart-failure-study/">An article on the CNN website says that drinking two cans of soda a day increases chances of heart failure by 23 percent.</a> <a href="http://www.bbc.com/news/health-33975946">And an article on the BBC website says that even moderate alcohol consumption increases risk of breast cancer.</a> Such news
releases are pretty common and some readers react to them by changing their working,
eating, and drinking habits.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
This is such a bullshit. Let me just glance over the fact
that these studies hardly ever establish causality. What they do, is that they
establish <a href="https://en.wikipedia.org/wiki/Partial_correlation">partial correlation</a> which is as good as control variables they used. In a nutshell, you are
more likely to get heart failure with the kind of people who both drink a lot
of soda and do not exercise. If the study does not account for the exercising
aspect, the rate of heart failure will be attributed only to drinking soda even
though it should be attributed to lack of exercising as well. This is so called
“<a href="https://en.wikipedia.org/wiki/Omitted-variable_bias">omitted variable bias</a>” and biomedical studies are plagued with it. The only way to eliminate it, and
the only kind of evidence that should be accepted as definite are <a href="https://en.wikipedia.org/wiki/Randomized_controlled_trial">randomized controlled trials</a>.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
But this is only scientists’ wrongdoing and I want to
complain here about how their findings – whether true or not – are twisted and
misinterpreted by the public. To see it, let us look at the three news articles
mentioned above and the corresponding research articles (which can be found
<a href="http://www.thelancet.com/journals/lancet/article/PIIS0140-6736(15)60295-1/abstract">here</a>,
<a href="http://heart.bmj.com/content/101/24/1961.full">here</a>, and <a href="http://www.bmj.com/content/351/bmj.h4238">here</a>).
Let us discuss the 33% stroke figure from the first article. Upon reading the
article, it seems that out of around 600,000 people, roughly 1700 had a stroke,
which gives us average incidence of less than 0.3%. That is, if you work over
55 hours a day, your chances of getting a stroke are 0.4% instead of 0.3% that
you would have if you worked just under 40 hours a day. In fact, your chances
of getting a stroke if you work over 55 hours increase by 0.1%, not 33% as the article
implies. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Second story: supposedly, drinking at least two sugary beverages
a day increases your chances of heart failure by 23%. From the source article, we
see that there were around 42,000 men taking part in the study. Around 4100 of
them had heart failure. That gives us an average incidence of 9.8%. Drinking a
lot of coke increases incidence to 12%. Therefore, your chance of getting heart
failure raises by 2.2 percentage points, not by the implied scary 23%. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Finally, let us consider the claim that light drinking
increases chances of breast cancer. According to the study, out of around 88,000
women, roughly 19,000 developed cancer. This tells us that an average women in
this study had a probability of 21.6% of developing cancer. On the other hand an
average drinking women had a probability of 24.4% of developing cancer. Thus,
the probability increases by 2.8% which does not seem too much when compared to
the overall risk of developing cancer. (My calculations in all the three
examples are approximate and based on a number of simplifying assumptions, yet
they should illustrate the problem). <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
So what is going on? What is the source of all these
discrepancies? The numbers that are reported by medical journals are relative
risks (and the statements about them are technically correct but may be
misleading to an untrained person). That is, they tell you how many times a
person who is involved in a “risky” behavior is more likely to contract a
disease as compared to a person who is not involved in the “risky” behavior.
That is, it may be true that a person who works a lot, a person who drinks a
lot of soda, and a person who drinks a little alcohol every day are 1.33, 1.23,
and 1.13 (respectively) times more likely to contract a disease in question than
a person who does not do it. But the probability for the person who does not do
it is usually small anyway, so even doubling it often does not increase your
overall probability of contracting the disease enough to worry about it. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
A related problem has to do with labeling substances as
carcinogenic. <a href="https://en.wikipedia.org/wiki/Carcinogen">Usually, anything that increases probability of causing cancer is labelled as carcinogenic.</a>
Therefore, a substance that increases your chances of contracting cancer from
15.2% to 15.3% (that is by 0.1% overall) is treated by the media frenzy in the
same way as a substance that increases your chances from 7.5% to 38.1% (that is
by 30.6% overall). People easily swallow it: to a raging mom dead set on
protecting her baby from all harm, something labelled as a carcinogen is pure
evil, no matter how strong a carcinogen it is and whether it also has some
unrelated health-enhancing benefits.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
But this is not all. Even if the numbers were reported
correctly, they still would be a bad guidance for making decisions. This is
because virtually everything has its advantages and disadvantages. Drinking a
glass of wine a day may increase your chances of developing cancer but may also
decrease your chances of getting a stroke. Quitting smoking may save you from
lung cancer but may also cause you to eat more which will make you obese and increase
your chances of heart failure. And so on. The only way to make a good decision is
to perform a complete cost-benefit analysis with respect to an ultimate
variable of interest. That is, a study is most useful for a person deciding what
to do to stay healthy, if it reports whether doing something increases or
decreases your expected healthy lifespan (and by how much). Only then you know full potential
impact of such a decision on your health and can decide whether changing your
habits is worth it. Unfortunately, studies reporting effects on healthy lifespan
are hard to come by.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The focus on incidence and disregard for life expectancy is
the source of another public misunderstanding of the current state of affairs: the
notion of <a href="https://www.google.com/#safe=off&q=cancer+epidemic">cancer epidemic</a>.
It is so scary: the cancer is currently much more prevalent than it was decades
ago and is projected to be even more common in future. The world surely is
becoming worse place, at least in this one respect, right? Bullshit. The reason
why cancer is becoming ever more prevalent is because we are better and better
at fighting other diseases. The average lifespan continuously increases because
we successively eliminate other causes of death. This leaves cancer (along a
few other culprits) to kill those people who did not die from other reasons. To
sum up: the cancer epidemic is a positive sign of the overall progress in
medical sciences.</div>
Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com0tag:blogger.com,1999:blog-7351190971143493163.post-66742374006871322552015-12-16T13:04:00.002-05:002015-12-30T11:23:35.125-05:00Dick pics<div class="MsoNormal">
I sometimes come across videos like this<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/40tdQ8My8Wc/0.jpg" frameborder="0" height="384" src="https://www.youtube.com/embed/40tdQ8My8Wc?feature=player_embedded" width="480"></iframe></div>
<div>
<br /></div>
<div class="MsoNormal">
or pictures like this<o:p></o:p></div>
<div class="MsoNormal">
<span id="goog_153100681"></span><span id="goog_153100682"></span><br /></div>
<div class="MsoNormal">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDh2NVhJfM_FrY1SZrgRIzPFyoJGEzrDTqBkrwiCQOOy3Pe8rY9BZ980qB7av1TGMU59Nz5qE_hRFSszCteY_Bv3a6O_evXA4bbE6a2TadAAzlDPC1CV0iCdW1q0rsSQLPLEgvIghxCqWy/s1600/Destroyed%252Bthat%252Bpoor%252Bpoor%252Bman_e1f795_5623345.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDh2NVhJfM_FrY1SZrgRIzPFyoJGEzrDTqBkrwiCQOOy3Pe8rY9BZ980qB7av1TGMU59Nz5qE_hRFSszCteY_Bv3a6O_evXA4bbE6a2TadAAzlDPC1CV0iCdW1q0rsSQLPLEgvIghxCqWy/s320/Destroyed%252Bthat%252Bpoor%252Bpoor%252Bman_e1f795_5623345.jpg" width="320" /></a></div>
<br />
or news like this: <a href="http://www.bbc.com/news/technology-33889225">Police investigate 'first cyber-flashing' case</a>.</div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
This is very interesting to me because it shows how people
have no idea what is going on in their own brains.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Let us start with the question: why an unwanted image of a
dick causes us to have an emotional reaction (and it seems that both man and
women have a similar reaction after looking at a stranger’s dick – some mixture
of shame and the feeling of being intimidated)? I remember when I was talking
to a male friend on Skype not so long ago. Another male friend of mine stood
behind him and suddenly pulled his pants off and showed his dick to the camera.
My immediate reaction was to curse and look away in disgust. The thing is that
unlike many people who send dick pics, my friend perfectly knew what he was
doing – he has read <a href="http://amzn.to/1JG0PT8">The Human Zoo by Desmond Morris</a>. I did too, but the trick
nevertheless worked.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
So why do dicks evoke these emotions in us? Do we learn to
be scared by dicks? When and how exactly do we learn about this? Somebody tells
us? Or do we need an unpleasant experience with a dick that belongs to somebody
else?<br />
<br />
There is no reason to be afraid of a dick if you had none of such
experiences. But people still do have these emotions. So what causes them? <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Another example I know is when I was just a few years old
and I was playing at a riverbank with a group of female friends, all of them a
few years old. A dude with a mustache was riding a bike nearby. He stopped
close to us, silently pulled down his pants and showed us his junk with a smile
on his face. The girls started screaming and run away. I probably did the same
thing, although I do not remember well, as it was so much time ago (by the way
none of us thinks about this as a traumatic experience now; it was quite
benign; after the incident the guy rode off and we never saw him again). Of
course, nobody explained to us before that this was an appropriate reaction in
such a situation. But it seemed appropriate. Why?<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The answer is that this is our innate instinct. We
have inherited from our ancestors some types of social interaction that are guided
(among others) by genital display. People who observe primates know that the
genital display is a way to communicate social status in a group. Dominant male
individuals show their dicks much more often than other individuals. Human brains
are wired in a similar way. Seeing somebody’s dick makes you feel intimidated
and human intuition sometimes makes guys show their dicks in order to
intimidate others.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
A woman often feels disgust after seeing stranger’s dick,
yet she may think that his intention was to arouse her and the man had no idea
that his dick looked gross to her. A men asked why he sent a dick pic would
probably say something like that: “it was a joke; I wanted to embarrass her; I
like to show off my masculinity.” What is really going on, is that when a man
wants to intimidate a woman (or less often another man), his primate intuition tells him to show off his
dick. The woman verbally misidentifies his intentions but emotionally responds
in an intended way. The act achieves its goal. Note that the man also somewhat
misidentifies what really caused him to do this. It is because he acts on his
animal instinct. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
So, as it turns out, unwanted dick pics are a product of our
ancestral way to ensure group cohesion through authority structure. These
mechanisms have not much use nowadays but they still hang around aimlessly in
our brains causing trouble. Moreover, the example of dick pics shows nicely how
our <a href="http://www.dekmiak.com/2015/12/undeserved-saliency-of-thoughts-and.html">verbal processing is disconnected from the part of the brain where we actually make decisions</a>. Neither a man nor a woman verbally understand their
own role in this situation – unless they are educated in anthropology or
primatology.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
If you want to read more, I recommend:</div>
<div class="MsoNormal">
<ul>
<li><a href="http://amzn.to/1JG0Eas">The Human Zoo by Desmond Morris</a></li>
<li><a href="http://amzn.to/1QqKnOu">The Naked Ape by Desmond Morris</a></li>
<li><a href="http://amzn.to/1I9kS1m">Primate Ethology by Desmond Morris</a></li>
<li><a href="http://www.psychmechanics.com/2015/05/body-language-crotch-displays-of-men.html">Body language: The crotch displays of men</a></li>
</ul>
<o:p></o:p></div>
<div class="MsoNormal">
<o:p></o:p></div>
<br />
<div class="MsoNormal">
<o:p></o:p></div>
Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com0tag:blogger.com,1999:blog-7351190971143493163.post-14191487513816800072015-12-16T12:03:00.000-05:002016-03-15T11:28:46.136-04:00Darkness in the sense of justice<div class="MsoNormal">
People have an innate sense of justice. Our intuition tells
us that if somebody did something wrong, they have to be punished. Notion of
<a href="https://en.wikipedia.org/wiki/Karma">karma</a> and such are based in the human tendency to think that there is some
cosmic justice. And people who figured out that there is no objective justice,
take such justice as an ideal humans should strive for. A just world is what
most of us are working towards.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
So maybe before we start making decisions based on our sense
of justice, it may be good to know where does it come from and whether we
should trust it. And of course, as most other intuitions, the sense of justice
is a product of natural selection. It is how nature wired our emotions in order
to guarantee that we cooperate, enforce social cohesion, and so on. The problem
is that nature tends to implement technological trade-offs in her designs, and
the things she creates are not perfect. For an easy example, just look up the
<a href="https://en.wikipedia.org/wiki/Recurrent_laryngeal_nerve">recurrent laryngeal nerve</a> which connects the brain with the jaw but goes down
to the chest for no apparent reason (<a href="https://www.youtube.com/watch?v=cO1a1Ek-HD0">which is a gross redundancy for a giraffe</a>).<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
And here is <a href="http://www.dekmiak.com/2015/09/consciousness-and-morality-revisited.html">the question I have kept on asking</a>. Should we
trust our intuitions? I would say – no. Our intuitions are the animal spirits that the nature equipped us with to deal with much different
circumstances than those of today. And even when the circumstances are right,
the animal spirits are not guaranteed to be perfect. As anything else designed
by natural selection, they are technological trade-offs.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Following our innate sense of justice may lead to sub-optimal
design of society, and thus to more suffering that it would be necessary if
people behaved rationally. Rationality should be a yardstick against which we
should judge how efficiently our instincts help us shape the society. If you
want to rationally maximize social welfare, you should consider what are the specific
consequences of the decisions you make, rather than follow your intuition. For
example, it is reasonable to think that some punishment for crimes is necessary
in order to deter people from committing crimes. But if such deterrence cannot
be achieved, there is no rational reason to punish a person. Moreover – there may
be good reasons to offer the person help in order to make them a better citizen
rather than let them learn how to be a hardened criminal during their jail time.
<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
You may cringe at the notion that some crimes should go
unpunished. But this feeling is precisely the dark, irrational revenge-seeking
sense of justice that was implemented in you by nature. If you want to build a
better society, you need to set the feelings aside and perform strict
cost-benefit analysis of the decisions you are facing. When you compare
outcomes obtained with rationality to outcomes obtained with the human innate sense
of justice, it is easy to see the darkness of our animal spirits. <o:p></o:p><br />
<br />
<b>Further reading</b><br />
<br />
For examples on how people deal with trade-offs between innate sense of justice and pragmatism, see:<br />
<ul>
<li><a href="http://www.economist.com/news/americas/21684820-survivors-wartime-atrocities-are-questioning-countrys-amnesty-digging-justice">Digging for justice, The Economist, Jan 2nd 2016</a>.</li>
<li><a href="http://www.economist.com/news/americas/21641293-clinching-peace-depends-persuading-farc-do-jail-time-last-lap-colombia">The last lap in Colombia, The Economist, Jan 31st 2015</a>.</li>
</ul>
<div>
Related peer-reviewed papers:</div>
<div>
<ul>
<li><a href="http://www.sciencedirect.com/science/article/pii/0167268182900166">Evolved ethics and efficient ethics</a></li>
</ul>
</div>
</div>
Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com0tag:blogger.com,1999:blog-7351190971143493163.post-18580869968846532492015-12-14T20:34:00.000-05:002015-12-26T16:57:07.853-05:00Undeserved saliency of thoughts and words<div class="MsoNormal">
It happens very often that we put a great emphasis on what people
think express verbally. I can see it in philosophical texts where, for example,
philosophers deliberate what should be more important – expressed preferences
or revealed preferences (see <a href="http://amzn.to/1Ygr4pX">Decision Theory and Rationality by José Bermúdez</a>,
p. 64) or while listening to <a href="http://www.dekmiak.com/2015/07/philosophic-burden-of-proof-in-god.html">people who keep on talking about their beliefseven in absence of any decision making problem these beliefs could influence</a>. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
My take on it is that what ultimately matters is behavior
and decisions. Description of human mental processes can help us understand
some aspects of human behavior but is only a part of the picture. For example,
if we want to see what a person truly wants, the action and the actual choice
should be taken into account rather than what the person says she wants, even,
or especially, when the two are in conflict. Similarly, it does not matter what
convoluted theories people come up with in order to explain how their thoughts
interact with their behavior. If their behavior can be fully explained by a
simpler theory, then the convoluted ones should be discarded.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
But why? Why am I so eager to demean human thoughts? The
reason is simple. Verbal processing and speech are devices that serve some
evolutionary purposes. I do not believe that providing a perfect window into the
operation of the human mind is one of these purposes. On the contrary, we know
that a lot of mental processes are unconscious. The part of the brain
responsible for verbal processing is not connected to all other parts of the
brain that are responsible for making decisions. Therefore, we are unable to
describe fully what is going on in our heads. Furthermore, there aren’t even
reasons to believe that spoken words are a perfect window into the part of mind
that is available to verbal processing. It may well be a dirty window obstructing
the view or a distorting mirror. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
To give you an analogy – imagine that human nature is a
picture of a ruined city with a single nice flower in the foreground. What
people say about their thoughts can give you access only to the part of the
picture that has the little flower, probably seen through a distorting lens. It
is not wise to draw a conclusion about what the entire picture represents based
on this little image only. If you want to know what the human nature truly is,
you must go beyond the verbal processing and look at the entire picture. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The best way to think about it is to ask yourself a
question: what could I learn about humans (and how) if they could not speak? Or
even better: how would I go about learning about an alien species that I have
no clue how to communicate with and who may be different to me in any aspect?
If you can think about humans and analyze them as an alien species, then you
are on a good way to be objective in your analysis of the human nature. But if
you are focused on what people think that is going on in their heads – then you
may be bound for a dead end. <o:p></o:p></div>
Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com0tag:blogger.com,1999:blog-7351190971143493163.post-37119084829708575932015-11-18T13:03:00.000-05:002015-12-07T13:06:03.896-05:00Big data regression<b>Problem formulation</b><br />
<br />
You have a dataset in which each observation is an impression of a banner ad. You have a variable indicating success (say, click or conversion) and a lot of additional information (features), all of which are coded as binary: browser type, host, URL, placement, banner format, banner id, banner keywords, hosts the viewer has seen so far, how many times the viewer has seen particular banners, when did s/he see these banners, how many times did s/he click on which banners, how did s/he behave while shopping online, current date and time, geoid information, and so on.<br />
<br />
The question is which features increase the chance of success and which decrease it? This is an important question if you want to allocate your advertising resources efficiently. The difficulty is that the number of observations is in billions and the number of available features is in millions.<br />
<br />
<b>A solution</b><br />
<br />
A naïve approach is to create a table which informs how many successes and how many failures occurred when feature was present or absent. Then, you can compare success ratio in absence of the feature with the success ratio in presence of the feature. If the latter is higher than the former, then the feature indicates higher probability of success.<br />
<br />
This approach is similar to calculating simple correlation between the feature and the success indicator. And thus, it suffers from <a href="https://en.wikipedia.org/wiki/Endogeneity_(econometrics)">endogeneity</a>. If a combination of two features often occurs together, say a particular host and a particular banner, and both of them seem to have high correlation with the success indicator, you do not really know whether this is the banner that drives success, the host, or both.<br />
<br />
In order to separate the effects of features, you need to calculate partial correlation, conditional on other features, rather than simple correlation. The straightforward way to do it is to perform an <a href="https://en.wikipedia.org/wiki/Ordinary_least_squares">ordinary least squares</a> regression on the data. Unfortunately, there exists no software that could handle amounts of data you have. Even if you limit the dataset to most common features – say top 5000 – you still end up with several terabytes of data to be processed by the regression algorithm. To focus attention, let us say that we need a way to perform a regression on n = 4 billion observations and k = 10 thousand features. If each variable takes up 4 bytes, the amount of memory required to perform such analysis equals nearly 160 terabytes.<br />
<br />
Typically, linear least squares models are fit using <a href="https://en.wikipedia.org/wiki/Linear_least_squares_(mathematics)#Orthogonal_decomposition_methods">orthogonal decomposition of the data matrix</a>. For example, <a href="https://stat.ethz.ch/R-manual/R-devel/library/stats/html/lm.html">R package uses QR decomposition</a>. One can use also <a href="https://en.wikipedia.org/wiki/Singular_value_decomposition">singular value decomposition</a>. Unfortunately, these methods require all data to be kept in memory and have algorithmic complexity of O(nk<sup>2</sup>).<br />
<br />
Alternatively, one can calculate <a href="https://en.wikipedia.org/wiki/Gramian_matrix">Gram matrix</a>. This has algorithmic complexity of O(nk<sup>2</sup>) which can be reduced to O(np<sup>2</sup>) if the data are sparse (where p is the quadratic mean number of features per observation) and very easily parallelized. Another advantage is that memory requirement for calculating Gram matrix are O(k<sup>2</sup>) only and for k = 10000 the exact amount of RAM required to keep Gram matrix would be just under 200 MB (keep in mind that Gram matrix is symmetric). The only problem here is that to calculate regression coefficients, it is necessary to invert the calculated Gram matrix (which is often discouraged due to inferior numerical stability and takes O(k<sup>3</sup>)). The viability of this solution depends thus on whether it is possible to do it with satisfactory numerical accuracy. As it turns out, it is.<br />
<br />
Note that popular machine learning engines like <a href="https://en.wikipedia.org/wiki/Vowpal_Wabbit">Vowpal Wabbit</a> are not of much use in this situation. Machine learning is usually concentrated on prediction, rather than accurate estimation of model parameters. Engines like VW in principle are less accurate than OLS. They allow multi-collinearity of variables which in turn forces user to perform separate data analysis in order to eliminate it in the first place. Finally, they do not allow for standard statistical inference with the model parameters.<br />
<br />
<b>Preliminaries</b><br />
<br />
The plan was to create a C++ class able to do all operations necessary for this regression. The data were stored on a remote Linux server using <a href="https://en.wikipedia.org/wiki/Apache_Hadoop">Hadoop</a>. I was planning to develop and debug my solution using Microsoft Visual Studio 2015 on my Windows 7 64-bit Dell computer (i7-4790 @ 3.6 GHz with 16 GB RAM) and then to port it to its final destination.<br />
<br />
There were four initial things I had to take care of: (1) a way of measuring code performance, (2) a way of measuring numerical accuracy of matrix inversion, (3) C++ libraries for inverting matrices, and (4) a strategy for verifying accuracy of the entire algorithm.<br />
<br />
Boy, was it hard to find a good way to precisely measure code execution time on Windows. Unfortunately, the usually recommended <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms724408(v=vs.85).aspx">GetTickCount()</a> Windows API function relies on the 55 Hz clock and thus has a resolution of around 18 milliseconds. Fortunately, I eventually found out about the <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms644904(v=vs.85).aspx">QueryPerformanceCounter()</a> function, whose resolution is much better.<br />
<br />
Next, I decided to use the following measure for numerical precision of matrix inversion. Let us say that you need to invert matrix A. You use an inversion algorithm on it which generates matrix B. If matrix B is a perfect inverse of A, then AB = I, where I is the identity matrix. Hence, I calculate matrix C = AB – I. Then, I find the element of matrix C that has the highest absolute value and call it r. This is my measure of numerical precision. In the world of infinite precision, r = 0. In the real world r < 1e-16 is perfect (I use double – a 64 bit floating point type for my calculations). r < 1e-5 is still acceptable. Otherwise there are reasons to worry.<br />
<br />
With tools for measuring performance and accuracy, I was able to start testing libraries. I initially turned to <a href="http://eigen.tuxfamily.org/index.php?title=Main_Page">Eigen </a>which was very easy to install and use with my Visual Studio. Eigen uses <a href="https://en.wikipedia.org/wiki/LU_decomposition">LU decomposition</a> for calculating matrix inverse and was satisfying in terms of speed and reliability – up to the point when I tried to invert a 7000x7000 matrix. Eigen kept on crashing and I could not figure out why. The second option was thus <a href="http://arma.sourceforge.net/">Armadillo</a>. Armadillo did not have the same problems and worked well with bigger matrices all the way up to 10000.<br />
<br />
As it turns out, Armadillo can take advantage of the fact that Gram matrix is symmetric and positive-definite. The inversion is done by means of <a href="https://en.wikipedia.org/wiki/Cholesky_decomposition">Cholesky decomposition</a> and after a few experiments I realized that it is not only faster but also numerically more reliable than LU-based method. I was able to invert a 10001x10001 matrix in 283 seconds (in a single thread) with r = 3.13e-14. The irony is that both Cholesky decomposition and matrix multiplication work in O(k<sup>3</sup>) but the latter is over twice as slow, so it takes much more time to check numerical precision than to perform actual inversion.<br />
<br />
Finally, I designed a data generating process to test whether least squares algorithm of my design can recover parameters used to generate the data. Essentially, I created 10001 variables x<sub>i</sub> for i=0, 1, 2, …, 10000. x<sub>0</sub> = 1, always. For i>0 we have P(x<sub>i</sub> = 1) = 1/(3+i) = 1 – P(x<sub>i</sub> = 0). Then, I created a vector of parameters b<sub>i</sub>. b<sub>0</sub> = 0.0015 and for any non-negative integer j, b<sub>4j+1</sub> = 0.0001, b<sub>4j+2</sub> = 0.0002, b<sub>4j+3</sub> = 0.0003, and b<sub>4j+4</sub> = -0.00005. Finally, P(y = 1) = x * b, where * indicates <a href="https://en.wikipedia.org/wiki/Dot_product">dot product</a>. This is a typical <a href="https://en.wikipedia.org/wiki/Linear_probability_model">linear probability model</a>.<br />
<br />
Using the formula above I generated 4 billion observations (it took 11 days on 4 out of 8 cores of my Windows machine) and fed them into the regression algorithm. The algorithm was able to recover vector b with the expected convergence rate. Note that by design the aforementioned data generating process creates variables that are independently distributed. I thus had to tweak this and that to see whether the algorithm could handle correlated features as well as to investigate <a href="http://www.sciencedirect.com/science/article/pii/S0165176505003150">the bias</a> (see more about that in the last section).<br />
<br />
<b>Statistical inference</b><br />
<br />
The question of how to recover model parameters from the data is simple. In addition to the Gram matrix, you need a success count vector. The i-th element in this vector indicates how many successes were there when i-th feature was present. Calculating this vector is at most O(np) in time and requires O(k) memory (note that none of the operations involved in calculating Gram matrix and success count vector are floating point operations – this is all integer arithmetic since we operate on binary variables only; thus both Gram matrix and success count vector are calculated with perfect numerical precision). Once you have them both, you need to invert the Gram matrix and multiply it by the success count vector. The resulting vector contains estimated model parameters.<br />
<br />
However, getting standard errors of the estimated coefficients is a bit more complicated. Typically, we would use diagonal elements of the inverted Gram matrix and multiply them by standard deviation of the residuals. The problem is that calculating residuals requires going through all observations all over again. This not only increases the execution time. It poses a major technical difficulty as it requires the dataset to be invariant for the duration of the algorithm execution (which is assumed to be at least several hours). To fix this, one would have to tinker with the data flow in the entire system which can greatly inflate project’s costs.<br />
<br />
Fortunately, there is trick that can rescue us here. Instead of quadratic mean of residuals, one can use standard deviation of the success variable. Note that the latter must be greater than the former: the former is the <a href="https://en.wikipedia.org/wiki/Root_mean_square">quadratic mean</a> of residuals for the entire model and the latter is the quadratic mean of residuals for the model with a constant only. This guarantees that the standard errors will be overestimated which is much better than having them underestimated or all over the place. Moreover, for small average success ratio, the two will be close. In fact, it is easy to show that under some plausible conditions as the average success ratio goes to zero, the two are the same in the limit. And for banner impressions, the average success ratio (e.g. <a href="https://en.wikipedia.org/wiki/Click-through_rate">CTR</a>) is, no doubt, small.<br />
<br />
No amount of theoretical divagations can replace an empirical test. It is thus necessary to check ex post whether statistical inference using the above simplifications is indeed valid. To do that, I estimate a number of models (keep in mind that I have 10000 variables) and check how frequently the estimated coefficients are within the 95% confidence intervals. I expect them to be there slightly more often than 95% of the time (due to overestimation of standard errors) and indeed, this is what I find.<br />
<br />
Finally, I cannot write a section about statistical inference without bashing <a href="https://en.wikipedia.org/wiki/P-value">p-values</a> and <a href="https://en.wikipedia.org/wiki/T-statistic">t-statistics</a>. I strongly discourage you from using them. A single number is often not enough to facilitate good judgment about the estimated coefficient. p-value typically answers a question like: “how likely is it, that the coefficient is on the opposite side of zero?” - Is this really what you want to know? The notion of <a href="https://en.wikipedia.org/wiki/Statistical_significance">statistical significance</a> is often misleading. You can have a statistically insignificant coefficient whose confidence interval is so close to zero that any meaningful influence on the dependent variable is ruled out: you can then say that your data conclusively show that there is no influence (rather than that the data do not show that there is influence). Also, you can have a statistically significant coefficient with very high t-statistic, which is <a href="https://en.wikipedia.org/wiki/Effect_size">economically insignificant</a> or economically significant but estimated very imprecisely. Thus, instead of p-values and t-statistics I suggest using confidence intervals. The question they answer is: what are the likely values of the coefficient? And this is what you actually want to know most of the time.<br />
<br />
<b>Data refinements</b><br />
<br />
Oops. You have a nice OLS algorithm which supports valid statistical inference. You tested it with you generated data and it works fine. Now you apply it to real data and the Gram matrix does not want to invert or inverts with precision r > 1. You quickly realize that it is because the data have a lot of constant, perfectly correlated, and <a href="https://en.wikipedia.org/wiki/Multicollinearity">multicollinear</a> variables. How to deal with that?<br />
<br />
Sure, you can force users to limit themselves only to variables which are neither perfectly correlated nor multi-collinear. But when they are using thousands of variables, it may take a lot of effort to figure it out. Also, running an algorithm for several hours only to learn that it fails because you stuffed it with a bad variable (and it does not tell you which one is bad!) simply does not seem right. Fortunately, as it turns out, all these problems can be fixed with analysis and manipulations on the already-calculated Gram matrix.<br />
<br />
The first refinement I suggest is dropping features that are present too few times (e.g. less than 1000). You can find them by examining diagonal entries of the Gram matrix. To drop a variable you can just delete appropriate row and column from the Gram matrix as well as corresponding entry form the success count vector. After such a delete operation, what you are left with is the same as if you did not consider the deleted variable to begin with. Clear cut.<br />
<br />
The second refinement I suggest is to drop features with not enough variability. Based on the Gram matrix and the success count vector, it is possible to construct a variability table for every feature (the same one I described as the naïve solution at the beginning of the article). This table has two rows and two columns – rows indicate whether there was a success and columns indicate whether the feature was present. Each cell contains the number of observations. So you have the number of observations that had a feature and there was a success, a number of observations that had a feature but with no success, a number of observation without this feature but with success, and a number of observations with neither feature nor success. I drop features for which at least one of the four cells has a value lower than 10.<br />
<br />
As we proceed with the third refinement, note that you can easily calculate correlation between any two features based on the content of Gram matrix. Just write out the formula for correlation and simplify it knowing that you are dealing with binary variables to realize that you have all information you need in the Gram matrix. This of course allows you to identify all pairs of perfectly correlated or highly correlated variables in O(k<sup>2</sup>) time. I got rid of a variable if I saw correlation whose absolute value exceeded .99 (doing, say, .95 instead of .99 did not dramatically improve speed or numerical precision of the algorithm).<br />
<br />
But now comes a biggie. How to find features that are perfectly multicollinear? One naïve approach is to try to find all triples of such variables and test them for multicollinearity, find all quadruples, quintuples, and so on. The trouble is that finding all n-tuples can be done in time O(k<sup>n</sup>) which is a nightmare. Alternatively, you can try to invert submatrices: if you can invert a matrix made up of first p rows and columns of the original Gram matrix, but you cannot invert a matrix made up of the first p+1 rows and columns of the original, it surely indicates that the variable number p+1 causes our Gram matrix to be singular. But this solution has a complexity of O(k<sup>4</sup>) which for high k may be very cumbersome. There must be a better way.<br />
<br />
As it turns out a better way is to perform a <a href="https://en.wikipedia.org/wiki/QR_decomposition">QR decomposition</a> of the Gram matrix (not to confuse with QR decomposition of the data matrix as a part of the standard linear least squares algorithm). The diagonal elements of the R matrix are of interest to us – a zero indicates that a variable is causing problems and needs to be eliminated. QR decomposition generates the same results as the “invert submatrices” algorithm described above – but it runs in O(k<sup>3</sup>). And, of course, it is a good practice to check its numerical precision in a similar way we were checking numerical precision of matrix inversion algorithm.<br />
<br />
Finally, note that you can sort the Gram matrix using its diagonal entries. I sort it descending so that features that get eliminated are always the features which occur less frequently. It is probably possible to achieve higher/lower numerical precision by sorting Gram matrix, however I have not investigated this issue extensively. I only noticed that in some instances sorting the Gram matrix ascending made the LU inversion algorithm fail (too high r) while sorting descending or not sorting did not affect the LU algorithm much.<br />
<br />
All these operations require some effort to keep track of which variables were eliminated and why, and especially how variables in the final Gram matrix (the one undergoing inversion) map to the initial variables before the refinements. However, the results are worth the effort.<br />
<br />
<b>Integration and application</b><br />
<br />
The task of integrating new solutions with legacy systems may be particularly hard. Fortunately, in my case, there already existed data processing routines that fed off of the same input I needed (that is a stream of observations in a sparsity supporting format – a list of “lit-up” features), as well as input generating routines that filtered original data with given observation and feature selectors.<br />
<br />
I had a <a href="http://wiki.networksecuritytoolkit.org/nstwiki/index.php/HowTo_Share_A_Terminal_Session_Using_Screen">shared terminal session using Screen</a> with people responsible for maintaining C++ code for analysis done on these data to-date. We were able to link up my class within the current setup so that users can use the same interface to run the regression that they used previously to do other type of analyses. Later on, I had to do some code debugging to account for unexpected differences in data format but ultimately everything went well.<br />
<br />
The first real data fed to the algorithm had 1.16 billion observations and 5050 features. Calculating Gram matrix and success count vector took around 7 hours. Due to refinements, the number of features was reduced to 3104. Inverting matrix took just a few seconds, and the achieved precision was around 2e-7.<br />
<br />
<b>Pitfalls</b><br />
<br />
In this final section I would like to discuss three potential problems that do not have easy solutions: variable cannibalization, bias, and causality.<br />
<br />
It often happens that a number of available features refer to essentially the same thing. For example, you may have features that indicate a person who did not see this banner in past minute, 5 minutes, hour, and day. These features will be correlated and they have a clear hierarchy of implication. A user can make an attempt to run a regression using all these features expecting that the chance of success will be a decreasing function of the number of impressions. However, the effect of a viewer who has never seen the banner will not be attributed entirely to any of the aforementioned features. Instead, it will be split among them, making the estimated coefficients hard to interpret. This is the essence of cannibalization – similar variables split the effect they are supposed to pick up and therefore none of them has a coefficient it should have (please let me know if you are aware of a better term than “cannibalization”). The simple but somewhat cumbersome remedy for it is to manually avoid using features with similar meaning in one regression.<br />
<br />
Secondly, it is widely known that linear probability model generates bias. The biased coefficients are usually closer to zero than they should be. To see why, consider a feature whose effect is to increase probability of success by 10%. However, this feature often occurs with other feature whose presence drives the probability of success to -25% (that is zero). Presence of the feature in question can at best increase the probability to -15% (that is still zero). As a result the feature in question does not affect the outcome in some sub-population due to negative predicted probability. Its estimated effect is thus smaller (closer to zero) than expected 10%.<br />
<br />
Note that the reason why linear probability model generates biased results is not because the regression algorithm is flawed but because the model specification is flawed. The P(y = 1) = x * b model equation is incorrect if x * b is smaller than zero or bigger than one because probability by definition must be between 0 and 1. Whenever x * b is outside these bounds, the coefficients end up being biased. That is, OLS correctly estimates partial correlation between independent and dependent variables, but, due to data truncation, partial correlation is not what is needed to recover the linear probability model parameters.<br />
<br />
The resolution of this issue may go towards assuming that model specification is correct and finding ways to alleviate bias or at least towards identifying features whose coefficients may be biased. On the other hand it may be also possible to assume that the linear probability specification is incorrect and to investigate whether partial correlation is what is really needed for the decision problems the estimates are supposed to help with. I consider solving this problem an issue separate from the main topic of this article and I leave it at that.<br />
<br />
Finally, I would like to make a note on causality. Partial correlation, as any correlation, does not imply causation. Therefore, it may turn out that a particular feature does not have a causal effect on probability of success but instead is correlated with an omitted variable which is the true cause of the change in the observable behavior. For example, one host can have a higher conversion ratio than the other. However, the reason for that may be that the advertised product is for females only. The population of females may be much smaller for the second host even though higher fraction of them buys the product. In such case the second host is actually better at selling the product (that is it is better to direct generic traffic to the second host rather than to the first one) but this information is obscured by inability to distinguish between male and female viewers. It is thus important to remember that the regression provides us only with partial correlation rather than proofs of causality.<br />
<br />
The issue of causality is of extreme importance when we are trying to predict effects of policy (like redirecting traffic in the example above). However, when instead of policy effects, we are interested in predictions, partial correlation seems to be a sufficient tool. For example, you may want to know whether people using Internet Explorer are more likely to click on a banner, even though you do not have the ability to influence what browser they are using. In such situations establishing causality is not necessary.<br />
<br />
:-)Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com0tag:blogger.com,1999:blog-7351190971143493163.post-3438383705597221802015-09-30T15:00:00.001-04:002015-11-17T23:39:24.599-05:00Consciousness and morality revisited<div class="MsoNormal">
As I am investigating the topic of morality (whether I have
anything interesting to say about it is yet to be discovered), I bought <a href="http://amzn.to/1iLLdGG">“The Moral Landscape: How science can determine human values” by Sam Harris</a>. I was
not surprised to see that on the first page, in the Introduction, Harris
writes: “I will argue, however, that question about values – about meaning,
morality, and life’s larger purpose – are really questions about the well-being
of conscious creatures.” I am glad to have yet another example that humans use
consciousness as a property defining objects of morality.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The notion of “well-being of conscious creatures” is
repeated numerous times throughout the book. On page 32, Harris explains why he
chose consciousness as the basis for morality: <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
“Let us begin with the fact of consciousness: I think we can
know, through reason alone, that consciousness is the only intelligible domain
of value. What is the alternative? I invite you to try to think of a source of
value that has absolutely nothing to do with the (actual or potential)
experience of conscious beings. Take a moment to think about what this would
entail: whatever this alternative is, it cannot affect the experience of any
creature (in this life or in any other). Put this thing in a box, and what you
have in that box is – it would seem, by definition – the least interesting
thing in the universe. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
So how much time should we spend worrying about such a
transcendent source of value? I think the time I will spend typing this
sentence is already too much. All other notions of value will bear some
relationship to the actual or potential experience of conscious beings. So my
claim that consciousness is the basis of human values and morality is not an
arbitrary starting point.“<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
There are a couple of problems here. First of all, Harris
does not present any constructive argument in favor of using consciousness as
the starting point. He only says that all alternatives he can think of are either
uninteresting or related to consciousness. This is an <a href="https://en.wikipedia.org/wiki/Argument_from_ignorance">argument from ignorance</a>,
a logical fallacy, which Harris should be familiar with as an outspoken
atheist. Unfortunately, Harris keeps on using arguments from ignorance in his
book (see also p. 62 and p. 183).<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Secondly, let us for a second consider the world of ants
(rather than humans). We know that most ants are insects with complex rules of
social interactions. The problem is how to design these rules in order to
maximize ants’ well-being (e.g. “thou shalt not kill another ant from your
nest”). Or to put it more generally, let us say we have any population of any
social agents: they may be simple computer programs implemented in a <a href="https://en.wikipedia.org/wiki/Cellular_automaton">cellular automaton</a>, or <a href="http://www.dekmiak.com/2015/07/alien-invasion.html">super-intelligent aliens</a> who have no characteristic that we would
recognize as consciousness by any modern definition (they do not have brain
tissue, they do not smile, frown, sleep, cry, nor talk). How do we go about
designing optimal interaction rules for their population, i.e. how do we design
their morality? If use of consciousness is necessary, does it mean that we
cannot design morality for creatures that do not have it? It seems that this is
what Harris is thinking: “altruism must be (…) conscious (…) to exclude ants”
(p. 92). Why not ants? It seems that if we are to solve much more complicated
problem for humans, maybe it would be a good idea to start with much simpler
problem for ants? Harris seems to think that we cannot optimize ants’ behavior but
we can optimize human behavior. Why?</div>
<br />
<div class="MsoNormal">
We already know that despite what Harris is
claiming, the choice of consciousness is arbitrary. <a href="http://www.dekmiak.com/2015/08/the-mind-body-problem-and-hard-problem.html">This is what evolutionary psychology dictates</a> and Harris tries (and fails) to rationalize this human intuition. And the question that needs to be answered in the first place is: should we follow our intuitions? Or, more precisely: why, when, and which intuitions should we follow, and which should we discard?<o:p></o:p></div>
Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com0tag:blogger.com,1999:blog-7351190971143493163.post-64791763055633709952015-09-14T18:25:00.000-04:002015-09-14T18:57:21.037-04:00Consciousness and morality<div class="MsoNormal">
In his brilliant book, ‘<a href="http://amzn.to/1Y5gbtZ">Consciousness and the brain</a>,’
Stanislas Dehaene gives an overview of neurological processes that give rise to
consciousness. He uses the definition of consciousness I like and, generally, I
agree with everything he has to say (especially with his critique of the
grotesque modern philosophical theories of consciousness towards the end of the
book). But there is one exception. In chapter 7, he unfortunately delves into a
morality-related topic and seems to make a tacit assumption that virtually
everybody else makes as well. And this is an assumption I do not like. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The question is: ‘is infanticide morally justified?’ The
quoted argument in favor is: “The fact that a being is (…) a member of species
Homo sapiens, is not relevant to the wrongness of killing it; it is, rather,
characteristics like rationality, autonomy, and self-consciousness (…). Infants
lack these characteristics. Killing them, therefore, cannot be equated with
killing normal human beings, or any other self-conscious beings.” Dehaene
strongly criticizes this point of view: “Such assertions are preposterous for
many reasons. (…) Although the infant mind remains a vast terra incognita,
behavior, anatomy, and brain imaging can provide much information about
conscious states. (…) We can now safely conclude that conscious access exists
in babies as in adults (…)” (p. 236-243)<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Let us take a step back to see what is going on here. We see two people arguing if a thing (an infant in this case) deserves protection
as an object of moral behavior (let us quickly explain the notion of 'object of moral behavior': e.g. unlike humans, cockroaches are not objects
of morality so we can kill them with no remorse). Both sides tacitly agree that
a thing qualifies as an object of moral behavior if it has certain
characteristics of an adult human being and that it does not qualify as an object
of moral behavior if it does not have these characteristics. Both sides tacitly
agree that these characteristics revolve around mental capabilities of a healthy
human adult and gravitate towards something that both sides call consciousness.
What the sides disagree upon is whether a particular class of things (infants) has
consciousness or not. I side with Dehaene that babies have consciousness,
because philosophers whom he cites, as it often happens to philosophers, seem
to have no idea what they are talking about. However, it may surprise you that who I side with is actually irrelevant. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Connecting consciousness with morality seems to be very
popular. As I wrote in <a href="http://www.dekmiak.com/2015/08/the-mind-body-problem-and-hard-problem.html">my previous post</a>, vegetarians often use the argument
that animals are ‘conscious’ to propose that it is immoral to kill them. We can
also see it in the debates about consciousness, maintaining life-support for
vegetative-state patients, etc. However, virtually never, a person making such
claims explains why consciousness is the necessary and sufficient condition to
become an object of morality. And this omission goes unnoticed. Everybody in
these discussions seems to be in tacit agreement that this is the way to go:
you are conscious – you deserve a right to live, you are not conscious – you
can be treated instrumentally. (In some other debates the question is whether
the thing in question is capable of ‘suffering’ or ‘feeling’ rather than being conscious,
I do not want to go too deep in the nuance here, because it is irrelevant.)<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Why is consciousness the necessary and sufficient condition
to become an object of morality? Why is it inherently wrong to kill a conscious
being? If you read <a href="http://www.dekmiak.com/2015/08/the-mind-body-problem-and-hard-problem.html">my previous essay</a>, you probably know the answers to these
questions. There is nothing objectively wrong in killing a conscious being,
whatever the definition of consciousness might be. It is subjectively wrong
from the point of view of the members of the Homo sapiens species, because they
(we) are hardwired to perceive it as wrong. In other words, we have an evolved
intuition that killing something that has consciousness is wrong because Mother
Nature hardwired us not to kill each other. But she did not care to make the
emotional mechanisms precise enough to spare us the ongoing confusion. Whatever
works is good enough.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The battle described at the beginning of this essay can be
deciphered in the following way. The two gentlemen have a certain concept
(consciousness) whose perception is hardwired in their brains to activate the
‘I care’ system. The two gentlemen then argue whether a certain stimulus (a
baby) should be associated with this concept (and thus activate the system).
But both of them skip the question whether this setup with the concept of consciousness invoking morality makes sense at all. None of the gentlemen makes any
arguments about objective – as opposed to emotional – reasons to kill or not to
kill infants. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Do such objective reasons exist? It may be surprising and
depressing for some people to learn that our intuitions about the world,
including the dearest and most deeply held feelings, are the works of natural
selection and are imprecise products of technological trade-offs that often
lead us astray. Our intuitions worked well to propel us to the status of the
dominant species on the planet Earth (in a sense that we technically have power
to destroy virtually all other species) but they also very efficiently generate
confusion when we try to understand the nature of reality. Using intuition is
not a pathway to truth. Rationality is.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
But if we eliminate our intuitions as a source of morality,
what are we left with? Can we answer the question ‘is it okay to murder
babies?’ Can we even answer the question ‘is it okay to murder another human
being?’ Can we build a rational argument that is completely independent of our hardwired
intuitions, is fully rational, and provides guidance for the decisions we must
constantly make? Finally, if we ever encounter <a href="http://www.dekmiak.com/2015/07/alien-invasion.html">more intellectually advanced aliens</a>, who do not rely on their instincts like we do, what kind of morality
should we expect from them?</div>
<br />
<div class="MsoNormal">
Maybe it is possible to answer these questions in a
meaningful way. But this is a topic for a separate post. Stay tuned. <o:p></o:p></div>
Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com0tag:blogger.com,1999:blog-7351190971143493163.post-72751365687242693212015-08-29T19:41:00.001-04:002016-05-23T12:03:56.211-04:00The mind-body problem and the hard problem of consciousness explained<div class="MsoNormal">
<b>Abstract:</b> In this essay I try to reconcile the two available sources of information
about consciousness. One source is science, which gives us insights into how
brains work. Another source is introspection and opinions expressed by other
people talking about their subjective experience. The hard problem of
consciousness can be understood as inconsistency of the information provided by
these two sources. I propose a reductionist theory based in evolutionary
psychology that accounts for subjective experience and explains why
introspection yields thoughts that are seemingly incompatible with fully
reductionist point of view. By incorporating thoughts of individuals and their
opinions about nature of consciousness into the reductionist theory, I reduce
the set of unexplained or inconsistent observations, on which the hard problem
of consciousness is based, to null. Given there is no more unexplained
observations left, regardless of whether they are objective or subjective, the
hard problem of consciousness appears to be solved. </div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/y7RL__ZgdEw/0.jpg" frameborder="0" height="384" src="https://www.youtube.com/embed/y7RL__ZgdEw?feature=player_embedded" width="480"></iframe></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Introduction<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
People are baffled by
the notion of consciousness. There have been many theories of why the
consciousness arises and none of them seems to be satisfying. <a href="https://en.wikipedia.org/wiki/Dualism_(philosophy_of_mind)">Dualism (e.g.mind is immaterial and somehow communicates with brain)</a> is just a pure speculation which offers no explanation in a scientific sense.
Other theories, like <a href="https://en.wikipedia.org/wiki/Panpsychism">panpsychism (every single molecule has consciousness but the more complicated the system, the more consciousness it has)</a>,
are not falsifiable and offer no predictive power. Finally, <a href="http://amzn.to/1JqOHat">full reductionism (mind is a product of a physical brain)</a> fails to address the reason why we are able to distinguish between subjective
experience and objective world. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
People discuss
consciousness, mind-body problem, and the existence of qualia – the discussion
itself is an objective fact about reality. Electrical and chemical impulses
originating in their brains make the muscles in their mouths and throats
contract so that the corresponding statements are uttered. It is thus an
objective fact about reality that there is something in the brains of these
people that causes them to perceive consciousness or qualia as something that
cannot be explained by material science. What are the origins of these
electrochemical signals? Is there some mysterious soul that through yet
unidentified physical mechanism facilitates transfer of information between the
realm of spiritual and the realm of material? Or the mental properties of
elementary particles in a brain unite in some mysterious way to influence the
neurons responsible for perception of consciousness? Finally, maybe there is a
fully reductionist explanation of why these neurons get activated and why our
brains produce behavioral outcomes like the <a href="https://en.wikipedia.org/wiki/Mind%E2%80%93body_problem#Descartes">writings of Rene Descartes</a>?<o:p></o:p></div>
<div class="MsoNormal">
<span class="MsoFootnoteReference"><span class="MsoFootnoteReference"><br /></span></span></div>
<div class="MsoNormal">
It is bizarre. The
best model of the Universe that science has been able to come up so far, the
model that is being constantly positively verified, yields good predictions,
and helps us solve practical problems, is materialistic and reductionist. All
objective evidence points to the fact that a mind is a product of a brain and
nothing else. Brain has not been fully understood yet. Mind has not been fully
understood either. So maybe understanding the brain will let us understand the
mind? It is bizarre that philosophers are often so quick to reject a notion
that once we fully understand physical brain we will fully understand human
experience. Why is that?<o:p></o:p></div>
<div class="MsoNormal">
</div>
<div>
<br />
<div id="ftn4">
</div>
</div>
<div>
<div class="MsoNormal">
<b>A solution<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
To sketch a quick
explanation, let me first focus the attention on what the problem is. When you
think about other humans as humans, or when you think about your own thoughts,
there is something you perceive (the common notion of consciousness). But you
no longer perceive this thing when you think about the brain tissue, firing
neurons, electrical circuits of a robot, and such. The perception of it, when
you think about humans as a whole, and failure to perceive it, when you think
about them in a reductionist way (biological tissue), is what causes the
dissonance in your brain. Your brain perceives this dissonance and makes your
mouth utter the statement like: ‘<a href="https://en.wikipedia.org/wiki/Hard_problem_of_consciousness#cite_note-Chalmers-3">The really hard problem of consciousness is the problem of experience. When we think and perceive there is a whir ofinformation processing, but there is also a subjective aspect.</a>’ The notion of “information processing” (reductionist part) does not cause the
feeling that you have about yourself when you ponder the phenomenon of your own
thought. This is why a thought must be something more. This is what the problem
was during the time of Descartes and this is what the problem still is as
discussed by modern philosophers talking about the hard problem of
consciousness and the existence of qualia. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div>
<div id="ftn1">
<div class="MsoNormal">
To solve the hard
problem of consciousness we need to explain why people perceive consciousness
in some things and they do not perceive it on other things. The answer lies in
evolutionary psychology. Every healthy human being has a system in their brain
that is supposed to detect minds. This system is activated when we think about
sentient beings but is not activated when we think about meat or a piece of
silicon. The reason why we have this system is to facilitate our socials
interactions. We need to recognize other humans so that we can feel sympathy or
compassion, and help them when they are hurt while not having the same feelings
towards a broken cardboard box.</div>
<div class="MsoNormal">
<br />
<div class="MsoNormal">
<b>Evolutionary psychology explains<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
<a href="http://amzn.to/1LAu7oS">A human brain has a number of systems that allow for recognition of objects that are important from the evolutionary point of view.</a> Recognition of such salient objects usually facilitates specific behavior which
is a response increasing genes’ probability of survival. When you see a naked
body of a potential sexual partner you are inclined to get closer. When you see
(or smell) a rotting carcass of a rat, you are inclined to move away. When you
see a baby, you feel a need to care about it. And so on. <o:p></o:p></div>
<div class="MsoNormal">
<br />
The perception of a
salient object often generates a feeling. This feeling can be overcome under
some circumstances. It cannot be treated as a sole determination of human
behavior, it is just guidance. There are other factors that can be more
important (e.g. there is a lion between me and the naked body of my lover). But
the important fact is that detection of salient objects happens outside of our
thoughts – we cannot chose to be attracted by a carcass instead of being
repelled. We can at most ignore the feeling of repulsion. <o:p></o:p><br />
<br /></div>
<div class="MsoNormal">
Another important fact
is that systems for recognition of salient objects are very crude and prone to
mistakes. It is probably very hard to precisely shape the structure of a brain
by genes. There is an engineering tradeoff involved – our brains are not
designed to be perfect. They are designed to do their job in most situations at
a moderate cost. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
One of the examples of
such crudeness is recognition of a sexual partner. It is very common both for
humans and in the rest of animal kingdom to get aroused by things that are far
from actual potential sexual partners. It is easy to find on the Internet a
picture of a tortoise having sex with a stone or a dog humping his owner’s leg.
It is also very easy to find a lot of pornography. Pornography allows humans to
get aroused by a pattern of colorful dots rather than by the presence of an
actual sexual partner. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Similar phenomena
occur with respect to perceived cuteness. It is quite simple to discern what
facial features activate a mental system that was most likely intended for the recognition of human infants (cartoonists know it too well). Seeing something with big eyes
and a little nose mounted on a big head makes us feel like we need to care
about it. But it is not only infants that have these features. Most of young
mammals have them which is why we perceive kittens and puppies as cute. From
the evolutionary point of view, this may be a mistake – we are misidentifying a
salient object and misallocating our resources (as we waste time on caring for
a puppy instead of a member of our own species, say a relative). But it is not
easy to determine whether this phenomenon is really a bug or a feature – there
is not only an engineering tradeoff involved in making the recognition
mechanism crude. There may be also some yet-to-be-discovered benefits from
making such “mistakes.”<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>The mind as a salient object<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
The toolbox our brains
are equipped with contains a lot of systems that guide our behavior when we
interact with other humans. For example, there is a subsystem responsible for basic
moral behavior. It takes a great deal of emotional effort to kill somebody you
consider to be a fellow human being. There is a feeling of compassion you feel
towards somebody in need. There are feelings of unfairness that we have when others
do not reciprocate. And so on. All these emotional responses are culturally
universal and have simple evolutionary explanations. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Is there any other evidence
that such subsystem exists? Let us consider genocide. Something that happens very
often before genocide is a process of dehumanization of a group that will be
subject to extermination. In the brains of perpetrators, dehumanization
effectively disconnects the system for recognition of fellow human beings from
the input generated by the victimized group. You no longer perceive victims as
humans – you now perceive them as cockroaches or rats, which does not activate
your moral intuition and makes them worthy of extermination. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
When you watch debates
or read articles about consciousness, you may notice that people often intuitively
make a connection between consciousness and moral behavior. And it is not only
vegetarians that refuse to eat “sentient beings.” People who otherwise eat
meat, sometimes say that since octopi, elephants, dolphins, and monkeys were
identified as self-aware (they can recognize themselves in a mirror), it is
thus immoral to eat them. The questions what is conscious and what is not
conscious is important precisely because conscious beings seem to require moral
treatment while beings that are not conscious are just things that can be dealt
with without as much respect. <a href="https://en.wikipedia.org/wiki/Mens_rea">Note that lack of consciousness at the time of committing a crime is often a condition for more lenient verdict.</a><o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Like other systems for
recognition of salient objects, the system for recognizing minds (or
consciousness / sentience / souls / feelings / subjective experience) is not
perfect. It can be overridden (as we saw in the example of genocide) and it can
be activated by the stimuli it was not likely intended for. Such a
misidentification can yield a decision that results in misallocation of
resources and could be detrimental not only from the evolutionary point of view
but even from the viewpoint of subjective wellbeing of the individual. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
There are a lot of
examples showing the system for recognizing minds being activated by a mistake,
when there is no actual human mind present. As I already mentioned, it is often
activated by animals, which leads people to refuse to eat them and chastise
those who do. It is activated by fetuses, which leads people to strongly oppose
abortion and demonize those who do not. It is activated by inanimate objects
and natural occurrences in people who believe in spirits and worship gods (and
trade favors with them by making offerings, including human sacrifice). And
finally, some people make a connection between this system and the entire
Universe, which leads to panpsychism. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The existence of such
a system can be potentially empirically verified. It implies that there is a
pattern of neurological activity that occurs when a human detects a mind. There
is also a pattern corresponding to at least some moral judgements which is then
tied to identifying the subject of a judgement as a mind. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>What is consciousness?<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
The main point of this
essay is that there is no evidence, whether subjective or objective, that leads
to a conclusion that mind is something more than a product of material brain,
given the laws of physics as we know them. All the subjective “evidence”
against reductionism can be explained by reductionism and there are no
arguments left in favor of other theories. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Reductionism explains
such “evidence” by showing that it is created as a result of cognitive
dissonance caused by the system for detecting minds which gets activated while
thinking about humans holistically or performing introspection, and is not
activated while thinking about nerve tissue. The hard problem of consciousness has
thus no origins in reality but is a product of inadequate perception abilities
of the human brain. In other words, the question is not whether the thing
exists but why do we have an illusion that it does. Similarly, when you are
visiting a psychiatric ward, you do not find yourself concerned whether one of
the patients really is Napoleon Bonaparte. You are more likely to analyze WHY
he thinks so. The thought that all healthy humans have some mental deficits leading
to delusions might seem depressing but on the other hand we cannot just start
off with an assumption that we are perfect.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Having addressed the
main point of this essay, an interesting follow-up question arises: does
consciousness even exist? Before discussing existence one must have a good
definition of the thing in question. A good definition identifies a phenomenon
by its properties and enables us to objectively discern whether a phenomenon
satisfies the properties or not. In other words, a good definition should let
us objectively determine whether something is conscious or not. A good
definition should be also as close to the common use of the word as possible.
Most of the available definitions describe consciousness by vague associations
with notions like sentience, awareness, subjectivity, or ability to feel and fail
at satisfying these criteria. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The word
“consciousness” is commonly used to describe phenomena which activate the mind
detection system in a brain of the person who speaks about it. Unfortunately,
for different people, different objects activate this system which causes a lot
of confusion. Despite trying hard I was unable to come up with a reductionist
definition that would be based on this approach. Hence, a different approach is
needed. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Another common way of
talking about consciousness is when we contrast conscious mental processes with
unconscious mental processes. The former are what we can speak about after
investigating our own minds trough introspections and the latter seem to be
“given” to us in form of feelings or information, for example who the faces
belong to and whether they are attractive. <o:p></o:p><br />
<br /></div>
<div class="MsoNormal">
Hence, I espouse the
following definition of consciousness: “Human consciousness is a collection of
mental processes that can be remembered and talked about later on by a healthy
human being.” This particular definition seems to be useful as it allows
empirically verifying what the content of human consciousness is and what it is
not. It relates to what we care about – the experience we can share with each
other, the experience perceived as the content of the Cartesian theater. It is
what the mind detection system is most likely supposed to detect. Finally, <a href="http://amzn.to/1FnxQ4C">its similar version has been already used by reputable scientists</a>. <br />
<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
What about animals
then? Do they have consciousness? Well, it depends on what scientific question
we are asking. We are surely not interested in knowing if animals possess the
imaginary and emotionally loaded quality whose illusion is caused by a failure
of the mind detection system in our brains. We know that animals are aware
(that is they have a working model of the environment in their brains) and
often self-aware (that is they have a working model of their bodies and maybe
even their own thoughts). But we don’t have to give these phenomena a new name.
Word “consciousness” seems to be interesting from the perspective of humans
willing to investigate what they are able to communicate about, but it does not
have any obvious application in case of other animals, since they cannot speak.
<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Let us now think about
a philosophical zombie, a creature imagined by philosophers, a creature that
behaves exactly like a human but does not have subjective experience – a very
sophisticated robot. Consciousness does not exist in a sense that there is
something mysterious that differentiates a philosophical zombie from a human
being. As a matter of fact, the notion of a philosophical zombie was engineered
as a human being who does not activate the mind-recognition system. The
difference between a human and a philosophical zombie is in subjective
perception, not in the objective properties of the objects being studied. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Subjective experience<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
Finally, let me address
the notions of subjective experience and qualia which seem so real and yet reductionism
seems to deny their existence. Do I claim that they do not exist? On the
contrary. Subjective experience exists and manifests itself as and only as a
state of a brain. Subjective experience is a pattern of neural activity. Qualia
correspond to various states of physical brain. Knowing perfectly configuration
of a brain is enough to fully understand human experience and to predict with
highest possible accuracy (subject to quantum uncertainties) how a person is
going to react to a particular experience. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The current state of
neuroscience does not allow modeling precisely the neural machinery that gives
rise to our thoughts. I can only speculate that, for example, there may be a
pattern of neural activity that gets activated when you see red color. There
also may be a pattern that gets activated when you want to say what you see.
Neurons in the part of the brain responsible for speech detect that these two
patterns have been activated and they send a signal to your mouth. You say ‘I
see red.’ <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
There may be a pattern
that gets activated when you perceive a mind. It gets activated when you think
about your own perception of red color. But it does not get activated when you
think about your own brain tissue. The patterns associated with these two
phenomena get activated due to different inputs and cannot be merged. Failure
to merge them is recognized and a pattern corresponding to detection of
cognitive dissonance emerges. This pattern in turn makes your mouth say: ‘My
subjective experience cannot be explained by reductionism.’<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
<b>Note:</b> Special thanks to Kamil Faber and Julia Madajczak for helping me make
this essay slightly less unintelligible. </div>
</div>
</div>
</div>
</div>
Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com16tag:blogger.com,1999:blog-7351190971143493163.post-54194003315116504402015-07-24T13:21:00.000-04:002015-12-30T11:19:42.475-05:00Philosophic burden of proof in God debates<div class="MsoNormal">
<b>Abstract:</b> Requiring
a position to meet its burden of proof before it can be believed is a bad
approach to decision-making. In reality, decisions often need to be made before
any proofs can be produced. In this essay, I show what are the flaws of the burden-of-proof logic. I suggest a different way of evaluating
beliefs, which is consistent with necessity of making decisions under
uncertainty. I also address most popular arguments put forward by the
proponents of the burden-of-proof logic. Finally, I try to explain what are the
reasons and consequences of adopting their way of thinking. </div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/7gfl0pPPrdA/0.jpg" frameborder="0" height="384" src="https://www.youtube.com/embed/7gfl0pPPrdA?feature=player_embedded" width="480"></iframe></div>
<br />
<div class="MsoNormal">
<b>Introduction</b><br />
<br />
Burden of proof is a framework of logical thinking used to
establish validity of certain claims about reality. It indicates which side
should provide arguments for their case. Many atheists argue that theists should
provide arguments, because these are theists who make a claim about reality:
“God exists.” On the other hand, atheists do not make a claim about reality;
they merely reject the theist claim. The default position of a skeptic and a
rational person is, according to the burden-of-proof logic, disbelief in a
claim until sufficient evidence is provided. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
A common response to this reasoning is that atheists put forward an
alternative claim: “God does not exist.” But according to many atheists, this is not the
case. The discussion is only about the claim made by theists. For example, a person who has
never learnt the notion of a god is also an atheist. Such a person could never
make a claim one way or the other. Moreover, when rejecting a claim, you are
not making yourself automatically a proponent of an alternative claim. There
are things about the Universe that we just simply do not know yet. You cannot
be forced to automatically accept a bad claim because you rejected another bad
claim. Finally, there are an infinite number of claims that can be made up by a
person with good imagination. It is impossible to even name them, let alone
produce reliable counterevidence to all of them. Therefore, a default position
must be to disbelieve a claim until evidence for it is provided, without being
forced to accept an alternative claim in the meantime. The evidence does not
have to take a tangible form. It can be in form of sound reasoning or even
vague clues in some cases.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Although there are, no doubt, a considerable variety of
opinions on this matter, the above explanation more or less summarizes why many
atheists think that the burden of proof lies with theists. Some theists try to
turn this argument around. They say that atheists are indeed making a claim
that “God does not exist.” Also, there is good evidence for their case and
there is insufficient evidence for the case of atheists, therefore it is atheists’
turn to argue for themselves. However, these arguments do not go deep enough.
In most debates, atheists present much higher level of knowledge and sophistication in their
thinking then their adversaries. Since they have hard time arguing otherwise, it
may seem that theists are indeed the ones who need to provide justification for
their claims and the burden of proof lies with them.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The philosophical questions that are interesting to me are:
is burden of proof a valid framework of logical thinking? Will using it improve
quality of the inferences we make about reality or should we use a different
framework? What different framework would be better? And if burden of proof is
the best framework, how to decide who has the burden of proof? Is there a
general rule or the rule depends on the situation?</div>
<br />
<div class="MsoNormal">
In this essay I indent to answer these questions by picking
apart the burden-of-proof logic and by addressing most common arguments supporting
it. But before I start this job, let me briefly explain why it should be
important to both sides of the debate: application of burden of proof shapes
communication between atheists and theists. It generates some confusion and
disagreement. It will be hard to come to an agreement if the parties use different logic, and especially hard if the parties use faulty logic. So,
whatever side you are on, if you care for the truth to prevail, in your
interest is to get both yours and your opponent’s logic straight. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Decisions matter<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
Why are the debates between theists and atheists important?
Why are debates important in general? The debates I want to discuss in this
essay are a way of exchanging information that is supposed to help establish
what is the nature of reality. You can have such a debate in your own head when
you consider pros and cons of some claims. We can also hold such a debate in
public to educate people and show to the undecided which arguments are
stronger. Regardless of whether argument goes on in your head or in public, the
same logic should govern the reasoning: the correct logic.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
Why do we care what the nature of reality is? We care about
it because our vision of reality influences our decisions, which in turn
reflect on our wellbeing. If somebody harbors in his head a belief that bears
no effect on his decision whatsoever, this belief is irrelevant to other people
and to the entire outside world. For some people it may be interesting to
indulge in “academic discussion” about such beliefs, but for the sake of this
argument, I am going to consider only beliefs that influence our decisions.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>The theory of
decisions under uncertainty<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
Consider the following scenario: you are speeding on a
highway. There is a turn ahead. You are wondering whether there are police
waiting behind it. If there are, you are probably going to get a ticket. Now,
you have to decide whether to slow down or maintain your speed.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
This is a typical problem in which you have to make a
decision under uncertainty. You have some prior information about the situation
– you have your past experience with police and you have heard many stories.
You also know the approximate costs and benefits of each choice: the
approximate value of the ticket, the amount of time lost by being pulled over and
the amount of time lost by slowing down to avoid the ticket. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
So let us apply the burden-of-proof logic to this situation.
The default position is disbelief in the claim that police exists until sufficient
evidence is provided. And since there is no proof that they are there, the
decision should be clearly to keep on speeding. But we know this is a wrong
decision under some circumstances, especially if you know that police really
like to be there. Either the burden-of-proof logic is not working here or I
have misapplied it. You can argue the latter by saying that the claim should be
“there is a 10% chance that police is behind the corner.” Your burden of proof is
now met by your previous experience with cops but you must have arguments both
in favor and against their existence to evaluate the probability. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
This is the way we seem to make decisions. We consider
alternative versions of reality – in fact cops either are there or they are
not. We assign a probability value to each version of reality. Then we think
about costs and benefits of our decisions under each version of reality and we
choose the option that is best for us. <a href="https://en.wikipedia.org/wiki/Decision_theory">This is how rational decisions are usually modelled in social sciences</a><u>. <o:p></o:p></u></div>
<div class="MsoNormal">
<u><br /></u></div>
<div class="MsoNormal">
‘Wait a minute’ you
may think. ‘But many people don’t evaluate probabilities and don’t build a
comprehensive cost-benefit analysis when they make decisions!’ <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
That is correct. Many people do not consider consequences of
their decisions and do not consider how probable their assumptions are. We call
such decisions irrational. In virtually every decision made by humans, there is
a component of irrationality. We do not have enough intellectual capacity to
process all information efficiently. However, we are quite good at
approximating rational decisions even when we do not explicitly think about probabilities.
Moreover, it has been proven over and over again that the more irrationality in
the decision-making process, the worse the results on average. An agent
concerned with her wellbeing must aspire to be as rational as possible.
Therefore, I am going to assume that the decisions we discuss are rational.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Consider a different example: a claim that some diseases are
caused by germs. Belief in such a claim can yield significant benefits. For
example, you can start washing your hands, which can extend your expected life span
by a few years. Today people ascribe a very high probability to this claim. But
a few centuries ago it did not even occur to them. They were acting as if they
assigned zero probability to this claim.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
In a rational decision-making process you need to consider
alternative versions of reality and assign them probabilities. The version of
reality that did not occur to you gets by default probability zero. Being
rational means choosing best option given the information you have. Being rational
does not depend on the quality of the information you have. If you have
insufficient or false information, your decision can still be rational if based
solely on this information. People who were not washing their hands were
rational, they just had insufficient information.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Let us go back to the question about a god. First, recall
that we are interested in decisions and their consequences. Going to church can
have different costs and benefits depending on which version of reality is
true: “God exists” or “God does not exist.” A rational person concerned with
her wellbeing should assign probabilities to both claims and choose the best
option. The process of evaluating probabilities requires both arguments against
and arguments in favor of existence of a god. If you had arguments for only one
side, you would end up with probability 1 or 0. If you had no arguments
whatsoever, the probability would be a half for each. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
It is impossible to square the burden-of-proof logic with
rational decision making. Evaluating a single claim about the nature of reality
in isolation does not make sense because it cannot well translate into a
decision. In order to have a decision, you need to evaluate at least two claims
and assign them probabilities (keep in mind that probabilities must sum to one).
As a result, it turns out that the burden-of-proof logic is useless. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>You can’t prove
negative<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
After establishing that the logic at its core is flawed, I
need to debunk examples and lines of reasoning presented by some atheists (and other
skeptics) that are built around this logic. The first is the notion that <a href="https://en.wikipedia.org/wiki/Evidence_of_absence">it is impossible to prove negative</a>. As the argument goes, it is inherently
hard to prove certain claims false as they are constructed in such a way that
they elude counterarguments. An often cited example was coined by <a href="https://en.wikipedia.org/wiki/Russell%27s_teapot">Bertrand Russell</a> in 1952: “If I were to suggest that between the Earth and Mars
there is a china teapot revolving about the sun in an elliptical orbit, nobody
would be able to disprove my assertion provided I were careful to add that the
teapot is too small to be revealed even by our most powerful telescopes.” <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
To break this argument down, consider the following scenario:
your five year old kid comes to you, waves his stuffed kangaroo in front of
your face and says: ‘Mommy, Timmy says he is hungry and wants you to put some
marshmallows in his pouch.’ <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
This is a serious decision-making challenge that you are
facing now. Any bad decision can have negative consequences. If you do not give
Timmy marshmallows, and the claim made by your kid turns out to be true, the
poor creature could suffer or even starve, making your child desolate. However,
if the claim is false and you donate the marshmallows, they will surely end up
in the stomach of your little love, after spending some time in the dirty and
hairy interior of Timmy’s pouch. Similar decisions in long run can harm your
child’s health and erode your authority. <o:p></o:p></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
So what will you do? On one hand you have the child’s
testimony. On the other hand you have the following arguments:</div>
<div class="MsoNormal">
</div>
<ol>
<li>The claim is incompatible with scientific worldview. You
could dissect Timmy and see inside that there is nothing that could generate
human speech.</li>
<li>The general experience is that stuffed animals do not talk.
There are no verified examples (except when they are stuffed with electronics,
but Timmy is not).</li>
<li>The children at this age tend to make such things up. There
is a lot of verified examples of children making claims that turned out to be
untrue.</li>
<li>The kid himself may have an interest in making you believe
the claim. Certainly, he is projecting his own desires on Timmy, as
marshmallows tend to be favorite food of kids, not stuffed kangaroos.</li>
</ol>
After performing this sophisticated analysis, you may
conclude that ‘Well, I cannot prove that Timmy did not say that. I cannot prove
negative, therefore I must give marshmallows to Timmy.’<br />
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<o:p></o:p></div>
<div>
<div class="MsoNormal">
We know however from the previous section that this is
faulty reasoning leading to an irrational decision. You cannot evaluate kid’s
claim in isolation. You have to evaluate it together with the claim “he made it
up” and assign both claims probabilities. In the end, you will most likely
assign very high probability to the claim “he made it up” and act accordingly.
Maybe Timmy did speak and you may never be one hundred percent sure. But for
practical reasons, you have enough evidence to disprove it. The fact that you
cannot “positively” prove that Timmy did not speak is irrelevant.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
This example is not as ludicrous as it sounds. It is indeed
very similar to the main topic of this essay. Note that supernatural religious
claims have similar characteristics:</div>
<div class="MsoNormal">
</div>
<ol>
<li>They cannot be explained using known and verified laws of
nature.</li>
<li>There are no verified examples of anything supernatural ever
happening.</li>
<li>People have a natural tendency to make up supernatural
claims.</li>
<li>People often have an interest in persuading you and a
tendency to engage in intellectual gymnastics to make their arguments about
supernatural look credible.</li>
</ol>
As a matter of fact, it is often impossible to prove
negative beyond any doubt (some people may say that it is impossible to prove
positive beyond any doubt too). But for practical reasons it is not necessary.
There are often good reasons to believe that the claim was made up and this should
be enough to force the person making the claim to produce more compelling
evidence. For example, I have good reasons to believe that Bertrand Russell
made up the celestial teapot. When forced to make a decision (e.g. make a bet),
I will assign very low probability to existence of the teapot unless more
compelling argument in favor of it is provided. Mr. Russell seems to be fully
aware that this is how it is supposed to be, as after introduction of his example
he swiftly adds: “But if I were to go on to say that, since my assertion cannot
be disproved, it is intolerable presumption on the part of human reason to
doubt it, I should rightly be thought to be talking nonsense.”<o:p></o:p><br />
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
In fact, proving negative is very common and one does not
have to come up with fancy examples to show it. Proof by contradiction is a
valid logical way to prove non-existence of an object. In mathematics, a
well-defined object can be tested for consistency of its properties. If the
properties are inconsistent, the implication is that the object does not exist.
Similarly, an object in physics can have a well-defined and ever-present
influence on the environment. The lack of the influence implies that the object
does not exist. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Null hypothesis<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
I sometimes hear the notion of null hypothesis being brought
up in God debates, although the context is never clear enough for me to
formulate it. Nevertheless, it does not seem that the notion is used properly,
so let me explain what it is about. <a href="https://en.wikipedia.org/wiki/Null_hypothesis">You can also read more on Wikipedia</a>.<br />
<br /></div>
<div class="MsoNormal">
In statistics, a null hypothesis is a set of assumptions about
available data. Statisticians use the data to calculate certain value called test
statistic (example: sample average). If the assumptions of the null hypothesis
are satisfied, then it is mathematically proven that test statistic should have
a particular probability distribution. This means that the test statistic is
very likely to take on some values and less likely to take on other values
(example: your null hypothesis is that man are on average 6 feet tall; it implies
that your sample average is not likely to be around 7 feet). If the statistic
takes a value that is considered unlikely (your sample average turned out to be
7 feet), it indicates that you should reject the null hypothesis. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
However, if your statistic takes on a likely value (your average
turns out to be 6.1 feet), it does not mean that you should accept the null
hypothesis. Virtually always, there exist multiple different null hypotheses that
could all be accepted. Sample size is never big enough to eliminate possibility
of unexpected random deviation (even though sample average is 6.1 it may turn
out that the true average among all men is 5.9 instead of 6 feet). <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Null hypothesis is a tool for proving negative. It is very
similar to proof by contradiction. You start with some assumptions. If you end
up with a result that is unlikely, your assumptions are likely to be wrong. But
having a likely result does not prove the assumptions, because even with different
assumptions, you may end up with the same result just by chance.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Gumballs in a jar<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
<a href="https://en.wikipedia.org/wiki/Philosophic_burden_of_proof">Wikipedia contains the following example</a> that explains
the burden-of-proof logic: there is a jar with gumballs. The number of gumballs
is either even or odd. There are two claims about reality:<o:p></o:p></div>
<div class="MsoNormal">
</div>
<ol>
<li>Number of gumballs is even.</li>
<li>Number of gumballs is odd.</li>
</ol>
If we have no information about the number of gumballs, then
we have to suspend our belief in both claims until evidence for any of them is
provided. This is the default position. End of the example.<br />
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The failure of this example is in the fact that it is
irrelevant, because there is no decision involved. To fix it, we can add in a
decision problem. Let us say that you have to make a guess whether the number
is odd or even and if you make a wrong guess (or refuse to guess) you will be <a href="https://www.youtube.com/watch?v=O1d7i3i0LLI">shot in the forehead with a Magnum</a>. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
Now the situation is quite different. In absolute absence of
information about the number of gumballs you will assign each claim a
probability of a half and pick at random. If on the other hand there is no
evidence except for somebody claiming that the number is even, you will not “disbelieve
this person by default until sufficient evidence is provided.” Instead, you
will choose “even” as your answer, unless you have reasons to believe that this
person may be misleading you. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Innocent until proven
guilty<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
Another popular example involves analogies to a court case.
In this scenario, a claim about the nature of reality is compared to a claim
that a person is guilty of murder. The burden of proof lies with the prosecutor
to prove the guilt, and judges (or jury, depending on the legal system) have to
produce a “guilty” or “not guilty” verdict (rather than “guilty” or “innocent”).
“Not guilty” in this case does not mean that the person was determined to be innocent.
It only means that there was insufficient evidence to ascertain guilt. In a similar
way, the burden of proof should lie with a person making a claim about the
nature of reality, and rejection of the claim does not automatically imply
acceptance of an alternative claim.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The argument that judges (jury) vote “guilty – not guilty”
is a word play. Recall that presumption of innocence is often phrased as
“innocent until proven guilty.” To keep the wording consistent with the
burden-of-proof logic, it should rather be phrased as “not guilty until proven
guilty.” But is it that these words have a deep significance to the logic of
the decision-making process? Or is it that they are based in tradition and do
not imply anything beyond their literal meaning?<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
In fact, a court decision is often a good example of how the
theory of decisions under uncertainty works. Both sides need to present their arguments.
There is both a prosecutor and a defense attorney who present different
accounts of the nature of reality. Based on their arguments, court assigns
probabilities to both stories. Then, within its legal constraints, court
considers costs and benefits of possible decisions it can make. Finally, a
ruling takes place. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The presumption of innocence indicates that courts ought to
be risk-averse in their rulings. That is, the probability of committing a crime
must be way above 50% for a person to be sentenced. This is a reflection of a
simple preference of our society: <a href="https://en.wikipedia.org/wiki/Blackstone%27s_formulation">we consider sentencing an innocent person to be a greater injustice than letting a criminal get away with his crimes</a>.
This is also valid from practical reasons: the information provided during a trial
is hardly ever complete and even judges are not perfectly rational, so we need
a great degree of certainty before we let them decide to ruin somebody’s life.
The reasons why decision-making process in courts is structured in such a way
are thus idiosyncratic. Using court rulings as a model for any decision is simply
wrong.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Evidence for claims
in science<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
‘Whenever scientists make a claim, they back it up with
evidence. You do not often see scientists making up unbacked theories’ another
argument goes.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
That is true, a significant part of science is about
assessing which claims about reality are true and which are false. For example,
the framework of null hypothesis discussed above is a tool of science that
serves exactly that purpose. But still, there are reasons why this analogy is wrong.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The concept of a god is not something new that was recently invented
by a mad scientist. Theism is the incumbent idea. Similarly, geocentric model of
the Universe was the incumbent idea in the medieval times. Are you saying that
Copernicus could just have said ‘I do not accept geocentric model of the
Universe because it has not met its burden of proof’ and people should have
been persuaded? Incumbent ideas usually have some arguments backing them,
however flawed. If you want to dismantle an incumbent idea, you must provide
new arguments to counter the old ones.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
But dismantling an incumbent idea is not enough. People need
information about the nature of reality in order to make decisions. If you
point out flaws in the only existing theory without providing an alternative
one, people have no choice but to still assign this theory probability 100%
when they are forced to make decisions. The only way to change that is to
introduce an alternative theory. And this new theory will require evidence. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
The fact that science focuses so often on single claims rather
than decisions has a good reason: efficiency of communication. It is much
easier to discuss a single claim about the nature of reality than a decision
that entails multiple claims or a single claim in context of all decisions it
can be part of. Nevertheless, scientists often provide examples of decisions
their work can influence, to show why it is relevant. And new theories hardly
ever appear in vacuum. Virtually always, there is some sort of incumbent theory
which needs to be replaced. For example, the arguments supporting germ theory
were made to convince people whose previous theory was that disease was a
punishment from God. To use a familiar analogy: a scientist is like a prosecutor
or a defense attorney. It is not their job to make a decision; their job is to
provide evidence in favor of their account of the nature of reality. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Extraordinary claims
require extraordinary evidence<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
For people who believe in a god, it is often as self-evident
that their god exists, as it was self-evident to medieval astronomers that the
Sun revolved around the Earth. Imagine that you are one of those medieval
astronomers. Somebody comes up to you and says that your claim about the Sun
revolving around the Earth is extraordinary and you need to produce
extraordinary evidence for it, otherwise your claim is unbelievable. This
sounds ridiculous. Just look at the Sun. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
It is all about perspective. Who decides what claims are
extraordinary and what type of evidence is required? Atheists may label theist
claims as “extraordinary” but they cannot just impose this labeling on theists
and expect them to accept it. If atheists want to have an actual dialog with
theists, they need to explain why theist claims should be labeled
“extraordinary.” This in turn entails providing and justifying and alternative
vision of reality, that is taking on the burden of proof.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
There are many claims made by theists that can easily be
recognized as extraordinary even by the people who make them. The communication
failure happens, when the rule “extraordinary claims require extraordinary
evidence” is applied across the board without making sure that the other side
agrees with the labeling and with what labels imply. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>The burden of proof<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
The decision to place the burden of proof on somebody who
claims existence is arbitrary. Theists often turn this argument on its head,
for example saying that we should then consider a claim that there exists a universe
without a god. The typical response from atheists is that it is a cop out. Is
it?<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
As I mentioned before, I consider only relevant questions. Both
existence and non-existence of a relevant object have their consequences (if
there are no consequences, then the object is irrelevant by definition). The
attempts to explain why we should prioritize one of these options over the
other are made only with examples of irrelevant objects, such as the celestial
teapot orbiting the Sun. To the contrary, people in general seem to be very
interested in establishing non-existence of relevant objects, especially if these
objects could threaten their wellbeing. Before walking into a gas chamber,
which of the following claims would you prefer to be proven: “Zyklon B is in
the chamber” or “there is no Zyklon B in the chamber?” <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The notion of default position and the burden-of-proof logical
framework do not hold up when faced with practical problems. They are flawed
and must be discarded. But should we abandon the notion of burden of proof entirely?<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
Burden of proof can be understood as a communication device.
It can imply what the presuppositions are and who should provide the arguments
to counter these presuppositions, like in the case of judicial trial. In common
discussions, the burden of proof lays often with the person who wants to change
beliefs of other people. In general, the burden of proof is most often on the
person who challenges the incumbent idea. There is nothing wrong with it. But stating
that it should always be applied in this or any other way and making a rule of
logic out of it requires justification, not mere assertion. <b><o:p></o:p></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Flying Spaghetti
Monster<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
Does it all mean that we have to debunk every possible
claim, no matter how ridiculous? <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Let us consider the example of the Flying Spaghetti Monster
(FSM hereafter). Let us imagine that the question of existence of FSM is
relevant, that is our decisions should be based on the true nature of reality,
otherwise there is some sort of penalty: you will be sent to FSM’s hell if it
does exist and you do not observe prescribed rites or you will be wasting time
and being obnoxious if it does not exist and you do observe the rites.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Regardless of whether the decision process happens in your
head or whether it is held in a public forum, one of the arguments can be: “FSM
does not exist because it seems to be made up by some people in order to troll
other people.” An argument in favor of alternative point of view may be: “I had
a personal revelation from FSM that he exists.” <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
A person perceiving such an exchange has to consider both
arguments and assign probabilities to corresponding claims. How well a person
evaluates the probabilities depends on the qualities of the person, for example
how knowledgeable or intelligent she is. If a person comes to a conclusion that
the first of the arguments has no merit and the second one is all that is
needed, it just means that the person has either no clue how to evaluate
evidence or no knowledge about contemporary societies. The discussion with such
a person about the claim itself is thus pointless. Instead, this person
probably needs to be educated how to evaluate evidence in general, and such a
discussion is recommended instead. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
On the other hand, a person who knows how to evaluate such arguments
will quickly conduct the entire reasoning in her head. It will happen in a
split second upon the first time she hears about the FSM. In fact, this happens
to most people. The results of this quick reasoning seem so obvious that people
often forget the reasoning even took place. So, yes, unfortunately every
ridiculous claim needs to be debunked. The good news is that it usually takes
less than the time needed to utter it. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Atheism<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
Atheism is most often defined as “a lack of belief in gods.”
Definitions often underline that it is not “a belief that gods don’t exist.”
The practical difference is that the latter definition includes only people who
thought about gods and concluded that they did not exist. The former
encompasses also people who have never thought about gods because this notion never
occurred to them as well as people who thought about gods but decline to provide
their stance. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Atheists often complain that people conflate these two
definitions. But the source of complaints is oftentimes not that individuals
got miscategorized, but because of the definitions’ supposed implications for
the burden of proof. In atheist worldview, the former definition shifts the
burden of proof to theists. The latter definition indicates that atheists are
making a positive claim which would require evidence and would place the burden
of proof on them. The question is: why people keep confusing the two
definitions?<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
A typical atheist neither goes to church nor observes other rituals
prescribed by religions. Most of the time, atheists know that if the claim
about God is correct, their wellbeing is in serious jeopardy. Nevertheless,
they keep on behaving as if gods did not exist. Yet they say that they are
atheists not because they think that gods do not exist. To the contrary, some
of them say that in addition to being atheists, they just happen to believe
that gods do not exist. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
Consider a rational person deciding whether to go to church.
Under the theory of decisions under uncertainty, the person has to assign
probabilities to at least two claims and evaluate costs and benefits of the
decision under each possible version of reality. Such a person would not go to
church only if probability assigned to “God does not exist” is high. Yet some atheists say that they evaluate only the “God exists” claim. They do not assign
probability to the claim “God does not exist.” How is that possible? There are
a few possible explanations for this paradox:<o:p></o:p></div>
<div class="MsoNormal">
</div>
<ol>
<li>Atheism is a vapid notion that has no implications on the
behavior of people under this label.</li>
<li>Atheists are irrational in their decisions.</li>
<li>Atheists are disingenuous by claiming that they do not hold
a certain belief and yet they consistently behave as if they did.</li>
<li>Theory of decision under uncertainty is wrong and cannot be
applied to this situation.</li>
</ol>
Back to the topic: the current definition of atheism
focusing on beliefs seems coherent with an alternative definition focused on
behavior: “an atheist is a person who behaves as if gods did not exist.” People
who consciously call themselves atheists, people who were not exposed to the
notion of a god, as well as the “undeclared” tend to behave as if gods did not
exist. There seem to be no need to change the definition. What needs to be
changed is the silly burden-of-proof logic.<o:p></o:p><br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Source of confusion<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
The entire essay could be probably replaced with a single
statement: “the claim that the default position and the burden-of-proof logical
frameworks are valid has not met its burden of proof; it should be thus
disbelieved by default.” However, as I am challenging an incumbent theory, I
feel obliged to provide as good arguments as possible. And arguing for the new
theory seems incomplete without speculating why the previous theory was so
readily accepted. I consider reasons to be the following: <b><o:p></o:p></b></div>
<div class="MsoNormal">
</div>
<ol>
<li>It is hard to realize that considering claims in isolation
does not make sense. You need to conceptually link up claims with decisions and
have a working model of decision making.</li>
<li>A lot of intellectual activity focuses on claims, especially
in science. It may seem natural to use claims as a basic unit and consider them
in isolation.</li>
<li>It is not in anybody’s interest to voluntarily give up an
advantage. Putting the burden of proof on theists is convenient for atheists. Maybe
this is why not enough effort has been made by atheists themselves to debunk the burden-of-proof
logic.</li>
<li>As Bertrand Russell pointed out, proving objectively
non-existence is in some cases impossible, especially if the object in question
is irrelevant (that is, it does not have a measurable influence on the people
who argue about it). Given the recent tendency of theists to roll back their
claims and to make them less and less relevant, it seems natural to demand more
evidence supporting such claims.</li>
<li>Some atheist feel like arguing against popular notion of God
is similar to arguing against Flying Spaghetti Monster. The idea just seems to
them so ridiculous that no arguments against it need to be made – on the
contrary, strong arguments must be made to support such an “extraordinary”
claim before it is even worth considering.</li>
</ol>
I hope that by now all these reasons have been cleared.<o:p></o:p><br />
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Consequences of
confusion<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
The last topic I would like to cover is why this is all
important.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
First of all, using faulty logic is never good. The quality
of conclusions that can be drawn from a discussion at hand is not its only
victim. Invalid patterns of thinking once adopted by people, can be used in
other discussions as well. Therefore, it is not just the conclusions about gods
that are at stake, but the entire body of logic and all future conclusions that
could be reached for bad reasons. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Second reason is the easily observable failure of
communication between atheists and theists. Theists often have hard time trying
understanding the argument about burden of proof because it is so unintelligible.
The reason for it is not that theists lack intelligence, but that the argument
is wrong. As a result, it is much harder to reach an agreement. Theists are
left unconvinced that what atheists are saying makes sense and atheists are
frustrated that theists do not want to accept their arguments. Such an impasse
makes it easier to create hard feelings and makes it less easy to carry out
meaningful debate leading to a conclusion. In a nutshell, use of faulty logic
can impede propagation of good ideas.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Finally, holding on to the burden-of-proof framework is highly
counterproductive from the point of view of atheists themselves. Theists oftentimes
leave the discussion with a feeling that atheists are disingenuous. Almost all
atheists behave as if they believe that a god does not exist. Yet they keep on
saying that it is not their belief. This clear discrepancy between words and
actions is easily noticeable and many theists feel perplexed once exposed to
it. And they cannot be blamed, if in the end they conclude that atheists are
selling them bullshit.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Disclaimer<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
I use labels “atheists” and “theists” in the context of
media personalities who recently dominated public sphere, mostly YouTube, as
well as people who respond to these personalities. This essay does not intend
to objectively represent views of groups that use mentioned labels but rather
addresses some of the arguments made by some people in these groups. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<o:p></o:p></div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<o:p></o:p></div>
Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com0tag:blogger.com,1999:blog-7351190971143493163.post-20690945762266146082015-07-18T19:10:00.001-04:002015-07-18T19:14:40.116-04:00Data scraping with C++<div class="MsoNormal">
Hello. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
My name is CText. I am a C++ class. I can read a text
file – usually an HTML or XML file. I can extract a lot of useful information
from it. I can find a piece of text enclosed by given strings. I can look for
it in a particular line or in the entire file. I can parse tables. I can parse
lists. I have worked with various data sources, including <a href="http://www.amazon.com/">Amazon</a>, <a href="http://www.christies.com/">Christies</a>,
<a href="https://www.epo.org/">EPO</a>, <a href="https://en.wikipedia.org/wiki/Factiva">Factiva</a>, and many more. I significantly speed up coding and
increase code reliability. Although I am probably not perfectly optimized, I am
doing my job well. I have to admit that I have been tested only with Visual C++
on Microsoft Windows. And I require an <a href="http://www.dekmiak.com/2015/07/my-c-utilities.html">additional header file</a> to
function. But I still hope I can be useful. The following program
illustrates my capabilities. The program<o:p></o:p></div>
<div class="MsoNormal">
</div>
<ol>
<li>downloads the GDP data from the World Bank website,</li>
<li>converts the GDP data and saves it to a CSV file,</li>
<li>finds the first line of the table in the file and displays
this line, and</li>
<li>retrieves the list of the countries and displays it.</li>
</ol>
<b>Sample code</b><o:p></o:p><br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="http://dekmiak.pl/download/datascraping.cpp">Download the source code</a> or copy and paste it:<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#include <iostream></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#include <andatathresher.h></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">using namespace std;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">int main()</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << "Hello World!" << endl;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>download("http://data.worldbank.org/indicator/NY.GDP.MKTP.CD", </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>"file.html");</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>CText txt("file.html");</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>CCSV csv;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>csv.data = txt.parsetable(0);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>csv.savetofile("gdp.csv");</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int line = txt.findline("<table");</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << "The line containing first \"table\" has the number " </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><< line << " and its contents is: " << endl << txt.line(line) </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span><< endl;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>vector<string> ctrs = txt.selectiveharvest("Country name", </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>"</table>", "<tr", "</tr>", "<a href", ">", "<");</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << "Here is the list of countries covered:" << endl;<span class="Apple-tab-span" style="white-space: pre;"> </span></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>for (int i = 0; i < ctrs.size() - 1; i++) </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cout << ctrs[i] << "; ";</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (ctrs.size()>0) cout << ctrs[ctrs.size() - 1] << endl;<span class="Apple-tab-span" style="white-space: pre;"> </span></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>system("pause");</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return 0;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Class members<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace;"><b>string content</b></span><o:p></o:p></div>
<div class="MsoNormal">
A field with the content of the file.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace;"><b>vector<int> separators</b></span><o:p></o:p></div>
<div class="MsoNormal">
A field that contains positions of new line characters in
the file.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace;"><b>CText::CText(const string &fname)</b></span><o:p></o:p></div>
<div class="MsoNormal">
A class constructor. Loads a file and performs its preliminary
analysis. A constructor without parameters can be called as well and file can
be loaded manually but one has to be careful about functions using lines. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace;"><b>bool CText::load(const string &filename)</b></span><o:p></o:p></div>
<div class="MsoNormal">
This function loads a file with a given file name, stores
its content in the field content, and performs its primary analysis. Returns
true upon success and false otherwise.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace;"><b>void CText::update()</b></span><o:p></o:p></div>
<div class="MsoNormal">
A method performing preliminary analysis of the file. It
updates the separators vector. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace;"><b>int CText::findline(const string &text, int pos = 0)</b></span><o:p></o:p></div>
<div class="MsoNormal">
This function returns the number of the first line that contains
given string. It starts searching in the file from the offset pos. Returns -1
if no line is found.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace;"><b>int CText::findinline(string &res, int line, const
string &before, const string &after)</b></span><o:p></o:p></div>
<div class="MsoNormal">
This function extracts a string from a line with the line
number given by line. The string that is directly after before and before after
is returned through reference res. The function returns offset of the found
string or -1 if it cannot be found. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace;"><b>int CText::findafter(string &res, const string
&prefix, const string &before, const string &after, int pos = 0)</b></span><o:p></o:p></div>
<div class="MsoNormal">
This function extracts a string from a file. It starts
searching from the offset pos. It looks for the first subsequent occurrence of
prefix and then for the first subsequent occurrence of before. The string that
is directly after before and before after is returned through reference res. The
function returns offset of the found string or -1 if it cannot be found.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace;"><b>int CText::findbetween(string &res, const string
&before, const string &after, int pos = 0)</b></span><o:p></o:p></div>
<div class="MsoNormal">
This function acts as findafter but with an empty string in
prefix. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace;"><b>int CText::geturl(string &res, const string
&pattern)</b></span><o:p></o:p></div>
<div class="MsoNormal">
This function looks for a line that contains string pattern.
Then it searcher for the first href HTML attribute it can find and returns its
content trough reference res. The function returns offset of the found string or
-1 if it cannot be found.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace;"><b>string CText::line(int index)</b></span><o:p></o:p></div>
<div class="MsoNormal">
This function returns line from the file with the line
number given by index. Lines are numbered from 0.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace;"><b>vector<string> CText::harvest(const string
&ldelimit, const string &udelimit, const string &prefix, const
string &before, const string &after)</b></span><o:p></o:p></div>
<div class="MsoNormal">
This function acts as selectiveharves but with empty strings
in starter and stopper. That is, it operates on the entire file.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace;"><b>vector<string> CText::selectiveharvest(const
string& starter, const string& stopper, const string &ldelimit,
const string &udelimit, const string &prefix, const string &before,
const string &after)</b></span><o:p></o:p></div>
<div class="MsoNormal">
This functions locates all strings that satisfy some
criteria and returns them as a vector. It operates only on the fragment of the
file that is after first occurrence of starter and before first subsequent occurrence
of stopper. Within this range function looks for pieces of text enclosed by
ldelimit and udelimit. Each such enclosure is supposed to produce one element
of the resulting vector. Within each enclosure, function performs procedure
similar to findafter and adds the result as an element to the resulting vector.
<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace;"><b>int CText::occurencies(const string& text)</b></span><o:p></o:p></div>
<div class="MsoNormal">
This function counts how many times given string can be
found in the file.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace;"><b>vector<TDataRec> CText::parsetable(int pos)</b></span><o:p></o:p></div>
<div class="MsoNormal">
This function parses an HTML table and returns it as a
vector of vectors of strings. It looks for the first table after offset pos. It
will not work for tables inside tables. For the definition of TDataRec type see
file anutil.h.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Class code</b></div>
<br />
<div class="MsoNormal">
<a href="http://dekmiak.pl/download/andatathresher.h">Download the source code</a> or copy and paste it:<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#pragma once</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#include <string></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#include <vector></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#include "anutil.h"</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#include <algorithm></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">using namespace std;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">/* INTERFACE */</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">class CText {</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">public:</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>string content;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>vector<int> separators;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>CText() {};</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>CText(const string &fname);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>void update();</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>bool load(const string &filename);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int findline(const string &text, int pos);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int findinline(string &res, int line, </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>const string &before, const string &after);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int findafter(string &res, const string &prefix, </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>const string &before, const string &after, int pos);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int findbetween(string &res, const string &before, </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>const string &after, int pos);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int geturl(string &res, const string &pattern);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>vector<string> harvest(const string &ldelimit, </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>const string &udelimit, const string &prefix, </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>const string &before, const string &after);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>vector<string> selectiveharvest(const string &starter, </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>const string &stopper, const string &ldelimit, </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>const string &udelimit, const string &prefix, </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>const string &before, const string &after);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>string line(int index);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int occurencies(const string &text);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>vector<TDataRec> parsetable(int pos);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">};</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">/* IMPLEMENTATION */</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">CText::CText(const string &fname)</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>load(fname);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">void CText::update()</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>separators.clear();</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>for (int i=0;i<content.length();i++) </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (content[i]=='\n') separators.push_back(i);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>separators.push_back(content.length());</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">bool CText::load(const string &filename)</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>ifstream infile;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>infile.open(filename,ios::binary);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (!infile.is_open())</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>{</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>content = "";</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return false;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}<span class="Apple-tab-span" style="white-space: pre;"> </span></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>stringstream cont;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>string line;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>while (!infile.eof())</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>{</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>getline(infile,line);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>cont << line << endl;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>content = cont.str();</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>infile.close();</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>update();</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return true;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">} </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">int CText::findline(const string &text, int pos = 0)</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (separators.size()==0) return -1;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int k = content.find(text,pos);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (k<0) return -1;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int i; </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>for (i=separators.size()-1; i>=0; i--) </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (separators[i]<k) break;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return i+1;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">int CText::findinline(string &res, int line, </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>const string &before, const string &after)</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int start = content.find(before,separators[line]);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int stop = content.find(after,start+before.length());</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if ((start<0) || (stop<0)) return -1;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (line+1<separators.size()) if ((start>separators[line+1]) </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>|| (stop>separators[line+1])) return -1;<span class="Apple-tab-span" style="white-space: pre;"> </span></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int pos = start + before.length();</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>res = content.substr(pos,stop-pos);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return pos;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">int CText::findafter(string &res, const string &prefix, </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>const string &before, const string &after, int pos = 0)</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int k1 = content.find(prefix,pos);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (k1<0) return -1;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int k2 = content.find(before,k1+prefix.length());</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (k2<0) return -1;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int k3 = content.find(after,k2+before.length());</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (k3<0) return -1;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>pos = k2 + before.length();</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>res = content.substr(pos,k3-pos);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return pos;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">int CText::findbetween(string &res, const string &before, </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>const string &after, int pos = 0)</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return findafter(res,"",before,after,pos);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">int CText::geturl(string &res, const string &pattern)</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int line = findline(pattern);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (line<0) return -1;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int pos = findinline(res,line,"href=\"","\"");</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return pos;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">string CText::line(int index)</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">{<span class="Apple-tab-span" style="white-space: pre;"> </span></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int start;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (index==0) start = 0; else start = separators[index-1]+1;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int stop = separators[index];</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return content.substr(start,stop-start);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">vector<string> CText::harvest(const string &ldelimit, const string &udelimit, </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>const string &prefix, const string &before, const string &after)</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return selectiveharvest("","",ldelimit,udelimit,prefix,before,after);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">vector<string> CText::selectiveharvest(const string& starter, </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>const string& stopper, const string &ldelimit, const string &udelimit, </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>const string &prefix, const string &before, const string &after)</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>vector<string> res;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int beginning;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (starter=="") beginning = 0; else beginning = content.find(starter);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (beginning<0) return res;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int finish;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (stopper=="") finish = content.length(); </span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>else finish = content.find(stopper,beginning);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (finish<0) finish = content.length();</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int start = content.find(ldelimit,beginning);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (start<0) return res;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int stop = content.find(udelimit,start);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>while ((stop>=0) && (start<finish))</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>{</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>string item;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int q = findafter(item,prefix,before,after,start);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (q>stop) item="";</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>res.push_back(item);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>start = content.find(ldelimit,stop);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (start<0) return res;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>stop = content.find(udelimit,start);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return res;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">int CText::occurencies(const string& text)</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (text=="") return 0;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int count = 0;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int pos = 0;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int k = content.find(text);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>while (k>=0)</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>{</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>count++;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>pos = k+1;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>k = content.find(text,pos);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return count;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">vector<TDataRec> CText::parsetable(int pos)</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">{</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>vector<TDataRec> res;<span class="Apple-tab-span" style="white-space: pre;"> </span></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>string temp = content;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>transform(temp.begin(),temp.end(),temp.begin(),toupper);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int p1 = temp.find("<TABLE",pos+1);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (p1<0) return res;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int p2 = temp.find("</TABLE",p1+1);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>if (p2<0) return res;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int p3 = temp.find("<TR",p1+1);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>while ((p3>=0) && (p3<p2))</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>{</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int p4 = temp.find("</TR",p3+1);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>TDataRec row;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int p5 = temp.find("<T",p3+1);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>while ((p5>=0) && (p5<p4))</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>{</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int p6 = temp.find(">",p5+1)+1;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>int p7 = temp.find("</",p6+1);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>string cell = htmltostring(content.substr(p6,p7-p6));</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>row.push_back(cell);<span class="Apple-tab-span" style="white-space: pre;"> </span></span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>p5 = temp.find("<T",p7+1);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>res.push_back(row);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>p3 = temp.find("<TR",p4+1);</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>}</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span class="Apple-tab-span" style="white-space: pre;"> </span>return res;</span></div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div>
<br /></div>
<div>
Let me know your experience!</div>
Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com0tag:blogger.com,1999:blog-7351190971143493163.post-37416713029918875872015-07-18T12:59:00.003-04:002015-07-18T14:44:18.601-04:00Alien invasion<div class="MsoNormal">
‘Yes, my little fish. What is your worry?’ said papa fish
folding newspaper.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
‘Is there life outside the Pond?’ asked little fish.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
‘There probably is. The Universe is very big... And it seems
to be made out of things we are made of. So extra-pondial life is very likely
to exist somewhere’ explained papa fish. ‘In fact’ he continued ‘we know that
there are other ponds out there similar to ours. We have already found some.’<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
‘Has anybody gone there?’ asked little fish.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
‘We don't have the technology yet. We have some flying fish
which can jump out of water for a few seconds, but to go to a different pond… it's
much more complicated.’<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
‘So how could life look like in these different ponds?’
little fish kept inquisitive. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
‘Oh, there is actually something that we can expect. There
are features of animals here in the Pond that evolved separately multiple times
and seem to be quite useful. We can expect that things like gills and fins are
likely to evolve in a different pond as well. Of course, it is silly to depict aleins
as fish-morphic creatures as they often are in the movies. Look for example how
different octopi are from us. But they have gills too.’ <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
‘Hm…’ little fish was thinking for a while. ‘When we meet
them, will these aliens be friendly or hostile? Will they try to conquer the
Pond?’<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
‘We can't be sure. But I believe they will be friendly. We
can exchange technology. And there is a plenty of uninhabited ponds. Why would
they need ours?’<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
After the conversation, little fish went to bed.
Unfortunately, it was the last conversation he had with papa fish. Little they
knew that as they spoke a band of humans rolled out their camping site next to
the Pond. Next day, early in the morning, one of the humans cast a net and
caught both little fish and papa fish, as well as a few others. It took them 20
minutes to die a painful death of suffocation in a fisherman’s bucket. And then
they were grilled and eaten. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
It is interesting to imagine how extraterrestrial life would look like. Finding
even simple life would have great philosophical and scientific implications.
But finding extraterrestrial intelligence is especially interesting. We could
learn a lot about ourselves just by observing other intelligence. Many things
we take as general truths could turn out to be products of our minds. Also, if alien
intelligence shows up somewhere close by, we may end up competing with them for
resources. And if they are technologically superior, then we are screwed. So
let us see what top scientific minds can say about how aliens would look like
and how our encounter with them could unfold:</div>
<div class="MsoNormal">
</div>
<ul>
<li><a href="https://www.youtube.com/watch?v=wk9LC-Cf8g4">Into the Universe with Stephen Hawking: Aliens</a></li>
<li><a href="https://www.youtube.com/watch?v=9RExQFZzHXQ">The Poetry of Science: Richard Dawkins and Neil deGrasse Tyson</a></li>
<li><a href="http://www.dailymotion.com/video/xmc5kn_curiosity-s01e02-alien-invasion-are-we-ready_tech">Curiosity - Alien Invasion: Are We Ready?</a></li>
<li><a href="https://www.youtube.com/watch?v=fkd3BVM7b94">Naked Science - Alien Contact</a></li>
<li><a href="https://www.youtube.com/watch?v=1fQkVqno-uI">The Fermi Paradox II — Solutions and Ideas – Where Are All The Aliens?</a></li>
</ul>
I am still very disappointed by anthropomorphism and "biomorphism" of the creatures they are discussing (maybe except for the last one). I want to strip these visions from their
biases and make them as realistic as possible. Although, I may identify some shortcomings but my thinking will be
still preconditioned by the experience of Earthly life. Therefore, all I hope
to achieve is to make an incremental improvement and pass the work on to
somebody who will identify the biases I overlooked. We deserve better aliens!<br />
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Meet a planet-eater</b><o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
I present you a planet-eater. This creature is a sphere, similar
in size of the Imperial Death Star (160 kilometers/100 miles in diameter) and
weights around 5 thousand trillion tons. It has a thick shell that along with
self-generated magnetic and electric fields protect the interior from cosmic
radiation and other dangers. The shell is able to withstand a high-yield nuclear
blast, as it is at least 20 kilometers (12 miles) thick. The bowels of the
creature contain among others resource silos as well as mechanical and chemical
plants that allow the planet-eater to create any device it needs. It is also
equipped with a fission and fusion cores that allow morphing some elements into
others.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The propulsion systems are built as they are needed. They
attach themselves to the creature’s surface and operate as long as necessary.
Then, they are hauled back inside where they are disassembled. The internal factories
are also able to manufacture probes, communication devices, smaller crafts able
to capture and haul asteroids or comets, repair robots, defense drones, exterior
silos, and so on. The list of blueprints includes everything that is needed to
be self-sufficient in the interstellar space. More devices can be designed on
the spot as needed. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The creature can equip itself with a multitude of sensors.
Data from these sensors are analyzed by an on-board supercomputer whose
intelligence is orders of magnitude higher than the total intelligence of all
humans who ever lived combined. The volume of the central unit is around two
cubic kilometers (0.8 cubic miles) and weights 4 billion tons. The
supercomputer has access to sensors inside the creature’s body. It also
monitors itself, thus meeting all necessary conditions for being
self-conscious. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Planet-eaters are semi-social species. It is hard to make a
random encounter in the interstellar space and if one happens, the help usually
arrives no sooner that after a few years. Each planet-eater is thus equipped to
do well on its own. However, whenever two planet-eaters meet, they quickly
exchange information they accumulated about the Universe and work together to
see if they can improve their blueprints or even totally redesign themselves.
They can work together to fend off enemies or solve problems one planet-eater
could not deal with on its own. There have been even cases of self-sacrifice. Their
social interactions can get very complicated and are intractable for a simple
human brain.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Planet-eaters are very rational when it comes to interaction
with other species. As with everything else, the decision on how to interact is
based on cold calculation of costs and benefits. Unfortunately, less advanced
creatures usually have nothing to offer them. They are at best ignored. Higher
creatures on the other hand, would be valuable partners but they in turn are
not interested in partnerships. Some of them just ignore planet-eaters; others
use them as their food.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
In fact, planet-eaters are one of the most primitive
inhabitants of the Universe. They feed on primordial matter so they will run
their course as soon as they eat up everything. They are small, week, and
stupid as compared to other aliens, like algae are small, week, and stupid as
compared to a whale. Finally, their ecological niche is small. The planets,
asteroids, and dust clouds on which they can feed constitute just 1% of the Universe
matter. The rest is contained in stars and other supermassive objects. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
They are certainly dwarfed by their more advanced cousins:
star-eaters (you may not realize that dark matter consists mostly of stars
currently being consumed by star-eaters). But their evolutionary advantage is
that they can multiply quickly, and they move relatively fast, so they can
reach distant places before other life forms. In fact, they are already present
in the Milky Way, and a number of planet-eaters are currently headed towards
the Earth (as well as several other adjacent solar systems). The first three
planet-eaters traveling together should enter our solar system within 15
thousand year. Others will come soon after.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Upon their arrival, planet-eaters will send probes to
analyze contents of our solar system and to plan how to use its matter most
efficiently. Running back and forth through the Solar System is not an easy due
to the Sun’s gravity. The routs must be carefully planned to minimize energy
expenditure. <o:p></o:p></div>
<div class="MsoNormal">
As they approach our solar system, the planet-eaters will
soon realize that there is something unusual going on in it. Namely, they will
detect human activity. They will send probes to examine us. Initially, the
probes will be orbiting from afar objects like Venus, the Earth, the Moon,
Mars, Ceres, IO, Callisto, and Titan, that is all places with our significant presence.
<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
They will intercept a lot of communication between us. These
pieces of intelligence will allow the invaders, still undetected by us, to land
some probes on the Earth and other celestial bodies colonized by us. Maybe a
few abductions will take place (but bodies will be discarded rather than
returned). Learning how we communicate will not be hard, and after connecting
to the Internet, they will know about us everything they need to know. Obviously,
they will learn nothing from us in terms of science. The most important thing to
learn will be that we will defend the rocks we inhabit using all measures
available to us, including nuclear weapons. We will be like insects crawling
over a fruit and stinging anybody who wants to pick it up. No hard feelings,
but you don’t want to be stung while eating, right?<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
While still in the outskirts of our solar system, the planet-eaters
will start to feed on rocks from the Kuiper belt in order to prepare the invasion.
After three dozen years of such preparations, the attacks will occur
simultaneously in all major population centers. Every celestial body will have
a form of attack most efficient for its circumstances. For example, the Earth
will have its atmosphere poisoned in such a way that most biological life will go
extinct within hours. Some facilities on the Moon will be nuked. Titan will
have its atmosphere heated so much that all human installations there will get vaporized.
And so on. There will be no need to engage in inefficient direct combat. Why
would you sting insects back if you can just blow them off?<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
In a few hours, human civilization will be reduced to rubble.
Only people in most remote space stations will survive. They will live not
because they will have been overlooked or because planet-eaters have mercy.
They will live because they pose no obstacle to further exploitation of the Solar
System and there is no point in wasting energy on killing them. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
No sooner than after several years the survivors will start
to partially understand what happened to their civilization and who the
adversaries are. But with limited spare parts and destroyed manufacturing
capabilities, the last humans will die three centuries after initial attack.
And the only reason to be proud of ourselves will be these three dozens years
it took to prepare the alien invasion. If we were less advanced, say at the
ninetieth century level, they would simply ignore our existence and
accidentally vaporize us here and there and then leave the rest to freeze and
suffocate. But the result will be similar. Even with all this advanced
technology, the last future human will freeze to death in a leaking undersurface
base on Iris. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
By then, the planet-eaters will be busy consuming the
planets of our solar system. There is no need to hurry – planet-eaters are usually
safe during the feast. It is unlikely that a threatening object would suddenly
appear in their vicinity, because flying even from the closest star would take
at least four years. And communication with neighboring systems will be
indicating that the area is safe.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
A contingent of harvesters manufactured in the belly of one
of the planet-eaters will land on the surface of the Earth. The machines will
gather resources and fly back to their master to replenish contents of its resource
silos. And while the planet-eater on the Earth’s orbit will be busy manufacturing
new minions, the robots on the Earth will start the slow process of
transforming Earth’s matter into bodies of new planet-eaters. It will take
long, as it will require cooling down the Earth’s core (all this iron and
uranium are especially valuable). But in the end, over hundred thousand copies
will be produced and only debris floating on the former Earth’s orbit will be
left. In total, the materials in the Solar System will be enough to create over
a million of fully functional and independent copies of planet-eaters. The
entire process will take around twenty thousand years. Then, the last
planet-eater will fly away, leaving the lone Sun behind. Star-eaters will come twelve
millions years later. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>A case for planet-eaters</b><o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Are we likely to encounter creatures like intelligent humanoids
or even spider-like aliens with silicon-based biology? We tend to create our
aliens in our own image. And we tend to create invasion scenarios in a way we
would probably invade. But we are in a short transitory state of technological
and intellectual progress. We are unlikely to stay this way for long and it is
unlikely that we will meet aliens resembling us, as we are right now. Aliens
may be billions of years of evolution ahead. They will have been flying in
space for billions of years. I expect a creature flying in space for that long
to actually evolve capability to fly in space. Analogically, you would not
expect terrestrial animals to carry around a bubble of water so that they can
breathe with their gills. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
But creation of first planet-eaters may be much quicker than
billions of years. The idea of self-replicating robots is not hard to come by
in science fiction. Add ability to travel in space and <a href="https://en.wikipedia.org/wiki/Superintelligence">superintelligence</a>
and you get a proto-planet-eater. It is likely that some earthling engineer
will eventually construct such a thing... that is, if we survive long enough. <o:p></o:p><br />
<br />
The <a href="https://www.youtube.com/watch?v=1fQkVqno-uI">video by Kurz Gesagt</a> is so good that I will address is separately. Many of their ideas resonate with me. However, self-replicating nanobots do not seem very likely to fare well on their own. They must be organized into a higher being. Otherwise, superintelligence is out of question. Without intelligence, they will lack adaptability and could be easily defeated by something with intelligence. Also, populating virtual world in a cozy neighborhood of a red dwarf may be fun until a technologically superior star-eater comes along. Reality check. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The key to thinking about aliens are evolution and natural
selection. The species that survives is the species that is best at acquiring
resources and making copies of themselves (or growing). Being intelligent and
having advanced civilization is a tool to improve this feature rather than
impede it. People sometimes feel noble as they try to protect the environment
and other species from extinction. Then, they think that the progress of our
civilization will eventually lead to the ultimate intra-special altruism and
they project this notion on their imaginary advanced alien species. This is
laughable. Don’t call yourself noble after giving to others some not-so-useful
scraps. Call yourself noble only after you restrict your population growth so
that there are more resources for other species. And even then, do not expect
intelligent aliens to do the same. Such an act of altruism is an evolutionary
disadvantage if you are competing with a different species for resources. On the
Earth we no longer compete, so we indulge in self-apotheosis.</div>
<br />
<div class="MsoNormal">
We humans tend to keep our heads in the heavens. But if we
ever meet intelligent aliens, we will be brought down to earth rather quickly.</div>
Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com0tag:blogger.com,1999:blog-7351190971143493163.post-6164313394922329672015-07-16T13:14:00.002-04:002015-07-16T13:16:37.052-04:00Will privatization save social security?<div class="MsoNormal">
In this article I explain two arguments that I have never
seen on the media or in any other setting, but which seem to be very important
to the debate about privatization of social security. I do not want to give a
general picture with an overview of pros and cons leading to a clear verdict. I
just want to present these two apparently neglected arguments as my
contribution to the debate. Also, I assume that you have some basic knowledge
about how social security works. If you do not – please read <a href="http://www.dekmiak.com/2015/07/social-security-explained.html">my previousarticle about this topic</a>. I am going to explain the arguments in detail
first and at the end I will present a "cocktail party version." Sit tight.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Social Security is
going bankrupt<o:p></o:p></b></div>
<div class="MsoNormal">
<b><br /></b></div>
<div class="MsoNormal">
Many people are concerned that social security is going bust
due to excessive future expenditure and insufficient future revenues. This is
indeed a legitimate concern. There will be problems if we continue business as
usual, although the problems are not as serious as some people paint them. Nevertheless,
the proponents of privatization use the prospect of bankruptcy as an argument
in their favor. Current system, so called pay-as-you-go, depends on the
contributions of current workers to fund pensions of current retirees. When
contributions dry up and the number of workers per pensioner dwindles, the
system is bound to collapse. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
On the other hand, in the private system, workers would
accumulate savings in their own private accounts. Upon retirement, pensions would
be drawn from these accounts. Shortage of money would not occur and demographic
change would not pose any threat. Therefore, using private sector instead of public
sector to handle pensions would not have led to the problems we are facing
today in the first place, and should avert similar problems in future. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
This argument seems neat at the first glance. But it suffers
from one serious flaw: it treats money as if its value does not change over
time. In other words, this argument is a product <a href="https://en.wikipedia.org/wiki/Money_illusion">money illusion</a>. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
By definition, economists are interested in allocation of
resources in the economy. "Who will produce what goods?" and "who will consume
what goods?" are the core questions of economics. Economists are interested in
money, because money is a tool to allocate resources. But money in itself does
not matter. The salience of money is derived from its ability to be exchanged
for actual goods and services. When money loses this function (for example
because of hyperinflation), it becomes irrelevant. Your material wellbeing does
not depend of how much money you have but how much actual goods you can buy. Analyzing
problem in terms of money is easy and often useful but sometimes it blurs the
underlying nature of the problem. So let us forget about money for a while and
analyze the problem in terms of goods and services.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
There are two groups of people involved in the problem. Domestic
workers create all goods and services that are available for sale in the
economy (with the exception of imported goods, but I will neglect the international
trade for clarity of reasoning). These goods are consumed by the workers,
pensioners, and other groups (like children, unemployed, etc. – for simplicity,
let us forget about them too). So how exactly are these goods allocated between
workers and pensioners? <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
In ancient times each person was creating goods mostly for
their own consumption. But modern economy benefits from division of labor,
where efficiency of production and quality of services are increased thanks to
specialization. Currently, each worker generates some amount of particular
goods or services. Then, workers can exchange and share the fruits of their
labor with other people. However, workers cannot take the entire value of what they
create for themselves. They have to give a share to the company owners in
exchange for capital and internal services like HR or IT (this is done
automatically so there is no conscious act of "giving"). They also have to give
a share to the government in form of taxes. Finally, they have to give a share
to the elderly through social security.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
To understand this process better, let us consider a very
simplified version of the economy in which there are only eleven inhabitants of
whom two are retired and nine are working. The economy is so simple, that the
only goods are burgers. Each worker is able to create 1000 burgers per year.
The people of this Burgerland decided to implement social security. There is a
payroll tax of 10% which is paid to fund pensions. Payroll tax means that
workers have to give 10% of the burgers they produce to the Social Security Administration
(SSA). As a result, each worker consumes only 900 burgers per year. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Because there are nine workers, SSA receives 900 burgers a
year. This is split between the two pensioners of whom each receives 450 burgers.
As a result, the retirement replacement ratio, that is the value of pensions in
relation to salary received before the retirement is 450/900 = 1/2. Every
worker can expect to receive upon retirement half of what they were earning
while working. In other words, thanks the payroll tax, the resources of the
economy are redistributed to the elderly in such a way so that they have half
as much per person as the workers. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Now, let us fast forward several decades. We observe that
productivity increased thanks to technological progress. Every worker is now able to create 1500
burgers, an increase in productivity of 50%. We also see that a demographic
change has occurred. Although there are still eleven people in the country,
only eight are workers and three are retirees. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The payroll tax has been kept at the same rate: 10%. Each
worker contributes 150 burgers and consumes 1350 burgers. The total income of SSA
is 8*150=1200 burgers and this is split equally among the three pensioners who
receive 400 burgers each. You can see that the replacement ratio is 400/1350
which is less than 30%. Every worker expects to receive less than 30% of their
salary upon retirement. Compare it to the
50% in the previous situation and you see a significant drop in benefits!<o:p></o:p></div>
<div class="MsoNormal">
This is similar to the situation which our real-life social
security is bound to face in the future. There will be fewer people providing
goods and services who pay payroll taxes and relatively more people buying
these goods and services. As a result, the replacement ratio must fall or contributes
must rise. These changes are imminent and will occur regardless of increases in
productivity and changes to the country's GDP. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
How is privatization supposed to solve this problem? Let us give
privatization the benefit of the doubt. Let us say that in the first period the
nine workers were saving 10% of their income – that is they were consuming 900
burgers a year each. The two retirees had 50% replacement rate – they were
eating 450 burgers a year each. Now, fast forward several decades and we
observe that economic progress increased productivity to 1500 burgers per
worker per year. Thanks to privatization we managed to somehow keep the
contributions at 10% and the replacement rate at 50%. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Everything is perfect... but wait a minute! There are eight
workers, each consuming 1350 burgers a year. There are three retirees each
consuming 675 burgers a year. So in total, there are 8*1350+3*675=12825 burgers
consumed in this economy per year. But there are only 8*1500=12000 burgers
produced in the economy per year! The numbers do not add up. In fact, there are
not enough burgers for retirees to buy with the money they have. Something must
have gone wrong!<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
This is the key to the problem. The root of the issue is the
demographic change. There will be relatively fewer people creating goods and
services and more retirees consuming these goods and services. Fewer producers
and more consumers mean that somebody has to lose. Workers must share more with
retirees or retirees must consume relatively less. There is no way around it. Privatizing
social security is similar to using creative accounting to solve financial difficulties
of a company. It does not make the problem go away, it just hides it
temporarily. Privatization blurs the picture and makes us unable to identify
who is going to be hit the most by the demographic change, whether they will be
hit abruptly or gradually and when they are going to be hit. Note that factors
like inflation, economic growth, and so on, are here irrelevant.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
You may wonder how would a real life privatization scenario
look like, as our Burgerland does not seem to be very realistic. If
privatization was successful, we would have an increasing population of elderly
with big savings account and a decreasing fraction of workers. They are areas
of the country where elderly people tend to concentrate (e.g. Florida). In such
places the number of people requesting services will increase and the number of
people who can serve them will decrease most significantly. In order to
compensate for the changes in demand for and supply of goods and services,
prices will have to increase. The most affected will the de goods that the elderly
buy. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Let us consider health care. The increasing number of
elderly will force hospitals to employ more doctors. Either doctors will have
to be paid more to entice people who would otherwise choose other professions,
or less qualified people will become doctors out of necessity. Most likely, we
can expect a combination of both. This results in higher prices and lower
quality of health care. On top of that, since more doctors means fewer people
available to other professions, the prices of other goods will rise as well,
although not as much. Such inflation can potentially wipe out savings of the
elderly clustered in places like Florida. And their life will be in general
tougher. Imagine a town full of elderly in which the last grocery store is
closed due to a lack of work force. This may be a stretch but it illustrates
the type of problems they would face thanks to demographic change. Privatization
of social security is not going to change it.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
In a summary, the root of all evil is the demographic
change. There will be relatively fewer people producing goods and more people
consuming them. Somebody will have to lose. Thinking that privatizing social
security will solve this problem is based on a mistake. Ensuring that money adds
up is not enough. Value of money can change over time and what in the end needs
to add up is not money but the amount of goods and services produced and
consumed. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Privatization will lead to higher returns </b><o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The rate of return you receive from social security depends
on your income. Social security was designed to reduce poverty among elderly. No
wonder that people who made little money through their lives receive relatively
higher pensions. For them, the rate of return is the highest and can reach <a href="http://www.reuters.com/article/2012/10/18/us-column-miller-socialsecurity-idUSBRE89H0YG20121018">above6 percent</a>. For people making a lot of money, return on social security is
negative – that is they pay more in payroll taxes than they receive in
benefits. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Although the richest people would potentially benefit the
most from the privatization of social security, the argument goes that it would
boost efficiency of the system as a whole. The average rate of return from
social security is currently quite low in comparison to average returns from,
say, US stock market. If the money from payroll taxes was invested in the stock
market, retirees would be surely better off.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Again, this argument makes sense at the first glance but
falls apart after closer examination. The flaw here is the assumption that the
same rate of return can be maintained for all these new savings created by the
privatization. It is against the law of supply and demand. The more capital is
there, the lower the interest rate.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Notice that in practice the money held in private retirement
accounts would be taken care of by pension fund managers. To make a return on
the contributions, they would have to buy some financial assets, be it stocks,
bonds, or other securities. The higher demand for the financial assets, the
higher their price and the lower the returns per amount invested.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Some people may think: yes, but availability of all these
new capital will surely increase investment and thus lead to higher economic growth
rates. That is to an extent true, but a clarification is needed. New enterprises
and economic growth are not going to massively pop up out of nowhere just
because new money for investment is available. New business ideas will probably
continue to emerge at the same rate, just more of them will get funding. And
guess what – financial markets tend to allocate capital to best, most promising,
or safest investments. The new projects that would potentially get the
additional money will be more risky and with lower expected profitability. In
other words, increase in the amount of capital available will not magically
increase the amount of capital needed. The shift of the capital supply curve to
the right will not magically induce the shift of capital demand curve to the
right. Rather, we will move along the demand for capital curve, towards the
interest rate of zero.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX4ukItH6HmGAFoWMH_I-WNpVbGsRlVCv_qLf4dLadNOj7vEZRSF7ZTv905lWKf7gQBsWLTqbhbOa-aXVsdrj92wGsTOHJZXROcpJDVkpsyFg3KMZstYbQSQzrdE88QjJJ6Q8-Vx-iYTcQ/s1600/2e2cc4f138380eb8040c6c200068ba5f.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiX4ukItH6HmGAFoWMH_I-WNpVbGsRlVCv_qLf4dLadNOj7vEZRSF7ZTv905lWKf7gQBsWLTqbhbOa-aXVsdrj92wGsTOHJZXROcpJDVkpsyFg3KMZstYbQSQzrdE88QjJJ6Q8-Vx-iYTcQ/s320/2e2cc4f138380eb8040c6c200068ba5f.jpg" width="307" /></a></div>
<div class="MsoNormal">
<i>Source: <a href="https://lumen.instructure.com/courses/196787/pages/Section16-20?module_item_id=4541726">instructure.com</a></i></div>
<br />
<div class="MsoNormal">
Of course, if the amount of new capital on financial markets
is not too high, the change in the interest rate will be negligible. So what is
the amount of savings that would be accumulated if social security was
privatized? There are a few ways to estimate that amount. For simplicity, let
us assume that people would contribute as much as they do today. We can then
just take the total annual contributions to social security ($650 billion) and
multiply it by the average number of years worked by a worker (40). As a result
we get around $25 trillion dollars of savings that would be managed by the
pension funds under privatized social security. This is more than
capitalization of the entire US stock market. Such an amount will have a profound
impact on rates of return.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
How sensitive is the market interest rate to an increase in
the supply of capital? As often in economics, it is probably impossible to
discern a general economic law in this regard. The answer will most likely
depend on numerous circumstances like the source of the funds, the risk
preferences of the fund managers, legal constraints, current market conditions
(are investors bullish or bearish?) and so on. Recent experiments with
quantitative easing can give us a clue. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The objective of quantitative easing was to reduce long-term
interest rates in order to spur economic activity. Central bank (Fed) buys very
safe financial assets (e.g. government bonds), hoping that the investors who sold
them would do something productive with their money, for example buy corporate
bonds or make loans to companies. <a href="http://www.nber.org/papers/w17555">As recent research shows</a>, there
are many investors who have a preference for some class of financial assets.
For example, some financial institutions are forced by law to put some fraction
of their money in very safe assets like government bonds. They cannot simply
substitute this investment with some more risky assets. As a result,
quantitative easing has much weaker effect on the interest rate paid by debtors
who contribute to economic growth (start-up companies, credit card owners,
etc.) and a strong effect on interest rates of the assets that are actually
purchased by the central bank (that is government bonds).<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The amount of money spent during quantitative easing is an
order of magnitude smaller than the market capitalization of the bonds that
were purchased through it. Yet it had a significant effect on their interest
rates. And now, we are to believe that dumping a pile of cash greater than the
entire US stock market capitalization onto financial markets is not going to
depress rates of return. No, the correct assumption is that the privatization
of social security will depress interest rates significantly. If proponents of
social security privatization argue otherwise, they must explain why this is
not going to happen. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Let us summarize. Privatization of social security will
generate a huge pile of savings. We know from experience that much smaller
injections of capital into financial markets tend to depress interest rates. Assuming
that the interest rate would be the same with and without privatization of
social security is clearly nonsense.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b>Cocktail party version</b><o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
If you want to show off at a cocktail party, you will need a
simplified and concise version of the arguments. I do not guarantee, that
everybody is going to understand them. Actually, I guarantee, that somebody is
not going to understand them. But you can always try. Disclaimer: I do not take
responsibility for tears and bruises.</div>
<div class="MsoNormal">
</div>
<ol>
<li>Privatization of social security won’t save the underlying
demographic problem. If you want to see why, imagine that no new people are
born and eventually everybody in the country becomes retired. With privatized
social security, it is very nice that everybody has their own accounts full of
money. But there is nothing to spend this money on because everybody is retired
and nobody is manufacturing goods and providing services! With social security
as it is right now, the demographic problem can be clearly seen. With
privatized social security we just do creative account to temporarily hide the
problem. But we do not solve it!</li>
<li>Comparing historical stock market rates of return to
historical social security rates of return does not make sense. Privatized
social security will significantly increase the stock of savings in the
economy. And we know that more savings means lower interest rates from the simple
law of demand and supply.</li>
</ol>
As I mentioned, there are more economic arguments in
this debate. In this article, I decided to focus on these two only.<br />
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
Good luck with the rest.<br />
<div class="MsoNormal">
<o:p></o:p></div>
Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com0tag:blogger.com,1999:blog-7351190971143493163.post-7206502924605801732015-07-15T20:09:00.000-04:002015-07-16T13:17:52.363-04:00The shape of the rainbow<div class="MsoNormal">
Have you ever wondered how would the rainbow look like as
seen by an animal that has different vision spectrum than human? Just posing
this simple question should lead to a quick conclusion that we see just a part
of the rainbow – the part that shines with the colors we can perceive. The
rainbow extends both into infrared and into ultraviolet and the only reason we
can’t see it, is because our eyes can’t perceive these “colors.” <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
If you were able to see all parts of the electromagnetic
spectrum, you would see that the rainbow is made of a number of separated arcs of different width and brightness.
This is because the Earth’s atmosphere is opaque to many light frequencies, for
example high energy ultraviolet and most of the infrared spectrum. Also, keep
in mind that the reason why rainbow emerges in the first place is because light
rays going through water are scattered. Anything that cannot be scattered by
water droplets is then out of the picture too. This includes some microwaves (water
is opaque to microwaves, this is why microwaves boil water, duh!) and radio
waves (anything with wavelength comparable to or exceeding the size of a
droplet cannot be scattered by it).<br />
<br /></div>
<div class="MsoNormal">
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN1lkcYiTA7HOnC9gnmWqbCnDSme1u33Evz2PCRlRdFAqxuLacF6POW9eCGI6kuIP7UxzwJwv2lvSRe4z3ewqPGsiXNL-XGORrLhYTodZoS0IEVAml7NL-BBfKMIP7VH4U24K08A2BBtnr/s1600/1650px-Atmospheric_electromagnetic_opacity.svg.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="188" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN1lkcYiTA7HOnC9gnmWqbCnDSme1u33Evz2PCRlRdFAqxuLacF6POW9eCGI6kuIP7UxzwJwv2lvSRe4z3ewqPGsiXNL-XGORrLhYTodZoS0IEVAml7NL-BBfKMIP7VH4U24K08A2BBtnr/s400/1650px-Atmospheric_electromagnetic_opacity.svg.png" width="400" /></a></div>
<i>Source: <a href="https://en.wikipedia.org/wiki/Electromagnetic_spectrum">Wikipedia</a></i><br />
<br /></div>
<div class="MsoNormal">
As a matter of fact, if the lens in your eye was not opaque
to ultraviolet light, you would be able to see it (<a href="https://en.wikipedia.org/wiki/Aphakia">and some people do, after removal of their lenses</a>)! An interesting fact is that ultraviolet is not
perceived by cones (which are the cells responsible for perceiving color) but lower wavelength ultraviolet is perceived by rods (which are the cells which perceive light intensity). Thus, if not for the lens, something
glowing in ultraviolet would just look brighter, but would not give it any
distinct color you could name. Your brain would not be able to
distinguish between something glowing green and ultraviolet and something
brighter glowing just green (or glowing green and white). If you looked at
the rainbow, the arc next to violet would just make the colors of the
background brighter.</div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
Next time look carefully, maybe it does!<br />
<div class="MsoNormal">
<o:p></o:p></div>
Dekmiakhttp://www.blogger.com/profile/02909753077833943086noreply@blogger.com0