Finally starting to get my head around Doctrine‘s Association Mappings. In the jsphp.co project I’m using one-to-one, one-to-may, many-to-one, and many-to-many relationships now, so I’ve got an example of everything.
Author Archives: Jay Jay
CSS layouts
I cheated with the design of the jsphp.co web-site and used a layout from this article CSS layouts. I use a slightly customised version of the one column fixed width layout and the two column fixed width layout.
jsphp.co developments
I’m working on my jsphp.co web-site. I haven’t deployed my latest changes yet, so there’s nothing there on the main web-site just now, except if you head over to checkout the development area which has all my latest changes. Basically over the last couple of days I’ve added support for:
- Home page
- Category listing
- Function listing
- View function, tests and benchmark with linkable line numbers
- Edit function, tests and benchmark with summary
- Test the code using QUnit
- Benchmark code and compare versions
- List revisions and view, edit or change the release status
- List developers including local and upstream contributors
- Comments on functions or tests (incomplete)
- Link to features, such as code downloads or the phpjs.org implementation
- Administer the function
- Contributor listing
- Lists local contributors
- Lists upstream contributors
- Licensing info
- Downloads
- Links to other web-sites
- Contact information
- System administration
- Manage categories
- Manage functions
- Manage users
- Manage upstream developers
- View errors
There’s still a little bit to do. Basically I need to review the entire code base for HTML injection and XSS vulnerabilities, I need to fix up the commenting subsystem to allow for editing and creation of comments, I need to protect from some changes (e.g. only administrators can release a function version), many of the forms need better/reviewed workflow for errors and omissions, there needs to be a facility for adding and removing upstream developers, and that’s about it. Once I’ve got those planned changes done I’ll release the latest version of the site and begin the process of importing the phpjs.org code base.
Thought for the day
Today I’m really worried that the computers are going to end up mind controlling the humans in our apocalyptic end. Well, not really worried.
Thought for the day
You might get my cooperation, but you won’t get my obedience.
Non-interactive apt-get install
I was wondering about how to do a non-interactive installation of MySQL using apt-get, because it prompts for the root password. I found my answer in an article — Truly non-interactive / unattended apt-get install.
Basically in addition to passing the -q -y arguments to apt-get, you export an environment variable, like this:
# export DEBIAN_FRONTEND=noninteractive # apt-get -q -y install mysql-server-5.0
Showing URL scheme in firefox
Today I was diagnosing some HTTP/HTTPS issues, and firefox was being a bitch by not showing me whether I was on a HTTPS or HTTP connection in the address bar. Turns out that in order to show the URL scheme you can change the setting in about:config. You need to change browser.urlbar.trimURLs to false, and then you’re back in business.
Spam spam spam spam spam spam
The amount of spam I’m receiving on this blog has just started to sky-rocket. I think shortly that comments will be disabled. It’s such a shame there are low-life spammers in the world.
The difference between absolute growth rate and relative growth rate
If you’re interested in this article about the difference between absolute growth and relative growth, you might also be interested in How to Lie with Statistics by Darrell Huff.
I searched the other day for the difference between an absolute growth rate and a relative growth rate, and didn’t easily find a helpful answer. I didn’t look too hard though.
Anyway, I figured it out just by thinking about it a little bit.
An absolute growth rate is given in units, while a relative growth rate is given as a percentage.
So, for example, I could have a growth rate of $100 per annum, or a growth rate of 10% per annum. The first growth rate is an absolute growth rate of $100 per annum, and the second rate is a relative growth rate of 10% per annum.
The difference is that an absolute rate just grows linearly, whereas a relative growth rate grows exponentially. So as the table below shows with $1,000 and an absolute growth rate of $100 per annum, after one year I’d have $1,100, after 2 years $1,200, after 3 years $1,300, and so on. Whereas with a relative growth rate of 10% after 1 year I’d have $1,100, after 2 years I’d have $1,210, after 3 years I’d have $1,331, and so on.
| $100 pa | 10% pa | |
|---|---|---|
| Start | $1,000 | $1,000 |
| After 1 year | $1,100 | $1,100 |
| After 2 years | $1,200 | $1,210 |
| After 3 years | $1,300 | $1,331 |
| After 4 years | $1,400 | $1,464.10 |
| After 5 years | $1,500 | $1,610.51 |
Maybe this explanation will help for someone the next time someone searches for the difference between absolute growth rates and relative growth rates.
Like the deserts miss the rain
I’ve always wondered about the metaphor “like the deserts miss the rain”… what is that supposed to mean? On the one hand, it doesn’t rain in the desert, so maybe the deserts miss the rain a lot. On the other hand, if it rained in the desert, then it wouldn’t be a desert any more, and that would destroy what the desert is, so a desert doesn’t miss the rain at all.
I don’t get it. Nice track though.