Archive | Autism RSS feed for this section

Blogging Housekeeping And David Kirby Part II

17 Jan

A quick recap.

In an interview with the New York last year (2005) David Kirby was quoted as saying that if the amount of cases of autism didn’t decrease before the end of 2005 then that would be a severe blow to the autism/thiomersal hypothesis.

Two months later in an email conversation with blogger Citizen Cain, Kirby said the exact same thing but this time with a date of 2007. I wondered why Kirby had moved the goalposts by two years.

At the time I was predisposed to put it down to trying to wriggle out of a stated position but the more I thought about it, the less likely that seemed so I mailed David Kirby to ask him. He responded:

The Times misquoted me. I actually asked for a correction, but did not receive one. What I told the reporter is that “we should know in the next few years.”.

The upshot of all this activity was me ending up apologising to David Kirby and basically saying that those of us who wanted to hold Kirby to 2005 should reset our watch to 2007 as Kirby said to Citizen Cain.

However, in the comments section of that post several people expressed disbelief that the New York Times would purposefully mislead people and I must admit it did seem strange to me too but I felt it best to give Kirby the benefit of the doubt.

So what I did was attempt to clear up any ambiguity on this issue and go straight to the source – The New York Times. I emailed the reporting team concerned, explained the situation and asked them if they could shed any light on the matter. A couple of hours ago I received this reply:

Prior to publication, we read the entire passage relating to this matter to Mr. Kirby. He approved it.

I won’t pretend I wasn’t shocked. This isn’t a misunderstanding, a simple case of crossed wires, Kirby has had passage *read to him* and he then approved it. Its very difficult indeed to understand how a journalist – one who more than most is aware of the power of words – could possibly miss such a thing. I don’t believe he did. I also believe he bare-faced lied to me. The NYT did not misquote him as he claimed to me, they quoted him on an approved piece. If he regretted it after that fact then thats something else entirely.

This matters. Things like this matter. If Kirby can be mistaken (and I’m choosing to use that charitable word) about this then what else is he mistaken about? People go ahead and support the thiomersal belief based in large part on what he says both in EoH and in interviews.

Whether or not Kirby’s been exposed in a lie or said something by mistake he regretted and tried to change it will no doubt be debated. But what cannot be debated is the bare faced lie he told me. I don’t appreciate dishonesty – especially when it comes from someone who has made such a big deal about campaigning for the truth.

A Year Today

26 Dec

I don’t suppose any of us will forget the terrible events of last year. A wave of terrible size and power engulfed a massive amount of land and killed a heartbreaking amount of people. Some of the stories that came out were almost too heartbreaking to hear and some of the video footage was too awful to watch for too long.

One group of people who know better than most of you reading this blog about what that day was like and terrible price it took are the Vesessins who blog at Nidahas.com. As native Sri Lankans they were literally at the heart of the issue in a way those of us in the West simply couldn’t be.

In a country that suffers from divisions that run very deep, the overriding message one year on seems to be:

As we remember the thousands who went to the waves, and the many more who are now homeless, let us commit ourselves to bring about a safe and peaceful Sri Lanka for those who did survive. Let us always remember the truism which took a tsunami to bring to light. Above all, we’re all Sri Lankans.

A message of hope and one of a profound wish to end a fight after getting some real perspective on the fragility of humanity.

It saddened and angered me to learn not long after the events of last year that there were some in the autism community who wished to make political hay whilst the sun shone after the tsunami. One Rick Rollens, fellow parent of an autistic child decided to utilise the horrific reaction all people had to the word ‘tsunami’ to better make his point:

California’s Autism Epidemic Tsunami Rapidly Growing….In California’s developmental services system, 8 out of 10 persons with full syndrome autism are between the ages of 3 and 17 years old, 7 out of 10 under the age of 14. The tsunami has arrived.

Leaving aside the fact that Rollens is totally wrong in both his methodology and conclusions, the words and tone he chose to use were at best ill judged and at worst, incredibly tasteless and insensitive.

Firstly is the fact that he was using the word ‘tsunami’ solely as an attention-getter. It has no legitimate context with autism. Secondly is the incredibly insulting use of the word as it applies to autistic people. Comparing them to people flooded out of their homes and lives is very misrepresentative of the nature of autism.

Thirdly is the absolutely shameful belittling of the events of last year. Whatever we feel may _cause_ autism, the fact is that it is a neurological condition at bottom. To associate this state with the death of hundreds of thousands of people is mind bogglingly trite and facile. *These people are dead*. I winced when I first read Rollens words and hoped that none of the relatives of the victims, nor any of my Sri Lankan friends would read them in the first months after the Tsunami. To endure the pain of losing a loved one is the worst thing I can imagine, to lose them in such a way must be awful beyond words. To see one’s country ripped apart must be painful beyond belief. To hear some pontificating person attempt to trivialise their loss by attempting to squeeze political mileage out of it would’ve been just terrible.

It took me a year to blog extensively on either the Tsunami and Rollens ignorance. The reason was mainly that I didn’t want Prabhath or any of the other guys at Vesess to read about it too soon.

Words matter. It really matters what words people use and how they’re used. With words you can build up and knock down. Using words you can show a reality or twist it. There are a lot of people out there who need to think long and hard about the sort of associations their words create and whether they are mature enough to use illustrations from a perspective that is clearly beyond them.

Who’s That Girl?

15 Dec

The five year old girl came carefully down the stairs (she felt unsteady on stairs generally) singing the latest Westlife single at the top of her voice. “YOUU LIFT ME UUUUUUUUUUUUUUUUUPPPPPP!!!”

Her Dad grinned to himself and recorded as much of the song as he could on his mobile. His daughters rendition of ‘twinkle twinkle’ was already his ringtone – the one where she’d mischievously substituted the word ‘diamond’ for ‘daddy’, making both her parents howl with laughter.

She came into the front room and had a brief acclimatising rock in front of the telly then grabbed the remote, switched to the DVD channel and used the remote to navigate perfectly to her favourite bit of her Bear in the Big Blue House disc (her overly anal in such matters Dad bemoaned the lack of good standardised interface design on DVD menu’s until her Mum told him to shut up).

“Wait a minute….ITS YOU!” Said Bear and sniffed the telly for a few seconds, an event that never failed to send the little girl into a fit of delighted giggles. Once finished, she rewound the DVD and made Bear sniff her a few more times, then she grabbed her own stuffed Bear toy and made Bear (via a tragic impression from her Mum) sniff her again.

Although the little girl was five she still used a feeder cup to drink from as she still hadn’t got the hang of ‘putting it upright’. A fact demonstrated in the interestingly hued furniture and carpet throughout the house. Today she fancied Sunny Delight, a fluorescent looking drink which helped with her occasional constipation.

Drink in hand (she pointed it out to her Mum to illustrate what she wanted) she walked over to the PC, grabbed the mouse, started Firefox (her Dad had banned IE from usage), clicked on ‘bookmarks’, scrolled down to her favourite game of the moment and completed the puzzle based game perfectly. As ever when he witnessed this event, her Dad wished he owned a digicam as he knew there were quite a lot of people who simply wouldn’t believe what they’d seen from this unchelated, uninjected 5 year old autistic girl who’d been diagnosed with Kanner’s autism at age three but due to her own abilities, perseverance and skills coupled with the love, acceptance and encouragement of her parents and siblings was making steady progress towards goals she herself felt comfortable with.

Her parents loved her very much. Just the way she was.

A Means To An End

28 Nov

And so, the latest fire-storm in the autism blogosphere continues to rage. If you’re unaware of the story I’ll offer a brief recap (as unbiased as I can make it) before trying to offer up some commentary.

Briefly, JB Handley of Generation Rescue bought the domains supportvaccination.com, oracknows.com and autismdiva.com. Why? I don’t really know. On a practical level they can’t be doing him much good at all so one is left to consider the possibility that he did it as either a joke or to be spiteful. I sincerely hope that the team who is working on his search engine marketing hasn’t recommended that he does stuff like this as if they are then they’re moving him into the realms of what is termed as ‘black hat SEO’ – this refers to doing lots of bad stuff that is against acceptable internet policy to get a good rank on a search engine results page. The penalties for this can be severe if search engines catch you at it and include blacklisting the sites in question and terminating any associated AdWords accounts. From what I know of JB he loves to push the envelope a bit so I wouldn’t be surprised if he is doing this. He is playing with more fire than I think he knows about though.

Anyway, the unsurprising upshot of this is that most people on ‘his’ side of the debate think that a) his methods are questionable but seeing as he’s promoting such an important message the ends justify the means or b) that its downright hilarious. People on ‘my’ side of the debate (please note by using the phrase ‘my side’ I’m not assuming ownership of it) think that a) its all very childish and a bit sad or b) that what he’s doing is tantamount to willfully misleading people.

What are the definite results of JB’s actions? Well, he’s polarised two sides that were beginning to listen to each other a little better. He’s created a new battlefront where none existed before and he’s upset people.

Lets look at JB’s sides claims that even though his methods are questionable that its OK as the message he’s relating is so important the end justifies the means.

First, that is a very dangerous argument to apply to anything. If we call ourselves a society that has a moral base then ‘the ends justify the means’ is at best, ambiguous as a reason.

Secondly, lets look closely at what JB’s message actually is to see if it is indeed justifiable to use methods such as these. Lots of people, particularly JB’s supporters either don’t know or seem intent on ignoring JB’s message. It is this: autism is mercury poisoning. Not _may be_ , not _in some cases_ , not _might be triggered by_ but simply *is*. Now and forever. This is an absolutist position and its the main thing about Generation Rescue that I believe it is imperative to challenge. Why? Because autism is *not* only mercury poisoning. The vast majority of the information on the GR site revolves around the idea that thiomersal in vaccines causes autism. Lets leave the debate as to the scientific validity of that belief to one side for now. I’m quite happy to entertain the possibility that he may well be right. I’m equally happy with the science that as of this time, states that he is not. For my argument – its irrelevant. The fact is that even if JB is right and thiomersal does cause autism _it is not the *sole* cause of autism_.

Big deal say people – why does that matter? It matters because if that viewpoint comes to be accepted fact then the standard treatment for autism will become chelation. And seeing as it is a verifiable scientific fact that autism existed _long_ before thiomersal was ever used this would mean that there were a very large number of autistic children undergoing chelation totally unnecessarily. Question: Is it stupid or clever to subject children to unnecessary medical procedures?

The irony of this message is that it is a standard complaint of the mercury = autism belief system that they couldn’t get their Doctors to look beyond their narrow treatment options. This is _exactly_ what will happen should mainstream medicine ever accept the GR viewpoint that autism is mercury poisoning to the exclusion of everything else.

Let me reiterate once more – I have no issue with any group that calls for more investigation into the use of thiomersal in vaccines and that I’m glad that it is no longer in vaccines. I also fully accept that there are occasions that vaccines have damaged children. I also fully accept that mercury is a known neuro-toxin. What I do not want however, is for my daughters treatment to be a) enforced and b) an unnecessary and dangerous procedure when there is no basis for such absolutism.

So I ask you again Dear Reader – is JB’s absolutist message so good that it justifies his actions? Lets not forget that his actions also include name-calling (JB referred to friends of mine as ‘trailer dwelling coo-coo’s’ and me personally as a ‘wanker’ – a phrase for the non Brit-slang understanding amongst you that means that JB believes I masturbate to excess – roughly equitable to ‘jerkoff’ in US parlance I believe). This is as well as buying up domains that belong to sites that disagree with him.

Many claim that JB has apologised (although I fail to see where he apologised to me) and thus should be forgiven. I agree and disagree with that. I agree that for the debate to progress we all need to forgive and move on. However, this is not a one-off circumstance for JB. This is his MO. At some point, we have to stop making allowances and start holding people to account.

That said, up until this incident, I believed JB’s latest apology was sincere. I still hope it was.

People have also referred to JB’s behaviour as a bull-in-a-china-shop and expressed admiration for his go-get-em approach. I can’t see how such an approach is particularly admirable. Bulls loose in china shops breaking everything indiscriminately and certainly I feel less sure of the shaky common ground that had just started to be secured between the two sides. Lets also not forget _my_ message: that autism is not solely thiomersal poisoning and that bulls loose in _that_ particular china shop run the risk of doing very great damage to the delicate objects inside it.

Now lets move on to the point about upset. People from JB’s side of the debate cannot seem to understand why this action has upset Camille so much. As she is very much smarter than me she doesn’t need me to speak for her but I do wish to add my opinion as to why whats happened might cause her distress.

As a blogger who comments particularly on the science behind the debate she stands or falls on the accuracy of that science. If anyone was misled into thinking she endorsed the GR view then that person may well have further doubts about her validity. I hesitate to speculate as to whether or not that might be one of the reasons JB did it of course.

Secondly, there is an issue here of implicit control. An ugly image is called to my mind of a rich businessman laughing uncontrollably at the image of a less affluent woman as he dangles her on puppet strings. Fanciful? Yes. Exaggerated? No doubt. Based in some element of truth? I’m afraid I think it is.

Thirdly, again, lets look at the GR message and think about why those who are autistic particularly might not want to be associated with it. They believe GR is wrong. Further though, they see GR reducing who they are to a set of mercury related symptoms. Lets not forget that GR believe that autism is *only* mercury poisoning.

Once upon a time (in fact less than 40 years ago) psychologists ‘knew’ that homosexuality was *only* an illness that could be ‘cured’. How do you think that – at the time – that made gay people feel? Imagine a blogging community of parents desperate cure their gay adolescents (who ‘know’ that their children are just ill) – would gay adults be horribly offended and fight back? Or would they sit on their hands and do nothing?

For us parents, the outcome of this debate is very important – our kids depend upon it. For those people who are autistic, the outcome of this debate is absolutely crucial. Their continued survival depends upon it. I ask you once more: in an area of such vital importance, is the method really unimportant when the method denigrates so much? Is it something to be brushed aside as we smile indulgently at its instigator when its tantamount to an attempt to control a debate that affects peoples very right to exist?

Is this message so right that such a total lack of respect for a differing view is at best readily embraced and at worst tolerated in the way we would tolerate a favourite but slightly spoiled child?

Web Professionals: Who We Are Or What We do?

17 Nov

The big topic doing the rounds at the moment is the topic of professionalism for web designers/developers. The gist of the argument centers around a remark made by Andy, in an interview on Accessifywho said:

I believe that the time has now passed for those working with old fashioned methods to be called web professionals.

This lit something of a blue touch paper and prompted a flurry of blog posts. Molly said::

The essence of this new professionalism isn’t about being perfect at what we do. It’s being able to say: Hey, I don’t know that. Let me go find out.

And Roger said:

Web professionals who refuse to update their skills and insist on using outdated methods can no longer be called web professionals.

Strong words and words that are difficult to disagree with. Roger was worried that he would be accused of being elitist for saying them. A long time ago (in a thread I can no longer find) I espoused similar views and was called an elitist. What I failed to make my accuser understand was that its not about creating an elite, its about creating a level playing field where _everyone_ has a core set of competencies.

Jeff added to the debate today stating his belief that higher education is the answer – or at least the stumbling block.

Its a good point – there needs to be an educational response to this issue but its not enough. Lets look at the word ‘professional’ for a moment:

  1. Of, relating to, engaged in, or suitable for a profession: lawyers, doctors, and other professional people.
  2. Conforming to the standards of a profession: professional behavior.
  3. Engaging in a given activity as a source of livelihood or as a career: a professional writer.
  4. Performed by persons receiving pay: professional football.
  5. Having or showing great skill; expert: a professional repair job.

Dictionary.com

When we say that those who don’t use the latest techniques can’t be professionals, which definition are we using? The closest is possibly no.2 but as that is a continually evolving thing in our profession thats tricky. At least two definitions pertain solely to the fact that a professional can be considered professional solely if they make money from their chosen profession.

Not easy is it? What we mean by professional is really – someone who designs and build websites in a way we agree with. When enough people agree then we have a standard. Simple. Or it would be if it were not for the example of IE – by that logic IE is the standard we should adhere to for coding ambiguities.

The quotes I made above seem to indicate that the ‘stripping’ of the phrase ‘professional web developer’ from some FrontPage jockeys status would matter two shits to him/her. I’m guessing they couldn’t possibly care less. As long as they continue to get paid, they’ll continue to do their work as quickly and cheaply as possible. If you’ve ever bought your furniture from DFS or Ikea instead of having it handmade by a professional furniture designer I’m sure you can appreciate why the’d do that.

A year ago, I wrote two posts that touched on this issue. The gist was that the community doesn’t need more education – everyone from the lowliest FrontPage hacker to the highest standards purist knows there’s a shit load of information out there and how to find it. Its choice that makes the difference – which I think was the essence of Molly’s post.

The fact is that there is a sizable majority that are quite simply _choosing_ not to get involved. For whatever reason. We need to counter that with an accreditation scheme. Plumbers need to be certified, so do mortgage brokers and travel agents. I think web designers/develoeprs need to be too. Business people are far more likely to work with people who have a visible proof of a certain level of ability – if we made the accreditation revolve around modern web standards then we’re laughing.

Cure Is A Four Letter Word.

14 Nov

But then again, so is ‘love’.

Do you know what? I’m tired of fighting with people. I’m coming off the worst flu I’ve had for nearly 6 years, my wife’s had it, our kids have all had it and I’m physically, emotionally and motivationally drained.

All I wanted when I started this was to document my autistic daughters progress, make the odd little web development post here and there and stand up for what I believe is right. What I believe is right is that autistic people should be respected. I believe society should change to accommodate difference. In the same way that women are equal to men, people of different cultures and creeds are equal to the dominant population in whichever country you live in, senior citizens are as important as young people, homosexuality is as normal (whatever the hell that is) as heterosexuality – people with a different neurology *irrespective of its cause* are just as valid and deserving of rights, consideration and an equal voice as those of us with a typical neurology.

_Is that really so difficult to deal with?_

Autism is not a childhood condition. It first _occurs_ in childhood. Take a look around you. Read the reports. Study the science. Examineour history.

Look, I’ll give you this – its entirely possible autism could be caused by mercury. In some cases. But please try and _think_. All the Amish in the world don’t add up to an autism/vaccine epidemic. All the recovered children in JB’s PDF’s and Erik’s AVI’s don’t add up to a cure.

Why? What is it you think you are curing? If your child doesn’t smear, or headbutt or have constipation – does that mean they are not autistic? _No_. It means they’re not constipated or headbutting or smearing anymore. If thats your child then I offer you my sincere congratulations. I don’t want your child to be in pain any more than I want my child in pain. But I would urge you to be very careful – your child almost certainly still thinks and interacts in ways that are very different than you do. Would that be enough justification for you to carry on ‘curing’? If so, why?

Ginger presents the best argument of all. She says that if a child is likely to grow into an adult that cannot communicate their needs – especially when that person is in danger – then it is worth it to attempt a ‘cure’. And she certainly has a lot of very good evidence that autistic people are routinely abused.

I have no easy answer to this argument. When I read it, I’ll freely admit it, I want to remove everything that threatens my daughter. But is that right? In one way its absolutely right – every parent has a duty to keep their kids safe.

But, I agree with Susan Senator who said:

The “must eradicate” attitude drives parents to be nothing but nutritionists, behaviorists, and therapists, for their children. These parents, however motivated by doing their children good, end up spending most of their parenting time trying to subjugate aspects of their children.

No child – of any neurology – can be kept 100% safe unless you want to take them and wrap them up in cotton wool. Pre-empting Ginger, I think she’d say that this isn’t a case of wrapping them up but of giving them every chance to be independent enough to recognise danger and be able to do something about it. Certainly when I read some of what Amanda Baggs has had to endure at the hands of ‘carers’ my blood boils and my heart quails.

But. I believe that autism is not the cause of this misery. Attitude is. Institutionalised and abusive staff are. The non-recognition of autistic people as having a valid existence causes these attitudes to grow. When someone says ‘all autism is mercury poisoning’, that is essentially taking someones existence and traducing it as poison and invalidating it as viable. As can be seen from the links provided – thiomersal cannot be responsible for all cases of autism. Autism existed before thiomersal. Thats simply a fact. To deny it is not only bizarre it is akin to taking someone by the scruff of the neck and telling them that because they are ill, they are not fit to make decisions and thus abuse is legitamised and around and around we go.

I don’t expect anyone who believes autism is mercury poisoning to give up on their idea. What I am asking is that you can try and at least meet those of us on the ‘other side’ halfway. Try and understand that painting everyone with one brush is tantamount to little more than bigotry. I asked JB once to recant just one aspect of his belief – that all autism is mercury poisoning now and forever. I ask him again, with all respect. If you are an advocate for autism then please try and see that in this one respect you are wrong. All autism is _not_ caused by thiomersal. This isn’t a game. Nobody’s keeping score. I’m more than happy to entertain the possibility that for some children who have become autistic that there is an environmental trigger. If there is ever science that conclusively demonstrates a causative link I swear to you that I will be as vocal in going after the guilty as I am now in going after people like Rashid Buttar. As I say, what I ask in return is that you _see_ that you truly look at the world of autism beyond your child. Look without melodrama and look without preconception. I am deathly afraid that one of the things you are doing is making the world for autistic people less safe. You’ve seen some of the things that a certain Rescue Angel of our mutual acquaintance has written here. JB himself expressed unease at what this person had said. Do you think that such a person is interested in advocating _for_ autistics?

Some people think that if you can communicate you cease to be autistic. Again, I see that as a willful and purposeful denigration of people who’s crime seems to be that they can communicate – the punishment is excommunication from who they are. Invalidated people. And for what? Why would anyone think such a thing? As Tolkein said: “what can we do against such reckless hate?”.

At the core of who I am is a belief in personal responsibility. I take responsibility for who I am and what I do. I believe its the cornerstone of what makes us free people. I will do everything I can to ensure that my kids all have that same belief. We have a duty to our society as well as our children. And society has a duty to us and them. Everything in life works better when its driven by reciprocality. I say society must change for the good of all our children _and_ adults as well. I reciprocate by doing my best to raise self-aware, self-confident children to adulthood. I cannot do that if who they are is withdrawn from them on the basis of political need. I don’t try and stop you from curing (if thats the word you choose to use) your kids. All I ask in return is that you stop insulting mine. If you are right and thiomersal causes autism then I will fight beside you. Will you fight beside me if I ask you to advocate _for_ autistics, instead of _against_ autism? Can you turn some of that energy and anger I see in chatrooms and blogs directed into action to enhance the lives of adult autistics? Can you do it without talking about mercury?

I’m not asking you to change your beliefs. We both know you don’t agree with mine and I don’t agree with yours. But there should be lots we can agree on. Can we?

E-commerce With PHP: Creating Unique Download Areas

10 Nov

I’ve posted a few snippets from the client-side that have touched on a project I’ve been working on recently. This project is an e-commerce based website that takes a payment (via WorldPay) and then generates a download of the product the shopper has just purchased.

Offering paid-for downloads via the web is a tricky proposition. There are lots of security factors that need to be considered. You don’t want your product to be actually on the webserver for example as its possible for someone to stumble across it and download it. On the other hand, you don’t want to make it very difficult for a user to get to the right place to download their product from – that would defeat the whole point.

The product we’re downloading is approaching 60mb in size so we have another issue – that PHP doesn’t handle downloads of big files very well. So we need to find some way of making sure PHP doesn’t choke.

Further complicating this particular solution was the fact that WorldPay doesn’t offer a ‘download’ solution – it only offers solutions for objects that are sent offline (books, CD’s, clothes, whatever) so I was limited in that respect.

The whole process is complicated. The shopper fills out their details (name, billing and shipping address, email, tel etc) on our site. These details first get input to our database and then get sent to WorldPay along with a unique id for this purchase. The shopper then fills out their card details which WorldPay then process. If the transaction is successful then a variable called ‘transStatus’ is set to ‘Y’. If its declined its set to ‘C’. This variable is sent via POST to a callback script which sits on our server (this part of the process is invisible to the shopper). The appropriate markup is generated via this callback script and sent back to the shopper at WorldPay. Part of this generated markup (assuming a successful transaction) includes a link with a variable appended to it (the unique id for this purchase) which points to a script back on our server. When the shopper clicks this link they get returned to our server and the download process starts in earnest.

At this point the script needs to do the following. First, it needs to compare the sent back value to a value in the db and pull out the purchase details that apply to that value. It then needs to generate a unique serial number (quick side note: this is returned to my script via an XML-RPC script that connects to a Java web service one of the developers wrote). It also needs to create a PDF invoice (quick side note no. 2: I used the rather marvelous R & OS PDF Class to generate the PDF).

What it also needs to do is create a new directory, copy a file from an old directory to this newly created directory and then send the newly created URI to the user. As a point of interest, you should note that the file that is being copied is _not_ the downloadable file. As this is over 60mb in size it makes no sense to copy this across for every shopper. Instead we copy across a very small file that triggers a download of the downloadable product file. OK so first of all I uploaded the downloadable file _and_ the file to be copied into a directory _above_ the web root, thus ensuring they can’t be browsed to. I then set about creating the PHP to store the download script:

$oldPath = "/home/somedir/";
$filename = "myscript.php";

So, first we set two variables; the path to the directory above the web root that contains the download script and the name of the download script itself.

if (file_exists($oldPath . $filename)){
	
		$mdy = date("mdy");
		$hms = date("His");	
		$rightnow = $mdy.$hms;
		$dir = md5($rightnow);		

Next we open a check to ensure the file exists,r eferencing the two variables we set up first. If the file _does_ exist then we create a fairly random string of letters and numbers by taking the current date, current time, appending them together (no spaces or punctuation marks) and then hashing them using the md5() function. This pretty randomised string of letters and numbers will be the name of the directory we’re going to create.

$newDir = "/home/somedir/public_html/dowmloads/" . $dir;	
mkdir($newDir, 0777);

So here we actually create the new directory – first we use the new name and append it to the location we want the new directory to live in and then we do the actual creation using mkdir(). Note that we set the access rights to this new directory in the second parameter of the function.

$newLoc = $newDir . "/" . $filename;		
$oldLoc = $oldPath . $filename;
			
copy ($oldLoc, $newLoc) or die ("Could not copy file");	
$uri = "http://www.blah.co.uk/downloads/" . $dir . "/" . $filename;

echo $uri;

Next we create two variables which contain a string referencing the new and old locations (i.e. where the file to copy exists now and where we want it to be copied to) and we then go ahead and actually copy the file over.

After that its a simple case of building the URI from a string and then doing what you want with it. Your original file (myscript.php) will now have been copied into the newly created directory. Just put an ‘else’ clause in to tidy up and the code in full is:

$oldPath = "/home/somedir/";
$filename = "myscript.php";

if (file_exists($oldPath . $filename)){
	
  $mdy = date("mdy");
  $hms = date("His");	
  $rightnow = $mdy.$hms;

  $dir = md5($rightnow);		
  $newDir = "/home/somedir/public_html/dowmloads/" . $dir;	
  mkdir($newDir, 0777);
		
  $newLoc = $newDir . "/" . $filename;		
  $oldLoc = $oldPath . $filename;
			
  copy ($oldLoc, $newLoc) or die ("Could not copy file");	
  $uri = "http://www.blah.co.uk/downloads/" . $dir . "/" . $filename;
		
  echo $uri;
		
} else {

  echo "Uh-oh, it went bad.";

}

So what about the file ‘myscript.php’? What does this do? Well, its there to actually grab the file that needs to be downloaded. Using lots of small files instead of lots of large ones makes a lot of sense. It also means we can script solutions for large files.

$filename = "/home/somedir/myprogram.exe";
$filename = realpath($filename);

if (!file_exists($filename)) {
 die("NO FILE HERE");
}

header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false);
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename="".basename($filename)."";");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ".@filesize($filename));
set_time_limit(0);
@readfile("$filename") or die("File not found.");

The first two lines are straightforward. First create a reference to where the file to be downloaded resides. then use realpath() to get the absolute path. Now, after that we perform a simple check to ensure that the file is there. if not, error out. If yes, then proceed.

The interesting bits of this script are the Header declarations. These are necessary for various thigns to make sure the download is fetched properly.

header("Pragma: public") works with header("Content-Disposition") as a known issue with IE6 is that the filename attribute of Content-Disposition is not always recognised. Using Pragma: public resolves this.

Cache-Control: must-revalidate and Cache-Control: private, falseensures the file is never cached.

Content-Type: application/octet-stream is the content type for application files and Content-Transfer-Encoding: binary ensures the correct transfer type is used (binary in this case).

The all-important line here is set_time_limit(0);. The time limit refers to the amount of seconds that PHP allows a script to execute. The default is 30 seconds which is obviously no good for a 60mb file. By setting the time limit to zero we set no upper limit on script execution time.

Lastly, we use the readfile() function to actually start the download off. Job done.

Two Little Snippets

7 Nov

Part of my continuing quest to use Javascript in responsible, degradable ways is documented below.

I’m coming to the end of a development period that involved building an e-commerce solution and sign up procedure. I saw two possible uses for some nice unobtrusive Javascript here.

In the first example (and this is one is very simple indeed) I wanted a way to have a value in a form field as per WCAG 1.0 guidelines dictate. However, whenever I see these implemented, the author fails to clear the form when the field in question gains focus meaning a user has to manually clear the placeholder value themselves – something of a pain. The solution in this case is as simple as:

window.onload = function() {
	if (!document.getElementById) return false;	

	var e = document.getElementById("email");
	e.onfocus = function() {
		e.value = "";
		return false;
	}	
}

And the markup:


So, the Javascript first checks that the function we need is supported by the browser. If its not then thats that – it won’t work but nothing is visually affected and no error alerts will appear. The worst case scenario is that the user muse clear the field manually.

If getElementByID() _is_ supported then we declare an onfocus() function that clears the value – and thats that. Job done.

My second idea was to aid the process of filling out address details. In most cases when you are buying from an online shop you must specify and billing address _and_ a shipping address. Obviously, its easy to grab the values of one set of fields and marry them up with another set but all the solutions I’d seen had no non-js fallback position and most had loads of JS attrtibutes in the markup which is something I really want to avoid. So, first lets look at out form:

	

	

		<h2>Billing Address</h2>
	
		Address
		
		
		
		
		
		
		
		
		Town
		
		
		County
		
		
		Post Code
		
		
		Area
		
  		  United Kingdom
                  Australia
                  Belgium                     
                  Canada
                  Denmark
  		  France
                  Sri Lanka
                  Venezuela
                  Zimbabwe
				
			
		<h2 id="addLnk">Shipping Address</h2>
	
		Address
		
			
		
		
			
		
		
			
		Town
		
			
		County
		
			
		Post Code
		
			
		Area
		
			
	
	

*NB: No, thats not the whole form, this is just the bit we’re interested in.*

Now, what I wanted was an easy way for the billing address details to be copied to the correct shipping address sections but if the user had no JS then to leave the form exactly as it was. Here’s what I did:

window.onload = function() {
	if (!document.getElementById) return false;
	if (!document.createElement) return false;
	if (!document.createTextNode) return false;
	if (!document.getElementsByTagName) return false;

	var h = document.getElementById("addLnk");
	var p = document.createElement("p");
	var a = document.createElement("a");
 	a.href = "#ready";
	a.className = "ditto";
 	a.appendChild(document.createTextNode("Shipping address is the same as the Billing address"));
 	h.appendChild(p);
	p.appendChild(a);

	var z = document.getElementsByTagName("a");
	var x = document.getElementById("buyFrm");
	for (var i=0; i<z.length; i++) {
		if (z[i].className == "ditto") {
			z[i].onclick = function() {
				x.sh_add1.value = x.add1.value;
				x.sh_add2.value = x.add2.value;
				x.sh_add3.value = x.add3.value;
				x.sh_town.value = x.town.value;
				x.sh_county.value = x.county.value;
				x.sh_pcode.value = x.pcode.value;
				x.sh_area.value = x.area.value;
				return false;
			}
		}
	}
}

The first four lines check that all the functions we need are available in the users browser. If they're not then nothing gets executed, nothing happens and the suer has the markup above presented to them.

The next section firstly looks for an element with an id of 'addLnk' (look in the markup above for it) and when it finds it, it dynamically creates then appends the following bit of markup:

Shipping address is the same as the Billing address

The link to ‘#ready’ simply moves the user down to the submit button (not shown in the above markup) for another added usability wrinkle. The meat of what this link does is triggered from the class ‘ditto’. Take a look at the last section of Javascript. This basically says that when a link with a class name of ‘ditto’ is clicked then copy the contents of one set of fields to the other. And thats it – job done here too.

These are both very simple bits of scripting but I hope they demonstrate real world practical use but executed in a way that ensures that the code is graceful in its degradation, accessible and separate from the semantic level.

A New Blog In Town

27 Oct

Its not often I feel compelled to write a whole entry just for the creation of a new blog but every so often one pops up by an author that you know is going to have an impact. I’ve ‘known’ Hurricane (its up to you to tell you his real name if he so desires) for a couple of years mostly meeting at an online cesspit of debauchery and web design that I keep forgetting to go and revisit.

To put it plainly and with all false modesty aside, ol’ H is smarter than a bag of spanners at the technical side of things like accessibility, standards and CSS. In fact he cares so much he’s fully prepared to (sort of) launch his new blog in an unfinished state presumably so he can further the concept of a live re-design to a live _start up_ .

Already, H has posted some good stuff. Hopefully thats the start of a long blogging career established.

I recommend adding his feed to your feed reader and paying a visit. And maybe you should go leave a comment too – if only to tell him that he may want to rethink the grasshopper imagery ;o)

Memo to self: fix the height problem that makes smaller entries look crap without comments.

Autism, Respect and the Mercury Militia

25 Oct

What was a disagreement about the causes of autism is widening into a war. This isn’t a war between parents and scientists. Its a war between one set of parents and a group comprised of other parents, scientists and autistics themselves. Its a war between flexibility and acceptance on one side and a rigid determination to ‘cure’ on the other.

To cure what? Good question. Some believe that autism and its attendant comorbidities are interchangeable. That constipation and a different way of looking at things are the same thing. That dyspraxia and a lack of imaginative ability are the same thing. Others believe that the two things are quite separate. That the comorbidities that are attendant with autism in _some_ people cannot be used to define autism. That the condition of being autistic bequeaths gifts as well as troubles (and it does bequeath troubles, lets not pretend it doesn’t) and that keeping the troubles is a small price to pay for keeping the gifts.

There are lots of questions that arise from these ideas of course but lets further examine the stance of the opposition to these two camps. For those that see autism as a medical as well as developmental issue there seems to be a residual pool of dislike, verging into outright hatred for those that don’t. They think that their opposition are abandoning kids to their horrible autistic fate. For them there are no shades of grey – its either black or white. These people also seek to play down and even attempt to rewrite official diagnostic criteria to downplay the ‘higher’ end of the spectrum.

Mr Lietch (sic) thinks it is in the child’s best interest to do absolutely nothing to ameliorate this condition [the writers son] . And, he and his associates knock parents for trying to help our children

John Best Jr

This condition. Autism, one assumes. The question to which I repeatedly put to John Best was what constituted autism? Best constantly (and still does) fails to appreciate the distinction:

…You claim head banging and feces smearing are not autism. Is this supposed to obscure the issue? These are not normal and are very much a part of autism….

John Best Jr

Up until now all we have is debate – its a debate that takes no prisoners to be sure, but its a debate nonetheless. However, things invariably take a turn for the worse:

Your neurodiverse pals who sneeringly refer to people who try to help children as “curebies”

Sounds diabolical doesn’t it? Us sneeringly cruel ‘neurodiverse’ (sic) want to stop people helping children. Something of bizarre belief seeing as quite a lot of people who consider themselves aligned with the notion of respecting autism are parents themselves. But wait! We forget that…

Anyone who is not chelating to get rid of the mercury is guilty of child abuse. Every doctor who is not telling their patients to chelate is guilty of malpractice….. Any parent who listens to the doctors tell them that there is no known cause or cure for autism is too damn stupid to have kids.

John Best Jr

Except of course the truth is somewhat different. The truth is (as I have repeatedly said) that respecting autism is not the same thing as respecting someone gastric issues. If your child smears faeces then find out why and intervene. If your child bangs their head on the wall, buy them a scrum cap, figure out why and intervene. If your child has gastric issues, find out what they are and intervene. *If your child is mercury poisoned then get a proper doctor to chelate them*. But don’t fool yourself that by removing someones need to bang their head against a wall you are removing their autism as you are not and cannot. that doesn’t mean you shouldn’t do it. It does mean you need to have realistic expectations. It does mean you need to be prepared to look at your child at the beginning, during and end of the process of treatment you have for them and say ‘I would love you no matter what’. You need to understand that because someone can’t speak doesn’t mean they can’t hear and to hear who they are described as ‘rotting in an abyss’ or ‘worse than hell’ or ‘diseased’ is going to do that child no good at all.

Frequently those if us who believe in acceptance are told by those that don’t that we are ignoring childrens needs:

And, Kev, have you done research on the trailer-dwelling coo-coos you now are affiliated with? You keep harping on the symptom profile of autism. Look, mate, our kids ALL share the same physical symptoms. I had twin autistic boys over to my house this weekend. They are six. They’ve never been treated. They can’t talk, much less function, they require 24 hour care. They have all the same physical issues my son HAD, which have since resolved. In your coo-coo world these parents would do nothing. Shameful and idiotic.

JB Handley

I have to admit to not being too sure what ‘coo-coo’ means but I’m assuming its not good. As ever though, the point is missed – no-one, repeat *no-one* is saying parents shouldn’t intervene where kids can’t talk or can’t function and I challenge JB Handley (or anyone else) to find any statement where I have advocated that belief. Its increasingly hysterical fear-mongering because its rapidly dawning on these people that they are looking increasingly fundamentalist and fringe.

You might note I’ve quoted extensively from JB Handley and John Best Jr here. I do so because they are both strongly affiliated with Generation Rescue, the group that apparently gives parents the knowledge to make an informed choice. Yeah. Knowledge like:

There is no evidence to suggest that autism is genetic. No autism gene has ever been found and the search will be endless – how can you have a gene for a mythical condition? Autism is mercury poisoning

Generation Rescue.

So, John Best Jr and JB Handley are all about promoting choice and informed decisions. So much so that they launch into full on attack mode and misrepresent people’s beliefs. Sometimes the attacks get very, very personal indeed:

Muslim terrorists who fly planes into tall buildings have a different set of beliefs than others. Your neurodiverse pals who sneeringly refer to people who try to help children as “curebies” and go to extreme measures in attempts to discredit those people are in the same class.

John Best Jr

John Best associating the World Trade Center attack with my belief that acceptance and flexibility is best. I couldn’t quite believe he’d actually said that so I asked for clarification:

You spout your nonsense in much the same way that terrorists shout for Allah before they blow things up with bombs strapped to themselves. That agenda is more than a little bit wacky to most people who are thinking straight.

John Best Jr

Yup, he meant it all right. Don’t forget, John Best Jr is a ‘Rescue Angel’ – one who is charged by Generation Rescue with informing parents about mercury and chelation. He is a spokesman for Generation Rescue.

The populace of Generation Rescue have a particular dislike of Kathleen Seidel. They see her as the ‘spokesperson’ of ‘the neurodiverse’ probably because of the domain. In a very disturbing attack, Best again mistakes autism with comorbidity, goes after Kathleen and at the same time confirms that for him, ‘better dead than autistic’ is certainly true:

..So they miss out on curing their children and the kids wind up spending their lives in institutions. In effect, they never enjoy one second of the lives they could have had if only the mercury had been removed from their brains. Ms Seidel might as well have put a bullet in those kids so they would not have suffered. Does that sound about right, Kevin?

John Best Jr

One wonders – is ‘better dead than autistic’ a policy decision of Generation Rescue?

John Best, that (typical?) fine, upstanding member of Generation Rescue also has views on the failings of the diagnostic criteria for autism:

Your adult Asperger’s friends would have been called by a different name when I was young and nobody was aware of the effects of the mercury they’ve been shooting into us since the 1930’s. They would have been called nerds.

John Best Jr.

Nice.

Best is, of course, attempting to paint all within the ‘neurodiverse’ (sic) movement as AS. Of course, his theory founders on the fact that it is not. But still, I wonder – is insulting autistics another policy of Generation Rescue?

I don’t believe for a moment that everyone in the Biomed community thinks like Best, or Handley come to that, which makes it a pity that so very many in the Biomed community see that our thoughts as a threat to them – so much of a threat that even an appalling loss of life such as the World Trade Center attacks is not above being denigrated in an attempt to demonise people such as I.

I’ve said it before and I say it again now. The Biomed community needs to take a long hard look at itself and who its most vocal proponents are. Do you honestly believe that your cause is well served by referring to others as akin to bombers? Or child abusers? or nerds?

Is this something you really think will attract people to your way of thinking?

Is this a position from which you think is substantial enough to build from?

Are these words which you feel serve you well, personally?