Saturday, September 7, 2013

Dreams

I've been having dreams again relatively frequent. I don't know what causes them to come or go. On Thursday I had one about fears. Not fears like spiders, but fears like I'm really really dumb and don't know what I am doing.

When I woke from that, it was about an hour before my alarm. So a little before 6. I tried to sleep at almost 2 and it wasn't very successful. Took a while.

And I can't remember exactly how it happened... maybe I started thinking about squares... for some reason. I wish I could remember how this idea was started because I want to know what spawns inspiration.

But I don't.


In computing we are learning about sorting algorithms. Sorting things like:
1 3 2 9 7 6 4 5 8 10
into ascending order.

The most basic sort we learned was called "bubble sort", which essentially puts all the numbers in a line like this:
3 1 5 4 2
and compares the first 2 numbers (3 is bigger than one, so swap)
1 3 5 4 2

compare 2nd and 3rd (3 is smaller than 5 so no swap)
1 3 5 4 2

compare 3rd and 4th
1 3 4 5 2

compare 4th and 5th
1 3 4 2 5

the result of this is that the biggest number is now at the end.
So go back to the beginning and do this 4 times, and you will have a sorted list.
1 3 4 2 5 // (1 < 3)
1 3 4 2 5 // (3 < 4)
1 3 2 4 5 // (4 > 2)
1 3 2 4 5 // (4 < 5)

Anyway this sort is pretty much the worst because it's super slow. If you were sorting 25 things,
2 3 4 5 6 7 8 ... 21 22 23 24 25 1
It would have to scan through 24 times just to move than 1 to the front.


The thing I thought about was, what if instead of arranging all the numbers on a line like that ...
I arrange it in a square?

21 22 23 24 25
16 17 18 19 20
11 12 13 14 15
06 07 08 09 10





01 02 03 04 05

Suddenly, you can swap vertically as well as horizontally. Suddenly you can swap diagonally as well.


So yeah I thought about that and couldn't get back to sleep for an hour. Then once I was meant to get up, I didn't feel like it and slept for another hour and a half.


I spent a lot of the day drawing 5x5 squares and filling them in with numbers, and it didn't work. But then I found a way to make it work, at least I think it did, maybe it just happened to work for the case I tested and wouldn't for others.


One of the things I thought was "I bet this has already been invented and I'm wasting my time". I tried googling 2D array bubble sort, which comes up with a lot of results.
But these results are asking, how do I use bubble sort to sort 2D arrays, whereas I am trying to use the notion of bubble sort with 2D arrays to sort a line of data.

So I haven't found anyone with the same idea, but I didn't look very hard for it.



I thought about performing music yesterday. I don't think it will happen again, but I can't tell the future what to be. I haven't played anything besides Coto in a long time.



Today is election. I'll probably go vote very soon. After this.

When they said that the polls keep saying coalition is going to win... where are these polls? What are they, and how do people participate in them?

How many people do they ask? I'm assuming enough for the central limit theorem

The more important question is, where do they get the people from? Are these people self selected - do they go to some place to participate in the poll. Or do people ask randoms on the street, or call random telephone numbers asking people?

Because the polls won't be a good indication unless it's random sampling. For example, asking the internet who they would choose would be very very not-random sampling, (I mean, everywhere you go regarding the election is everyone really really really hoping coalition doesn't win (which is different to hoping labor will win)). And the reason is, people who use the internet, in particular facebook reddit and twitter, are in general younger. In general, more informed. In general, care about different things such as the NBN.

So putting a poll on the internet is a very bad way to get sample data, because it won't be representative of the population.

I don't know how they would get a proper random sample, though. Maybe they don't.


Maybe if the internet is a good representation of how young people will vote, there is a good chance that ALP will win. Because it's quite hard to find people openly supporting the liberals - maybe they are intimidated because no one else is.


When did I care about any of this, anyway?

...

probably began from this http://howfastisthenbn.com.au/

It gets frustrating when my family is using the internet because it means I am not able to play games. And to some that might sound ridiculous because so what games aren't important go find something productive to do.

I don't know. Gaming and eSports is a culture. Perhaps one of the biggest reasons it's so behind in Australia is because the internet is so bad. Download speeds are bad. Upload speeds are embarassing. While these could be fixed, I guess it will never be good as other countries because we're an island in the wrong timezone.

Anyway, enough about that.



The main thing I actually wanted to talk about when I came here an hour ago was about politics, religion and gay rights. Or maybe it's human rights. Why gay people shouldn't be excluded from human rights.

I feel obliged to have to warn you that I wanted to talk about this, and I don't know if that's good or bad.


Of course I'm talking about this - Rudd launches passionate gay marriage defence

Loud atheists got so happy about it. Loud Christians got so angry about it. I thought that was sad. Perhaps there will never be true coexistence because a person thinks "my entire life experience tells me this is true", yet can't acknowledge that another person would think "my entire life experience tells me that is true". It happens because their life experiences are different.

What am I saying, of course there won't be coexistence. It's ingrained into us, like violence and greed.


What amazed me was how the argument quickly moves away from gay marriage towards the bible. In fact, this is what always amazes me whenever religion is involved with anything.
There are people going on about how things are "cherry-picked" from the bible to suit their agenda.
And then there are people saying "no don't worry guys the bible is still right, look at all of these other things it says". And then people get angry at Kevin Rudd, he misquoted the bible how dare he not going to vote for him he's evil


But ... why don't they argue about things like "is it natural condition" or "is it okay if a gay couple raises a child" or "why do you care when it doesn't affect you"? You know... what it's actually meant to be about.


...


rewatched it. I guess it's because Kevin asked the pastor whether he thought it was natural or not, and he just dodged the question and said it's because Jesus said so.


I'm actually really curious now about what the guy actually thinks. If he kept his religion out of it, how would he answer those three questions.

No comments:

(Thanks, Harvard)