Sunday, November 20, 2005

 

30,000 women lose job due to pregnancy.

Maternity pay will shortly be extended from 6 to 9 months, with the right to turn part of it into paternity pay.

This is great news for those working for large companies or with strong trade unions.

But many employers are not complying with their *existing* statutory duties.

The Equal Opportunities Commission / Citizens Advice Bureau found that:

..each year 30,000 women are dismissed, made redundant or treated so badly that they decide to leave their job as a result of their pregnancy.

New maternity rights are all very well, but the problem is enforcement. CAB says that employers can get away with non compliance:

..in the knowledge that the Employment Tribunal process – the only means of enforcing most employment rights, - is unduly legalistic and adversarial, and thus extremely daunting, especially to pregnant women, new and lone parents, very young and elderly workers... etc

Every year, about one-third of all Employment Tribunal claims are withdrawn by the claimant before the case reaches a hearing, and research by the Department of Trade and Industry has found that in 51 per cent of such cases this is because the claimant considers there to be too much stress, difficulty, fuss or expense involved in continuing.


More from CAB briefing

Thursday, November 10, 2005

 

Junit on private methods

Sometimes, I want to write JUnit tests for private methods. I think it's legitimate to want to do this - especially if I'm writing the test first.

The options according to Bill Venners are:

1. Promote them to protected.
No, I agree with Bill that this is definitely *dirty*.

2. Use that 'PrivateAccessor.invoke' thing from junit-addons.
I don't like this. For one, I can't remember the syntax, for two, I can't bare to look at it it's so ugly. Passing method names as strings - Urrrch.

3. Put my tests inside the classes they test
No, that will make them too big, and I don't like scrollbars either.

4. Deny that I want to test them after all.
This is my boss Leigh's view. But I am unconvinced....

Here are some arguments for it:

Argument 1: if something is interesting and complex enough to be worthy of testing, then it should be moved into a new class and become public. (This is the JUnit official line too.)

But what about this:

public class ISSN{

public ISSN(String issn){
validate(issn);
// other stuff
}

private void validate (String issn) throws Exception{

removeHyphen(issn);
doChecksum(issn);
}

private void doChecksum(String issn) throws Exception{

// tricky looping and chopping stuff here
// only 8 lines though
}
....


- doChecksum does not belong in its own class, and does not need to be more public. But I do really want to test it. Not testing it will make me worry.

Argument 2: A complete enough suite of tests on public/protected/package scoped methods will end up testing all paths through the code anyway.

- True, BUT:
1. It's harder work to set up the test.
What about this:

public class ISSN{
public ISSN(String issn, SomethingInconvenientToCreate foo){
validate(issn);
// other stuff
}
...



2. It's harder to understand the test later.
I am a simple creature - i want tests for foo() to be called testfoo...(), and in them, I want to see calls to foo().. What's wrong with that? Life is hard enough.


The solution: ?? Hmm..

1. Sun magically deal with it.
2. Put tests inside testee classes - but get IDE to hide them. Ie, eclipse & co. magically deal with it.
3. ???

 

Slashing and chopping and planting

I've been doing some gardening in this churchyard restoration project in East Oxford recently.

I would highly recommend it to anyone wondering how to escape telly on Saturday afternoons. Hacking at ivy is a good option if you're feeling guilty about not going to the gym. Bulb planting is nice and calm if you're worn out with that.

2-4 pm every Saturday.

No long term commitment required. No God stuff. Spades provided.

I even got a piece of home made cake last time - rocking.

 

Women earn 17.2% less

...in the year to April 2005, women working full-time earned on average 17.2% less than their male colleagues more

previous post

Thursday, November 03, 2005

 

Our bugs are not so bad after all..

powergen bill for £59,000. This kind of thing makes me feel so much better about all the embarassing bugs I've been responsible for...

This page is powered by Blogger. Isn't yours?