Archive for the ‘Advice’ Category

Apache unexplained resets

Tuesday, April 19th, 2011

Sometimes you’ll be coding away and discover something peculiar. One such example is when attempting to run a regular expression on a very long string (1000+ bytes) on a default WAMP installation. Apache randomly ‘resets’ the connection. This is because you’ve caused it to crash. There’s no explanation and even the Windows event log doesn’t reveal any useful information.

The reason of course, is because you’ve overflowed the stack, Apache has run out of memory and crashed.

The fix is simple; just add this to your Apache config:

<IfModule mpm_winnt_module>
ThreadStackSize 8388608
</IfModule>

Problem solved.

Battery Acid

Thursday, August 20th, 2009

Back in the day

As a child, a certain time of year would come and I’d get excited. This wasn’t Christmas or my Birthday, this was a visit to the dentist. The dentist you see, was an exciting place; massive futuristic chair, toys I didn’t have in the waiting room and a cupboard full of sweets and stickers for the good kids. I you see, was one of the good kids. Let the dentist poke around in my mouth a bit and then be rewarded with a sticker and a sweet. Fantastic!

Growing up

As you grow up, you’re given more advice on how to care for parts of your body: Don’t eat fatty foods, don’t have too many sweets or sugary drinks etc. This advice is largely ignored, because the best things in life aren’t necessarily the most tasty. As a child and even as an adult, I will regularly go through large amounts of sugar in my diet.

Fizzy Drinks

One of these things you’re supposed to stay away from, is fizzy drinks. From about the age of 7, I started to drink coke pretty regularly. Not always coke coke, but some random brand of it. Now, luckily I always followed the advice of dentists: Brush your teeth twice a day for a few minutes at a time, never brush straight after eating or drinking something with sugar (as it’s abrasive) and don’t eat or drink anything after brushing your teeth before bed. This excellent advice has resulted in my total filling count, at the age of 27, as 0.

Complacency

Growing up, you realise that a lot of things people tell you are actually wrong or misinformed, or you simply haven’t heard of something because nobody ever told you. And so, my tale is a sad one. After 15 years of drinking coke, I decided I was fat. As the average 2 litre bottle of coke contains 800 calories from sugar (1/3 the daily recommended intake for an average male), and as coke was my main source of liquid (as I like neither tea nor coffee, and water is a little bland) I switched to diet coke. Diet coke after 15 years of coke tastes foul for a good couple of weeks. But within the first two months I had already lost a stone, and the horrible stickyness you’re left with on your teeth from normal coke was gone. 4 years ago I went to the dentist. For the first time in 8 years. I was expecting something, but no – once again my teeth were perfect, the dentist didn’t even believe I hadn’t been for 8 years. All I required was a scale and polish, and that’s what you usually get anyway. I left happy.

Realisation

Some things in life are obvious. Some are so obvious, you don’t even realise it until somebody tells you. Now, coke / diet coke contain an ingredient known as Phospheric acid. This acid is in a low quantity, and gives coke a tangy taste and helps to preserve it on the shelf. What you may not know, is that this acid is also more corrosive than battery acid. This kind of acid is undoubtedly, bad for your teeth. But it wasn’t until I saw the dentist last week that they filled in all the gaps…

Result

I hadn’t had a filling in 27 years of life, 20 years of drinking 2 litres of coke a day. Why? Quite simply, this acid had been sterilising my teeth. That part makes coke sound like a miracle cure for tooth decay. But then comes the bad news: Imagine a stone left in an ocean for hundreds of years. It turns into a nice smooth pebble. This is what drinking such a large quantity of coke for so long has done to my teeth – the acid has washed them away and left them fairly blunt. The reason I had no fillings – there was nothing left to fill.

Conclusion

The advice the dentist gave me, was to stop drinking coke. Or anything with acid in full stop. No more fizzy drinks, no more fruit juice, just water. If I absolutely have to, use a straw to avoid getting acid on my teeth and rinse with water as soon as possible. If I continue to drink coke as my main source of liquid, within the next few years all of my teeth will require root canals or crowns. At the same time.

So here it is kids: Don’t drink battery acid. It’ll make your dentist very rich before you get to 30.

Spam

Sunday, May 17th, 2009

As a child, growing up in the 80′s when the Internet was unknown to the masses, spam was a good thing.

Not many people send you mail when you’re young. You’ll get a few cards at Christmas (if your family is of that persuasion) and some for your Birthday, but then there’s nothing. I used to absolutely love it when I was sent something random, whether is was an application to a credit card or a 50p coupon off tampons.

Growing older, you start to realise this junk mail is slightly annoying. Most of the things you’re sent don’t relate to you, are unnecessary or are something you’d never purchase anyway, and so you throw it away usually without reading it. This problem is escalated when you move into a rented house that has had a lot of tenants in a few years; the quantity of addressed junk is phenomenal.

But that’s not why I’m here to talk to you today. My issue is somewhat different – leaflet spam.

A couple of weeks ago, I put a little notice up on my front door that politely asks “No free papers or leaflets please”. This is because I have little time for random toilet paper being put through my door, and it usually ends up straight in my bin. Now, this has been partially successful, in that the child labour force who usually deliver the free papers are obviously well educated, can read the sign and don’t give me a paper. Unfortunately, this isn’t so for the normal leaflet deliverers. I’d always assumed that leaflet deliverers were students or ‘other’ who couldn’t find a real job. But given the amount of leaflets I’ve received post sign I must conclude that the people delivering them are illiterate.

Incidentally, the best way to stop people sending spam to your email address is not to give out your email address in the first place. Give it only to known contacts, don’t use it in websites you’re not familiar with (use a second, throw away email for those) and never publish it in plain text online. If you absolutely must then I’d recommend Google Mail who have a fantastic spam filter.

For your entertainment, here are all of the leaflets I have received so far; their deliverers willingly ignoring my polite request:

  • LA Fitness
  • Christian Aid
  • The Green Party
  • Choudhury Indian Restaurant (Yum!)
  • JS Cars (who have a lovely hotmail address – never tried emailing for a taxi before)
  • Mama Jan Pizza
  • Johns Car Wash (Under new management (!))
  • KHAN Cafe Rooje (heh, reminds me of Kirk: KHAAAAAAAN!)
  • Italian Express Pizza
  • The new unitary council – I’m taking control – I’m voting CONSERVATIVE (I will obey)