A380 Mass Panic

Posted by Monty on February 8th, 2012

There seems to be mass hysteria in the news right now, about the Airbus A380 – the massive double decker airplane that’s up in the skies. Apparently now that some news agencies have gotten around to reading some news, they have basically branded the A380 as unsafe because there are cracks, and you are risking your lives by flying on the planes. As usual, mass hysteria and paranoia has hit Twitter too. Lets take a look at the issue.

The A380′s wing is built up of multiple parts. One such set of parts, is the Wing Ribs – literally ribs that run down the length of the wings. There are approx 60 Ribs per wing, and 30-40 connectors per rib – that’s approx. 2,400 L shaped brackets in use, per wing. The cracks are appearing in two places, on the feet of the ribs – the connectors that join it onto the wing’s lower skin. NO RIBS ON THE A380 HAVE EVER CRACKED! Its the RIB FEET (aka attachment brackets) that have cracks.

There are two types of cracks, helpfully labelled Type 1 and Type 2:

Images are thanks to Doric Asset Finance.

Airbus have admitted that new wing ribs that are being shipped contain Type 1 cracks – so this means this is a manufacturing defect, not a stress related defect. Airbus have already have started adjusting their manufacturing process, as it appears that the CFRP (Carbon Fiber Reinforced Polymer) attachment brackets are being manufactured with defects – the 4 metallic rib connectors that are used, as the primary structure for the wing, are not comprmised, only 26 CFRP polymer connectors. That’s 26 out of approx. 2000!

Now, the problem comes with Type 2 cracks – the cause for them, at the moment, is unknown. It’s believed to be stress related, but its unreproducible at the moment. What we do know is that EASA (European Aviation Safety Agency) have issued an Airworthiness Directive (AD) saying:

  • For an aircraft that has between 1,300 FC and 1,799 FC (Flight Cycles), an examination has to occur within 6 weeks, or 84 FC, of the effective date of the AD (Which is 24 Jan)
  • For an aircraft that has over 1800 FC, an examination has to occur within 4 days, or 14 FC, of the effective date.

IF cracks are found, contact Airbus for help (for which, they will provide replacement connectors, for them to be replaced, as part of warranty).

Airbus, and EASA have stated that cracked rib feet do not constitute a problem to safety, if is corrected. If left uncorrected, it MAY become a safety issue, but that could be said for any repairs at all to the aircraft.

Raymond needs to be slapped everyday, for the rest of his life.

Posted by Monty on February 8th, 2012

I normally don’t do politics. Politics is bad. Like eating babies bad. But, this is a piss boiler. The Beeb ran an article called “Family life on benefits“. It talks about poor old Raymond (Not his real name), and his family of 7 children (plus a wife), they get £582.40 a week – or to put in other terms – £30k a year (after tax). Lets have a look at his story in detail. The majority of this story goes back to the whole “Benefits cap of £26k a year, how will people survive”. Here’s how they will survive.

  • “Raymond, a former educational software writer, has been jobless since 2001…Ray says: ‘The market for my skills dried up 10 years ago – there’s a total lack of work in my area of expertise.” – Oh really? Funny that, because I started software development professionally roughly when your “skills dried up” – so that’s a load of cobblers.
  • “I go out once a week, on a Friday night. I meet up with my mates in the pub and have three or four pints.” – I’m sorry, what? You’re going out, getting drunk, and hammered on our money? You dont have a job – you don’t deserve to go to the pub, and kill your liver.£20 A week saved
  • “We get the Sky Movies package because we’re stuck in the house all week – otherwise we wouldn’t have any entertainment” – GO OUT AND GET A FUCKING JOB. Why should I pay for YOU to sit at home and watch movies all day? £15 a week saved.
  • “Most of this goes on our eldest son’s bus fares to college and back. For me, if it’s less than five miles, I’ll walk.” – Buy your son a bike, he gets exercise, prolongs his life. £30 a week saved.
  • “My wife and I have mobile phones, and so do all of the teenage children. You try telling teenagers they’re going to have to do without their mobiles and there’ll be hell to pay” – Its called learning how to be a parent and telling your 8 year old child that they don’t NEED a mobile phone. £32 a week saved.
  • “Weekly shopping includes 24 cans of larger, 200 cigarettes and a large pouch of tobacco” – I’m sorry but this is the piss boiler. 24 cans of larger a week? 3 and a half pints of alcohol a day? 200 cigs? WHAT THE FUCK? YOU EXPECT ME TO PAY FOR YOU TO GET DRUNK? £70 a week saved now and hundreds of thousands saved in future, from having to replace a liver, cancer and early death.
  • “On the cigarettes, my wife tried to give up, but she missed one appointment on the course and they threw her off it.” – Why did she miss it? She’s unemployed. She has nothing else to do.

How much is that? £167 a week, or in other terms, £8,600 a year.

What I think the solution is? Raymond is required to, by law, to turn up at a special council facility, every day, for a minimum of 10 hours. During those 10 hours, he will be slapped repeatedly around the face. He will get a 20 minute toilet break, then the slapping will continue.

Luke – ITSVopfOLBC ?

Posted by Monty on January 6th, 2012

What on earth does that mean? ITSVopfOLBC ?

Well here’s a description:

I – Indexed
T – Tokenized
S – Stored
V – Term Vector
o – offset
p – position
f – Omit Term Frequency
O – Omit Norms
L – Lazy Loaded
B – Binary
C – Compressed

In case you ever wondered!

Counting number of records – Int or UInt?

Posted by Monty on December 14th, 2011

Lets say, you wanted a count for the number of records/customers/orders/Whatever else you have in your database/rdbms/nosql database/file system, how would you achieve that? 99% of the time, you would use something like this:


public int CountNumberOfRecords()
{
// Fancy code goes in here that does what it should do.
}

But, is using int the right thing to do? Int(32) has possible values from -2,147,483,648 to 2,147,483,648 – do you really need the negative? I don’t know about you, but I never have a negative number of rows in my database!

What you should be using is :


public uint CountNumberOfRecords()
{
// Fancy code goes in here that does what it should do.
}

What is the difference I hear you ask? Well a UInt (UInt16, 32, 64) is an Unsigned Integer – it does not contain a “bit” that can be used to signify that the number is a positive or a negative – the max value now is 4,294,967,295 – double!

The only issue with using a uint is that it is not CLS compliant – in other words, other languages that use the .net framework might not support UInt, so you might have to decorate your methods with [CLSCompliantAttribute(false)]

Error 2 when starting Windows Event Log

Posted by Monty on May 3rd, 2011

… On Windows 7

If you have the above error (Cannot find the file specified) when trying to start the windows event log, then have no fear, for I may have the solution. If you have tried everything else online, then try this fix.

Open up regedit, and delete the following key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\Parameters

Basically, a hotfix (not sure which) malforms that registry key, rendering the event log useless.

Que? No hablas

Posted by Monty on October 6th, 2010

So, let me get this straight.

You cannot delete this object because you will go and recreate it because of its associations?

Have you thought that maybe…

.. And I know this is a VERY crazy thought…

That I want to GET RID OF THIS RECORD and its Associations?

nHibernate sucks. It sucked 4 years ago when I used it, and it sucks bigtime now too.


public void ActuallyDeleteEmail(int emailId)
 {
 ISQLQuery sqlQuery = Session.CreateSQLQuery(string.Format('DELETE FROM [TABLE] WHERE ID={0}', emailId.ToString()));
 sqlQuery.ExecuteUpdate();
 }

OH! MY! GOD!

YOU CAN ACTUALLY DELETE THE RECORD? WHO KNEW?

Introducing ServerAdmin

Posted by Monty on September 1st, 2010

Its not quite ready for release right now, but basically, its a really lightweight web based management system for all the sites you have running on your box – so you no longer have to load up IIS Manager and dig through there, for simple quick things like adding a new site, recycling an app pool, or stopping a site.

Here are a few teasers:

This is NOT the way you write code

Posted by Monty on August 24th, 2010

Seriously. If I see ANYONE under my employment writing code like this, without a VERY GOOD REASON, I will look at getting rid of you for gross negligance, and possibly criminal acts, under the geneva convention.

    public static DataTable GetAll(String where)
    {

        // get a configured DbCommand object
        DbCommand comm = GenericDataAccess.CreateCommand();

        //define command type
        comm.CommandType = CommandType.StoredProcedure;

        // set the stored procedure name
        comm.CommandText = "GetAll";

        //Create new parameter
        DbParameter param = comm.CreateParameter();
        param.ParameterName = "@tableName";
        param.Value = _tableName;
        param.DbType = DbType.String;
        //Add param to command object
        comm.Parameters.Add(param);

        //Create new parameter
        param = comm.CreateParameter();
        param.ParameterName = "@where";
        param.Value = where;
        param.DbType = DbType.String;
        //Add param to command object
        comm.Parameters.Add(param);

        DataTable dt = new DataTable();
        dt = GenericDataAccess.ExecuteSelectCommand(comm);

        return dt;

    }

If your WHAT THE FUCK meter isnt going off already, wait till you see GetAll:

ALTER PROCEDURE [dbo].[GetAll]
	@tableName VARCHAR(50),
	@allRecords BIT = NULL,
	@where NVARCHAR(1024) = NULL
AS
BEGIN
	SET NOCOUNT ON;

	DECLARE @sql VARCHAR(200)

	IF @where IS NULL
	BEGIN
		-- Insert statements for procedure here
		IF @allRecords = 1
		BEGIN
			SET @sql = 'SELECT * FROM ' + @tableName
		END
		ELSE
		BEGIN
			SET @sql = 'SELECT * FROM ' + @tableName + ' WHERE disable = 0'
		END
	END
	ELSE
	BEGIN
		SET @sql = 'SELECT * FROM ' + @tableName + ' ' + @where
	END

	EXEC (@sql)
END

Seriously. DEAR GOD. HOW THE HELL DID YOU GET A JOB?

public static DataTable GetAll(String where)
{

// get a configured DbCommand object
DbCommand comm = GenericDataAccess.CreateCommand();

//define command type
comm.CommandType = CommandType.StoredProcedure;

// set the stored procedure name
comm.CommandText = "GetAll";

//Create new parameter
DbParameter param = comm.CreateParameter();
param.ParameterName = "@tableName";
param.Value = _tableName;
param.DbType = DbType.String;
//Add param to command object
comm.Parameters.Add(param);

//Create new parameter
param = comm.CreateParameter();
param.ParameterName = "@where";
param.Value = where;
param.DbType = DbType.String;
//Add param to command object
comm.Parameters.Add(param);

DataTable dt = new DataTable();
dt = GenericDataAccess.ExecuteSelectCommand(comm);

return dt;

}

Cognitive Bias, or Why you should get someone else to test your code

Posted by Monty on August 8th, 2010

This happens to be a frequent topic for discussion, where people either believe they shouldnt have to get someone else to test their code, or why they should get someone else, who isnt biased, to test their code.

I am a very strong believer in getting someone else to check my work. I am the one who written it, I know what its supposed to do, and I am biased in weather checking if it will work, or not. It is always better to get a second pair of eyes to check over something that you have written / implemented, just to make sure its working correctly. Im not the only one who likes to do this. Pharmacists HAVE to get someone else to check to see if they have dispensed the right prescription drug. Radiologists have to get a 2nd opinion to see if there is a fracture on a bone. In Air Traffic Control, there are computer systems, to make sure that two planes do not try to occupy the same space at the same time.

Take this phenomenon called Controlled Flight Into Terrain (CFIT). Its very interesting, and a bit gruesome. You take a perfectly good plane, fully working and fueled up, and you put a pilot into it, and he might fly it into the ground (or a mountain, or the sea, or an obstacle), in a controlled manor. According to Boeing, its one of the leading cause of airplane accidents and loss of life. This can be caused by a number of things, pilot disorentation, loss of situational awareness, minor problems manifesting themselfs.

Basically, the soft squishy human can be wrong. Two humans are less likely to be wrong than one, 3 more than 2, etc.

Get someone else to test your code. Seriously.

cattumblr_ky3xjpxusv1qzow1mo1_500.jpg (JPEG Image, 462×500 pixels)

Posted by Monty on July 30th, 2010

cattumblr_ky3xjpxusv1qzow1mo1_500.jpg (JPEG Image, 462×500 pixels).


Copyright © 2007-2010 Muntedhar Alhakim. All rights reserved.