What the Hell are Microsoft Doing????????

I just read a news article on the BBC news webiste (http://news.bbc.co.uk/1/hi/technology/8196242.stm) stating that they are going to keep supporting IE6 until 2014.

Why would they do that. Do they not understand the pains it causes web developers. For god sake there are already 2 versions ahead of that now. IE8 has been here for quite some time. I can’t believe they are doing this. I’ll begin to list a few things that are the major flaws in IE6.
  1. PNG support (Biggest pain for graphical websites)
  2. Fixed Positioning
  3. inline-block display
  4. relative positioning needed on EVERYTHING
  5. JS support
These things are just the things I can think right now. When completing web development work I seem to spend 3 days developing things in a decent browser and then the same again getting it working in IE6. It’s an expensive browser to support.
WHY WON’T PEOPLE JUST UPGRADE AND MAKE IE6 JUST DIE!!!

CSS Vertical Aligning…

Have you ever faced this problem? It’s a mind field! There are several CSS solutions to use but each one has it’s own downfalls and points that it will not work with.


I’ve just written a JS solution to this.
$(“div.centraliser”).each(function() {
$(this).css(“padding-top”, (parseInt($(this).parent().height(), 10) / 2) - (parseInt($(this).css(“height”), 10) / 2)+”px”);
});

There are some points to outline here.
  1. In the parseInt calls remember to pass the second parameter or it parses the values into which base it thinks is correct. E.g. Base 8 Base, 10, Base 12.
  2. Any items you want to centralise on the page, give it a class name of centraliser. This may not be as you have your page layed out but this is what I was needing so :-p
  3. This works by assigning a padding-top to the relevant item. It takes the height of the parent container and finds the center line of this. It then takes away from this the height of the container you want to centralise divided by 2.
  4. This solution uses jQuery to do the math but I’m sure you could do it with regular javascript if you wanted to shoot your self in the foot then walk a mile. (P.s. use jQuery. It’s ace).

Why do things always go wrong at the same time?

I’ve had one of those days today where everything goes wrong at the same time. Our ecommerce system interfacing with sagepay (used to be protx) has decided to stop taking 3D secured transactions. Investigations are still on going here!

The other problem has been our exchange server. First thing this morning I get a call saying that the exchange server has stopped recieving connections again! Now this was the second time in as many days and shouldn’t be happening. On goes my investigative hat! It appears that the mailbox store on exchange is limited to 18GB by default and we’ve just reached this limit! I found this out by the hundreds of error messages in the system event log! Apparently you can make the store bigger but need to doso via the registry. After fixing this it appears to work again but think this will be a recuring problem… peoples mailboxes are going to continue to expand so I may have to investigate a mailbox archiving program/method at some point.

As for working on something that’s not been fixing things… I’m about to start looking into the Zend Framework MVC engine. Quite excited about this as the other parts of hte Zend Framework I’ve used so far has been brilliant! Very easy to use and delivers some quite complex functionality with minimal effort.

I’ll post again with the outcome of my investigations!

PHP Alternative Control Structures

I didn’t know these existed! Apparently you can write an if statement in the common way:

if($a == 1)
{
echo “It equals 1”;
}
else
{
echo “it doesn’t equal 1”;
}


Or in an alternative way…

if($a ==1):
echo “it equals 1”;
else:
echo “It doesn’t equal 1”;
endif;

Not sure what I think of this to be honest! Maybe better for templates or identifying what the end of the statement links to. Although any good IDE will do that for you!

Testing Sucks

In all the things that I do… I hate testing the most! Just seems like an exercise that sucks the life out of you. I know it’s something that has to be done as no one gets coding completely right first time. Whether it’s a misplaced “,” or “;” it is needed… I just don’t like doing it!

 

It’s repetitive. There are some tests that require so much setup that is just takes so long every time to get to the part that you are actually testing! I’m currently working on an e-commerce system for our company website www.tcc-net.com and to get to the bit I need to test I have to navigate through so many pages to get to it, it’s driving me bonkers!

 

This should be where I get out my testing toolkit and setup a selenium test. If you’ve never used selenium I strongly recommend it. It allows you to setup automated web tests very quickly and easily. The reason I haven’t done this is because I’ve finished now! :-p