Ravings of a Classical Scientist

This blog is the result of a rational minded person looking at many aspects of the world around us. Warning: This blog is not for everyone, ignorance is bliss, so don't get angry at me for ruining it.

Name:
Location: Toronto, Ontario, Canada

I'm an atheist humanist who strides to enlighten people if they have a desire to learn truths. As a professional physicist I can only be reasonable and logical because I dislike being wrong.

Wednesday, February 28, 2007

Priest's sex abuse victims

It is completely ridiculous that abuse victims of the Catholic church get accused of extorting money!! These were not adults who were abused but children! It is an unforgivable act to abuse a child but covering it up or belittle these people's pain.

This came from watching the fifth estate about the Catholic London diocese. I hope they go bankrupt like the San Diago one! Any institution who protects pedophiles deserves its fate. Such activity cannot be justified and the idea that the rest of parish shouldn't have to suffer is bunk. If you support an institution you are partially responsible for it.

Labels:

Friday, February 23, 2007

The arogance of scientists is sometimes a virtue

It is often said that scientists are arrogant elitists which is sometimes true more often it is confidence mistaken for arrogance. But when one thinks of how science works this can be a major asset. When some scientists challenge current theories with new ones they are met (rightfully so) by a huge wave of skepticism. The confidence or even arrogance of the scientists is needed to continue to build the case against such opposition. It is a travesty that the general public does not understand the peer review process and the difficulty in establishing alternative theories. One day when I get involved in school curriculum I will bring it up.

Labels:

Thursday, February 22, 2007

Published

I finally got published in Physical Review A with a thank you to Igor for all his help. Now I have one in each of the journals that are popular in my field I feel better. I'm almost ready to start writing the next one... I'm just not looking forward to the writing ;-)

Labels: ,

Sunday, February 18, 2007

Hope in Europe

While deluded German chancelor Merkel tries to push a EU constitution with a strong declaration of the special place of Jeudeo-Christianity in the founding and current day root of values there is still hope. It seems that a large and broad coalition of secularists (which includes religious and non-religious since secular means for NO government religion not a ban on religion as the ignorant and malicious would have you think).
Quote:
The centerpiece of the Vision is the "Brussels Declaration," a one-page restatement of our common values, the liberal values of individual freedom, democracy and the rule of law on which modern European civilization is based. They are not the values of a single culture or tradition but are our shared values, the values that enable Europeans of all backgrounds, cultures and traditions to live together in peace and harmony.

The Brussels Declaration is the outcome of an unprecedented Europe-wide collaboration between academics, politicians, writers, community leaders and both secular and religious non-governmental organizations. It has already been endorsed by hundreds of European leaders including dozens of members of parliament.
It is always encouraging for me to see a backlash of reason against idiotic politicians. This is especially true when I see religious people fighting this fight since they understand the only way to guarantee religious freedom is by secularism. There are enough theocratic states in the past and present to know it only hurts everyone. I hope the EU will come to it's senses and adopt a secular and therefore fair constitution.

Labels: ,

Sunday, February 11, 2007

More details on openmp

There are a few little things I've learned that I want to share in hopes others using the openmp will not spend the 6 hours "debugging" the same types of mistakes I did.
(This is meant to clear up some stuff that I found unclear on other pages but is in no way complete).

The first thing to try is compiling without openmp (usually by not including the -openmp flag) and see if there are any normal mistakes. If the code is mistakeless (no hanging parenthesis or undeclared variables) then it is still compilable without openmp it will just run as a serial program.

The next thing is that directs for improving loops is incredibly sensitive and they really mean the loop must be on the very line. For instance
#pragma omp parallel for private(i)
norm =1; for(i=0 ;i <N ; i++) {...}

gave me errors of: syntax error before '{' token but on a line that was 10 or so lines preceding this code. That took me a long time to figure out. It doesn't complain about the code itself but says there are errors in parenthesis in preceding lines (at least that's what happened for me). But just putting the norm = 1; before the #pragma directive it all works. Putting parenthesis encapsulating the for loop also seem to be a source of error. So it wants
#pragma omp parallel for private(i)
for(i=0 ;i <N ; i++) {...}
NOT
#pragma omp parallel for private(i)
{for(i=0 ;i <N ; i++) {...} }

Also there seems to be no reason to do everything under a giant #pragma omp parallel code segment with subsections for #pragma omp for or #pragma omp sections. In fact it seems much easier to do it in small forks. As in having a segment:
...

#pragma omp parallel sections
{
#pragma omp section
{
code; code(A,B); etc... }
#pragma omp section
{
code; code(B,A); etc... }
}

...
printf(...); other regular code...
...
#pragma omp parallel for schedule(static) private (i,j)
for(i=0 ;i <N ; i++) {...}

Well I hope this save someone time and effort.

Labels:

Saturday, February 10, 2007

Threading a scientific program

I wanted one of my codes to have a section where it would diagonalize 4 different matrices at the same time (since this is my bottleneck) and the computers that I'm running on (sharcnet) are mostly quad processors. I looked in to MPI and it's apparent processing and it is hard!! It is clearly not meant for what I wanted to do. I have a code that executes in serial and at a bottleneck point I wanted it to do many things on different CPU's. Then I found openMP. This was what I wanted, a way to parallelize a section of my code without a complete rewrite! I found the SECTIONS and SECTION commands especially easy. For instance say you have 2 matrices A and B and you want to do something to them with the function diag(). In a normal C code you'd have
...
diag(A); //long wait
diag(B); //also long wait
...

With openmp you can fork this section of the code with
#pragma omp parallel sections
{ }
This created an area that is forked and then joined at the end. So once this region finishes executing it goes back to serial-type execution. In the SECTIONS part you now (optimally) make a number of SECTIONs that equals the number of processors (not rquired but makes sense) and each section will execute on a different CPU at the same time but once the SECTIONS section ends it's regular execution again. So for matrices A and B you'd have
...
#pragma omp parallel sections
{
#pragma omp section
{ diag(A)}

#pragma omp section
{ diag(B)}
}
... //this will be normal C or C++ code. There is plenty more but I don't need it right now so that's all I know. I can say this is defiantly easier than using MPI send/receive! Some good sites are AMD's short one and a more complete one here. Hope this helps someone but leave me some CPU's please. ;-)

Labels: ,

Thursday, February 08, 2007

Devil's in the details

When I started joining in and participating in humanist and atheist groups I really thought they would be a very mono-philosophical group. Boy was I wrong! When you get a group of people together who's one thing in common is the desire to analyze and question everything you get a very diverse spectrum of opinions. There seem to be a few scales though that help to measure (at least for myself) the differences.

The first is how scientific. This includes aversion to academic learning (the "I know a lot and I didn't need university" people, which is fine but they clearly have a chip about it) and scientific literacy. The other is upbringing and tradition which includes age. The latter is usually a good tell in how far these people are willing to "push" their views into society (not onto individuals) by making their voices heard along side the religious. The placement on this two-dimensional grid gives some idea where people will answer some of our communities vexing question such as: is humanism a religion?

I find a lot of these arguments pointless since they usually come down to the definition of some word. In fact I've found this to be a great niche for myself. As a board member of the Humanist Association of Toronto (HAT) I've enjoyed clarifying the debate by narrowing it onto the actual core question and then proposing my answer to that question. Even if other disagree with my answer they at the very least speak then only about the actual core question not side bars or irrelevant tangents. Oddly though I've also learned that as a general rule some "discussions" at meetings are actually intended simply as an airing of grievances. I've found many times people will first spill out a bunch of emotive statements in a discussion who's only purpose is to unencumber themselves of the grievance. I find it is best to let people get it out but that they should only be allowed a single turn and it becomes time to step in once and refocus once people seem to have exhausted the general feeling and before it becomes impolite and personal. It does seem to me that a strong group can dispatch of many ill feelings by a short airing in the form of a discussion as long as it is terminated quickly.

In my short time with these organizations I have definitely learned that there are many types of atheists and some are not on par with me. For instance brutal Buddists or "spiritualists" are not really people I have much in common with. They are still religious except of rigid dogma they have fluid dogma. This is in some ways worse since if you say nothing you can't ever be wrong but it means you stand probably change with the times (i.e. no stonings). But there are a few commonalities between all the non-spiritual atheists that I've noticed. The first is that we are a very positive bunch. It seems most if not all of us are optimists by nature. Secondly it is a community that is will to debate ANYTHING!! This has its ups and downs but is only a positive since you can walk away from any discussion based on interest and you can start any discussion. This makes the community vibrant and always interesting since we are always on the edge of the marketplace of ideas and always willing to contemplate new problems.

Labels: ,

Tuesday, February 06, 2007

Freewill and milestones

It's often fun to reminisce about milestones in one's life like when one left dogma, when one accepted facts over personal opinion and I think freewill is my most recent one. I haven't thought about freewill for a while (3+ years) with my last thoughts on the subject being "I don't know" since the question is really asking if the universe is deterministic or probabilistic fundamentally. Since there have been no conclusive experiments I could find no other alternative. In the last few years I've been reading eh Scientific American Mind magazine and learning bits and pieces about the current state of neurology and a crucial piece of information came my way. But before I reveal it I want to say why the Scientific American Mind magazine was important (it's kinda embarrassing).

While I always thought of chemistry and biology as "physics too large to compute" fields the mind/brain (if you think they are separate your on the wrong blog) was still a thing of mystery (not in the religious person's sense but in the Sherlock Homes sense as in I haven't thought about it enough or read enough). The magazine forced me to deal with my machinery in a very critical and scientific matter making clear this was a physical system (albeit a complicated one). See I think I still had some lingering Christianity buried in there and it is weird to describe. It wasn't a coherent set of beliefs but a kinda remnant feeling of the way things "are." Like a prefeeling that there was a "mind" in the brain but when I thought about it, poof it was gone! I would describe it as a place surrounded by scientific logical knowledge (from the magazine) about how the brain works that I simply hadn't accessed and updated. It's gone now, but I wonder what else is in there.

Anyways the important piece of information I needed to make my call on the freewill bit was whether mechanisms in the brain that did processing were small enough for quantum effects to be felt. The answer is a resounding no. All components of the brain are very large compared with quantum dimensions making quantum effects negligible, too small to allow for "internally random" thoughts (that's my definition of freewill). So reality does not seem to accommodate the idea of freewill so as the ether it must be abandoned until other evidence to the contrary is shown.

Labels: ,

Sunday, February 04, 2007

All-knowing God and freewill

At the gym yesterday I got into a discussion with a Muslim (accidentally) and I asked if Allah is all-knowing then how can he have freewill? To me it seems like the logical implication of an all-knowing god is that he knows all and so he will know every decision you make and so you can't surprise him or he wouldn't be all-knowing. Therefore an all-knowing god implies no free will.

Labels:

Friday, February 02, 2007

Review of my Creative ZEN M Vision

I decided to go with the creative Zen (60GB) rather than the video ipod and I don't regret it at all!! I chose it for two main reasons and I have been very happy with that choice.

The first reason was I saw both of the players side-by-side and compared the video screens. The Zen is much brighter with much more vibrant colors.

The second reason was much more technical: the ZEN is much more compatible with regular codecs! It would b really annoying to have to convert every movie and TV show into the right format (and very time consuming). The ZEN has the most popular codecs and so most files and can transfered with any conversion! If you want to save space you can convert any video into 320x240 (the res of the screen) to save space, but with 60GB this hasn't been a problem.

The software is also really good with some extras and a built in microhone. I thought that would be useless but I really like being able to quickly record something (someone's email, notes or reminders) at the touch of a button. That brings me to another likable feature, a programmable button. You can assign it as you like and easily change it. The ZEN also has great battery life and for $25 you can buy a usb to 120V plug and connect it anywhere. It also as a syn for cameras so you don't need to buy a bigger memory card, you just plug your ZEN to you camera (no computer) and download the pics. The photo cart has also been really neat since I now carry my entire digital photo collection in my pocket! No need for bulky albums and you can even make custom slide shows.

The ZENcasts (same as podcasts) are neat but I don't like the fact that the software doesn't directly let you chose to listen to the zencast's as mp3's only. When the podcasts (mp3 files on the HDD) are transfered to the player it encodes some graphics (mostly name of the show and some info like guests names and topics). This is a neat feature but I'd like to be able to turn it off (you can just let the sync program be aware of your podcast folder and it will transfer them as mp3's but that's a hassle).

The battery like is awesome and is actually up to specs, another reason I went with the ZEN despite it's size. It may be a little bigger than the ipod but it is already so small it makes no difference to me. The main qualm is the difficulty in finding accessories. I'd like to get a rubber or plastic cover but can't find any (by passively looking).

I bought it for two main uses: I wanted to listen to podcasts while walking the dog and to occupy me when I am someplace I can't read but am board (shopping for clothing with the misses, after a long day on the bus/subway or waiting for bureaucrats). I have found it useful for even more things and would defiantly recommend it.

Labels:

Great News!!!

Well I have been mute for a while for reasons I will post later but for now the big announcement is that my wife is pregnant!! The due date is Oct 4th (very close to a good friends bday :) I am thinking of recording a WAV file near her uterus and trying to see if I can find the signal of the baby's heartbeat. It seems like a cool first peek!

Labels: