RSS Feed

I added an RSS feed. If there is a problem with it (or any other bug) tell me and I will fix it.

Elliot Temple | Permalink | Messages (3)

TV

(Bad) TV is no danger to people with strong critical faculties.

Of the rest, there is no use barring them from TV. Thwarting them will alienate them. And mistaken ideas are very easy to come by; they will find plenty elsewhere.

The only way keeping TV away could conceivably work is if the person was in constant contact with only good ideas, and accepted those uncritically. But in that case, if they are listening to good ideas all the time, why not just teach them to think critically?

BTW I actually think a lot of mainstream TV is quite good, and that TV has been getting better and more intelligent over time.

Elliot Temple | Permalink | Messages (0)

Humans

BBC Earth: "The lives of these elephants is dominated by wet and dry, the seasonal cycle created by the sun."

Me: Yes, indeed. Most of the Earth is dominated by the sun. And some other facts of happenstance like how much carbon, water, and nitrogen there is here. But there is one major exception: human beings. The role that the sun -- and those other facts -- plays in our lives is dwindling as we gain more control over our environment. We now have electric lights, sun screen, air conditioning, roofs, and so on. We can go outside when it's very hot, or very cold. We are becoming ever less parochial. Elephants are not.


Elliot Temple | Permalink | Messages (0)

Elliot Temple | Permalink | Messages (0)

Elliot Temple | Permalink | Messages (0)

Elliot Temple | Permalink | Messages (0)

N

http://www.harveycartel.org/metanet/downloads.html

ninja game. 2d platformer. controls are left/right/jump. fun.

there's 500 levels. they are in sections of 5. i beat sections 0, 1, and 90. so you can skip ahead once you get the idea i guess. i died a lot. it doesn't matter. you can just retry and the gameplay is fast. you have a time limit (90 seconds i think). if you are too slow you should suicide without beating the level b/c your time limit lasts for all 5 levels in a section, but dying resets you to the time you started the level with. you can gather gold to get more time. also it's not immediately obvious but you win by going out the door. the door is closed. hit the blue switch.

press against walls when falling to slide on them. you can jump off. you can go straight up a wall if you jump enough but it's slow -- going back and forth is much easier. hold jump longer to jump further. it takes some practice to aim jumps to actually land on the platform you want. it's easy to go too far or too short. run before jumping to gain more speed.

Elliot Temple | Permalink | Messages (0)

24 Game

game: you are given 4 numbers. combine them all to make 24 using + * - / and ().

examples:

numbers: 3 3 7 8
solution: 3*3+7+8

numbers: 1 5 9 12
solution: (5-1)*9-12

numbers I was given to solve:

2,3,10,10
3,3,7,7

Try them, it's fun.

I wrote a Ruby program to brute force these. Then I wrote a second much more elegant one.

The first program does this:

find all the different ways to put the numbers in order. find all the different ways to put the operations (+,-,*,/) in order (but making sets of only 3 of them). then make all possible pairs of the numbers in an order and the operations in an order, and interleave them. so we get all ways to combine the 4 numbers in any order with operations between them. *then* we can't just evaluate those because order of operations is important. so we try evaluating in all possible orders. (do the first, second, or third operation. that leaves 3 numbers and 2 operations. try both orders).

ugh.

the second program is smarter. i realized that one step towards a solution consists of combining 2 numbers with an operation. if you think about it this way, you don't have to worry about order of operations. so just find all the ways to pick 2 numbers from whatever numbers you have left, then try all 4 operations. make sure to put the numbers in either order, b/c 7-3 and 3-7 are different. if you divide by zero, throw that out. once you do this, you now have 3 numbers. you replaced 2 numbers with one number. ok, great, we made progress. now do it again, and you find yourself with 2 numbers, then one. make sure to stop when you get to one. much better. as it goes, it keeps track of the history so if it finds an answer it can tell you what it did.

UPDATE:

I cleaned up my code enough to show the second search function. but the formatting comes out awful when i paste it here. if you ask i can email it.

Elliot Temple | Permalink | Messages (0)