Do Vegans have Less Children?

When I was on the last Ljubljana Python Meetup, the conversation somehow ended up at the question, if vegans have less children and meat eaters. Trust me, it was a very legit question, and was well to the point, considering the topic at the time.

So now, a couple of days later, I decided to put the question and see if what the correct answer is. Imagine my disappointment, when the search engines completely failed me. I got the entries related to whenever it is healthy for children to eat vegan food to the effect of the school food on the children. Which was... not what I was asking.

The first statistics, that touched upon this was Comparison of Sociodemographic and Nutritional Characteristics between Self-Reported Vegetarians, Vegans, and Meat-Eaters from the NutriNet-Santé Study. At the very end of the table 2, there were statistics, that could be helpful. They made a break down of vegans, vegetarians and meat-eaters by what kind of households do they live in. And they could be living alone or with the partner, and with children on not. So, combining houses without children should at least give me the indication, how many people in each category were without children.

The data, copied from that table is here:

Food Preference Total Living without Children Living with Children
Vegan 789 658 131
Vegetarian 2370 1774 596
Meet-Eaters 90,664 69846 33759

So far this data does not tell much. About 37% of meat-eaters have children, compared to 25% of vegetarians and 17% of vegans. So far the data seems to hold. Since I think that if we have statistics, we should use it, I will try to do this now and fail miserably. The problem is, and this can already be seen from the table above, the number don't add up. If I go by the percentage, then the number for meat eaters is 33%. Which is lower, than what I got with simple statistics.

So this data set was a bit of a failure. So what I did then, I figure out that maybe I am able to find some indirect data. For example, vegans are more likely to be urban, and they are more likely to have less children. Or that vegans are more likely to be left-wing, and they (at least in US) have less children. It would not give me the effect the veganism has on children, but it would give me at least what can I expect to see in reality.

I found General Social Survey. I find tried to start with number of children and political orientation, but then for fun I entered the following phrases: "vegan", "food" and "meat". And with meat, I had found that they did ask people, if they refused to eat meat for environmental reasons. Well, that does not talk about vegans, but much more vegetarians. And it is for one reason. Since environment was a topic, that was touched upon, and I had not found anything else, this data-set was good enough.

The data can be found here: https://gssdataexplorer.norc.org/projects/55496/crosstabs/99617.

The data-set also includes the ability to add the chi-square results next to it. The results of chi.square are X-squared = 41.016, df = 24, p-value = 0.01659. By the standards of social sciences, this would mean that putting people in how frequently people refuse to eat meat for environmental reasons, has an effect on how many children do they have. But it does not tell us, which groups are more likely to have children.

But maybe stacked graphs would be able to show this.

Graph showing that vegetarian-like-people have more chance of having 0-child households, while also showing that they are a little more likely to have big households.

As it can be seen from the picture (the darker spots mean less children, with the darkest being none), the people that always refuse to eat meat are more likely to live withour children.

So I am going to assume that the chi-square meant, that vegetarian-like people are less likely to have children and probablly have less children overall. I would need to go into more details, with either ad-hoc testing or testing some other statistics. But for me, this is enough to sate my curiosity.

The R code used to create this was the following:

always <- c(30, 11, 16, 4, 9, 3, 0, 2, 1)/76
often <- c(54, 29, 62, 31, 15, 9, 0, 1, 2)/203
never <- c(558, 328, 541, 283, 165, 68, 26, 11, 23)/2003
sometimes <- c(160, 98, 145, 117, 34, 27, 5, 3, 5)/594
df <- data.frame(always, often, sometimes, never)
df <- data.matrix(df)
png("number_of_children_based_on_food_preference.png")
barplot(df)
dev.off()

You Two Are Both Speedsters Fanfiction Stream of Thought

When I was testing the DES application, that I am programming, I had to input some text each time. So I decided, that instead of doing bla, bla, bla all the time, I would try and write a fanfiction scene. And this is the result. I was distracted by testing, so I guess that this is the minimal level, that I am capable of doing. Which is good to know. But on the other hand, it means, that probably is not that good.


"Cisco, can you bring his wheelchair?" asked Beth, when she came to Dr. Wells. "I don't think he can stand right now.

"He shouldn't be able to stand at all." said Hartley, looking Dr. Wells in a new light.

"Don't we have bigger problems right now?" asked dr. Wells. At this, they all looked at Barry, who was lying there with the broken back. He was no match for Zoom and dr. Wells...

"I will heal. Though, I really don't want to have my back broken again, in case it was not set correctly." said Barry with the grimace on his face.

"You really did want the particle accelerator to explode?" suddenly said Hartley. "Even though you already had powers?"

"You have no proof that dr. Wells was a metahuman before the explosion." suddenly said Cisco.

"He was." Hartley said, without offering more. Both Cisco and Caitlin turned to Wells, awaiting explanation.

"Hartley is right." offered Wells, without any additional explanation.

"Let me get this straight, you were the metahuman the whole time we knew you?" said Stein.

Barry chuckled. They all looked at him. He just shook his head, when he was lying on the bed. "I can now sort of understand, why you don't usually start with explanation of your situation." Wells looked at him with raised eyebrows.

"How would you explain it then?" asked Harry. Barry looked at Wells,

"Well... meet Eobard Thawne, a speedster form the future." Barry thought about it for a while. "Seems lacking, since this would also describe me."

"I am the only one that is confused?" asked Ronnie. "Nobody else?"

"This is ridiculous. You were both born here, how can you be from the future? What, did you two just suddenly decide to travel back and... nothing makes sense." said Caitlin.

"First of all, we are not from the same future." said Barry. "Which thankfully means, that he" he pointed at Wells, "had not yet meet Nora." He paused. "The other Nora." he turned to Wells. "The one you thought was Dawn."

"I met your daughter in your timeline?" Wells asked himself. "How did that go?"

"Well... " Barry stopped. "Time travel is weird."

"You guys can not stay on the subject, right?" asked Harry. "I am more interested in how this affects our fight with Zoom."

"Zoom wants to things. First, he is dying and the only thing that can save his life is a speedforce from another speedster. Without his condition. The second one is, that he wants to be the fastest person, and for that he wants to dominate one Earth and destroy others." Barry paused. "Assuming the changes in the timeline did not change his motivations."

"Could that happen?" asked Cisco.

"I imagine it would be the cause and effect sort of things" added Stein.

"I don't know. I once messed with time, and it changed John's baby gender."

How Encryption Annoyed Me Today

I am currently making an app to research experience. I am very toward the end of making the first version, which will go into the testing. I expect a lot of things to go wrong. This is going to be a very new experience for me.

Well, one of the things that went wrong with the previous version a couple of years ago was, that the whole experience data was collected in plain text on the server. Where it would be a easy target for hackers to get. Maybe this was alright in 2015 (at least that is how it was presented to me), but since then we had the whole Cambridge Analytica and their involvement in Trump election and Brexit vote, so not something that we want to deal with in 2019.

They have the whole strategy, how they are going to protect the privacy of the people now. The problem is, that their part is not ready yet. So until it will be ready, the data would be send by email. Not exactly a good alternative. Unless the data would be encrypted.

So in the recent days I got the idea. Why not use some kind of public-private keys for encryption. This should work. So I went, realized that a lot of people talk abut the RSA and decided to try and implement this in the app.

Almost a whole day later, I finally got the app to send the encrypted file this way. The problem was, that the content of the file was too big to be able to decrypt it. Apparently there is a size limit, based on how long the key is? Well, since these things can go quite large, this was almost a whole day spend on the way that would not work.

So we are back on the AES encryption and researchers and the participants in research exchanging the passwords in person. Quite more work. The other alternative would be to encrypt the key with public key, but this one I was not sure, if I am capable enough to explain in order for them to understand. Since it is a short-term solution, I guess it would work. And I hope whatever solution they will come with, it will not take too long.

Well, as long they are not like some people that I know, who are sending their passwords to other people in Facebook messenger. Yes, I have seen this happen in person.

But the lesson for today way, RSA can only be used for short messages. Good to know for next time.

Different Types of Personality Tests

Normally personality tests are designed in a way, to test you on a couple of different traits and tell you, how well developed is this trait. This is the type that is usually done by The Big Five and other types of surveys, that come from the sciences, MBTI, humors, and so on and so on. This one is really useful to show, how we compare to other people.

On the other hand is the type, where they end up ranking the relative strength of traits in the person. I think Rogers had this type and also the Jung had this type. This one is more useful to realize what are our strengths and weakness. When not comparing to other people. And even more important, it tells us how we approach the world.

I have to admit, that when it comes to my personal development, I usually pick the second type of test. But when it comes to making decisions that involves other people, I am much more adherent to the first one.

So then I found on Youtube (which is the ban of my existence) a video, which transformed The Big Five from the first type into the second one. Here are the questions:

Question Extroversion Agreeableness Neuroticism Conscientiousness Openness
What word best describes you? Talkative Kind Anxious Efficient Imaginative
How would your best friend describe you? Enthusiastic Cooperative Worrisome Organized Creative
Pick the activity that sounds most like something you would do: Plan a party Donate to a charity Share a problem with a close friend Make a schedule for your week Create a piece of art
Which adage would you live by? Spend time with friends Care for people in need Safety first Do your duty Beauty will save the world
What's your biggest fault? Dominate conversations Let people take advantage Worry too much Perfectionist Scatterbrained
When faced with a problem, I tend to approach it... Energetically Cooperatively Nervously Dependably Curiously

So, when I am solving this test, I get the half split between conscientiousness and openness. Which I kind of agree with. I mean, the one weakness of this test is to not also take into account, that being on the very end of the other trait can also be helpful. Which I am, when it comes to extroversion and agreeableness. I did expect at least one answer from neuroticism, but I got 0 as well. For me it was a bit confirmation, that I sometimes also approach things like these hard-working people. :)

Then I also got interesting, and try to figure out, what some of the people would get. Since I should not write what I think about other people on the blog, I am going to use the example of the fictional characters. And since in the last half a year, I am into the Arrowverse, you can imagine which characters will I be using.

Person Extroversion Agreeableness Neuroticism Conscientiousness Openness Type
Oliver Queen 1 1 0 4 0 Conscientiousness
Tommy Merlin 6 0 0 0 0 Extroversion
John Diggle 0 2 1 3 0 Conscientiousness
Felicity Smoak 2 0 0 0 4 Openness
Barry Allen 0 5 1 0 0 Agreeableness
Cisco Ramon 3 0 0 0 3 Extroversion/Openness
Eobard Thawne 1 0 0 4 1 Conscientiousness
Caitlin Snow 0 2 3 1 0 Neuroticism

Well, if we compare the Arrow and Flash team in their first season (so Oliver, John and Felicity vs. Barry, Cisco, Caitlin and Eobard), we have a team mired in conscientiousness, balanced by openness. On the other side, we have all five of the traits expressed. I wonder if this is the reason, why these two teams feel so different? Which would again be the wrong use of this type of questionnaire (but it is fun to wonder, and I don't think anybody thinks in methodologically the right way all the time).

The Summary of Year 2018

I think that by this time, the whole Earth had entered the year 2019. Happy new year to anybody reading it right now. For the beginning of new year, I though to write a short numerical summary of what I did in this year.

For this, I am only able to do the summary for the things, that I do the good job of keeping track of. So, that means, that the only things that I can describe is the use of my internet, the number of blog posts and the amount of material read.

Blog Posts

Let me start with the blog. I have recently changed the way how I show the blog posts here. I am using nikola now, which means, that if I wanted to keep the links the same as when I was using htmly, I needed to put the blog posts in the year/month folders. Which made the analysis a lot easier, since I only needed to count the number of files in the folders.

import os

post_folder = "/mnt/Stable/sarajaksa.eu-nikola/posts/2018"

months = os.listdir(post_folder)

number_of_posts = dict()

for month in months:
    posts = os.listdir(post_folder + "/" + month)
    number_of_posts[int(month)] = len(posts)

with open("blog_posts.csv", "w") as f:
    all_posts = 0
    f.write("Month;PostNumber\n")
    for i in range(1, 13):
        if i not in number_of_posts:
            post_number = 0
        else:
            post_number = number_of_posts[i]
        f.write(str(i) + ";" + str(post_number) + "\n")
        all_posts += post_number
    print("I had written " + str(all_posts) + " blog posts in year 2018.")

In the year 2018 I had written 58 blog posts. Here is the breakdown by the months:

Month Posts Written
January 2
February 0
March 3
April 1
May 6
June 3
July 2
August 7
September 7
October 9
November 11
December 7

For the more visual types, there is also an easy way to create a graph:

library(tidyverse)

data <- read.csv("blog_posts.csv", sep=";", header=TRUE)

png("number_of_blog_posts_2018.png")
ggplot(data, aes(x=Month, y=PostNumber)) + 
    geom_line(color="blue") + 
    xlab("Months") + 
    ylab("Number of Posts Written") +
    ggtitle("Blogging in 2018")
dev.off()

graph of number of post written (data is on the table further up)

Reading Material

Ever since the later months of 2017, I have kept track of all the books, scientific articles and similar material (like thesis). I simply put them in the .bib file with the time stamp, which indicates, when I had finished the material. Which means, that for the year 2018, I have the information for every book that I finished and every scientific article that I had finished.

The script this time is a big longer, since i needed po parse the bib files as well:

import re


def get_bib_entries_by_date(list_of_files, date_to_match):
    re_entry = r"@\w*{.+?timestamp.+?}"
    re_timestamp = r"timestamp[\s]+?=[\s]+?{.+?}"
    re_date = r"\d\d\d\d-\d\d-\d\d"
    re_type = r"@\w*{"

    lines = ""

    for bib_file in list_of_files:
        with open(bib_file) as f:
            lines2 = f.readlines()

        lines2 = " ".join(lines2)
        lines = lines + lines2

    lines = lines.replace("\n", " ")

    lines = re.findall(re_entry, lines)
    all_entries = dict()

    for line in lines:
        timestamp = re.findall(re_timestamp, line)[0]
        date = re.findall(re_date, timestamp)
        if date:
            date = date[0]
        entry = re.findall(re_type, line)[0][1:-1]
        if date_to_match in date:
            if entry not in all_entries:
                all_entries[entry] = 0
            all_entries[entry] += 1

    return all_entries


def dictionary_to_csv(dictionary, filename):
    with open(filename, "w") as f:
        f.write("Month;Entry;Count\n")
        for month in dictionary:
            for entry in dictionary[month]:
                f.write(
                    month + ";" + entry + ";" + str(dictionary[month][entry]) + "\n"
                )


def get_entries_by_months(filenames, year, filename):
    months = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]
    all_results = dict()
    for month in months:
        all_results[month] = get_bib_entries_by_date(filenames, year + "-" + month)
    dictionary_to_csv(all_results, filename)


get_entries_by_months(
    ["Articles.bib", "Books.bib", "Conferences.bib", "Predelano.bib", "Thesis.bib"],
    "2018",
    "2018.csv",
)

This got me the csv file, that I could then analyse and visualize in R. This is the code that I had used:

library(tidyverse)

data <- read.csv("2018.csv", sep=";", header=TRUE)

data_articles <- data %>% 
    filter(Entry=="Article" | Entry=="InProceedings") %>% 
    group_by(Month) %>% 
    summarize(Count=sum(Count), Entry="Article")
data_books <- data %>% 
    filter(Entry=="Book") %>% 
    group_by(Month) %>% 
    summarize(Count=sum(Count), Entry="Book")
data_chapters <- data %>% 
    filter(Entry=="InBook" | Entry=="InCollection") %>% 
    group_by(Month) %>% 
    summarize(Count=sum(Count), Entry="Chapter")
data_other <- data %>% 
    filter(Entry=="MasterThesis" | Entry=="Report" | Entry=="TechReport" | Entry=="Thesis") %>% 
    group_by(Month) %>% 
    summarize(Count=sum(Count), Entry="Other")

png("articles_read_2018.png")
ggplot(data_articles, aes(x=Month, y=Count)) + 
    geom_line(color="blue") + 
    xlab("Months") + 
    ylab("Number of Articles Read") +
    ggtitle("Reading Articles in 2018")
dev.off()

png("books_read_2018.png")
ggplot(data_books, aes(x=Month, y=Count)) + 
    geom_line(color="blue") + 
    xlab("Months") + 
    ylab("Number of Books Read") +
    ggtitle("Reading Books in 2018")
dev.off()

data <- merge.data.frame(data_articles, data_books, all=TRUE)
data <- merge.data.frame(data, data_chapters, all=TRUE)
data <- merge.data.frame(data, data_other, all=TRUE)

data_summary <- data %>% group_by(Entry) %>% summarize(Count=sum(Count), MonthAvg=sum(Count)/12, DayAvg=sum(Count)/365)

data_summary

So now for the results. In the following table, there are the results for the number of material that I read:

Type Units Read Month Average Day Average
Articles 530 44.2 1.45
Books 102 8.5 0.279
Chapters 39 3.25 0.107
Other 14 1.17 0.0384

In the personal development, they suggest to read 50 book per year. It was supposed to be good for something? I am not sure. Well, I read about twice as much without this being the goal, so I think this was quite nice.

But I was more interested in how many articles do I read per day. So I read about 1.5 article per day. This seems like a relatively small number, but this would be the number, if I was consistent in doing it every day. Which I am not. So I guess I should be happy with the result. I mean, I read more than 500 of them in a year, which is not a small number.

For people, that are more visual, I also added the graphs of how many books and articles did I read per month.

This is the graph for the articles:

graph of number of articles read in 2018

And another graph for books:

graph of number of books read in 2018

Time Spend on the Internet

While not for for all months, I do have data for my use of internet form July to October. So here I am going to show you some of this as well. Let us first start with the parsing, before we go to the visualization:

folder = "Programming-MyUsedTime"
files = [
    "MindTheTime-2018-Julij.csv",
    "MindTheTime-2018-Avgust.csv",
    "MindTheTime-2018-September.csv",
    "MindTheTime-2018-Oktober.csv",
]

time_spend_on_websites = dict()

for filename in files:
    with open(folder + "/" + filename) as f:
        lines = f.readlines()
    for line in lines:
        line = line.strip()
        _, website, time, _, _ = line.split(";")
        if not website:
            continue
        if website not in time_spend_on_websites:
            time_spend_on_websites[website] = 0
        time = time.split(":")
        if len(time) == 3:
            time = int(time[0]) * 60 * 60 + int(time[1]) * 60 + int(time[0])
        elif len(time) == 2:
            time = int(time[0]) * 60 + int(time[1])
        time_spend_on_websites[website] += time

with open("Websites-2018.csv", "w") as f:
    f.write("Website;Time\n")
    for website, time in time_spend_on_websites.items():
        if time > 0:
            f.write(website + ";" + str(time) + "\n")

So, for the first analysis, lets see how many hours did I spend on the internet per month. I do apologize, that the names of the months are in Slovenian. But the sames are similar, so it should not impend the understanding too much.

library(tidyverse)

data_total <- read.csv("Programming-MyUsedTime/MindTheTime-2018-Total.csv", sep=";", header=FALSE)
names(data_total) <- c("Month", "Time", "Nothing")
data_total$Nothing <- NULL

data_total <- data_total %>%
    separate(col=Time, into=c("Hours", "Minutes", "Seconds"), sep=":") 

data_total$Hours <- as.numeric(data_total$Hours)
data_total$Minutes <- as.numeric(data_total$Minutes)
data_total$Seconds <- as.numeric(data_total$Seconds)

data_total$Time = data_total$Hours * 60 * 60 + data_total$Minutes * 60 + data_total$Seconds

png("website_total_2018.png")
ggplot(data_total, aes(x=Month, y=Hours)) + 
    geom_col(color="blue") + 
    scale_x_discrete(limits=c("Junij", "Julij", "August", "September", "Oktober")) +
    xlab("Months") + 
    ylab("Time Spend on Internet") +
    ggtitle("Time Spend on Internet in 2018")
dev.off()

time spend on the internet in hours per month (June: 72, July: 119, August: 140, September: 110, October: 62)

Well, now I could also check the most visited 10 domains in this time frame. I am going to do it, simply because when I saw it for the first time a couple of months ago, I started to change some of my habits. So, let us see these pages:

library(tidyverse)

data <- read.csv("Websites-2018.csv", sep=";", header=TRUE)
data <- data[with(data, order(Time, decreasing=TRUE)), ]
data10 <- head(data, n=10)

data10$Minutes <- data10$Time %/% 60
data10$Seconds <- data10$Time %% 60
data10$Hours <- data10$Minutes %/% 60
data10$Minutes <- data10$Minutes %% 60
data10$Time <- NULL

data10
Website Hours Minutes Seconds
archiveofourown.org 98 55 9
watch-series.com 45 39 55
www.youtube.com 1 5 49
watchseries.fi 0 20 21
www.fanfiction.net 0 12 4
mail.google.com 0 9 50
putlocker0.com 0 9 8
www.google.com 0 8 32
putlocker-hd.is 0 7 36
www.duolingo.com 0 7 14

This can be grouped into a couple of categories: fanfiction (archiveofourown.org, fanfiction.net), watching (illegal) videos (watch-series.com, www.youtube.com, watchseries.fi, putlocker0.com, putlocker-hd.is), email (mail.google.com), search (google.com) and language learning (duolingo.com). Sure puts things in the perspective in how I spend time on the internet.

Well, since this time, I have blocked the sites containing fanfiction. I also decided to stop watching series illegally on the internet, but instead by DVDs. I am expecting three more season DVDs this week. Also, since I buy European DVDs, they always have some foreign language track there as well. It is a lot more interesting watching series in German than doing the German Duolingo tree. I now use mutt as email, so it will not longer log there. Also, when I use mutt it feels faster than when I was using gmail through browser. Not much I can do about search yet. I need to find some way there as well.

So I am assuming that the data for year 2019 is going to look a lot different.

So this was my year 2018 in some numerical numbers.

I updated the blog

If you had been on my blog previously, you can see that my blog now looks different. I used to use htmly, but now I am generating a static site with nikola and then just serve the html files generated. It is not that I was unsatisfied with the htmly, it is just that I could not figure out, how to update my site without having to log in every time. Because login requires cookies (only session cookie) and they needed to be set for everybody and so on and I tried to make it work for my case.

Actually, my site still sets a session cookie ("PH_HPXY_CHECK") for some reason, but I no longer have any code, which would set it. I don't get this cookie, when I am running a site on my own computer. I have no idea, how to eliminate this one as well.

The other thing was, that it required tag for every single blogs. I do have tags for some of my work (mostly my material that I had originally posted on other websites), but not for most of them. I guess these were the two things, that I wanted to deal with. I would still recommend htmly as a simple blog platform, it just was not for me.

Then I read on the internet a bit about the static sites generators. I don't have any kind of interaction on my site. Even if in the future I realize that I needed the interaction, I still think that most of the sites will be static. So this works well.

I have spend around a day (if measured as time frame of 24 hours) putting everything in the new system and changing the css a bit. This is why some details may not be that well made yet. But I like, that this made the page size smaller for around 60%, which is always a good think. To take care of the environment (and make pages faster, but this version is no faster than the previous one).

On the other hand, I am currently working on the app for researching experience. And I am at the user experience part of it. And I realized that I had no idea, how a good user experience no mobile app looks like (since I don't really use my phone and tablet enough to get a feeling). On the other side, I do know what user experience do I like at websites, so this is like having a practice before the real part.

Hope this will make the blog more and not less readable.

If anybody came here searching for how to migrate from htmly to nikola, I appologize that I am not writting about it. But I will add the code that I used to change the htmly blogposts to nikola blog posts.

import os
import re

re_title = r"<!--t[\S\s]*t-->"
re_tag = r"<!--tag[\S\s]*tag-->"
re_desc = r"<!--d[\S\s]*d-->"

all_files = os.listdir("post/")

for current_file in all_files:
    time = ":".join(current_file.split("_")[0].split("-")[3:])
    date = "-".join(current_file.split("_")[0].split("-")[:3])
    datetime = date + " " + time + " UTC"
    filename = current_file.split("_")[2][:-3]
    tags = current_file.split("_")[1]
    if tags == "none":
        tags = ""
    with open(os.path.join("post/", current_file)) as f:
        lines = f.readlines()
    lines = "".join(lines)
    title = re.search(re_title, lines).group(0)
    lines = lines.replace(title, "")
    title = title.replace("<!--t", "").replace("t-->", "").strip()
    lines = lines.replace(re.search(re_tag, lines).group(0), "")
    desc = re.search(re_desc, lines).group(0)
    lines = lines.replace(desc, "")
    desc = desc.replace("<!--d", "").replace("d-->", "").strip()
    with open(os.path.join("trypost2/", filename + ".rst"), "w") as f:
        f.write(".. title: " + title + "\n")
        f.write(".. slug: " + filename + "\n")
        f.write(".. date: " + datetime + "\n")
        f.write(".. tags: " + tags + "\n")
        f.write(".. description: " + desc + "\n")
        f.write("\n\n")
        f.write(lines)

You can also donwload the code here: htmly2static.py

Using Mutt to Read Emails

I am going to admit, that I have been interested in the idea of minimalism for years. Getting rid of the things that are unnecessary and make sure that what is left is what I enjoy having and doing. I am still far away of the ideal, but it is there. Now I am going to just elsewhere, but I will come to this point later.

I have been spending a bit of time on trying to speed up my internet site in the last two months. I wanted to make sure than my banwidth is as small as possible for enviormental reasons and my loading time is as small as possible for respect of the time that people have. I am still very far away from it.

But there was one thing that I noticed. Quite a lot of websites were hell of a lot slower than my website. And one of them was also gmail, which I had been using so far to check my email. Which means, that every time I checked emails, I had to wait a couple of seconds (not that I ever timed it). Plus, I am more and more uncomfortable with how personal data is used, so I always knew that eventually I will close it anyway. So this was a good excuse for me to try something new and to make sure that I am making a step into getting away from the giant internet companies.

What I decided to try was mutt. This is a command line program, that allows me to read my emails and to recive them. I also had to get msmtp to send my messages. I head about mutt from one of my professors, when I was abroad. I found the idea of checking the email in the command line interesting. But up until now, I had never tried it. I found out about msmpt from the helpful guide about using mutt on ubuntu. They also recomend some other packages (like fetchmail), but I found out that I don't need them.

I did spend a lot of time trying to track down, how the configuration files should look like, so I will share mine, in case they help somebody. First here is the configuration file for mutt (.muttrc):

set realname = "Sara Jakša"
set from = "Sara Jakša <[email address]>"

set folder = [imap url:port]
set imap_user = [email username]
set imap_pass = [email password]

unset imap_passive
set imap_keepalive = 300
set mail_check = 120

set spoolfile = "+INBOX"
set postponed ="+Drafts"
mailboxes = +INBOX

set sendmail="/usr/bin/msmtp"

set header_cache = ~/.cache/mutt
set message_cachedir = "~/.cache/mutt"

And a configuration file for msmtp (.msmtprc)

account default              
host [smtp url]      
port [smtp port]                     
from [email]  
tls on                       
tls_starttls off              
tls_trust_file /etc/ssl/certs/ca-certificates.crt
auth on                     
user [email username]    
password [email password]
logfile ~/.msmtp.log

Though I would recomend, that you follow the guide that I linked above, as the person writting it probablly have a lot more knowledge about it than somebody that started learing about it less than 24 hours ago.

Now let me return to the point about the minimalism, that I started before. I always liked the command line, because it forced me to be minimalistic about it. There are no colors to distract my, neither are there any advertizments. It helps, that I am not checking my emails in the browser, because that means, that if I am not learning a new programming something, I can just eliminate the browser from my linux instalation. Also, I am still not sure how to do different setttings, but it seems that once I delete a message from mutt, it is also gone from the server. Which also helps with being more mindful about it, but also with being able to forget about it, once the message it deleted.

I think the point of the minimalism is also to find the tools that help one do the work, that needs to be done, without distracting us. And mutt, not being a browser, already has the advantage of not being able to simply switch to blogs or youtube (or the current addiction that I am fighting for the last couple of months: fanfiction). Plus, it is not anoying and slow, like some of the other clients, like Thunderbird. I think I finally found something, that will only improve my life.

What are similarity in Windows vs. Linux and Social Media vs. Blog

I am right now programming a mobile app for researching ones experience, so I am getting more and more into the sphere of Android and iOS and react-native. The people I worked with asked me, if I wanted my own Mac computer. I have to admit, if one is satified with not having every functionality, then one does not need a mac. I know that the first demo version just worked on the mac. But there are still things, that are hard (or impossible) to do without it - like notifications.

But when I got the questions about getting a Mac, I was thinking about my own workflow. I have right now both Windows and Arch Linux installed on my system. But I can clearly see, which one do I prefer. When I had a research project during my cognitive science studied, we were using Atlas.ti for analyzing data. Well, installing Atlas.ti on Linux was imposisble for me (believe me, I tried), so every time I wanted to continioue the analysis, I needed to log into Windows. And that was a battle. Every. Single. Time. There was something about it, that I really did not like it.

I took note of it as one of my twerks at the time, and I did not go any further into it. Until very recentlly, when I realized that I got a very similar feeling. The topic of that feeling. Surprisingly my tablet. And here I was more aware, of where was this feeling comming from. And this is from the complete frustration of not making the tech work the way I wanted it to. Ofcourse, the newest version of Android for my tablet was one below the minimal one needed for react-native. And ofcourse, installing the newer version of Android does not have any clear instructions. And ofcourse, the most frequent thing, that come up when searching for the solution was the possibility of making a brick out of the tech. I mean, it is just a piece of tech, I can't be the only one who wanted to to this?! Is that what people talk about when they talk about planned obselency?!

As somebody that has been having Linux as my primary operating system and somebody that was never a big user of smartphones and tablets, I found this frustrating. To me it is obious, that it is the user that controls the system, and not the system that forces user to comform to it. I am the one that decides what is not my system (something that Windows and Android don't really agree with), I decide when things get upgrated (ditto) and I decide when do I use what. If I don't like something, I can change each single part of the system in the way that I wanted. If I don't have the skills, then I can learn or pay somebody else to do it.

But maybe these things are not that obious to other people. On the last python meetup, I was speaking with a firend, and she mentioned that somebody she knows was thinking about changing the operating system. And the videos explaning how to do it were using the command line. That convined them (I think it was a he, but I am not sure, so them) to no use it. And they were looking things for Ubuntu, where most things that a normal computer user would want to do, can be done through graphical interface.

Maybe this is why we end up with stories like this. Where the technology is starting to make the job of the doctors harder. It is interesting, that they are solving it by hiring a sort of a secretary.

Sure, then I came accross the Free Software Fundation which also touch upon some of these same points, that annoy me (you can read their story The Right to Read, it is great).

But beside this, that also reminded me of what I have listened in a youtube video or two from Tristan Harris. He talks about how social media (and possible other things as well, my memory may be a bit lacking) are designed in a way to addict us. He goes into how this is tied into how the value of these companies is calculated and their monitizing model, but this is not important for my argument. Is seems that social media, with all their design restrictions and the way they are controlled, and even social expectations in place, they are the same type of system like Android and Windows.

What is the more Linux like system? Blogging. I am not the first one, that has noticed that. There are recent articles from Cal Newport, that touch upon that. One example is comparing social media to AOL or how social media compare to blogs. Everybody can start the blog (or their website). They can put anything they want on there. It can look in anyway it can (which profiles on social media can not). Nobody has the right to delete your content (which can happen with social media). Nobody can stop you from being there (which is true for social media). The book Technically Wrong has a couple of good examples about it. (Is it bad, that when I say the writting of the book on the site - "Recommended for all readers interested in the intersection of technology and social justice" - I was thinking of deleting this sentence?)

Maybe that is why, I also get frustrated by the social media all the time, but in the years of writting this blog, I had not once become frustrated about it? I originally thought this is because using social media is a social situation (with all social expectations), but writting for this blog is something I do for myself. But maybe this is another possible explanation. I get frustrated not because of the socialiness of the situation, but because of the loss of control? I guess this would be the best description.

Tis weekend, when I went hiking with a friend, he asked me, why I no longer have a LinkedIn account. And I told him, that I had no positive results from it. He gave me a couple of reasons, why this was so. Better economy, I am soon not going to be a student anymore. I started working. And so on. And then I mentioned that we both know at least two people, that if I told them, that I need a job in a next couple of months, I would get it, without me needing to do anything else.

Is there any social media, that can say that? I would guess not. Instead, I can simply eliminate another source of frustration from my life.

Why Found Science (or Why Explore Space)

I have quite a lot of people, who think that science, that is not immediately useful for industry/businesses is not something that we should be giving any money to.

Well, now I had found the answer that I can give it to them, when I hear about it again. The letter that Ernst Stuhlinger write gives probably a lot better description, than I am capable of producing.

The copy of the letter can be found here: Why Explore Space.

When you are reading it, there is going to be a part about international cooperation. Keep in mind, that the mentioned Apollo 13 mission took place in 1970. At that time, the relationship between US and Russia were a lot different, then they are now.

The Value of Different Cultures

I have a small confession to make. When I started to write this article, I was at the Business informatics day at the Faculty of Economics. I am technically still a student (these pesky surveys for my master thesis don't want to fill themselves). But beside the master thesis, I have not been a part of business informatics for about a year. Cognitive science and programming took most of my attention. And even the year before that, I put a lot more attention on my cognitive science or was abroad.

As soon as I came there, and started listening to conversations of the people around me, I got a cultural shook. I have forgotten how business-like this culture is. The first big group talked about Microsoft. In a very business like way. Everybody was dressed so business-like. And everybody was so unapproachable. Then again, I found the most approachable people at programming meetups, so I may be a bit biassed.

The presentations were not better. I was under the impression that this was going to be informational. But it started with all the stuff people do to feel self-important. You know, call the 'important' people on the stage. Or tell you about their history. Or give awards to others. It was horrifying. But it did reminded me a bit about that one business conference, that I had attended. And Toastmasters marathon. And after an hour, they finally went to the meaty part, or what was supposed to be an interesting round table. But it went into a such a bad start, so I left. Like they wanted to proof that buisness informatics rocks. But this was a half informational presentation half alumni gathering, so who were they convincing? Or maybe I missed something there.

Since I had a hour of thinking time (there is no way, I am putting any more attention than I have to on them convincing themselves they are self-important), I got to thinking. And one of the things that I thought about was, that there is a value of different cultures.

One of the things is, that these cultures provide a good filter for people. I know some social justice warriors is going to disagree with me, since this means that not everybody is going to feel welcome everywhere. There is a place for the type of safe and non-judgmental culture that they are providing. There is also a place for the business, feeling self-important society. And there is a place for a place, were people feel free to criticize. And there is a place for all the artistry thinking types and for technological types and for scientific types. And there is also place for hacking community.

And I think that people, that can change between these cultures, that can bind the knowledge and processes of one culture with another.

But I think the other value is, that is shows the good and bad parts of the culture, that the person is mostly a part of. I guess it is very similar to living in a foreign country. It is hard to value the home culture, if this is the only thing one knows.

I have a feeling, that when I started to write this, I had something even smarter to add, but I don't remember.