Archive for the ‘books’ Category

How long will humanity survive?

Tuesday, August 18th, 2009

I'm reading a book called "The Goldilocks Enigma" by Paul Davies. It discusses why it is that the universe seems to be so finely tuned to life. It explains all the 'coincidences' that have turned up in cosmology and quantum physics, the constants that we experience such as the strength of gravity, the size of protons, the power of the electromagnetic force, etc, and describes what would happen if they were slightly different.

The book has pointed out the one glaring exception to the "principle of mediocrity" that says the universe is pretty much the same wherever you look: the exception being that we are here and we have never yet observed intelligent life elsewhere! Why should that be? It continued by covering in detail the theory of multiple pocket universes, perhaps an infinite number of them, creating a collective multiverse. I am just coming on to the part about simulated universes and whether we would even know if we were in a simulation. All this i find very fascinating.

One thing made me stop and think this morning. It was just a little aside to another point the author was making. I'll quote the context and bold up the bit that interested me the most.

While the simulation argument was restricted to a single universe, it was always possible to wriggle out of the uncomfortable conclusion that this might be a simulation by arguing that no civilizations are likely to reach the point of achieving such stupendous computational power. For example, there are many reasons why humanity may not survive for more than a few centuries beyond the present, and that may not be long enough for conscious computers to be developed. If a similar fate were to befall any other intelligent beings who might be located elsewhere in the universe, then simulations, while still a possibility in principle, might never be achieved in practice.

Paul Davies, The Goldilocks Enigma, page 208.

There it is. Just a little snippet with no elaboration. Just a cold hint that our species might not be around for very much longer. A footnote references "Our Final Century" by Martin Rees. I think i should read that book soon!

The reason it caught my attention is that i have been thinking for a while that we might be heading for an early demise. A point made in "Conversations With God" is that our technological advances have now exceeded our sociological development. We have the ability to annihilate our entire species (and many of the others) if we misuse our technology. The scary thing is, all it takes is a few wrong decisions by a minority of people with great influence. Look at the Iraq war. I was one of 36 million people[citation] who protested against it before the war began. It did no good. We couldn't change the minds of the people who decided it would happen.

If it's not a devestating war it'll be run-away climate change, or over-population leading to world hunger, or an asteroid will hit the planet and wipe us out. In the long-term i think the only way to ensure the prolonged survival of our species is to spread ourselves out across other planets in the galaxy. Of course, eventually we would have to do that anyway: in 5 billion years time the sun will run out of fuel. But how soon can we start migrating to different planets? Current estimates suggest not very soon at all!

This is the first hint i've come across that says our time left could be measured in centuries. In "Stardust", Stephen Welch says that the average life-span of a land-based species is 5 million years. We humans have only been around for the last 200,000 years. It's a terribly young age for a species to die!

But if we are wiped out, what happens next? I believe that life will go on in some form. Life is very resilient, once started, it's very hard to kill it. No matter what happens to the planet, even if we can't survive, something will. But then what of all our culture, our literature, our art, our technology? Everything that we've produced will eventually fade and crumble without us here to preserve it. Does that matter? Wouldn't it be a shame if another intelligent species were to come to our planet in a million years' time and find no trace of our existence?

What are we really trying to achieve here, anyway? I mean really long-term. Eventually our entire universe will freeze out as the last stars extinguish all the available fuel. We know that the human race cannot survive indefinitely, at least, not unless we can figure out a way to jump to a different universe, all of which (if they exist at all) are probably receding from us faster than the speed of light! Even if we put our consciousness into a simulated reality, it cannot outlast the life of the universe. Everything needs energy, and the second law of thermodynamics will be our ultimate downfall. "The Last Question" by Isaac Asimov, written in 1956, makes this point profoundly. It's a good read; i enjoyed it recently.

Ah, where am i going with this? I know we as a species won't last forever, I don't want our entire existence to be meaningless in the end but i can't work out what it would take to make it meaningful on a cosmic scale. I think that a few hundred years is not a long time for homo sapiens to have left, and i hope we can get past our selfishness and childishness. I hope that our final end isn't caused by our own silly fault.

CouchDB and data storage

Friday, April 10th, 2009

Alexander Lang has written a great article about why CouchDB is not compatible with ActiveRecord, and why you should not try to coerce CouchDB into mimicking a relational database. It really is a very different thing altogether: The case of ActiveRecord vs. CouchDB

In my experience of CouchDB i first tried out ActiveCouch because of my familiarity with ActiveRecord. I soon came across problems because it was trying to make CouchDB something that it is not. As i exclaimed at the time, "LOL. ActiveRecord this is not!"

I had far more success with couchrest which is a much closer CouchDB wrapper, enabling CouchDB to be used as it's intended: as a RESTful interface with map/reduce views.

Domain-Driven Design

Recently i have been reading Domain-Driven Design by Eric Evans. Through reading it my understanding of Rails – and web programming – has completely turned around. My thinking used to be entirely database-centric. I saw Rails as little more than an easy access into the database. For ages i didn't even realise that you could have models that weren't connected to a database table!

Now my thinking has changed and i consider the primary focus to be the domain model. I think about the classes and the design patterns that apply to them. I consider how they fit together, how they communicate with each other, and the boundaries between the core domain and subdomains. In my mind, the database has gone from being the most important thing to being just a method of persistence for the data in the domain model.

When you think of things this way round you are less likely to get hung up on the differences between ActiveRecord and CouchDB. You work out your domain, design the classes and then think about the most appropriate database platform to support your model.

Update: I've just come across a useful article that provides three methods to achieve a has_many relational structure in CouchDB. CouchDB "Joins" by Christopher Lenz.

Better blogging

Monday, December 15th, 2008

So yesterday's post was actually not the last post of the year! :)

A few nights ago i saw somebody's blog had little icons next to comments, showing the country, browser and operating system of each commenter. I found that quite interesting and decided i wanted the same on my blog. I discovered that it is part of the FireStats plugin and so i installed it. Little did i know the impact that it was about to have on me!

FireStats reveals a whole lot of fascinating information about who is visiting your blog. Suddenly i can see the most popular posts, find out the search terms that people used to get here, or the referrer page that sent them here. I used to think i was just writing my blog for a few friends, but now i see that people are coming from all over the world, mostly for information about CouchDB and … Caturday! HAHA! I haven't done a Caturday post for ages! Perhaps i should start doing them again!

So i put up the "Currently popular" widget in the navigator. It's pretty nifty because it changes every day. I also installed a few more plugins and made a few tweaks:

  • I enabled title slugs in the URL for all my posts. The old URLs still work, however.
  • Yet Another Related Posts Plugin puts links to related posts at the bottom of each post. It calculates 'related' by category, title and content. It's pretty good! I have been reminded of old posts that i'd forgotten about!
  • Unfancy Quote Plugin has removed the so-called curly quotes that were appearing where i did not want them – ie in example code
  • WP Super Cache ensures speedy rendering of pages, particularly if hundreds of people were to look at a page all at once. Instead of continually querying the database, once it knows the content of a particular page, it can just display the cached version.

WordPress plugins are so for the win!

* * *

In other news, i finished reading Design Patterns today. It wasn't such a hard read as i thought it would be; it's actually quite easy to read one or two patterns at a time. The summaries are also very useful, for comparing and contrasting different patterns.

The State and Strategy patterns were quite obvious. Mediator seems almost the same as Observer to me. No matter how many times i read and understand the difference between Adapter and Bridge, i cannot seem to remember it long-term. Memento is my favourite pattern. It's like asking someone, "Please remind me of this in a minute!" and they say, "Oh, okay" even though they have no idea what it means!

Visitor seems to me like the stupidest pattern ever, but maybe i have misunderstood it. It seems to contradict everything that makes sense about object-oriented programming, to have something that goes around doing things to other objects, violating encapsulation, and it has to be hard-coded to deal differently with different objects. It makes me think of Aspect-oriented programming actually.

I went to the library and borrowed a book for the holiday: Why Is Uranus Upside Down? And Other Questions About the Universe by Fred Watson. A nice bit of light reading, i think! ;)

Awakening

Saturday, October 11th, 2008

Now something inside is awakening,
Like a dream I once had and forgot.
And it's something I'm scared of
And something I don't want to stop.

Sara Groves – Awakening

Stealing other people's lyrics in order to convey your own feelings == WIN.

Lately i keep getting calling cards from God. Sometimes it just happens like that – a whole stack of coincidences arrange themselves to make an impression on me. I feel a spiritual hunger. I miss something about church, and christian music, and collaborative worship. I suddenly find myself surrounded by Christians and admiring the things they are doing.

My attitude is shifting ever so slightly, from "I don't think i can ever be sure whether or not there is a God" to something more like, "I am willing to entertain the possibility there might be a loving God". I realise there's not a great deal of difference, but to me it feels different. One says there is no point even bothering to contemplate God, and the other says there is every reason to explore the possibility of a personal relationship with God.

Something is stirring within me, but i am very conscious that i have been at this point of "Awakening" many times before. What usually happens is one or two Christian friends give me some encouragement, and then a whole load more Christians put me off.

Christians, let me give you a clue: telling me i should not do yoga does more harm than the yoga itself would do. Telling me not to read certain books does more harm than the reading of those books. Condemning me for my sinful lifestyle does far more harm than my living with my loving partner (to whom i was not married) for four years. Thankfully we have now absolved ourselves of that particular 'sin' by getting married! :)

Today i encountered some Christians from various churches in the centre of Winchester. They call it "Healing on the Streets". I received some prayer for healing for my shoulders, neck and jaw … which are always tense due to stress and grinding my teeth at night. They were very kind and i enjoyed to be prayed for. I met someone who attends the Harvest church, which i have been vaguely thinking about trying out. I didn't make any promises, but i might visit tomorrow.

In wonderful contrast to Christianity, i also bought a book today called Fuck It. The Ultimate Spiritual Way. I have just started reading it, and i'm quite enjoying it. It's an amusing little book that could teach us all to just lighten up, relax, let go, stop making everything so meaning-full. It's the western equivalent of all that mystical eastern teaching, but without any new-age esoteric complications. It's so simple! Just try saying "Fuck it" to something that's bothering you, and see if you enjoy the freedom that results!

A post of many dimensions

Sunday, November 18th, 2007

I am currently reading Hyperspace by Michio Kaku, and absolutely loving it! So fascinating, and so well explained. Who would have imagined that the physical laws of the universe become simpler and fit together better in higher dimensions?! Just getting on to superstring theory, and actually understanding it!!

I have just found a wonderful video that enables a way of conceiving ten dimensions … anyone interested in higher dimensions should absolutely definitely watch this video! I have also been watching video trailers of Flatland the movie, and i am looking forward to reading the book.

Oh my gosh, youtube is great for explaining scientific theories! Here is an amazing program by none other than Michio Kaku, explaining superstrings, the nature of the universe, the search for a unified theory of forces. Its a half-hour program in four parts – just search for Michio Kaku on String Theory. WOW.

There was something else i wanted to mention: Buy Nothing Day is coming up on Saturday. I am going to challenge myself not to spend any money at all for the whole day. Not only is it a personal challenge (not too difficult i hope!) but also it is a message to the retail industry that we will not get drawn into this world of consumerism and shopoholicism.

Chaos

Friday, November 9th, 2007

I finished the book "Chaos" by James Gleick today. It took me a while to get through it – such a heavy-going book, but i'm very glad i made it to the end. For about half the book i was thinking, "Well that's very nice … but … so what?!" but i think i got it by the end. My opinion of the term 'chaos' has certainly changed significantly in that i now regard chaos as ordered and meaningful; quite different to randomness. I read an article on Madeline McCann that described the investigation procedure as 'chaotic' and for me it really meant something very different than it would have done a month ago; definitely not what the journalist intended to convey!

There is a nice little summary of the book here for anyone who would like to know what it's about but doesn't want to go into all the intricate details.

I warn you though, i'm a bit fanatical: i made a dragon curve today out of a piece of paper and an ignorant colleague called it a Mandelbrot! I was like: "A dragon curve has absolutely nothing to do with the Mandelbrot set! For a start, the Mandelbrot set uses complex numbers!!" So if you want to sound knowledgeable, be sure you know the basics!! ;)

A strange scientific phenomenon

Tuesday, October 23rd, 2007

Is there a scientific law which states that clocks are more likely to stop when you're away on holiday than when you're at home to notice them stop?

The last two times we have come home from a trip away, one of our clocks has been found to have run out of battery and stopped. They had previously been running for months, maybe years without stopping, so why should they stop during the time that we were away?! Even when we were only away for 5 nights!!

The books i am currently reading cause me to ask questions like this all the time! I am now reading "Chaos" by James Gleik, which is a welcome relief from the last three scientific books i have read, which gave me a very depressive view of entropy – the state of disorder. Entropy can only ever increase, never decrease. Any system, left to its own devices, will become more and more disordered – which is why my desk gets messy and needs tidying. But even then i am expending energy in the form of heat for the work done in order to tidy the desk. Heat is a disordered form of energy so entropy still increases!

However, the book of chaos tells me that there can be order within chaos, and the most beautiful example it gives is the red spot of Jupiter. Whilst chaotic storms are constantly occurring all over Jupiter, the red spot somehow remains constant: a place of order within the chaos. Simulations have been created to model it, and they produce the same phenomenon. This makes me feel a little more positive about entropy.

* * *

Well, we had a very nice break away, and a very good journey home. I think that 5 nights away is probably my personal optimum, although i felt ready to come home yesterday, i was content to stay another day. We had a really lovely time.

In other news i have just been told that Winchester is the least green city in the whole of England. Oh dear.

Talking about books

Monday, September 24th, 2007

I thought i would upload holiday photos tonight … but now the time comes i just don't feel like it. So i'll save it for another evening, or possibly the weekend. There's no hurry.

Instead i find myself wanting to record that i am currently reading The Whole Shebang – A State-of-the-Universe(s) Report by Timothy Ferris, and enjoying it very much. I found it in a bookshop in Budapest and managed to bargain it down from 800 to 600 Forints (which is about £1.70). Okay, the book is about 10 years old, but it is very easy to read and understand, with plenty of comparisons to things i can realistically imagine, to help me visualise the concepts that are being explained. I have learnt all about the age and rate of expansion of the universe, red shifts, space-time distortion … i am currently reading about the many fascinating aspects of black holes! :) Best of all, the book is signed by the author on the first page! ;)

I have always been interested in space, and this book works for me where Stephen Hawking's Brief History of Time did not. I tried twice to read it and got baffled by the science. Hopefully, having read this book, i will be able to try the Stephen Hawking one again. I'm also looking forward to learning more up-to-date developments once i have a thorough understanding of what was known ten years ago.

Whilst on holiday i also read a Terry Pratchett book – The Light Fantastic. It reminded me just why i cannot stand Terry Pratchett – just ridiculously stupidly far too random for my liking – but my partner the book for me (off read it swap it) so i thought i should give it a try. Despite myself, i did actually find parts of it quite funny, and i especially liked Death as a character, so maybe i will try reading Mort one of these days.

I very much enjoyed Fingersmith by Sarah Waters, although i was disappointed that an absolutely perfect plot line i thought was coming did not. It seemed too delicious an opportunity to miss, but it almost seemed as if Sarah considered it, began writing it, then let it flop and instead devised a highly improbable plot device to replace it. There was also a particularly obvious line of contemplation that i think should have been pursued, but was not even touched upon. I'm trying to be cryptic to avoid spoiling the book for anyone else who wants to read it … but if anyone already has, i'd be keen to discuss these ideas.

Happy holidays

Tuesday, September 18th, 2007

We are thoroughly enjoying our holiday, although i am also looking forward to going home. We have been to many museums and visited many tourist attractions. We shall probably spend the remaining days re-visiting places we have already been to take some more photographs.

One of my favourite places we visited was a Roman ampitheatre, out of the way where not many people visit. It was thoroughly overgrown, but felt steeped in history. There were hundreds of lizards living in the stones – so pretty they were. I was lucky enough to find a still one and take a photo. Most of them run away when they hear you coming.

Today i am spending a morning on my own, since i am the kind of person who needs to do that every now and then. I have a bottle of water, a book and an iPod, and i shall walk up the hill to find some peace and stillness, away from the crowds and the noise. I am currently reading Fingersmith by Sarah Waters, which i highly recommend. It is intriguing and fascinating, with a really sweet hinted underlying love story. I am not half way through yet so i do not know what might still happen.

I hope everyone is fine. I look forward to coming back home and being in better contact with everyone.

who-am-i
A web programmer in my late-late-twenties, fanatical about open source, free software, loving my job working daily with Ruby on Rails, RSpec, Cucumber and Git.

I am very proud to have created MyChores.co.uk, an online team based tracking system for household chores and other recurring tasks.
Search



Flickr