pseudocode.cc

April 10, 2008

Making basic computer security interesting by CGI

Filed under: Computer Security, Technology — Frederick @ 3:58 pm

Check out www.netbasics.org.nz, created by netsafe, a New Zealand based organization dedicated to educating the general population of New Zealand about internet safety.

They have made an excellent attempt at bringing life to a dry, yet important, subject through beautiful computer animation. Hopefully, this preventative measure will help reduce the amount of zombied computers and identity theft that occurs.

My recommendation to this organization is to offer other countries around the world to make use of these animations (dubbed into local languages/dialects) to help promote computer security.

I wonder how long this has been in the making. The release time is perfect, considering the recent arrest and conviction of Owen “Akill” Walker.

March 18, 2008

Backing up a Subversion Repository using svnsync

Filed under: Subversion, Technology — Frederick @ 1:00 am

I had to backup a subversion repository just recently and decided to post the method here.

Detailed instruction are available. This post basically extracts the minimum amount of information required from the detailed instructions to get it working.

Now, the first thing we want to do is create a repository for our backup to reside in.

$ mkdir backup

$ cd backup

$ svnadmin create .

We need to give ourselves permission to modify revprops. Edit ‘backup/hooks/pre-revprop-change’ and add the following:

#!/bin/sh
exit 0

(The reason we exit 0 as opposed to testing for the user is I am making my database in a trusted environment where only I have write access.)

Now, we set the script to be executable

$ chmod +x backup/hooks/pre-revprop-change

Initialize the repository for svnsync:

$ svnsync init --username svnsync file:///path/to/backup http://path.to.example/repo

$ svnsync sync file:///path/to/backup

The sync command is the one that backs up the repository. It does so by replaying all the commits sequentially.

Finally, I suggest you add a cron job to run “svnsync sync file:///path/to/backup” as often as needed.

March 17, 2008

Fixing emacs M-x shell or M-x compile for cygwin on Vista

Filed under: Cygwin, Emacs, Technology — Frederick @ 4:07 pm

If you try executing a command in emacs and receive an error similar to the following:

> apply: Doing vfork: no error

> apply: Doing vfork: resource temporarily unavailable [2 times] 

> “linked dll data write copy failed”

Here is a workaround:

1. Exit all cygwin based programs.

2. Run c:\cygwin\bin\ash (may need to run as administrator)

3. In ash, run /bin/rebaseall

4. Run cygwin’s setup.exe

5. Reinstall Libs/libncurses7

Emacs should be capable of forking properly now.

The importance of a good numbering system to mathematics

Filed under: Mathematics — Frederick @ 2:47 pm

I was having a conversation with a friend a couple of weeks ago about the history of mathematics. I explained to him that the notation we use affects how easily we can do mathematics. I also explained that we gained 0 in modern mathematics because of the Arabic inclusion of a symbol for zero (there are some uses of a symbol for 0 before this time period, but the Arabic notation is possibly the first to use zero to increase the quantity of a number via a radix). Furthermore, I told him that Socrates would probably be surprised and interested that most of the modern world can divide somewhat complex numbers with ease.

The reason this is so is the way Greek numbers system is set up. For example, suppose we wish to divide 285 / 5. We are easily able to discern that the correct answer is 57. Now, lets look at division using the Greek notation.

285 is defined by Tau Pi Epsilon. Tau is the symbol for 200, Pi is the symbol for 80, and Epsilon is the symbol for 5. We add each number together, giving us the number 285. If we divide this by 5, the notation makes it difficult for us to discern an answer.

Furthermore, we also gain a more subtle advantage. If we wish to multiply a number by 10, we simply shift the number to the left, adding a 0 to the right of the integer. e.g. 2 * 10 = 20. 20 * 10 = 200. In the Greek system, Beta(2) * Iota(10) becomes Kappa(20), and Kappa * Iota becomes Tau (200). When dealing with very large numbers, what is 2*10^5280 is a very real (albeit large) number that we can easily identify. As far as I know, there is no set of symbols that represent this very large number.

In short, our notation largely determines the ease of thinking about, working with, and passing around information. This holds true regardless of the language, and purpose of the language.

Powered by WordPress