Tuesday, February 21, 2012

HTML coding mistakes: the "dreaded" ampersand (&) in URLs

coding HTML (or variants)? you probably know that, to put certain symbols, such as < , on a page, you need to write "&lt;", otherwise it'll be mistaken for a tag. for the ampersand ("and sign") itself, you'll need to write "&amp;"

interestingly enough, this is neglected when you write a URL, especially in an <a> tag. here's an example:

<a href="http://www.example.com/content?id=1234&view=normal">View Content</a>

notice the error? the ampersand needs to be replaced with "&amp;"

I suppose that, since it's within quotes, it doesn't have to be replaced with these character entities (the technical term for this type of replacement). well, that's not the case. for example, if you need to include a special character, such as ¤ in a URL, that would require something like "&#a4".

atheism, and morals and ethics

it's been claimed that atheists and others without religion cannot be moral or ethical. to them, I say, "total BS!" (see, I could've written that out, but I didn't! immoral, am I?)

many theories of ethics and morality have been developed that do not require a deity or an external standard. the Wikipedia article on secular ethics will serve as a good introduction to these theories.

personally, I would place myself in consequentialism. a broad term, it states that actions should be judged by their consequences, not by their mere nature (that's deontology).

anyway, not to get bogged down in technical terms, atheists can be moral, since morality doesn't necessarily have to come from an outside standard. this should be at least one defense against the claim that atheists are evil, etc.

evolution's "circular reasoning"

browsing various areas, I've noticed that one argument that people often make against the theory of evolution is circular reasoning in the principle of "survival of the fittest." the argument generally goes like this:

the theory of evolution states that the fittest animals will survive, and that those that survive are the fittest. this is circular reasoning, and thus evolution is wrong

this is merely the definition of biological "fitness", stated twice. how this really comes into the big picture of evolution is this:

those, that are deemed the fittest, survive and are able to pass on heritable traits (in the form of genes) to the next generation. therefore those traits that lead to fitness and survival become more common over time

are we good here?

Sunday, February 12, 2012

religious freedom, hmm?

I've just read this article on Yahoo! News, describing how some Republicans allege President Obama's new rules on birth control coverage in health insurance is attacking religious freedom

the article states that Obama has proposed a new rule requiring most employers to cover contraception for women, which violates the beliefs of the Catholic Church, among other religious groups. that, Republicans say, is an attack on freedom of religion, our first right (if anyone asks, they got that one right. it indeed is the first right granted in the Bill of Rights)

hmm... this seems like a good argument. especially being an atheist, I'm in support of freedom of religion. but let's check this one out. what if a certain religion condoned or even mandated such bad things as rape or murder? freedom of religion?

see, obviously this wouldn't pass. the point is, religious freedom must be balanced with other needs, such as public safety, in the case of this hypothetical religion. in the case of birth control, some balance must be made. and, as the article and comments on it point out, there are exceptions