Blog for February 2007
27/02/2007: Re: is PHP less secure than Perl, Python, or Ruby?
PHP is not inherently insecure, but because it’s very easy to write PHP, it has become rather a popular language amongst people with little, if any, formal training on how to program. Because of this, there are an awful lot of badly written PHP scripts out there; installing them may well open up your server to abuse….
27/02/2007: PHP4 vs PHP5 [was Re: Extending the mysqli class]
Michael Fesser wrote:
My scripts make use of many of the new OOP features in PHP 5, so they won’t run at all on PHP 4.
Ditto.
My current big pet project is http://demiblog.org/. This is PHP 5+ only and supports MySQL 5+ and PostgreSQL 8+. Although I do realise that earlier versions of these packages are still quite widely used out there, this project probably won’t hit the big 1.0 for another year or two, by which time, the hosting world will have probably moved on a lot. Supporting older versions of PHP and the database engines will cost development time and push back the project release date even later, by which time PHP 4 support will be even less relevant.
So although PHP 4 may still be alive right now, it’s counting down the days to his retirement when it can hand over the family business to his son PHP 5. He’s heard the happy news that his dranddaughter PHP 6 is planning on following in their footsteps too as soon as she graduates. Because of PHP 4’s impending retirements, he’s not taking on…
21/02/2007: Re: target new window = good or bad?
idiotprogrammer wrote:
I find this to be bothersome and contrary to current web trends. But I can find no articles or recommendations to back me up here.
20/02/2007: Re: A treatise on how religious Atheism is
TomP wrote:
[Atheists] do not believe in the existence of a soul.
Although most Buddhists do not believe in any gods, and can therefore be described as atheists, they most certainly do believe in the concept of a soul — indeed, a soul that can continue to exist after death.
You do not believe in any source for ethical conduct except sources within human beings
There have been several good ethical theories put forward that go further than “look within yourself and you’ll know what’s right”. Arguably, the two that seem to gel best with current observed human ethics are Kantian ethics and Utilitarianism.
Kantian ethics look at the means rather than the ends.
- We ask, should one do X?
- We imagine a world where everyone does X.
- Is this world flawed?
- If so, one should never do X.
- If not, one may do X.
That is, if we want to know whether it is morally acceptable to lie, we imagine a world where everyone lied all the time. Nobody would be able to get anything done in such a world. (Imagine a…
20/02/2007: Re: Views on XHTML 1.1 site
The upcoming revision to the XHTML 1.1 spec gets savaged on Usenet.
16/02/2007: Re: Is there an Evolutionist in the house ???!
Dave in Lake Villa wrote:
Could someone please tell me how Evolutionists/Atheists respond to these please ? Thanks.
1. Nothing produced something which then exploded its matter and out of that came personality, abstract thoughts, rationale, intuition, love, hate, discernment and even believe in a personal Creator.
You appear to be asking about the Big Bang. Firstly, this has nothing to do with the theory of evolution by natural selection: the universe was not created through a process of natural selection, but by the laws of physics.
For example, if I kick a ball, it keeps going in the same direction until something (a wall; gravity; friction; etc) changes its path. Similarly, if you set a star moving in a particular direction, it will keep going until it collides with another star or its path is changed by the gravity of some massive object. Simple laws of physics: testable, observable, widely accepted as fact.
Tracing the ball’s path backwards, you find my foot. Tracing…
15/02/2007: Re: Web Design: Would you design a PDF by writing Postscript in Notepad?
fgdg wrote:
Why do we put up with web design software? Nobody makes a PDFs by writing Postscript in Notepad, but that is what designer’s working for the web are expected to do.
You are comparing apples with oranges here. PostScript is1 a language for describing what pages look like. HTML is a language for describing what pages mean.
15/02/2007: Re: Random Map Generation
skulkrinbait@googlemail.com wrote:
My first prototype for doing this doesn’t give good results, the map being far too random, can someone help me out or point me to a good resource please?
Real geography is not random…
10/02/2007: Re: Parsing Question…
cjl wrote:
Short of writing a parser, which is clearly beyond me, what are some reasonable approaches to handling user input that will be executed?
Writing a parser is the best option in the long-run. If you were to attempt to interpret the user input some other way, like pure regular expressions, then you would fall into a lot of traps, and your interpreter would behave oddly in many cases.
A full parser is a much better option: it will behave far more reliably and would be a lot easier to extend, should you feel the need to add extra features to the language at a later date.
Although it’s a lot of work, there are some fairly well established methods on writing them. What you basically need to write is three fairly independent components: a tokeniser, a parser and an interpreter. None of these share any code in common, except for the definitions of a few constants and classes.
Firstly, a tokeniser, which reads the user input and splits it into a long list of tokens. Each token should have the…