I’ve been working for a client over recent months and part of my resposibility has been to look after a number of servers used for performance testing. Occasionally drives fill up on the server farm causing outages and obvious interruptions to testing.
It would be a near full-time job to manage all these servers, so to reduce the chance of temporary files from filling up drives and causing problems, I looked into creating a scheduled task to delete old temporary files. Since my server estate is varied, I didnt want to use PowerShell so I opted for an old “DOS” command, FORFILES.
This seems to have done the trick for me: forfiles /s /m *.* /d -7 /c "cmd /c del @path"
(This command deletes all files that are more than 7 days old from the folder in which it runs.)
Update – To remove folders as well: forfiles /S /D -7 /C "cmd /c IF @isdir == TRUE RMDIR @path /S /Q"
(This command deletes all folders that are more than 7 days old from the folder in which it runs. – Run it after deleting the files with the command above.)
Last weekend, I had an interesting exchange on FaceBook. As well as a few “likes” or “thumbs up”, I had a reply from a friend who is generally left-leaning. She included an image of a Union leaflet explaining the Unite Union’s reasons for wanting to stay in the EU.
The Unite Union is claiming that the EU is responsible for 10 benefits that British citizens have in the workplace, these include Health and Safety legislation, equal pay law, protection against discrimination, parental leave, sick pay and more.
I’m really surprised that Unite has this opinion. Much of the legislation that they’re referring to is actually British legislation enacted by Labour governments. I can’t see why the trade unions don’t want to take at least some credit for this. For example the Health and Safety legislation and much of the early equality legislation (sexual, race discrimination / equal pay etc.) came from Harold Wilson’s Labour government of the early 1970s, much of it pre-dated our membership of the EU.
The more recent legislation (European Social Chapter) came primarily from Tony Blair’s government in 1997 and under the Cameron/Clegg coalition in 2010.
You can’t deny that all of this legislation is fundamentally a good thing for British workers and any future UK government would be unlikely to repeal it unilaterally. Despite the fact that this legislation is a good thing, the EU can’t claim responsibility for all of it.
Addressing some of the points that Unite makes:
Workplace safety – The 1977 or 1996 Safety Representatives and Safety Committees Regulations Acts, are protected in British, not EU law.
The European Social Chapter – When the Social Chapter was enshrined in EU law (by the 1991 Maastricht treaty) the UK opted out. Personally, I think that this was a mistake, but it’s wrong for Unite to claim that the EU is responsible for putting these employment rights into British law. Tony Blair’s government did that in 1997. Nobody on the “Brexit” side is suggesting that we should repeal these laws.
Equality – The 2010 Equality Act is enacted in British, Not EU law and although it incorporates some EU rules into British law, many of the laws brought about as part of this act are updates Harold Wilson’s laws from the early 1970s, many of these original laws were brought in before we even joined the EU.
EU working time directive – Tony Blair opted out of the EU working time directive allowing workers to work more than 48 hours per week (if they volunteered for extra work). This still allows workers to be coerced into working longer hours so realistically most British workers don’t enjoy the full protection of the EU social chapter.
Equal Pay – The Equal Pay Act of 1970 was the first attempt to provide pay equality based on gender (this came in before we joined the EU). Despite this law and subsequent EU rulings on this subject there is still a significant disparity between the money that women earn compared to men. This chart shows the significant gender pay gap that still exists in Europe. For this reason, it is wrong to claim that the EU guarantees equal pay. http://ec.europa.eu/eurostat/documents/7116161/7188977/1305EN.pdf
Holiday Health Cover – the “Healthcare on holiday” protection comes from the EHIC card. This is due to the UK’s membership of the EEA (European Economic Area) and has nothing to do with the EU. Both Switzerland and Iceland are members of the EHIC scheme even though they aren’t EU members.
I find it hard to believe that Unite is campaigning to remain a member of the EU. With the TTIP legislation on the horizon which will erode workers rights and according to CEPR projections increase EU unemployment by 1.3 million, I would have thought that this is just the thing that Unions should oppose.
Tony Benn sums up the EU for me. Fundamentally undemocratic and heading in the wrong direction. It isn’t the good things that the EU may or may not have done in the past, it’s the bad things that they are planning to do in the future that worry me. That’s why I want out.
Since I wrote this blog, Dan Hannan (MEP and prominent Eurosceptic) tweeted this. It shows the supposedly independent groups including the OECS, IMF, IFS, LSE who’ve all benefited from EU funding.
It seems that the Unite Union is also on the list and received €285,000 funding from the EU. It appears that, “EU who pays the piper calls the tune.”
I originally wrote this for the Trust IV blog, but I thought it deserved a “republish” here…
As a performance tester, along with many people in the IT-world, I’m often asked to plan for different eventualities. I have to write test plans, software deployment plans or help to provide estimates for how long a piece of work will take. For predictable, simple work, this is fairly easy and is the sort of thing that people learn in school maths lessons. e.g. “If it takes one man one hour to dig a hole, how long will it take two men to dig a similar hole?”
In the IT world it often isn’t as simple as that. To (mis)quote Donald Rumsfeld, things that catch us out are the “unknown unknowns, those things that we don’t know that we don’t know.” How can we be sure that the configuration of a particular server is the same as the last one where we performed a particular task?
How do we know that the test data that we’ve been given is a true representation of live data?
How can we be sure that the business requirements we’ve been given are correct?
With a whole host of unknowns we need to be prepared to change our plans at a moment’s notice.
This is where the “dead Prussian” comes in…..
This chap is Helmut von Moltke the Elder; a Prussian army officer who died in Berlin in 1891. He was the chief of staff of the Prussian army and an excellent strategist. Rather than directing his armies with explicit commands, which ran the risk of becoming irrelevant quickly, he recognised that it made more sense to describe an overall strategic plan to his officers and rely on them to help him to achieve his objectives.
He recognised that military strategy was best described as a system of “options” since only the beginning of a military operation was plannable. He tasked his officers with calculating numerous possible outcomes and “what if?” scenarios. Only by preparing for multiple possibilities, could he be ensured of success.
His ethos is best described with the quote which is most commonly attributed to him: “No plan of operations extends with certainty beyond the first encounter with the enemy’s main strength.”
Often abbreviated to: “No plan survives contact with the enemy.”
I think that “Moltke” would have been at home in the IT world. He rejected a single detailed plan in favour of multiple “what if” plans and empowered his subordinates, trusting them to make the right decisions, despite the fact that he couldn’t always be in contact with them. Although the “military subject matter” of his famous quotes isn’t pertinent in IT, the theme remains relevant.
As I tester, I believe that these quotes are spot on:
No test plan survives first contact with application code.
No project plan extends with certainty beyond the first milestone.
There is no such thing as the “perfect test”, prepare for the unexpected.
If something can go wrong, it probably will….. be prepared for it.
Can you think of any other “Moltke-themed” quotations that are relevant to you?
Answers on a postcard….well perhaps in a Tweet to @TrustIV or @RichardBishop