Thursday, 29 December 2011

Fun with data types

Are protected underwriting terms applicable?  (Never mind what it means).  The answer is either Yes or No – they either are or they aren't.  No maybes possible, no special situations - so the perfect data type would be Boolean - a value of 1 means True, and 0 means False.  Named after 19th century mathematician George Boole, who presumably worked out that the opposite of True was in fact False.  Isn't maths wonderful?



Unfortunately, in SQL Server, there is no Boolean data type.  This might be something of a setback.  Still, the nearest thing that can be used in place of Boolean data is the BIT data type, which is an integer data type that can accept a value of 1, 0 or NULL value only.  And it only uses up one bit so it is very efficient.  

So, problem solved, I hear you say?  Ho, ho, ho; that is hollow laughter echoing round the IT crowd’s squalid basement.   Because 1 is fine for Yes, but 0 won’t do for No.  Oh dear me no - the bulk upload software to which I want to transfer data expects either 1 or blank.  It could be changed of course, but that would mean months of development and testing. 

Hokay, how else can we do this?  Tinyint, Smallint and no doubt Int and Bigint all implicitly convert the desired blank into a 0.  So no joy in that direction. 

A fixed size character string?  So I tried it as char(1), and did a CASE statement to specify ‘1’ for Yes and “ for No.  But that changed ‘’ to ‘ ‘ in other words, a space or ASCII code, er, 32.  Not the same thing at all, as far as a computer is concerned.  I asked for a single character – I get a single character – a space is a character, it just happens to be an invisible character. 

The answer was to use a variable length character string – the varchar datatype is usually used for strings that can vary greatly in length.  Names, for example.  You don’t know who is going to order a widget next – could be Jim Lee, could be Felicity-Jayne Anstruther-Gough-Calthorpe.  Using a varchar allows the length to vary – from 0, which is what we want, to 1, so it’s now varchar(1), which looks bizarre but works!  There’s a length overhead to using a variable character field, but we can live with that. 

I still think it should be Boolean!

Tuesday, 13 December 2011

How to Identify Twins

I'm trying to find a list of twins in my source database - reason being, twins share a surname, a date of birth, and a postcode.  Unfortunately, those are exactly the criteria that the destination database uses to identify and reject duplicates <sigh>.  So it's handy to have a list of twins beforehand and do some manual jiggerypokery to make things work as desired. 

(In an ideal world, perhaps our skilled team of Oracle experts would modify the destination database so that it considered the forename as well, and said to itself "Hey, twins!  Maybe I won't reject this guy after all."  But that puts us into a world of development changes and testing and pain - it's easier and quicker to leave the damn thing alone and manually wrestle with the input data.)

So the first step is to identify surnames which occur more than once in the data.  Notice that I'm grouping by Surname and Date of Birth:

      Select mb1.surname
      From   tblbods    mb1
      Group BY    mb1.surname, mb1.dob
      having count(mb1.surname) > 1

Which gives us:

Surname
SMITH
JONES
FORTESCUE-SMYTHE
MURPHY
MCDONALD
PATEL


Actually it gives us an awful lot more than this - there are 200,000 records in the table.  But I thought you would get bored if I listed more, plus I have had to change all the names and dates of birth so as to anonymise the data. 

Second step is to do the same for dates of birth which occur more than once.

      Select mb2.dob
      From   tblbods    mb2
      Group BY    mb2.surname,      mb2.dob
      having count(mb2.DOB) > 1

DoB
10/05/1993
11/06/1996
11/06/2007
25/12/2005
11/07/2010
14/02/2001


And then finally I want to select data where the surname is in the list of surnames from Step 1, and the date of birth is in the list of DoBs from Step 2.


Select
      mb.BodID, mb.Title, mb.Forename, mb.Surname,
      mb.relationship, mb.sex as Gender, mb.DoB
from
      -- Table of individual members
      tblbods     mb
where  mb.surname in
(
      -- Step 1 - surnames which occur more than once
      Select mb1.surname
      From   tblbods    mb1
      Group BY    mb1.surname ,     mb1.dob
      having count(mb1.surname) > 1
)

and mb.dob in
(
      -- Step 2 - Dates of Birth which occur more than once
      Select mb2.dob
      From   tblbods    mb2
      Group BY    mb2.surname,      mb2.dob
      having count(mb2.DOB) > 1
)

And the end result is:

BodID
Title
Forename
Surname
relationship
Gender
DoB
523189
MISS      
MARIA
SMITH
Child
F
11/07/2010
523190
MISS      
ALANA
SMITH
Child
F
11/07/2010
531637
MR        
JASPER
FORTESCUE-SMYTHE
Child
M
14/02/2001
531638
MR        
SIMON
FORTESCUE-SMYTHE
Child
M
14/02/2001
466662
MASTER    
RAHUL
PATEL
Child
M
10/05/1993
466664
MISS      
SAMIRA
PATEL
Child
F
10/05/1993
519007
MASTER    
JOSEPH
MURPHY
Child
M
11/06/2007
519008
MISS      
ANNETTE
MURPHY
Child
F
11/06/2007
339731
MISS      
PATRICIA
JONES
Child
F
11/06/1996
339736
MISS      
IMOGEN
JONES
Child
F
11/06/1996
419768
MASTER    
WINSTON
MCDONALD
Child
M
25/12/2005
419769
MASTER    
DOUGLAS
MCDONALD
Child
M
25/12/2005


Simples!  Hope you find this useful.









Saturday, 10 December 2011

Job Hunting - Preparing for the Interview

So you've read my blogs on doing up your Linked In profile, and job hunting - and all this good advice has worked!  (Or at least helped a bit).  You have an interview.  Are you ready for it?

Part of it is getting organised.  If you are looking, there's a fair chance that you will get a few interviews.  If you get them mixed up, this will be a bad thing - so you need to get organised, don't play it by ear.  Start by creating a file for the Employer.  I like to use clear plastic folders, but whatever you find in the cupboard will do.

Then a cover sheet.  Put the Company name in big letters, then the job title.  You've probably come through an agency, so put down the agency name and the bloke's name.  He will want you to ring him after the interview to discuss how things went, so you might as well ring the right bloke.  Then the name of the interviewer and their job title - the agency should give you this in advance.  It's handy to have all this stuff on one sheet of paper, rather than have to search for it.  Let me know if you want a copy and I'll send a copy of mine - this site doesn't seem to allow me to add stuff for you to download.

Add your CV to the file - it got you to the interview, they will probably want to ask you questions about it - you might think you know it off by heart, but take it just in case.  Maybe the recruitment agency has sent an old version, maybe the interviewer has left yours on his desk and brought someone else's.  If you have a copy, you look efficient.  If you don't have one, you might find yourself struggling.

Make a list of any holidays you have booked over the next three months - type it up nicely, hand it to the interviewer or the HR bod if there is one - it shows them that you are efficient and thinking about their problems. I once had a holiday booked, but no-one asked me about holidays and I forgot to mention it - it caused a lot of grief when I told them about my long-planned holidays a couple of weeks after I started work.  If you give them a list up front, they can't quibble about your week on the beach when you start the job, or God forbid!  ask you to cancel.

Put together a list of good questions for you to ask when it's your turn.  They ask you questions, and during the course of the interview you'll probably ask them a few back - but it's worth having a few good questions to ask at the end when you want to leave them with a good impression of you.  Maybe something that shows you have checked out their website, or their competitor's website - "I see your competitor has just brought out X - how is this likely to affect this business?"  A good last question might be "If I was successful, when would you need me to start?"  But build a list of good questions (the recruitment agencies have samples on their websites) and keep adding to it.  Google has 14,000,000 pages of "good questions to ask at interview" - some are better than others, and some are very cheesy indeed.  Prepare a half a dozen that you are comfortable with in advance - that way your mind doesn't go blank.  It's probably OK to refer to your list - again, it proves you have prepared for the interview.  But just ask a couple of good ones - reading 20 questions off your list will not be helpful.

All that stuff above is going to be pretty much the same for every interview you go to.  Now for the stuff that applies to the specific job.  Start with the letter or email inviting you to attend - you might need it.  Then the job spec that the agency sent you.  I like to go through it, ticking the things I know on the Essential and Desirable lists.  Don't panic if they specify something as essential but you can't in honesty tick it.  Maybe it isn't that essential, but most likely the other seven things you have ticked outweigh the one you can't.  Be ready to ask them about it - get your attack in first - "I see you are looking for someone with X, whereas my experience is in Y - is this likely to be a problem?"  The answer's probably not - or they wouldn't be wasting their time talking to you.

You know the name of the interviewer - look them up on Linked In and print it out, stick it in the file.  You get a picture, some background history, current and previous jobs, groups they are members of - chances are you will find some common connection or interest you can mention.  Don't be a creepy stalker though!

Check out the company website.  Check them out on Google as well - maybe they have been in the news recently.  Print out anything that you think is interesting and add it to your file.  Maybe cut and paste stuff onto a one page summary - you are probably not going to remember tons of corporate waffle.  I'm not a fan of Twitter but it doesn't hurt to look and see what people are saying.  Good or bad, it might lead to a good question to ask.

The agency will probably give you advance warning if there is going to be a technical test.  You can study for this - Pinal Dave has a good list of SQL Server Questions, and unlike others he gives you the answers too.  But remember that the test isn't trying to catch you out.  And in the great scheme of things, it doesn't matter very much how many Pages there are in an Extent*.

You are going to have to wear a suit and tie, or the female equivalent, especially if you are female.  It's far better to be overdressed - if the interviewer is in jeans and a tee shirt, you can take off the jacket, maybe loosen the tie.  But if you are in jeans and a tee shirt, you can't suddenly get less casual if you need to.  I was nearly caught out once - I knew the firm had a casual dress culture, so nearly went along in my chinos.  Luckily I stuck to my suit and tie, because when I got there it turned out that interviews were very formal indeed.

Check out where the place is - if you can go the day before and scope out the route and the parking, do so.  In any event, get to the place early on the day and spend a few minutes skimming through your file.  Take a few deep breaths.  And go in there and do your best!


* Eight.  Now you know.

Monday, 14 November 2011

More on setting up a DTS package

Remember I was talking about setting up a thing to import stuff from a spreadsheet into SQL Server?


Well, there are a few more wrinkles worth mentioning.


First thing was that when I first tried to run it, there was a problem.  The Data for the Source column is too large for the specified buffer size.  Here's the error message:



Ah?  I don't remember specifying a buffer size.  Well, not surprisingly, because I never did - what's more, as far as I can tell I can't get at the buffer size to change it.  It seems that by default DTS reads the first eight rows of the spreadsheet and works out how big the buffers and field lengths need to be, based on what it finds there.  Unfortunately, the data in this particular field reads something like "Yes" or "No" until we get down to row number 172 where someone has written an essay detailing the sad and complex story of one particular Hospital. (Don't get me started on database design and normalisation - let me just say that not everyone in the past adopted best practice - grrrr!)

The quickest way round this is to take row 172 and move it up to the first eight rows.  This works fine, and the data gets loaded.  But I'm not free to interfere with the master spreadsheet.  (Perhaps I could copy it and sort the copy?  I may come back to that)  That also means I don't want to put a dummy row up at the top with a 2048 character field in it.  (http://social.msdn.microsoft.com/forums/en-US/transactsql/thread/5e4f90d7-b84c-422b-bbd1-35481ae3d1ba/)

Apparently I can edit the registry so that it calculates buffer sizes based on more than the default eight rows.  But I'm leery of mucking about with the registry, and anyway it may be that someone else needs to run the package, not me. 

It might be possible to read in the field in chunks of 255 characters until the source field is empty But that is getting into something that's too heavy duty for me.  Maybe someone cleverer than me can figure it out and post the solution.  

The obvious answer is to find out where the buffer size is specified as 255, and change it to something larger.  But as far as I can see, it isn't possible to change this in DTS.  

One entry in Google suggested that I might need a new service pack?  http://support.microsoft.com/kb/247527 - nope, already got it.  


Had you guessed already that I've been researching this on Google?  I also tried asking the question on the Linkedin SQLDBA group.  I got some good answers but not THE answer, unfortunately.  So I suppose this blog post is really about problem solving.  You know, that favourite interview question - "Right, Jack, tell me about how you would go about solving a problem" and you think, Er...

First thing is research - Google finds lots of posts where it has been done, or something like it has been done, but usually not quite the same thing.  LinkedIn groups helped, but no magic bullet.  One of my colleagues vaguely remembered coming across something similar a couple of years ago, but couldn't really remember what he did to solve it <sigh>.  But it's always worth asking around, because there's a fairly good chance that someone will know the answer.  

Then, evaluate the options.  I did try moving row 172 up to the top, and it worked like a charm.  But it isn't my spreadsheet to modify, and there is no guarantee that the author isn't going to write a long and complicated explanation in row 207 next week.  So that was a no go.  

Then - decision.  I went for editing the registry in the end.  There's an article here on how to do it.  You change the permitted value for the TypeGuessRows variable in the registry so that DTS reads all the rows in the spreadsheet. Unfortunately, this means that the DTS package will only run on a machine which has been so modified. On the other hand, maybe this means that I have a job for life?  Yeah, right.

And Test.  Yep - it works.  

Wednesday, 7 September 2011

Create a DTS package to Import Excel files

DTS stands for Data Transformation Services, and is the SQL Server 2000 forerunner to SSIS.  Among other things, it can be used for importing data from an Excel spreadsheet to a table in a SQL Server database.  That was what I needed to do, but you can import or export from and to pretty much anything.  

Before using the wizard to set up a DTS package, make sure that there are no existing versions e.g. for testing.  If a table already exists, the Wizard won’t put in a task to create the table, and DTS is fiddly to edit. 

Open SQL Server 2000 Enterprise Manager and navigate to the database you want.  Select the “Run a Wizard” task from the taskbar.  (It's the one that looks like a magic wand sprinkling stars...)


There are loads of wizards.  Select the Wizard you wish to use from the range available.  In this case we want to use the DTS Import wizard.





Select the data source type from the pull down menu – in this case Excel.
Browse to the source data file.  


If the source data is in Sharepoint, select My Network Places and choose the Portal.  
After choosing the file to be imported, click on Next.  





Now select the destination server and database.  If you forget to specify the database, the wizard will set up a table on the default database, which may not be what you intended.  In my case the default was Master.  So the package worked, and created a table, but I couldn’t see it anywhere because I was looking in the wrong place.  


You can copy the whole table, or use a query to select just the bits you want.  



In this example there are several worksheets in the spreadsheet, listed in the source column.  I have ticked All, and specified the name of the destination table. 

Click on Preview to make sure that you have the correct data. 




You can run the package immediately, or save it for later, or schedule it to run daily or weekly.  


.  If saving, specify the package name and optionally a description.  


Check the Wizard’s summary and click on Finish


This is what the wizard produces:

Right click on the Create Table task.  This allows you to edit the code used, e.g. to check whether the table already exists and if necessary, drop it before creating a new one.  




This sort of thing, perhaps:
-- ImportPortfolio Matrix
-- Jack Whittaker 02/06/2011

use SGSGROUP
go


-- Check for existence of table
if exists
(select * from dbo.sysobjects
where id = object_id(N'[dbo].[tblMasterCFCPortfolioMatrix]')
and OBJECTPROPERTY(id, N'IsUserTable') = 1)


drop table [dbo].[tblMasterCFCPortfolioMatrix]
GO

-- create new table

 
If you forget this - and I did - then step one of the job will fail.  You can't create a new database if there is one there already.  But apart from that, it's not difficult at all.  


Tuesday, 30 August 2011

What I Did On My Hols

Yes, I know it's nothing to do with DBA Tasks, but you don't have to read it if you don't want to!



I went to the Eifel National Park.  No relation to the famous tower – two effs - but a landscape of steep wooded hills and lakes just over the Belgian border in Western Germany, about four hours drive east of Calais.  Imagine the Lake District with far more trees and far fewer tourists, and little medieval villages like Monschau full of half-timbered houses.  The warm sun shines on open air cafés serving beer with Wienerschnitzel (not every stereotype is false). 

Put on your walking boots or get on a bike and wander round the hills and lakes - this is what people do here.  Take a boat trip on the lake and walk back.  Cycle lanes and footpaths abound, making for lots of white paint at road junctions.  (Remember to wait for your pedestrian traffic light, even if it’s 3am and there’s nothing coming - the cops enforce jaywalking laws with 100 euro on the spot fines.  Ditto cyclists).  Once you get away from the main routes, a detailed map would be handy - I wasn’t impressed by the signposting on the footpaths.  Those of you adept at reading between the lines will realise that this means I got lost.  



The village is Gemünd, which is close to Schleiden.  There’s another Gemünd near Bitburg somewhere, and lots more places called Gemunden, so be careful programming the satnav.  Nearest big towns are Aachen to the north, Köln to the east. 

Accommodation is in a series of apartment blocks.  All the flats have a balcony I think,  but sadly although there are great views to east and especially west, our block faced south so we gazed at the closed shutters of the empty block next door.  Good sized living room with sofa bed, with galley kitchen and small verandah; smallish double bedroom; shower/wc. All fine for a week.  There’s one flat for sale with an asking price of 60,000 euros - you wouldn’t get a flat of this quality for that kind of money in the UK. 

What it doesn’t have on site is a restaurant or bar; nearest is the Salzberg 500m down the hill.  We found Aristotle’s rather smart Greek restaurant at the bottom of the footpath from the top of the complex down to the valley; a steep climb home...  Apart from that you need to  go down into Gemünd itself about 1.5 km away down a steep hill, where there are probably a dozen quiet bars and restaurants, so it’s probably not a resort suitable for party animals.  Although I admit I didn’t try the sauna.

Speaking of party animals having to make their own entertainment with their kit off - dominating the skyline to the west is the tower of Ordensburg Vogelsang (look it up on Wikipedia).  The National Socialists used to bring the best and brightest hunky blond young Aryan men to this training establishment and inducted them into a secret cult which involved them going into a secret room in the tower decorated with a big mural of the perfect German man. Who just happens to be naked.  You may wish to roll your eyes at this point.  After the war the place was used briefly by the British and then the Belgian army, who built a huge barracks block that Albert Speer would have admired, and replaced all the German eagles with Belgian heraldic lions. 

Off to Köln for the day, starting with a boat trip up the Rhine from the cathedral, commentary in German and English - oldest, longest, busiest, highest etc.  2000 years of history, check out the cathedral and the adjacent Roman museum, plus it has a chocolate museum, so pretty much the perfect weekend break.  Students of urban planning should come and see how to do it.  Cheap to park as well, 1€20 for an hour right by the cathedral. 

A month or two back I visited the Museum of Welsh Life in Cardiff (Amgueddfa Werin Cymru), and just down the road from Gemünd near Kommern is a very similar German version.  Park at the bottom and walk up the hill, and there among the trees are little clusters of half-timbered wattle and daub houses from up and down the Rhine, preserved as they were before the coming of the 18th century..  They have a working wood-fired bakery where they bake the bread they sell on site.  Chickens and geese wander round the villages, but the pigs are confined to their sty which is probably just as well.  The occasional member of staff wanders round in historical costume, the effect spoilt only by the occasional squawk of the two way radio. They are building a new village covering the period from the 1950s to the 1970s, which makes me feel very old.  You can eat on site, but we went down the hill to Kommern, a living village of, er, half-timbered wattle and daub houses, and had a very nice Greek meal in the restaurant’s tiny shady courtyard.

Drove back to France via Maastricht in the Netherlands; lots of clothes shops for those that like them.  But the main square was blocked off as they were setting up stalls for a forthcoming antiques fair, so the pavement café atmosphere was spoiled for me.  I was surprised that the tourist information office actually charged for a map of the town; everyone else in Europe gives them away for free.  And the swish new Vrijthof underground car park beneath the main square charged more for an hour than Köln did for four.

Tuesday, 9 August 2011

Data Quality - What could possibly go wrong?

Well, pretty much everything.  If you have enough data, there will be mistakes in it.  Try writing your own name down on a piece of paper.  In CAPITALS.  There's quite a good chance that you will spell your own name wrong - something about the unfamiliar capitals trips up the link between your brain and your fingers.  Now imagine that you are a data entry clerk typing in hundreds of names every day.  Some of them are Arabic, others Polish, some even Welsh.  Can you guarantee that every name is correct?

There are ways to help, of course.  Take addresses, now - most countries have a postal code system which can be used in automatic sorting machinery to help your letter get to the right place.  Most countries use a 4 or 5 digit numeric code - 90210 famously defines Beverly Hills in California, so typing an easy number into your address software automatically fills in the town (and it isn't Beverley Hills) and state.  And by reading the relevant postal address file, the software can check the spelling of the streets.  The postcode systems in the UK and the Netherlands can go right down to street, even sometimes premises level.  But these things have to be kept up to date - and periodically the postal authorities make changes in order to take on board changes out in the wild, even sometimes to fix mistakes.

So your name and address data may contain errors - perhaps your older data even preceded the current computer system and was transcribed from a Rolodex.  Check it.

Check the names and genders and titles as well, while you are at it.  Where you find blanks, there are a few things you can do:

  • Where there is a gender, you can derive a title (if Gender = F, then Title = Ms).  Note that while this is fairly risk-free for men, some women dislike being called Ms.  
  • And vice versa - where there is a title, you can derive a gender (if Title = Mr, then Gender = M).  
  • Where there is a forename, you can - usually - derive a title and gender (if Forename = Andrew, then Title = Mr and Gender = M).  This will still leave a number of names (e.g. Hilary) where it is not possible to determine the gender.  

Maybe you don't have a first name at all, just the initials.  Is that a man or a woman?  If you don't know, how can you address a letter?  Suppose it says Mr J Smith, but then states the gender as F?  Something wrong, but what?   You could of course classify such cases as "Unknown", but that might screw up your letters completely -  “Dear Unknown Smith” is not going to win you much business for your widget factory.  “Dear Customer” might be acceptable.

Suppose you have a list of email addresses - you need to make sure that they are valid before sending off your mailshot.  Lots of things you can check here:

  • Check for spaces in field
  • Check that name is present
  • Check that address does not end in a full stop     
  • Check that suffix e.g. .co.uk is not missing
  • Check that suffix is not truncated
  • Check that @ symbol is present     
  • Check that @ symbol is not duplicated      
  • Check that there is no spurious full stop in the address
I found some SQL code on the internet to do this - you don't expect me to do any actual WORK, do you? (After writing that sentence, the boss made me rewrite my code in PL/SQL in order to do that useful job for an Oracle database - I should have kept my mouth shut).  If you want a copy, let me know and I'll pass it on.  One big problem, of course - you can check all these things and have the most valid email address ever, but it's no good if your customer has changed to a new ISP last month.  

And while I think about it, don't forget that you need to comply with data protection legislation to hold all this stuff.  UK readers can find a handy checklist here, but there are similar rules for most countries.  You can get your data checked for people who have moved house, or people who have died (if you want to upset a bereaved relative, send a cheery letter to the recently deceased).  And if you know that someone has died, make sure that you don't contact them, especially not if you are going to write to Dear Mr Smith (Deceased).  

Tuesday, 7 June 2011

How to Keep Your Job

Emails, eh?  You reply to your friend with a sarcastic comment mocking some corporate announcement that Dilbert would have found extreme, and suddenly everyone in the company is reading your wit and wisdom.

The great thing about emails is that they provide a way to communicate instantly with lots of people.  The trouble with emails is that they provide a way to communicate instantly with lots of people.  In the days when you wrote a memo and put it in the internal mail, it probably wouldn't arrive until tomorrow, and you could always get it back from the out tray if you needed to stop it.  Or even if you thought of something to add after writing it.

Well, here's a handy hint - you can do exactly that with an email.  Remember I was talking about email the other day and how to set up rules to sort them into folders?  Well, I was.  You can set up a rule that slows down your email to a more human pace.  Let me show you how to do it.

Start by setting up a new rule.  In Outlook, click on Tools, and then select Rules and Alerts.


Right now, click on New Rule, and it'll give you a list of ready made rules, none of which do what you want to do.  That's to put a delay on outgoing mails, remember?  But right down at the bottom of the list there's a thing about starting from a blank rule, and the thing you are looking for - check messages after sending.  Select that one, and click on Next.




Right - now you get the following screen - lots of possible conditions.  You could think about setting it to put in a delay if you choose to send a message to Company - All, perhaps.  But you might still reply to a career-challenging individual by accident, or some weasel who forwards your message to the world.  Remember Claire Swire?  Yes, that Claire Swire.  So think twice, okay?  And apply this rule to all your outgoing emails - scroll right down to the very bottom of the list and choose "On this machine only".  Hit Next.



Again, there are lots of things you could do - but the thing we want is down at the bottom of the list again.  Choose "Defer Delivery by a number of minutes".  Then in the box at the bottom, click on the link where it says a number of  and type in 5.  If you don't realise that you have screwed up in five minutes, you probably aren't going to realise in 60.  Oh, go on then, put in 10, 15, whatever you want. See if I care.  



You could stop there, if you want.  Click on Finish, and go home.  Next time you press Send and then think "Ooops!", you can stop worrying - it's sitting in your out-box and you can grab it back, edit it, delete it, whatever you want.  I've saved your backside from corporate hell, and you owe me a beer, or suitable non-alcoholic refreshment if this is more appropriate in your jurisdiction.

Still here?  You want the last bit?  OK, suppose you really, really can't wait five minutes.  What a sad life you must live, to be sure.  Take a break, smell the flowers, gaze into the distance for a few minutes and let your thoughts drift away.  You'll feel better for it.

Right then.  Exceptions.  You really want it to go now, you can't wait five minutes because you have promised your boss to send something right now, and she is waiting, drumming her fingers on the desk and wondering what has gone wrong with the email system.  Before her blood pressure rises from a simmer to a rolling boil, I'll tell you.

Click on the thing that says "except if the body contains specific words".  Click on the link where it says specific words and type in your secret code for making things go straight away.


Like what?  You have to be a bit careful.  Don't type something like "Urgent" or "Priority" because you probably get lots of emails with words like that in them.  You can be dull, dull, dull and type something like "For immediate transmission".  I like to say "Priority Green" - it doesn't mean anything particularly, but you can stick it at the bottom of your signature file next to the corporate thingy about saving the planet by not printing out this email, where it doesn't look out of place.  If anyone notices it, they probably think it is some environmental initiative which they missed, and that you are obviously a very virtuous person.



Last of all, give your new rule a name, something like Delay Outgoing Emails, something like that and click on Finish.


From now on, any email you send has a life-saving delay built into it.  You can get round it if you really need to, but I shouldn't bother - five minutes won't usually be noticed.  The crucial thing is that you have put in a delay longer than the Ohnosecond.

Saturday, 14 May 2011

Passwords

This is copied from an article by Buffalo Bill Brabant...

"There has been a resurgence of hackers  attacking webmail users and then using the stolen accounts to send ads and malware to the address books of the stolen account. This is at the least very embarrassing to those involved as one of the users of my Yard sale groups found out last week. After a post by a hacked AOL user they requested I remove the person's posting privileges. Instead I placed the user on moderation and explained what had happened.
As fate would have it, the complainer, who was also an AOL user got hacked about a week later.

Anyhow because it is timely here is an article I wrote about a year ago on password strength which is your only defense against being hacked.



We probably have all seen at least one of these lately, an email from someone we know to about ten of their friends with no subject line or the name of the person as a subject. When you open the email you find a url to a website and if you click on it and you are lucky the worst you will get is a Viagra ad but it just as easy for them to rig the site with malware downloads like antivirus 2010.

This started out a few years back when people were hacking Yahoo mails to steal choice addresses and after their methods were posted on youtube, spammers started hacking hotmail email accounts last winter and then more recently AOL, and within the past week Yahoo accounts.

There has also been a revival of a scam from last year where a person hacks into your email and changes passwords so you cannot check your email. They then send emails out to everyone in your address book saying that you were on vacation out of the country and that you have lost or been robbed of everything except your passport and need thousands of dollars to get out of your predicament. If the person sends an email to inquire about the circumstances the hacker answers as you and has money wired to the foreign country where armed with a false ID he can claim the money from however many people care for you. 

You can improve your odds against being hacked with a strong password but it doesn't have to be hard to remember. Let's say for example your name is Dave Jones. You can strengthen security by using upper and lower case letters so we will try DaVeJoNeS which is a step up from davejones which is rated weak by Microsoft 

With the DaVeJoNeS it rises to medium security which means that no one will accidentally guess your password even if they know you but it would not stop a hacker so lets go up one more step. We can add number and symbols from the top row of keys to help strengthen the password so we add a number to our medium password and Dave likes 7 so we get DaVe7JoNeS. Adding that one number makes our password in the strong category.

Now we will take Dave's password and we will add a few symbols in this case an asterisk in front and one in back or &*DaVe7JoNeS*& along with two ampersands and our password becomes very strong and hard to crack.

Here is another place where you can check your passwords but even with the Microsoft site I would send them a slightly altered password then what you intend to use because it is always safer to trust no one.

Feel free to share this with your friends because if I can stop one person from being hacked I consider it well worth the time it took me to write it down."


Thanks Buffalo!  

You can generate a random password, but it's difficult to remember things like >J^+B#8d.  

You could follow Buffalo's method but make it even sneakier by starting with someone else's name - the politician you hate most, perhaps?  A one-hit wonder pop-star from the 1980s?