1. # Random File Permissions

If we create a new file in Linux, why are the default permissions random?

At the risk of repeating myself, suppose I run the following C program three times, where I deliberately omit the permissions (or mode) argument in the open function:

#include <fcntl.h>

int main()
{
int fd, ec ...
2. # Default File Permissions

What are the default file permissions when creating a new Linux file?

Most documentation describes the permissions as "unpredictable", which usually means quasi-random. If I create a new file in C and compile it using gcc, then permissions do appear to be random:

#include <fcntl.h>

int main()
{
int fd ...
3. # Horizontal Mouseover Submenus in CSS

In this document, I provide instructions on how to make a horizontal navigational bar with mouseover submenus using CSS. This is also an attempt to documents things as I learn, so expect frequent updates.

## HTML example template

In the example below, we isolate the components within a top-level nav element ...

4. # Black-Scholes Derivation

## Introduction

I found it difficult to follow many of the derivations of the Black-Scholes option pricing formula. Most get the stochastic details correct, but they all seem to be a bit loose in their definitions of the portfolio. So this is my attempt to document a derivation that I could ...

5. # Rambo NES doesn't use Zelda 2 code

I occasionally read rumours that Rambo for the NES used code from Zelda 2, making it not much more than a ROM hack of the original cartridge. The clearest statement of this rumour is the about.com review of the game, but I have also read this on various forums ...

6. # Scuse the mess

Apologies for the messy website. I am experimenting more with Pelican and trying to create my own website theme. That means not only learning Pelican in more detail, but also Jinja2 and even basic HTML and CSS, which I haven't seriously looked at since the 90's.

The results ...

7. # New Blog Format

I may not update my blog very often, but at least I update the underlying software. The main changes are that I've replaced Apache with nginx, and deleted the old Wordpress site. Instead, I am using Pelican as a static web generator. I tried out several, but Pelican has ...

8. # Persona: Aegis or Aigis?

Sweating through Persona 3 Portable has turned me into a Persona fan, and one of the more interesting characters is the Anti-Shadow Suppression Weapon, Aigis. But there is one thing I find confusing about her: How do I spell her name??

Since the character was developed in Japan, perhaps the ...

9. # "Digital: A love story" emilia.core message

I just finished playing Analogue: A Hate Story" by Christine Love, and am now going through the spiritual precessor "Digital: A Love Story".

At one point, you get a mysterious message from another user after a system crash, including a binary sequence, which is in ASCII. I thought it was ...

10. # Slacker Pin's "Tool Around" Ability (partially) Explained

After playing Penny Arcade Adventures: On the Rain-Slick Precipice of Darkness 3, I got very interested in the "Slacker" pin's "Tool Around" ability. After a few minutes with a disassembler, and a few hours sorting through the mess, I managed to work out most of it to the best ...

11. # Avoiding Utility Classes

My journey from science to computer science consists mostly of very small victories, so I don't always recognise everything that I've learned as it happens. But in C#, my first serious attempt at object-oriented programming, the lessons are occasionally more acute. In the space of about a week ...

12. # MPICH2 and bcastlength failures

After installing MPICH2 on my workstation, it kept consistently failing the bcastlength test (something about detection of broadcasting a too-long array, see here. After scouring Google to see what was wrong, I found nothing. Eventually, I broke down and subscribed to the mailing list, intending to ask the community. But ...

13. # Fourier's Death

A recent TIL (today-i-learned) in Reddit suggests a comical story of Fourier's death being due to a tumble down the stairs:

TIL French mathematician Joseph Fourier believed wrapping his body in a blanket was beneficial to his health. He died after tripping on it and falling down the stairs ...
14. # Evo (Java) white screen problem

Since everyone in my work team is located at different cities, we use videoconferencing for occasional meetings. The software we use is Evo, which is a java-based application that has pretty good quality and supports multiuser conferencing. Today, I had a problem where the application would simply not open. All ...

15. # Useful Drupal Module

Lately I have been struggling to learn how to use a Drupal site effectively. The fact that I can get it running at all shows that it is a mostly painless process; typical LAMP stuff. But it has been hard to find the right modules for the job.

The main ...

I mostly use GMail for personal emails, but I still access my work email through Thunderbird. In fact, I often tell myself that the days of the email client are numbered, and I should already be doing everyone on the web. I have occasionally considered piping it through GMail, but ...

17. # Heap or stack?

After a visit to UNSW last Friday, the subject of using stack or heap memory for a climate model came up, with my host promoting use of the stack for all variables, including basic field variables like velocity or temperature. The issue surprised me a bit because I had never ...

18. # YAML, JSON and human-readable configuration files

There are many headaches involved in using climate models. One is usually required to compile and build the programs themselves, and there is usually a dependence on at least a few external libraries, such as NetCDF or MPI support. Data formats can be peculiar and poorly documented, and modifying the ...

19. # Home again

We've finally returned home from our trip about three weeks ago. Unfortunately, I also became terribly sick after arriving home, which meant that I was out of commission for another week. Two weeks later returning to work, I'm still congested and coughing a bit. The timing was not ...