For some time I have been noticing that several error logs across my site have been filled with errors relating to attempted header updates in PHP that are failing.
I found out today what the problem is.
The error for most of them occurs on line 1, and it's because of Aptana Studio saving in UTF with BOM. BOM or Byte-Order-Mark is a single array of characters that is put at the start of a UTF file. The BOM can be seen with a hexeditor such as Notepad++ on Windows or hexdump on *nix machines.
It looks like this:
EF BB BF
Because PHP recognises this as output, it simply leaves it in and therefore PHP flushes the headers and the headers cannot be sent. Don't get fooled by this issue that has had me fooled for months.
There is more information here:
http://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php
http://ext.raneous.net/post/16512690236/my-utf-8-byte-order-mark-bom-adventure
Only a few days ago I wrote a tribute to Christopher Lee. Now I'm writing yet another tribute to a celebrity actor who I liked.
Like Christopher Lee, Patrick Macnee was 93 years of age, and he died of natural causes.
To many Sir Patrick Macnee was the actor in The Avengers (starring along side Bond Girl Diana Rigg) but to me he was one of my favourite Bond allies.
Macnee was a great Bond ally, playing Sir Godfrey Tibbett in A View To A Kill along side Roger Moore. He also starred in one of my favourite Gregory Peck films - The Sea Wolves.
He also starred in the Oasis music video Don't Look Back in Anger - one of my favourite music videos.
A great actor and I'm sure a very nice person. He will be missed.

Yes, it's true. I am beginning to like Microsoft again.
Let me tell you a little secret. Since Ballmer left Microsoft, I have slowly began to like them more and more. I'm not talking about everything - I mean certainly not the Nokia side of Microsoft and Windows Phone. But there are parts of Microsoft that I believe are good and doing well, and one of those is the way they are going with Windows 10.
I was not, latterly, a fan of Windows 8, but I do believe it works well with devices designed specifically for it - touch devices.
Truthfully, I never disliked Microsoft, and I certainly don't dislike everything they do. I just became too obsessed with Apple.
I am personally really excited by the feature I loved most on Android - NFC payments - finally coming to iPhone.
Now I will be able to pay for those purchases with NFC from my phone rather than my debit or credit card.
I personally like this idea, but I understand that many do not.
I'm maybe going to have to make a category dedicated to tributes to people on my blog as this is now the second tribute in the last month.

By Avda (Own work) [CC BY-SA 3.0], via Wikimedia Commons
Anyway, Christopher Lee passed away on the 7th June 2015 at the age of 93. Whilst I'm obviously upset about this, Christopher Lee being my favourite actor of all time (as many of you will know), I'm not as upset as would be with someone younger. Christopher Lee was a happy man, who lived a long life and starred in some of the most icon films of the last century. He made his mark and had a good long life.
He starred in some amazing films including, James Bond: The Man with the Golden Gun, Star Wars, The Lord of the Rings and The Hobbit, Dracula, Sleepy Hollow (albeit brief) and so much more.
A rather interesting fact about Christopher Lee's family is that his mother married James Bond writer Ian Fleming's uncle making them 'step-cousins'. This is a nice little link between Lee and James Bond in which he starred in.
Interestingly, one of my mother's friends accommodated him whilst he was golfing at Muirfield in Gullane, Scotland.
I have known this day would come sooner or later as Lee had not been in good health several times over the past few years and it lead me to expect it at some point.
I would like to pay my respects to Christopher Lee as being one of the world's best actors (and one of my favourite of all time, if not my favourite, and will likely remain that way indefinitely).
Two's Complement is one of those tricky little things that you can easily mess up, but what if there was an easier way of doing it than the traditional methods?
Well indeed there is.
Let's do it.
Example 1
For this example, we're going try and calculate -64. This should be easy.
The first step is to figure out how many bits we are going to need. For this we will need 8 bits. As a result our first place holder will be 128.
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
But wait a moment, the next thing we do, and we do this before putting down the placeholders, is we want to calculate a negative for the first place holder.
So what do we do? Well here's my way of doing it, and I don't know of anyone else who does it this way but:
0 - (128 - 64) = -64
Now write that as the first place holder instead. We always have a 1 for a negative number (the sign bit) so put a 1 underneath it.
-64 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
1 |
The next step is to keep adding until you get to 0.
-64 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
Easy peasy.
-64 + 64 = 0
Example 2
Now for -34
0 - (128 - 34)
-94 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
1 | 1 | 0 | 1 | 1 | 1 | 1 | 0 |
-94 + 64 + 16 + 8 + 4 + 2 = 0
Like I say, I don't know anyone else who uses this, though I do know of a technique similar to it. If you're teaching this to students or pupils, I don't recommend using this to teach, just to check that they got the correct answer.
If you visit my gallery a lot, you may notice that the photos are often slow to load and slow the page loading down. Well not anymore!
Thanks to a new script I produced for it, images load asynchronously with the main page and no longer slow down the download speed.
As a result, images take a few seconds more to load fully, but the page will load completely around them.
In the next few weeks, I will be likely dropping BlackBook, Data Project, Record Checker, Slide Away, SmartSocial and Wonderword from my website and from production after years of work. BlackRabbit Script has also since been replaced by ZenLang and the Zenith Parsing Engine (ZPE).
The decision has come after I looked at the lack of competitive features they have. All of them are still included in the BBCL library that will still receive updates (I do realise it has now been downloaded some 800+ times since I put it up two years ago and that people are actually using some of its functionalities).
The core focus of my software portfolio will now be on Cobweb Internet Browser, Painter Pro, core plugins for the software and my ZPE. However, I may decide in the future that I may stop working on Cobweb and Painter Pro eventually, and I can see that happening as development has slowed quite a lot.
I may also choose to drop the name Elements from the software. All older software will be found under Software > More.
I will be looking into the new C# to attempt to make the BBCL multi-platform.
On the topic of ZPE, it has now made it to version 1.3.4 which brings a lot of new features including nested functions, standard errors, when statements (equivalent to switch/case statements), for loops and more. Please check it out! Please note as it is already receiving a lot of attention it may take a few days for me to reply to emails about it!
In my personal opinion Charles Kennedy was one of the most honest, hard working and "for the people" politicians in British politics throughout my life.
For me personally, Charles Kennedy was the reason I took an interest in politics and lead me to the path of the Liberal Democrats when I was around about 14. I became a liberal from around about 2005, just before Charles stood down as leader of the Liberal Democrats. I have always considered myself to a rather liberal person and a lot of that has come from what Charles Kennedy stood for.
I personally shed a tear when I heard the news this morning.

I was personally not in favour of the Iraq war and I personally disliked both the Labour Party and Conservative Party. I still am a liberal at heart and a strong supporter of what they have done for this country not only in the past but what people like Charles Kennedy did for this country - a strong and firm leader that the Liberal Democrats needed.
Charles Kennedy is notable in my books for his friendly, optimistic attitude to politics - he was a far more people's person than most and would have made an excellent PM for the country. He also achieved the best result for the Liberal Democrats that has been achieved to date, obtaining 63 seats. This kind of result has not been achieved since before the First World War and David Lloyd George before the decline of the Liberal Party to the Labour Party in 1920 odds.
I will personally miss the wonderful nature of Charles Kennedy - an honest, amazing politician who was an outstanding Liberal Democrat!
Scotland made its voice very clear last night. The Exit poll was nearly 100% accurate with it's predictions and almost every seat in Scotland now belongs to the SNP.
The prediction was that Liberal Democrat Alistair Carmichael would retain his seat and the Conservative David Mundell would retain his.
What we saw though was not an overnight change rather a change that has been coming along for sometime.
The following graph shows how massive the swing was:
Across Scotland, several notable figures were outsted from their seats:

Douglas Alexander

Michael Moore

Jo Swinson

Ed Davey

Danny Alexander

Jim Murphy

Charles Kennedy
Images from OGL and CC license.
In the list Jo Swinson and Charles Kennedy were two that I did not expect to have as much trouble retaining their seats as Jim Murphy and Douglas Alexander.
Last night the SNP saw swings of up to 39% - something we've not seen like this before.
However, the UK as a whole voted for another Conservative government. This is the result of punishing the Liberal Democrats by not voting for them down south (which is how democracy works anyway, which is a good thing). What I'm saying is, the Conservatives only have a majority of 13 seats, so if a few Liberal Democrats kept their seats we may have had another hung parliament which could have lead to a Labour-SNP coalition.
Anyway, I'm not massively bothered as amazed at the turnout and swing in Scotland.