Posts this Month

March 2010
M T W T F S S
« Feb    
1234567
891011121314
15161718192021
22232425262728
293031  

Archived Posts

Categories

Tearing my hair out

I like the LAMP development platform. It’s cheap and very powerful although in corporations everything seems to be heading .NET.

I taught myself PHP from a book a while ago. I was an Oracle DBA at one point so the MySQL was easy. So I wrote a few utilities for my home Intranet and a Portfolio management tool for work. I find coding relaxing when I don’t have deadlines to meet so I have been enjoying building some internal sites for my own use. Call me weird.

However, I decided to have a go at a mailing list manager. All went OK until I decided to put an inline logo at the top of the EMails as an afterthought. Boy what a problem that is. I can’t get it to work properly. It displays the logo fine but underneath it is the filename of the file and it is clickable as well. Not like the ones I get when I am sent them.

Anyone now how to do this in PHP. Here is my simple test code.

$mail_logo = ‘Porn.jpg’;

$to = ‘LordT@MyDomain.com’;
$subject = ‘EMail with header’;

$file = fopen($mail_logo,’rb’);
$data = fread($file,filesize($mail_logo));
fclose($file);
$data = chunk_split(base64_encode($data));

$headers = “From: Sender@MyDomain.com\r\nReply-To: Sender@MyDomain.com\r\n”;
$headers .= “MIME-Version: 1.0\r\n”;

$boundary = md5(uniqid(time()));

$headers .= “Content-Type: multipart/mixed; boundary = $boundary\r\n\r\n”;

$message = “–$boundary\r\n”;
$message .= “Content-Type: image/jpg;\n name=\”{$mail_logo}\”\n”;
$message .= “Content-Disposition: inline;\n filename=\”{$mail_logo}\”\n”;
$message .= “Content-Transfer-Encoding: base64\n\n”;
$message .= “$data\n\n”;

$message .= “–$boundary\r\n”;
$message .= “Content-Type: text/plain; charset=ISO-8859-1\n”;

$message .= “\n\nThis is the plain text version\nLine 2″;

$mail_sent = @mail( $to, $subject, $message, $headers );

It sends it fine. Just won’t get rid of that pesky filename. Anyone know anything out there. I’ve heard the Internet is a great source of information.

HMG screws up everything

You would think tax codes were the easiest thing in the world to work out. You get a tax free allowance and everything else is taxed at exorbitant %. Of course they can’t even get the basics right and many are finding they are being screwed around by an unaccountable behemoth at their expense. Tightening the grip and making sure that they squeeze as much as they can from everyone means that they err on the side of caution, their caution.

Now considering how much we spend on IT systems in government you would think they would get the basics right. They send you a tax form addressed to you at your address and in the 22nd century you would think you would have to complete your name address, NI number, DoB and a million and one other field on the form that you have completed many times. I still get notices from old insurers when my insurance is due with quotes made out to me while multimillion pound computer upgrades don’t have a clue what my DoB is.

Of course it will never change. The government thinks we should fill in these forms and anything else it demands we do without complaint. If we don’t we get the lowest tax code you can think of or you get an astronomical tax bill which you have to fill in other forms to get sorted. All calling their offices and paying for the privilege.

Now when you look at the DWP systems, they are just as bad, the best bit is the number of forms you need to complete to get what you have been paying for decades and then they screw it up. No comeback, no apology but the much vaunted safety net is lying flat on the floor. Again you have to spend money on getting it fixed, money you can’t get back.

While Joseph Stack who flew his plane into the IRS building in Austin Texas obviously was a bit further down the path of pissed off than most of us. I can’t see it any better over here and people like him will only get more effective in their frustration and once someone starts others follow. Pity it will be the poor DWP and HMRC staff who get it and not the people that actually cause it, those lying thieving politicians, but such is life.

Large birds

Not fat women but large feathered creatures. We have a few on the planet already, particularly the Emu, and they can be farmed for meat like sheep, pigs and cows.

However here we have found the DNA from larger birds that were around tens of thousands of years ago when creatures were much much bigger.

When are we going to create a live Jurassic Park with DNA from these types of animals and look at farming them. They could very well survive in areas where current livestock can’t, they could be more efficient at converting greenery to meat, they could very well be a source of new medicines or even just simply tasty to eat.

Controlled lab conditions should be OK and we don’t let them out into the wild until we are 100% sure that we can eat them.

I’m sure it’s all thought out. *Cough*

Our scientists are introducing a foreign insect species into the UK ecosystem to combat a foreign plant introduced into the UK ecosystem. The insect is a psyllid called Aphalara itadori.



Even though there are *cough* safeguards in place to prevent escape which seem to rely on chemically nuking the site if an escape is suspect how they can monitor all these itty bitty creatures on a 24 hour basis is beyond me. No mention of making them sterile or having liitle monitoring tags around their ankles. The winds we have here could blow them miles away from their curfew sites and into the wild. Hell, they will probably get lost when being couriered to their new home.

Some times policies have the words unintended consequences stamped on them. This is one of those times.

Barely started and already lost

ID cards are still slowly being rolled out by the Stasi. The level is so low that everyone thinks they have been stopped but that is not so.

So knowing that there are some out there, the fact it is government run, and that everything the government does falls apart and fails, I’m sure it doesn’t surprise you to find out that the government has no idea how many have been obtained fraudulently. Read here.

Of course they will find out slowly when people such as yourself who don’t have one, want one or will get one unless it is forced upon us, apply and find someone already used your name, ran up a £1M bill and several criminal records and left you with the bill. All made possible by the state.

Snail mail

I know that EMail delivery is not guaranteed. Occasionally things go missing or are claimed to go missing anyway, and we wonder. Today, I received a failure to deliver message and I just couldn’t remember sending it. It must be important though because I just don’t send junk mail.

On investigation to find out when I sent it I found this.

——————–
From: Mail Delivery System
To: xxxxx@xxxxx.co.uk
Subject: Mail delivery failed: returning message to sender

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

blah blah blah then

for gi@xxxxxx.com; Wed, 30 Apr 2008 17:56:18 +0100
——————–

Just short of two years. I sure hope it wasn’t urgent.

Taking vaccines to point of use

One of the things that first surprised me was the fact that we give billions of pounds away every year in aid to the third world and yet despite all this we still have not rid these people of some of the most basic diseases.

Now of course I know it is incompetence and corruption that cause this and that is going to be very difficult to overcome.

This breakthrough however won’t fix the main problem but will go along way in curing some of these diseases. Vaccines that don’t have to be kept refrigerated 24/7. This means that they can be transported easier and in greater quantity so they can reach the parts that other vaccines would be unable to. Read here.

Of course by making these people live longer without increasing their capability of getting food and water will create a different type of issue. One I think we should resolve by giving them all AK47s so they can ‘fix’ their governments. Otherwise instead of dying of diptheria they simply starve to death and take more with them.

This technique is a tool that can be used to bring light into the dark but it cannot be used alone. It needs several things together to improve the lot of these people. It can be done. It just isn’t being done and millions die because of PC issues, government inefficiency and corruption.

Simulators

When I started work way back in the 19xx’s, Sorry smudge on the screen there, one of the guys I was working with was seriously into flight simulators. So much so that he had several Apple II computers which he used to set his own system up. Nice chair, control sticks, footpads for the rudders etc. It cost him several thousand pounds and several hundred hours of hard work programming and building and he had line art for his terrain and plane. He left to develop a flight simulator system for the MoD.

I’ve been waiting for a long time for someone to develop a system that was both cheap and something I was prepared to pay for. MS FS was good but nowadays you can’t fly into Manhattan or the Pentagon so it isn’t very realistic. Have to stick with an old version if you want to do that.

Anyway, there are several add-ons you can buy to give you that feeling of sitting in a cockpit and flying but nowadays I am not interested in doing so.

But I was interested in this simulator from Honda. Something more practical although the cost does seem high for what it is. If it was cheap enough we could ensure our kids got plenty of practise before we let them near our precious cars. I’ll never forget sitting in the passenger seat wondering how I was verbally going to control the vehicle. I think Driving Instructors are brave people.

The benefits of simulators like this for cars, trucks, even bikes is that it a risk free environment that enables them to make the basic mistakes of calculating distances, speeds and gaps where they only get a beep rather than a squished pedestrian. Then when they have reached a basic competency then they need real world experience. Can’t spend forever risk free if you want to get anywhere. (Someone pass that on to our government will you)

The main reason that the cost should be lower is that if the cost was lower then we could get every learner to get one and we could keep them off the roads until they are at least a little competent. For some they would never get near the road.

24/7 on the grid

It’s looking like we won’t be able to step away from the grid no matter where we go soon. In the past we have always had the excuse that we have a bad signal are we are out of range but that excuse is rapidly disappearing.

With modern technology improving all the time the number of places that we can go to hide are rapidly disappearing. There will be few places in the West which will not be in range of mobile base stations. Your boss will never be more than a phone call way.

Now with this satellite link there will be nowhere to hide at all. Wherever you are in the world and you should be available. I’m glad this wasn’t available 10 years ago. My boss then would have loved it as he never hesitated to call people on holiday. Sadly I always managed to holiday in places that had really bad reception.

On the positive side of course it means we will always be online and keep our web pages updated and find out what Gordos latest stupid policy is. Or maybe Cameron’s.. It depends.

The downsides are few compared to the upsides of having access virtually at your fingertips wherever you are or go. Directions to a recommended restaurant. Met some Essex girls, where is the local Pharmacist? Let’s have a quick Google for them. Sunbathe while playing Rainbow 6 with your chums, even go shopping with the missus and play while you loiter outside looking suspicious. On the other hand you have a heart attack when you get the bill for the shopping because you waved happily every time she signaled for your concent your computer can contact the local emergency services and give them directions and your symptoms.

Personally, I’m looking forward to 24/7 connectivity. I am perfectly capable of ignoring a call not from friends or family when on holiday and I would find it handy to access Google Maps when I am escaping from pirates while on a sea voyage. Oh! And to be able to call for help. Once the H&S forms have been filled in then our boys will race in to save me from those nasty foreigners.

Changing positions

One of things not yet blamed on humans is the polarity change expected any time soon. Soon, of course being in stellar terms which could mean several 1,000 years plus away.

It interests me because it is another example of how insignificant humans are in the scheme of things. Here is a global event which we just cannot do anything about. We won’t even be able to say when it will happen until it has announced itself by causing disruption to our systems. Then when it does start we have no idea how long it will take to complete the process. If it takes too long and we will suffer from the suns radiation while our protection is down.

Now consider how many of the systems we use for navigation depends on the poles. Compasses etc. will not be accurate until the flip is complete. Even then they will only be accurate to a new setting. One we have no idea where. Luckily, we are all high tech now and have GPS and other guidance equipment. However will they suffer from the magnetic interference caused by the poles shifting? I have no idea and until we know the intensity or the rate of change nobody knows. Frightening.

Although one thing is clear. All animals are susceptible to magnetic changes. We use magnetic bracelets for our health and people swear by them. Some people have a nature knowledge, like a pigeon, of where they are on the plant and can point home. How will it impact on us while it makes the change? Probably not significantly by who knows.

Nature. It’s power puts us in our place.