Monday, 18 January 2010

Spamassassin 2010 date bug

Noticed this pretty much at the start of the year so why has it taken me this long to fix it?

Anyway, basically bug in spamassassin means that all email in 2010 get an extra 3 points on there score, automatically putting them close to being tagged as spam (depending on what you have tag level 2 set as)

There is a fix available for it but I'm in the process of upgrading servers so in the meantime you can turn this rule off by inserting the following in /etc/mail/spamassassin/local.cf and restarting your daemons.

score FH_DATE_PAST_20XX 0

Oracle: How to recompile and view package source code

As SYSDBA you can recompile all packages from sqlplus with the following oracle utility

@$ORACLE_HOME/rdbms/admin/utlrp.sql

To view any "invalid" packages after compilation you can use the following SQL which will give u a summary overview of all object_types
set pages 49000
select object_type, status, count(*)
from user_objectsgroup by object_type, status;

If you have invalid package or package body objects it will basically mean you've got compilation errors in your pl/sql code.  To view the invalid objects in more detail use following SQL
COLUMN object_name FORMAT A30
SELECT
  object_type,
  object_name,
  status
FROM user_objects
WHERE status = 'INVALID'
ORDER BY object_type, object_name;

When you've identified the package/body that is invalid you can manually recompile it with
ALTER PACKAGE <obj_name_from_prev_query> COMPILE BODY;

if its a package obj that is invalid then just omit the "body" part at end of the statement 

More comprehensive info on recompiling can be found here.

If the package/function etc still won't compile then a show errors cmd just after manually trying to recompile will show you why compilation failed.  "show errors" will give you the syntax error and the line & column reference on which it ocurred.

If you then want to see the source code for the package etc you'll have to query the USER_SOURCE table.

set pages 49000
select text
from user_source
where name='<invalid_obj_name_from_prev_query>'
and type='PACKAGE BODY'
order by line

Change type to suit, generally it will be either FUNCTION, PACKAGE, PACKAGE BODY, PROCEDURE or TRIGGER

You can then compare the source for the package/function etc with the lines for the earlier show errors cmd.

Now the hard work of debugging the pl/sql begins....  :-)

Sunday, 17 January 2010

Secret Millionaire buys new Van for Uig Community Shop

Just been fwd'd this article in Scotsman Online.

Essentially a "Secret Millionaire" has purchased a new refrigerated van for the Uig Community ran shop.  I'm not sure how many community ran co-operative shops there are on the Island but this is probably the best known (Clachan in Leverburgh is another) but I give full marks, 10/10 to the philanthropist who did this.  Good on ya! :-)  Its refreshing to see somebody who obv has plenty money putting some of it back into their community.

Side thought: Wonder if they have generators to keep fridges/freezers going thro winter power outages (there's always one!), If not maybe somebody will buy one   (not me, I hasten to add... I have nowhere near enough money!) :-)

Saturday, 16 January 2010

JP Morgan: More appalling bonuses from Banks



For the love of money is the root of all evil: which while some coveted after, they have erred from the faith, and pierced themselves through with many sorrows.

1 Timothy 6:10


The bible has quite a few quotes regarding money, and none of them favourable.  I do wonder from time to time if you can actually be a Christian and work for a bank.

As if we needed any more evidence of the immorality of these institutions, with incomprehensible bad taste JP Morgan has announced it is to award bonuses to the tune of £5.73bn ($9.3bn) but to just over 24,500 staff.  I've harped on for years now, long before crash of lehman bros and prob drove friends and colleges of mine up the wall but the general public as a whole are now wise to what banks do (or rather don't do) to make obscene amounts of money out of thin air. 
You would think that JP Morgan would at least have the common sense in the current climate to keep their head down and hold off on obscene bonuses for a year, because generally speaking keep your head down and ride out the storm and you can get back to being a shower of bastards in no time.

Iceland's banking collapse has seen the UK and Netherlands Governments hold this small country to ransom to the tune of £6.3bn ($3.6bn), a single private bank awarding £5.7bn to 24,600 staff really puts the sheer scale of this into perspective.  The Icelandic people don't see why they should pay this back, they're not to blame for the irresponsible risks taken by their private banking system, you can sign a petition of support for them here.

It's difficult to get your head round the sheer scale of these figures, to be honest the "experts" in the banks couldn't fathom it out either so what chance do we have, but a good way to get the scale is to put 1 billion seconds in years into google.  Google will return 31.68 YEARS so at £1 every second the bonus for 24,600 JP Morgan staff would take 181.57 YEARS to accumulate that amount.

So, What exactly have these people done to earn these bonuses, in reality sit at a computer gambling.  There is a myth that this job is difficult but from watching "Million Dollar Traders" I learned that anybody can do this job, however they do need a certain aptitude.  They need to be able to do basic mental arithmetic, they need to care about nothing but making money and they need to be completely selfish pricks.  There was a psychological test in Episode 1 to figure out who the best candidates were.

To quote Lex Van Dam (any relation to Jean-Claude) the creator of the TV programme "When I worked at Goldman Sachs I went through a training programme and most people there had MBAs and the view was that you need lots of education to be a good trader but I don’t think so. It’s not that complicated, you just need to stick to a few rules."

The timing was a bit unfortunate as programme was during the start of the recession but as I recall by the summary of the experiment had shown that something like half the contestants had traded as well as the professionals during that period.  So when "talented" traders threaten to leave the UK or move to hedge funds, let them, we'll find its not that difficult to find replacements.

Note: As i'm typing it appears JP Morgan have reneged to pressure over bonuses (Financial Times)