Blog of Sara Jakša

The Constant Attention

What is your intention focused on right now? I recently started the class on the first person research, and we spend a lot of time going over our our experience. For example, my problem solving most of the time is either asking myself questions in the inner voice or placing verbal words into space.

Because of that, I have became more aware of where my attention is focused on. And is it a sad thing that most of my attention is spend on the inner voice. I have commentary on the random concepts or ideas, I am arguing with myself, I am analysing my own thinking and actions and so on.

I wonder is this is why I found walks making up some story so relaxing. My inner voice had something simple, but interesting to do.

I then talked to a guy at my class, who has the introverted intuition (Ni) for the dominant function. He was saying that he just observes what is going on all the time, without evaluating it.

I wonder if this has something to do with the differences in Jung's functions. My dominant function, which is introverted thinking (Ti) is concerned with building theories, regardless of the outside data. And this is why my inner voice is doing. It tries to build the theories, but even I am aware, that at this stage they are most likely not a good way to explain the world.

I will be the first one to admit, that I still don't understand the introverted intuition (Ni), but from what I understood from conversations to the Jung's writings, introverted intuition is a constant sensation of the inner world. It is like they are constantly aware of the experience they are having. Which is quite similar to what he said it is happening to him when experiencing.

So I started to wonder if other functions are the same way. I have a little understanding of the mentality of the extraverted feeling (Fe), even if I lack their tools. People with extraverted feeling evaluated the meaning of everything based on the group's opinion. Their attention goes to being constantly aware of how the actions are going to be perceived.

While the extraverted intuition (Ne) is more concerned with new possibilities of already existing objects. So the mentality of the extroverted type is similar to the brainstorming sensing going well. There are just constantly new ideas, which leads to new ideas, which leads to new ideas,...

The others would be just conjunction, but extroverted thinking type (Te) could potentially keep their attention on the data and rules, introverted feeling (Fi) on their feelings (not emotions!)? values?, introverted sensing (Si) on the impressions that it is getting, and extraverted sensing (Se) on the outside world perception.

Makes me wonder how much this changes the perception of the world...

Easy Coconut Pie Recipe

Coconut Muffin Pie

I had described how did I help my sister bake chocolate muffins. While I was guiding her, I was doing the similar recipe next to her, in order to show her, what quantities to use. The only exception was, that hers was chocolate and my was coconut.

I blame my mother for the coconut. She asked my to buy her a coconut flour, but then she never used it.

Ingredients:

  • Flour
  • Sugar
  • Coconut flour
  • Baking Soda
  • Sunflower oil
  • Milk
  • Chocolate

Recipe:

  • Mix flour, sugar, coconut flour and baking soda
  • Add oil and milk, until all of the mixture is wet
  • Put the mixture in the pan for pie. Put first half of the mixture, then pieces of chocolate, and then the rest of the mixture.
  • Bake on the 180°C for 30 minutes.

Suggestions:

  • While not as bad as the nuts, the coconut flour did seems to dry the mixture. That is why I recommend using more oil than for other recipes.

Easy Chocolate Muffins Recipe

Chocolate Muffins

My sister asked my to show her how to make chocolate muffins with melted chocolate in the middle. I accepted the challenge, and decided to show here how it is done.

Thought I am still not sure, how can muffins be a good return favour. Well, maybe one day I will understand the social expectations.

Ingredients:

  • Flour
  • Sugar
  • Cacao
  • Baking Soda
  • Sunflower oil
  • Mlik
  • Chocolate

Recipe:

  • Mix flour, sugar, cacao and baking soda
  • Add oil and milk, until all of the mixture is wet
  • Put the mixture in the pans. In the middle, put a piece of chocolate
  • Bake on the 180°C for 15 minutes.

Suggestions:

  • To check if it is finished, put the toothpick in the muffin. If it comes out clean, then it is done
  • Make sure to not put it in the middle, because there it would get dirty by melted chocolate

What to Use for Learning Better?

There was a really interesting meta study in 2013, where they were comparing the 10 different study techniques. They had the ones that they though that students are using a lot, or the ones that they though that they hold promise.

They managed to show that most of the people in school learn ineffectively. They read the chapter. They summarize the chapter (inefficient). Then they reread their notes (inefficient). They usually do it a couple of days before the exam (inefficient).

Though, to be fair, some of the people do practice problems. If they try to solve them for themselves (very efficient), that is good, but let us admit, that is not how it is usually done. Most people just look over the solutions and copy it (inefficient).

It kind of remind me of people using learning styles, like VARK (visual, auditory, reading and kinestetic) to learn. People use them, but there quite a scientific agreement that they don't really work. Even if they admit that people have preferences. They just don't help.

There are two techniques that were found to be very effective. Spaced practice and practice testing. We have encountered one of them at the top: when I described students doing practice problems.

That is the reason why maths teachers always gave us homework. I know I usually did not do it. It was too easy, and therefore boring. On the other hand, if she gave us some hard problem, then I usually did it.

There were also three techniques that could be useful, but they don't have enough scientific support. These are interleaving, elaborate interrogation and self explanation.

So how did I use these techniques in my own learning? I usually start with reading am article or a book, or with listening to the lecture. I take notes and make a summary (summarizing - ineffective). They I put all of the important concepts into Anki, which that quizzes me on it (practice testing - effective). Based on how well I evaluate myself, the program then decides when should I review it next (spaced practice - effective). I also have all of my material there (interweaving – moderately effective).

If there is something I don't know, then I either do some practice problems or try to use is in practice (practice testing - effective) or I walk up and down and try to explain it to myself (self-explanation – moderate effective). Which one do I use depends mostly on the subject.

After using the upper methods, I then know what do I have problems with. Then I attack it with different methods to gain understanding: from self-explanation (moderate effective) to summarizing (ineffective) and visualizing (ineffective). When I understand it, then I go back to the Anki system. Yes, I am aware I depend to much on one small program.

I think it is important that from time to time, each one of us makes a stock of learning method and technique. It is only by accurate information and together with science knowledge, that we are able to improve ourselves.

I Am Looking for A Way to Organize Notes from Reading Research Articles

Recently I am dealing with the problem of how to keep track of the scientific articles that I have read. Since starting cognitive science masters, the number of articles that I read had risen exponentially. Partly this is my fault, as it is just too interesting to stop researching.

So here I am going to explain what I did so far.

My first idea was to have the descriptions of the different concepts in the LaTeX, where I would use bib to keep track of the references. It quickly become clear that this is not going to work. So, for example, where to put the article from the Kobayashi Chiyoko (2008)?

I could put it in the neurological part, where I put all the research connected to brain parts. Or I could put it in the part connected to the theory of mind. Or at the part where I described the behavior language differences.

Even if I put the relevant information, where do I put the description of the experiment? My undergraduate education is from the Business Informatics, so I am allergic to information duplication in any kind of database. And this would be a database. Originally I thought that I could solve the problem with linking, but linking in LaTeX, while well supported, is still not natural for me.

Then I came across this article from Cal Newport describing paper research wiki, so I decided to try this way. Instead of his suggestion to use PBworks, I ended up using DokuWiki wiki for one reasons, I prefer working without internet a lot of time. But I guess an online based tool would be better for a person that uses multiple devices.

This one was a lot better at least in the terms of linking. The problem that I have now is not connected with the technological part, but more of a motivational one. Just because it is possible to link all knowledge, does not mean I do it. So far most of my data is written as notes on the articles. And for that I could have easily used LaTeX.

But I can see potential in the future. I hope that I picked the structure, that I could continue using.

My First AUR PKGBUILD file

When I decided to use the Tumblr as at source of data for my school project, I was looking for some sort of Python wrapper for Tumblr API.

Thankfully, there there was one already written for Python2. I might prefer Python3, but I am not about to complain. There was one problem. I am using Arch Linux, but I could not find this package either in the 'usual' repositories, nor in AUR.

I am aware there I could be installing the packages with the pip. But I remember the mess that I eventually created when I was using Ruby. Some packages were installed though pacman, some through gems, and on the end it was hard to know what did I had on my computer. So with Python, I have been clearly staying to installing through pacman only.

The one thing that I did was simply look at the three other PKGBUILS files to try and figure out what to do. For explanation of the variable in the first part of the file, the Arch Linux documentation was helpful. For the actually building the package, not that much. In that case, I was copying and editing the lines from other PKGBUILT files.

I had some troubles, until I eventually managed to get it installed. And only then did I realize that I can't use it, because it requires the python oauth2 package. I am glad that I managed to find out what was wrong that quickly. On the other side, I already have quite a couple of python packages installed on the computer and I would not know if any of them are also dependencies.

I don't let it bother me much, as right now it is working.

I also tried to [upload it to the AUR], but the rules that they reference on the first page are not something I want to deal with. So I am only publishing my PKGBUILD here.

    # Maintainer: Sara Jakša <sarajaksa@gmail.com>

    pkgname=python2-pytumblr
    pkgver=0.0.6.r114.dfae962
    pkgrel=1
    pkgdesc="Python wrapper for Tumblr API"
    arch=('any')
    url="https://github.com/tumblr/pytumblr"
    depends=('python2' 'python2-oauth2')
    makedepends=('python2-setuptools' 'git')
    source=("pytumblr::git+https://github.com/tumblr/pytumblr")
    sha256sums=('SKIP')


    pkgver() {
        cd "${srcdir}/pytumblr"
        printf "%s.r%s.%s" "$(python setup.py --version)" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
    }

    package() {
        cd "${srcdir}/pytumblr"
        python2 setup.py install --root="${pkgdir}/"
    }

I will most likely figure out the whole AUR quality rules one day. When I will actually have the time or needed it more.

This Blog Now Have Syntax Highlighting

From time to time I write some snippets for code on my blog. So I was wondering if there is an easy way to do a code highlighting. I know I am not going to do it by hand. I tried that once, since I did not have a nice way to copy the code into word with syntax highlighting. I did not consider this function necessary enough to do it that way. It was disheartening.

The first solution that came to mind was to use a markdown that also has a syntax highlighting. This was eventually a dead end for me. I could not make it work.

The second one was to use some JavaScript library. Thankfully, the first result on the google ended up being the one that I ended up using.

Setting it up was fairly simply. They let people build the package of only the languages they will use, which in my case, at least for now is Python and R.

Then there are three lines of code, that I needed to put in the head of the template, and two files that I needed to transfer, one css and on javascript file.

I would like to say, that it worked. It did not. For some reason the class for my code block was generated in a way that is stopped highlighting from working. This was easily solved by adding the ```name-of-language on the beginning of the code block in my markdown file, and the ``` on the end.

I simply took one possible scheme. It works and that is important for me at this point. Maybe one day I will play with it, but not now.

How to get Tumblr Posts with API

I need to create a project for my Business Intelligence course, which involved making some sort of prototype. It needs to be some sort of model, be it anything from OLAP cubes to text mining and sentiment analysis to dashboard for data visualization.

I eventually decided that I wanted to make a application for discovering the MBTI type from the words that people use. There is some research, that shows that people use different words depending on their Big Five personality results. So there is some merit in this project.

Originally I wanted to use twitter, because it is one of the three big social networks (I think they are Facebook, Twitter and LinkedIn), but they require the phone number to use their API. And I am not paying to get a phone, just so I would be able to use their data. And I did not saw much of MBTI conversations going on in the Facebook or LinkedIn.

On the other hand, I was aware of quite a couple of blogs on Tumblr that I could use in my research. So it seems to be a good alternative. Might not give such an accurate results. We will see.

I currently found out how to find posts by tag, get each post, and from the posts, get to the blog description. This should be helpful in finding out in the systematic way, which blogs have MBTI code written in description. So far I figured if there is only one MBTI code, then this blog belongs to that code.

Here is the code for that:

    import pytumblr
    import re

    #this is a regex, to be able to get the url of the Tumblr blog from the url post
    tumblr_url = r"\w+.tumblr.com"

    # Authenticate via OAuth
    client = pytumblr.TumblrRestClient("put your keys here")

    #find one posts tagged MBTI
    post = client.tagged('MBTI', limit=1)

    #get information out of the post
    i = 0
    post_id = post[i][u"id"]
    title = post[i][u"title"]
    body = post[i][u"body"]
    tags = post[i][u"tags"]
    post_url = post[i][u"post_url"]

    #now find the blog url from the post url
    user_url = re.search(tumblr_url, post_url)
    user_url = user_url.group()

    #get the information about the blog
    fictionalcharactermbti = client.blog_info(user_url)

    #get blog description and number of posts
    blog_description = fictionalcharactermbti[u"blog"][u"description"]
    number_of_posts = fictionalcharactermbti[u"blog"][u"posts"]

    print(post_url)
    print(title)

    print(user_url)
    print(blog_description)
    print(number_of_posts)

Presumptions and Programming

Last week, a teacher asked for a volunteer in school to do a data visualization project. I volunteered, since I figured that in the worst case scenario I will brush on some of my programming skills. Yes, even from the start I did know I will do it by programming, and not in any kind of program for graphics.

The professor only said that he wanted a timeline, and he did not want to share with me what it is going to be used for. He did say that he hoped it will help him prove a point.

When a person mentions timeline, the picture below is something that I get in my mind.

Timeline - Inventions

I got the homework from all my classmates and I am supposed to create a timeline of important inventions and discoveries. The upper one is the timeline of what I wrote down were five the most important discoveries.

I used the file that looked like this:

year    discovery   name
-650    Number 0    Brahmagupta
-360    Dualism Plato
1600    Magnetism   William Gilbert
1859    Evolution   Charles Darwin
1900    Quantum Mechanics   Max Planck

And down below is the code to produce the upper plot:

    data <- read.csv("data.csv", header=TRUE, sep="\t")

    data$weight <- 1
    data$yearplace <- runif(5, -0.7, -0.2)

    png("Discoveries.png")

    plot(data$year, data$weight, type="h", frame.plot=FALSE, axes = FALSE, xlab="",ylab="", xlim=c(min(data$year),max(data$year)+100), ylim=c(-5,7))
    abline(h=0,lwd=2)
    text(data$year, 3, data$discovery, cex=1, srt=90)
    text(data$year, data$yearplace, data$year, cex=0.75) 

    dev.off()

The timeline that I needed to create had 5 discoveries from each person. And then another one with around equal amount of data for inventions.

Where I came into the big problems, as most inventions happened in the last 2 centuries, but the earliest one was more than 100.000 years ago. I am talking about fire. The problem was how to put something like that on any kind of meaningful scale. I prepared the version with just information from the last 1000 years and one with the logarithmic scale, showing how many years ago it had happened.

When I showed the timeline to the professor, it ended up not being what he needed. He explained to me, that he had a graph of citations in the last 100 years. He was hoping that he would be able to show, that most important discoveries happened around year 1900. But that citations rised in the second half of the 20th century.

I figured out that this means that he wanted something similar to the histogram. Something a lot easier to do than the timeline mentioned above.

    data <- read.csv("data.csv", header=TRUE, sep="\t", stringsAsFactors=FALSE)
    data <- subset(data, year>1900)
    png(file="test.png")
    hist(data$year, breaks=seq(1900,2020,10), freq=FALSE, axes=FALSE, col="lightblue", xlab="",ylab="", main="Discoveries since 1900")
    axis(1)
    dev.off()

Frequency of important discoveries since 1900

But when I was looking over the information on the internet how to remove all the axes and additional info, I discovered something called density. With very short reading it seems to be the probability function for the new data.

    data <- read.csv("data.csv", header=TRUE, sep="\t", stringsAsFactors=FALSE)
    data <- subset(data, year>1800)
    png(file="test.png")
    plot(density(data$year), axes=FALSE, col="black", ylab=NULL, xlab=NULL, sub=NULL, ann=FALSE)
    axis(1)
    title("Discoveries od leta 1800")
    dev.off()

Frequency of important discoveries since 1800

Which I think is so far the most elegant visualization of it so far. Now I just hope that this time I did understood the professor correctly.

Eyewitnesses, Judging and Scientific Method

Eyewitnesses are still an important part of the judging system. It probably had an even bigger role in the past. That were the times before Purkinje, Overton and Herschel made fingerprinting a normality. That was before Mullis and Jeffreys discovered what is needed to use the DNA in the criminal cases. Before the time of mostly cheap but even more importantly ubiquitous recording devices like cameras. Before we could see someone history by reading their email archive.

The judging system in most part works in a way that the better side wins. Not the one that was more right, or the one where it would be more fair, but the one that manages to convince others, depending on the system either a judge or a jury.

The eyewitnesses are the same way. They are obliged to tell the truth, but they need to convince people that they are right. It a way it could almost be described as a popularity contest. Do you know one thing that doesn't really work that is based on the similar popularity metrics? Politics.

There are some ways of trying to make the eyewitnesses more scientific. One way of how they are trying to do it in New Jersey is by telling people about the different scientific research that gives rise to the problems with record of eyewitness. Like how memory is not a video recording (which for the record, I did not know anybody still thinks that). The effect of the leading questions and so on.

But Papailiou, Yokum and Robertson showed in their research that this does not make them more likely to distinguish between a good or a bad report. Instead they became more skeptical of everything.

Which is only partly good. It is good for the legal system of 'innocent until proven guilty'. Not so good for the scientific method, as it is the admittance of ignorance, not skepticism that is one of the main drivers.

Not to mention, in the criminal law, now by presenting these rules you can make anybody more likely to not be accused of the crime. I find it hard to believe that nobody would take that possibility.

One thing that comes to mind is the legal system in the original Star Trek. There were a couple of episodes with the legal theme. Let me talk about the episode in the 3th season called Turnabout Intruder.

In that episode the minds of Captain Kirk and his former lower Janice are exchanged. So Kirk ends up win the Janice body and Janice is in the Kirk's body. Now Kirk needs to convince others that it is him in the woman's body.

I like the exchange after the mind meld in this scene. It is sad, that they cut the next line: "However, my belief is not acceptable evidence. Evidence must be factual. Doctor McCoy may be of help. Come with me." [1]

Even if he manages to convince his crew, as long as he is unable to produce any evidence, that is not his own testimony, it will not be counted as such. Kirk first tries to make a claim. Spock says it has to be 'substantiated by any external evidence or objective tests' [1]. Kirk then tired to convince him by offering the testimony of the common past instances, but it is not excepted by Spock.

Even when Spock tests him telepathically, it convinces him, but he says that it not not enough. Scott later confirm this, as he says that telepathic connection is subjective and not something that can be examined in the open.

Even when everybody start to doubt that whoever is in Kirk body is really Kirk, they don't fight through the judging system, but, as clearly seen in the case of Chekov and Sulu, through civil disobedience.

I want to talk about the upper episode through the hand of the conditions for science. There are three conditions for science:

  • the admittance of ignorance
  • the equal access to knowledge
  • content thinking

The admittance of ignorance means, that we are willing to admit that there might be something we don't know. It shows in McCoy's admitting that something might be up even though his medical scans show nothing. It shows in Spock willing to mind meld with what was by his knowledge at the time a woman with mental problems.

The equal access to knowledge refers to the ability that everybody is able to go and confirm or dis-confirm the fact of somebody else. Nothing that some person can check but others can't is considered knowledge. It is why Scott opposes Spock's telepathic proof. As telepathy is not something that everybody can check for themselves it is not considered to be proof.

The third is content thinking. It refer to the thinking, where the raw data is more important than any kind of authority that this person might have. Spock equals it to violence, when he reprimand Janice in Kirk's body that it is uncalled for. He later stands against her, when he claims that she is dangerously insane or when he tired to convince him to stand down. Chekov and Scott might use a more 'subjective' evidence of captain character, but they also don't just take the words of authority as given.

Which is surprising when you think about it. Starfleet is after all a organization with military structure.

So in the one possible utopian future (the only utopian future seen so far that I actually liked), they still have eyewitnesses. But they don't accept their report without any other evidence. It would be an interesting concept to test in real world.

[1] Turnabout Intruder Transcript