Friday, June 14, 2013

Atheism: Disproving the argument from complexity

When intellectual theists are asked to prove gods existence, one very common argument is the argument from complexity.

The argument is as follows:
Simple man made mechanises we encounter every day, a watch, a car, or a phone, have a certain level of complexity.
Obviously we already know they are man made, no matter where we are to encounter them.
So to begin the argument, we assume we don't know about the origin of these objects.
Due to their complexity, we could not imagine how would they form spontaneously or randomly in nature.
So we reach the conclusion that they had a creator, since we know intelligent life forms, such as ourselves have the capacity to invent and construct complex machinery.


From this premise, we extrapolate that since biological life, and its superset, the universe, are much more complex, it is obvious that it too needs a creator.

But first, what is complexity?
Using the standert definition from thefreedictionary.com :
'Consisting of interconnected or interwoven parts'

But this definition doesen't quite captures the intuition we have when using the word.
Why?
Think of a lump of coal, it is made of billions upon billions of carbon atoms, surely it can be considered as "consisting of interconnected parts", right?
But a lump of coal doesn’t strike us as complex, which means the definition isn’t precise enough to capture our intuitive understanding of the word.
I would try to come up with an improved definition, trying the capture the meaning behind the theists use of the words.

Complexity:
Consisting of interconnected parts which oparate  together to form a greater purpose, function, or goal.

Using this definition, we can now understand why we think of a micro-organism as more complex then a lump of coal, although the coal may have a million times
more atoms (= parts).

Back to our universe.
The approach of argument is nonsensical, and here's why.
When talking about any physical property, i.e, mass, volume, length, time, energy,
Any sentence of the form "The universe is very *insert physical property here* "  i.e:
"The universe is very massive"
"The universe contains a lot of energy"
"The univere is big"
is tautological.

Since by definition, our universe is the sum of all objects in existence, every property which increases as more objects are added will reach its maximum when including all objects.

Coming back to our complexity property.
For those sentences to have any meaning, we need to discover at least another universe, measure its complexity, and compare the two.

Then we will be able to say whether our universe is complex RELATIVELY to another universe.

Actually, to use this argument in the most confident way, we would need to observe many other universes, measure their relative complexity, see if they were created randomly or by intelligent design, and then reach the conclusion of the probable origin of our universe,
but this method is circular and thus impractical, if we could somehow find the creator or lack thereof in other universes, we would do so for ours.

Saturday, May 25, 2013

Max image upload limit in wordpress

I tried hosting a web server on a virtual machine,
Details:
Virtual box
Ubuntu 12.10 server
apache
wordpress

I tried to upload a couple of images from a trip with my family, but there was a file size limit of 2MB on each image.

Solution:


1.find the file php.ini in your php installation:
find / -iname “php.ini” -print 2>/dev/null

(The “-print 2>/dev/null” part makes sure you don’t see error massages in the find output)


I found my files in two places:
/etc/php5/apache2/php.ini
/etc/php5/cli/php.ini


2. Edit each file using:
sudo vim php.ini
 

3. And search for the line:

upload_max_filesize = 2M
in vim:
/max_filesize

4. Change it to your preferred limit, save the file.

5. Restart apache with
sudo service apache2 reload 





Can’t console to router on ngs3

Running ngs3 on linux, configured everything, chose a bin file for a router, dragged him to the window, and now I am trying to console into him from right mouse menu, but can't.

Solution:
From settings, enter terminal settings, and chose another terminal console app, hit use, and apply.

Thursday, May 23, 2013

My Scripts: Backup your configuration files


File name: configbackup

#!/bin/bash

tmpdate=$(date +%D | sed "s/\//-/g");


tar zcvf ~/config_backup$tmpdate.tar.gz ~/.vimrc ~/.zshrc ~/.config/awesome/rc.lua  ~/.vimperatorrc /usr/local/sbin/*



Explanation:

Save the date as 05-23-2013 for example, the sed is substituting the the '/' in date with '-'.
tmpdate=$(date +%D | sed "s/\//-/g"); 


Create a compressed tar archive in home dir, called config_backup05-23-2013, where the date in the name changes acording to the date when you executed the scrip.

The files to be included are some configuration files which are important to me, but you should change them to your preferred ones, just write all of them with space between each one, all on the same line.
tar zcvf ~/config_backup$tmpdate.tar.gz ~/.vimrc ~/.zshrc ~/.config/awesome/rc.lua  ~/.vimperatorrc /usr/local/sbin/*








I save all my scripts in /usr/local/sbin/, which is included in $PATH, that way I can
launch them just by issuing their name from every directory.

I chose this dir because it was empty to begin with, a perfect place for all my scripts.


This is part one of a four part mini series where I will post small scripts I've written, along some documentation and explanation.

Saturday, March 2, 2013

Sleep as android

Yesterday was my first trial of the app called "sleep as android".
Sleep as android is an alarm clock app which can also monitor your sleep.
It does it using the phones gyroscope, you lay your phone on you bed next to you, and during the night, whenever you move, the phones sensors pick it up, judging by the amount of movement, it knows whether you are in a light sleep or deep sleep stage.

My two graphs so far:


I am planning on using it for another week, and if I like it, buy the full version.

One possible experiment I may conduct is to see the effects of meditation before bed on the quality of my sleep.

I could also see if I avoid computer screen light before bed, it improves my sleep.

Wednesday, May 23, 2012

Martial art training with an audio guide

This September I started training in the martial arts, in a discipline called Ryukyu Kenpo Kobujutsu Kai, 
or in short: Ryukyu Kenpo.
http://ryukyu-kenpo.com/
I got my 3rd belt this month: yellow.
One of the ways to progress quickly in martial arts, is to train at home. at the off hours of the dojo.
But I wanted to create a new way to train, so that I will remember all techniques much better.
I wanted some one to tell my a name of a random technique. And I would have to perform it.


But I have no partner to train with, so I decided to create a project:
The goal: To create multiple audio files, each one is saying the name of one technique, with a delay to allow performing it, and than have those files on an ipod, and using the random option, I will be able to train.


The process:
Step 1:
Go to the ryukyu kenpo site. and save all techniques to a txt file.

Step 2:
Remove description of all techniques, leaving only the names.
I did this quickly using a vim macro.
Step 3:
Split the file to many files, each containing one technique.
I used the command:
split -l 1 Martial_arts_techniques.txt
-l 1 - meaning to split the file by single lines


This gave me a lot of files named:
xaa, xab ... xcj

Step 4:
Created a wav file of silence using Audacity

Step 5:


In the folder with multiple text files (xaa,xab...), I entered:
ls -l > filelist.txt
To create a file with the names of all the files, each one in it's own line

Step 6:
I wrote this bash program:


#!/bin/bash

cat ~/Desktop/filelist.txt| while read line;
do name=$(echo $line | cut -c58-70) ;espeak -f $name -w $name".wav"  ; 
done

Program explanation:
Line 2: Pump the filelist file to a loop, each iteration, the current technique name is stored in line.
Line 3:Cutting from:
-rw-rw-r-- 1 pentagonpie pentagonpie      32 2012-05-22 12:24 xcc
(The result of the 'ls -l')
only the last part:
xcc 

Then using espeak, converting the text file into an audio file.



saving as program.bash.
Executing using 
bash program.bash
To create a folder with all the text files mixed with the new .wav files

Step 7:
Deleting all txt files:
rm *.txt 

Step 8:
Creating a program similar to the previous.

1 #!/bin/bash

2 cat ~/Desktop/filelist.txt| while read line;
3 do name=$(echo $line | cut -c58-70) ;sox -m $name".wav" final_silence.wav $name"2.wav"  ;
4 done


Line 3: using sox to combine every file with the silence file from step 4.

Step 9:
Importing all audio files to ipod, and using portable speakers.

That is how I done it!

Sample file:


Monday, May 14, 2012

Tracking my push-ups

I am trying to increase the number of pushups I can preform.
A great site dedicated to this effort is calld http://hundredpushups.com/

Being a scientific oriented guy, and a geek, I wanted to track my progress.
I decided to use a great site for this documentation:

http://daytum.com/
"DAYTUM HELPS YOU COLLECT,CATEGORIZE AND COMMUNICATEYOUR EVERYDAY DATA."




DAYTUM main page
So I created a new category called "Exercise", added a new item called "pushups", and inserted 16 and 17 as my first attempts.
But I couldn't find an option to show me a trend chart, the closest I could get was a lousy filled graph which didn't tell me much.

So I decided a to use a different site.
I opened a new form in google docs, with only one text box, the amount of pushups I did.


Now each time I perform a set of push-ups, i enter this site which i bookmarked, and insert the new number.

behind the scenes is a spreadsheet which gets updated automatically with the new information.

I created a new trend chart, but I wanted my chart to update with each new entry,
so in the range, I changed it from 
"Sheet1!A2:B3" to "Sheet1!A2:B20"

It basically tells the chart to create a chart from my existing data, AND from additional colums which are blank at the moment.
The chart algorithm is smart enough to exclude the non-existing data, and when new data is added, it will be added to the chart. 


And this is exactly what I wanted!