World's Greenest Homes series 1 was produced by Cineflix in 2008. Every episode shows two, supposedly ecological, homes. I wrote supposedly, because you cannot seriously think that 400-700 square meter mansions for 2-5 people are ecological. It doesn't matter that you put concrete floors with garbage in them, or fill your walls with old newspapers, or use old furniture, or use rain water to flush toilets - you are still building a palace!
The host Emmanuel Belliveau is trying hard to find something ecological about those homes, but sometimes it feels like dual flush toilets or double-pane windows make your house "world's greenest".
Most of the homes presented are in North America. With a few exceptions, they are huge, and they don't belong in this series. The homes that are in the UK, Sweden, Netherlands or Australia show more constraint, and generally are much more interesting.
Wednesday, May 11, 2011
Sunday, April 24, 2011
Spark! by John J. Ratey and Eric Hagerman
Homo Sapiens no longer needs to walk long distances, run, jump, or catch prey. Our bodies, however, still work best when we move. When we spend our days sitting, we get fat and... dumb.
"Spark" starts with a quote from Plato:
In order for man to succeed in life, God provided him with two means, education and physical activity. Not separately, one for the soul and the other for the body, but for the two together. With these two means, man can attain perfection.
The benefits of staying active are clear and are proven. Steady exercise: walking, running is essential. Sprinting works differently and is beneficial too. Physical activity that makes the brain work: karate, tennis, and other small team games are important from a different perspective. Exercising with others is better than doing it alone.
My favorite citation comes from page 237: "[...] if you are not busy living, your body will be busy dying."
John Ratey's web page.
Sunday, April 10, 2011
DON'T PANIC - Nearly Everything is Better Than You Think by Cassandra Wilkinson
Cassandra Wilkinson did a lot of reading for this book. References at the end take 20 pages out of total 200. The references are a strong part of this book. This sentence on page 30:
Spending time in stimulating company has been shown to develop our neural pathways [...]has lead me to A User's Guide to the Brain: Perception, Attention, and the Four Theaters of the Brain by John Ratey, which I need to read one day.
Cassandra gives many examples of fear-mongering and then cites research that shows the opposite. She discusses happiness, family, society, fertility rate, economy, globalisation, war on terror, fashion, politics and other everyday news topics. All in Australian and international context.
The message stated in the title is clear and powerful: don't worry, this is not the end of world. When you live in fear you are proven to make wrong decisions. When you have faith in other people, progress is made.
Friday, March 11, 2011
The i Programming Language - Part 1 - The Concept
Here is my idea for a new programming language. The language is called "i" for Internet, or interactive. The main difference between i (or IPL) and other languages of today is the dynamic, or even unpredictable nature of i programs. This is achieved by using two key features:
A program written in i, every time it runs, uses:
To make the language universal, and quick to accept, it compiles to JavaScript bytecode or is read and executed by an interpreter written in JavaScript. The i program, and the i libraries can be hosted inside regular html web pages. That's how they can be discovered quickly. A regular web search finds them.
The execution flow looks like this:
A program written in i, every time it runs, uses:
- Different data. Input data is provided by Internet APIs like google search, flickr, youtube, amazon. For example when the program needs a picture of a a car, it grabs it from one of the free repositories on the Internet. Possibly, it grabs a different picture every time it runs. When a program needs encyclopedic information, it gets an article from wikipedia. When it needs a definition of a word: it uses a free dictionary or google's "define: this", when it needs a word translated, it uses translate.google.com and so on. It can use paid services too. It all depends on what libraries are available. And here we come to point 2.
- Different algorithms. Algorithms can be provided by libraries or functions found on the Internet. The i runtime engine, if it cannot find a requested library or function locally, starts searching around, maybe looking in a few hinted or well known places, or maybe all over the Internet, again using google search.
To make the language universal, and quick to accept, it compiles to JavaScript bytecode or is read and executed by an interpreter written in JavaScript. The i program, and the i libraries can be hosted inside regular html web pages. That's how they can be discovered quickly. A regular web search finds them.
The execution flow looks like this:
- A user requests a web page from a web server. The web page contains an i program in a native format plus an i interpreter written in JavaScript. Or it contains an i program already converted to JavaScript.
- The program starts running on page load event or when the user clicks a button or some other way. The program gets data, finds and calls other i programs using AJAX calls to i runtime engine hosted on a web server within the same domain, which in turn calls various Internet APIs. Note: the primary runtime environment is the browser, but the runtime on the server is needed to get past same origin policy, to make the i interpreter smaller and simpler, and to provide standard i libraries. The program is effectively running inside the user's browser downloading data and pieces of i code as it goes. It can also run code written in any language, executed on web servers, exposed using REST. Details to be defined.
- An i program can run forever, and can run simultaneously on an unlimited number of computers by spawning itself from the browser to servers that accept i code for execution.
Wednesday, March 9, 2011
My ruby zoo
Ruby is fun. A lot of fun. It makes programmers smile. It makes them try crazy things... and those crazy things work.
Thank you Yukihiro Matsumoto!
Here is a little game I wrote with my kids one Saturday afternoon maybe a year ago.
There is an animal.rb and a zoo.rb and there is myzoo.rb which runs all that. I ran it using IronRuby.
animal.rb:
Thank you Yukihiro Matsumoto!
Here is a little game I wrote with my kids one Saturday afternoon maybe a year ago.
There is an animal.rb and a zoo.rb and there is myzoo.rb which runs all that. I ran it using IronRuby.
animal.rb:
class Animal # create accessor methods for reading these properties attr_reader :attractiveness, :upkeep, :name, :age, :dies_at, :cost_to_buy, :current_value, :dead MAX_ATTRACTIVENESS = 100 MAX_UPKEEP = 100 MAX_AGE_WHEN_BUYING = 30 MAX_YEARS_TO_LIVE_AFTER_BUYING = 30 MAX_COST_TO_BUY = 100 ADVERBS = ["Small", "Big", "Smelly", "Cutest", "Sweetest", "Greenish", "Killer", "Harmless", "Angry"] NOUNS = ["Croc", "Elephant", "Hippo", "Ant", "Bear", "Mollusk", "Octopus", "Snake", "Snail"] def initialize(name) @attractiveness = rand(MAX_ATTRACTIVENESS) @upkeep = rand(MAX_UPKEEP) @name = name @age = rand(MAX_AGE_WHEN_BUYING) @dies_at = @age + rand(MAX_YEARS_TO_LIVE_AFTER_BUYING) @cost_to_buy = rand(MAX_COST_TO_BUY) @dead = false end def Animal.get name = ADVERBS[rand(ADVERBS.length)] + " " + NOUNS[rand(NOUNS.length)] return Animal.new(name) end def make_older return if @dead if age == @dies_at @dead = true puts @name + " died of old age." else @age += 1 @attractiveness -= 1 end end def show puts puts "Name: #{@name}" puts "Attractiveness: #{@attractiveness.to_s} max: #{MAX_ATTRACTIVENESS.to_s}" puts "Cost to buy: $#{@cost_to_buy.to_s} max: #{MAX_COST_TO_BUY.to_s}" puts "Upkeep per year: $#{@upkeep.to_s} max: #{MAX_UPKEEP.to_s}" puts "Age: #{@age.to_s} year(s). max: #{MAX_AGE_WHEN_BUYING.to_s}" puts "Dies at: #{@dies_at.to_s} year(s). max: #{(MAX_AGE_WHEN_BUYING + MAX_YEARS_TO_LIVE_AFTER_BUYING).to_s}" puts end end # class Animal
zoo.rb:
class Zoo
# ticket price can be set directly
attr_accessor :ticket_price
# other properties are set internally
attr_reader :overhead_cost, :seed_money, :animals, :upkeep, :year, :animals_bought, :guests, :revenue, :cash
def initialize()
@animals = Array.new
@upkeep = 0
@overhead_cost = 100
@ticket_price = 10
@guests = 0
@revenue = 0
@seed_money = 500
@cash = @seed_money
@year = 0
end
def show
puts
puts "Animals: " + @animals.length.to_s
puts "Upkeep last year: $" + @upkeep.to_s
puts "Overhead cost: $" + @overhead_cost.to_s
puts "Ticket price: $" + @ticket_price.to_s
puts "Revenue last year: $" + @revenue.to_s
puts "Guests last year: " + @guests.to_s
puts "Cash: $" + @cash.to_s
puts "Year: " + @year.to_s
puts
end
# This defines how we buy animals:
def buy_animal(animal)
@cash = @cash - animal.cost_to_buy
puts "You now have: $" + @cash.to_s
@animals.push animal
end
def next_year
@upkeep = 0
@animals.each do |animal|
animal.make_older
end
@animals.delete_if do |animal|
animal.dead
end
@animals.each do |animal|
@upkeep += animal.upkeep
end
@guests = 0
@animals.each do |animal|
@guests += animal.attractiveness
end
@guests = (@guests/Math.sqrt(@ticket_price)).to_i
@revenue = @guests * @ticket_price
@cash += @revenue - @overhead_cost - @upkeep
@year += 1
end
end #class Zoo
myzoo.rb:
require "zoo.rb"
require "animal.rb"
YEARS_TO_PLAY = 10
CREATE_OR_APPEND_MODE = "a+"
WRITE_MODE = "w"
SCORES_FILE = "scores.txt"
def show_hall_of_fame
File.open(SCORES_FILE, CREATE_OR_APPEND_MODE) {}
scores = IO.readlines(SCORES_FILE)
puts "Hall of fame: "
puts "...is waiting for your name" if scores.length == 0
puts scores if scores.length > 0
end
def update_hall_of_fame (cash, player)
File.open(SCORES_FILE, CREATE_OR_APPEND_MODE) {}
scores = IO.readlines(SCORES_FILE)
scores[scores.length] = format("%10.10s %s", cash.to_s, player)
scores.sort!.reverse!
File.open(SCORES_FILE, WRITE_MODE) {|f| f.write(scores) }
end
def show_menu
puts
puts "b = Buy Animals"
puts "s = Sell Animals"
puts "p = Set Ticket Price"
puts "a = Show Animals"
puts "z = Show Zoo"
puts "n = Next Year"
puts "h = Hall of Fame"
puts "q = Quit"
puts
end
puts "Welcome to MyZoo!"
puts "You manage it. Try to make as much money as you can in #{YEARS_TO_PLAY.to_s} years."
print "What's your name boss? "
player = gets
myzoo = Zoo.new
show_hall_of_fame
puts "You have in the bank: $" + myzoo.cash.to_s
playing = true
while playing and myzoo.year <= YEARS_TO_PLAY do
show_menu
print "Enter command:"
command = gets
case command
when "b\n"
some_animal = Animal.get
some_animal.show
print "Do you want to buy this animal? (y/n) "
answer = gets
myzoo.buy_animal(some_animal) if answer == "y\n"
when "s\n"
if myzoo.animals.length > 0
puts "Your salesperson has been eaten by #{myzoo.animals[0].name}."
else
puts "There is no fauna in your zoo."
end
when "p\n"
print "New ticket price: "
answer = gets
if answer.to_i > 0
myzoo.ticket_price = answer.to_i
else
puts "Sorry, no free tickets this year."
end
when "a\n"
if myzoo.animals.length > 0
puts "Your animals: "
myzoo.animals.each do |animal|
animal.show
end
else
puts "Did you buy any? Are they still alive?"
end
when "z\n"
myzoo.show
when "n\n"
myzoo.next_year
myzoo.show
when "h\n"
show_hall_of_fame
when "q\n"
print "Abandoning your enterprise? (y/n)"
answer = gets
if answer == "y\n" then
puts "Good-bye!"
playing = false
end
end
end
update_hall_of_fame(myzoo.cash, player) if myzoo.cash > 0
show_hall_of_fame
Tuesday, March 8, 2011
"Marek Edelman. Życie. Po prostu." by Witold Bereś and Krzysztof Burnetko.
I have read this 500 page book in Polish. The English title is "Marek Edelman: Simply A Life". A 30 minute DVD is included with the book. It shows Edelman being interviewed by the authors for the book.
This book is for you if you are looking for a first hand account of what the relations between different groups of Jews and Poles were in pre-war Poland, during the war, and after.
This book tells the story of the first Warsaw uprising - the Ghetto uprising - as it was: without pathos. It is a shocking story, but told without big words or hatred.This book also tells a more general story. This book is for you if you are looking for inspiration how to live your life. What is important.
A few quotes by Marek Edelman:
"In life, those who let others live, are right."
"In principle, life is most important. And if you live, then the most important thing is freedom. And then you give life for freedom. And then you don't know what is most important."
"I am a Polish Jew, but Ala [wife] and all Jews think that I am a disgusting polonophile, and that I have a character of a Pole. But I think that patriotism is disgusting. I would never say about myself that I am a patriot - I am a patriot of the idea of freedom everywhere."And finally:
"In life, I like caviar and beautiful girls."
............
2025.05.29 update:
Marek Edelman is an exemplary person, a hero, but even he had skeletons in his closet. During the interview he said in passing that before the war he too took part in scamming of the farmers coming to Warsaw. The interviewers didn't ask him to explain.
2025.06.12 update:
Another thing that I remembered in view of the lies that sometimes show up on the internet: Poland did not expel Jews in 1968. The communist party's "anti-Zionist" campaign affected Polish Jews, including Marek Edelman, but it did not forcefully expel them from the country. Instead, many lost their government jobs, including Edelman, and were told they could apply to leave the country. This was completely voluntary. If someone took up that offer, and many people, not only Jews, desperately wanted to leave communist Poland - in 1970 there were 20 attempted hijackings of passenger planes - to escape to the West, they would have to sell their possessions, and they would be given a one-way travel document. Edelman, if I remember correctly, got some other job thanks to a friend, and in less than a year, when the campaign ended, got back his original job at the hospital.
The Associate by John Grisham
Read by: Erik Singer
9CDs
Another story from the world of lawyers. We meet Kyle McAvoy when he is a senior at Yale law school. He is about to graduate and start a career in public law, but someone sinister has other plans for him. What will Kyle do with his life? Will he follow his ideals or will he give in to the dark side?
9CDs
Another story from the world of lawyers. We meet Kyle McAvoy when he is a senior at Yale law school. He is about to graduate and start a career in public law, but someone sinister has other plans for him. What will Kyle do with his life? Will he follow his ideals or will he give in to the dark side?
Subscribe to:
Posts (Atom)
