Monday, 31 December 2012

Bletchley Park - Birthplace of the Modern Computer

I enjoyed a visit to Bletchley Park with my kids on Saturday. It's an amazing place. It just reeks of World War II and the Cold War. And it has so many fascinating stories to tell. The place was abuzz with the latest news - that 92 year old Bletchley codebreaker Raymond Roberts had been appointed an MBE in the New Years honours list.

Bletchley's activities are reckoned to have shortened WW II by 2 years, yet nobody but a select few knew what was done there until the mid-1970s when the Official Secrets Act restrictions were lifted. Such was the secrecy that husbands and wives did not know that they each had worked at Bletchley in their younger days until they cautiously mentioned their past to each other in the mid-1970s.

Bletchley Park (near Milton Keynes, in Buckinghamshire) was Britain's main decryption establishment during WW II; the home of the Government Code and Cipher School (GC&CS), known as the Golf, Chess and Cheese Society by outsiders who can have had no idea of the work truly going on at Bletchley. Ciphers and codes of several Axis countries were decrypted including, most importantly, those generated by the German Enigma and Lorenz machines. This was achieved in equal measure by brainpower and by the invention and use of Colossus - the world's first electronic, digital, fixed-program, single-purpose computer . The secrecy around Bletchley's activities meant that the Axis countries were unaware that their seemingly unbreakable codes had indeed been broken and British military commanders and politicians were reading Axis messages within hours of them being sent.

A senior member of the Bletchley war-time team was Alan Turing. Turing was part of the team that cracked the Nazi Enigma code, vital to the allied war effort. He is now widely recognised as a computing pioneer. However, at the time of his death - which an inquest recorded as suicide - he was virtually unknown to the public. His work at Bletchley Park was kept secret until 1974.

2012 celebrated 100 years since Turing's birth. There's a wonderful sculpture of Turing at Bletchley, made entirely of pieces of slate by Stephen Kettle. The picture I've shown here doesn't do it justice. It's well worth a trip to Bletchley just to see this sculpture. Amazing work!

The Automatic Computing Engine (ACE) was the product of Turing's theoretical work in 1936 "On Computable Numbers" and his wartime experience at Bletchley Park with Colossus. In early 1946, Turing presented a detailed paper on ACE to the National Physical Laboratory (NPL) Executive Committee, giving the first reasonably complete design of a stored-program computer. However, the Official Secrets Act prohibited him from explaining that he knew that his ideas could be implemented in an electronic device. ACE implemented subroutine calls and used Abbreviated Computer Instructions, an early form of programming language. Turing's colleagues at the NPL, not knowing about Colossus, thought that the engineering work to build a complete ACE was too ambitious.

Turing was a homosexual, at a time when homosexuality was illegal in Britain. Turing was convicted of gross indecency in 1952 after acknowledging a sexual relationship with a man. Barbaric as it seems by modern standards, he was offered (and accepted) treatment with female hormones ("chemical castration") as an alternative to prison. Turing died in 1954, from cyanide poisoning. An inquest determined that his death was suicide. An incredibly tragic life story.

In 2009, Prime Minister Gordon Brown made an official public apology on behalf of the British government for "the appalling way he was treated". In 2012, there has been a growing campaign to grant Turing a statutory pardon. In a letter to the Daily Telegraph on 14th December, eleven of Britain's leading scientists called on the government to grant the pardon.

I'm looking forward to receiving my copy of Dr Sue Black's Saving Bletchley Park book later this year, describing the amazing people and amazing work done at Bletchley over the last 70 years, including efforts in recent years to stop the bulldozers and save the site for the nation.

The BBC History web site has a wonderful section on Bletchley (including video). Bletchley Park is highly recommended for a visit, and so is the BBC web site!

Thursday, 27 December 2012

NOTE: UK Events, Good News and Bad News!

Good news 1: SAS UK will be running Analytics 2013 in London on 19th and 20th June. This is part of a series of such conferences, its predecessor being held in Cologne, Germany last June. The 2012 conference included Data Mining, Forecasting, Text Analytics, Fraud Detection, Data Visualisation, Predictive Modeling, Data Optimisation, Operations Research, Credit Scoring, and High-Performance Analytics. A wide varity of analytics topics! I'm sure the 2013 conference will be well worth attending.

Good news 2: There will be a series of 'SAS Professionals road shows' early in 2013. I've long extolled the virtues of the annual SAS Professionals Convention held in Marlow. Now you don't even need to travel as it comes to you! Keep checking the SAS Professionals web site for details when they appear.

Bad news: There isn't any really. There won't be a full-blown SAS Professionals Convention in 2013, but with all of the above, it's no great surprise, and nobody is a loser.

Your "2012" Top Ten

It's traditional at this time of year to look back over the year and pull out some highlights. I thought I'd take the easy route here and publish a list of the ten most viewed articles published this year. However, I realised that this would be skewed in favour of older articles. So, in an effort to bring balance, I decided to look at the posts I'd published in the last 18 months and highlight the ten most viewed. And when I come to do that in a years time, the last half of 2012 will get its fair crack of the whip. Does that make sense?

Anyway, here they are (with the most popular at the top of the list)...
  1. NOTE: SAS Global Forum (SGF) 2012 Call For Papers, 18-Oct-2011
  2. NOTE: Keyboard Shortcuts in the SAS Enhanced Editotor, 23-Aug-2011
  3. NOTE: Booked for SAS Global Forum 2012, 03-Jan-2012
  4. NOTE: DS2. Data Step Evolved?, 02-May-2012
  5. NOTE: Upgrading to SAS 9.3, 30-Aug-2011
  6. NOTE: SAS Global Forum 2012 - Update, 24-Apr-2012
  7. NOTE: SAS Global Forum 2012 - Workflow Management, 24-Apr-2012
  8. NOTE: SAS Global Forum 2012 - Futures, 25-Apr-2012
  9. NOTE: Enterprise Guide 5.1 - Now Shipping!, 27-Feb-2012
  10. Testing - Peer Reviews, 13-Dec-2011
The fact that nine out of ten of the posts have a "NOTE:" prefix immediately shows that the posts about SAS syntax and functionality got many more hits than those about software development best practice (I don't use the "NOTE:" prefix for posts that are not specific to SAS software). That disappoints me a little because my aim for the blog is to spread that best practice. However, I enjoy researching and writing the articles, and I can see from the stats that the "best practice" articles do have a decent amount of readership. I could guess that they don't match Google search strings so readily as those with SAS syntax within them.

I hope you had a good Christmas. Here's to a healthy and happy New Year.

Wednesday, 19 December 2012

NOTE: Metadata-Bound Libraries in Action

Following my recent post about the excellent new metadata-bound libraries in V9.3 M2, I noticed Paul Homes publish a blog article with the results of his testing of this new capability. Paul shows some code samples and associated log output. Take a look! You can see the error messages that result from invalid attempts to access a table in a metadata-bound library.

My reference here to Paul's article is somewhat recursive given that Paul's article mentions my own original article! Thanks Paul.

Tuesday, 18 December 2012

NOTE: Present Thinking

Christmas approaches, I've opened 18 windows in the SAS Professionals advent calendar (without winning anything, yet), written most of my Christmas cards, and my mind is firmly focused on the remaining Christmas shopping. However, I've allowed my mind to wander a little and think about what SAS-related gifts I might like to give or receive.
  • Number one has to be a trip to next year's SAS Global Forum. Not only is it the best opportunity of the year to learn about SAS technology, to meet fellow SAS practitioners, and to meet SAS developers, it's also a great opportunity to visit the great city of San Francisco. I'll be there; will you?
  • Along the same theme, a trip to SAS Professionals Convention in Marlow has to be the best value event of 2013 if the prices of 2012 are retained. Frustratingly, we're still waiting for the dates to be announced.
  • If I'm looking for something a little cheaper than trips to Marlow or San Francisco, there are a few books I'm looking forward to reading. Firstly, The 50 Keys to Learning SAS Stored Processes by Tricia Aanderud and Angela Hall. It was published earlier this year,but I haven't gotten around to getting my own copy yet. Stored processes (as I said yesterday) are an excellent means of packaging your code and making it available anywhere (seemingly). You can never know enough about stored processes
  • Another book I'm looking forward to reading is Chris Hemedinger's Creating Custom Tasks for SAS Enterprise Guide using Microsoft .NET, due to published early next year. I mentioned Chris's book back in October. EG custom tasks are not as widely-accessible as stored processes (limited, as they are, to just EG and Add-In for Microsoft Office) but they nonetheless provide great benefit as a means of packaging your functionality and making it available to you and others in a parameter/wizard-driven fashion.  
  • Books I've already read and would recommend jointly are: Performance Dashboards by Wayne Eckerson, and The Design of Information Dashboards Using SAS by Christopher Simien PH.D. These two publications make an excellent pairing, taking you from the high-level theory of dashboards (as something much more than colourful reports) through to copious SAS examples of dashboarding techniques. Both books rightly highlight the need to design a dashboard as a human interaction mechanism prior to diving into the coding. If you're not familiar with the works of Few and Tufte then you'll struggle for respect as a producer of dashboards. 
  • If £20 is stretching your budget(!), you could do much worse than to look at Phil Holland's App/Books that I mentioned back in September. Available for Android, Chrome, and webOS, the books are delivered as apps to your device and updated with extra pages (and information) for free from time-to-time. Each app/book costs just £1 - £2.
Okay, day-dreaming over, I'd better get my concentration back to my real Christmas shopping list. Will the Bluewater mall be empty of shoppers this evening? Wish me luck! 

Monday, 17 December 2012

NOTE: Calling Stored Processes from SAS Code (PROC STP)

Stored Processes. Brilliant. An excellent (and easy) means of packaging your SAS code and making it available in parameter-driven form through Enterprise Guide, Microsoft Office applications (through the SAS Add-In for Microsoft Office), Information Maps & Web Report Studio, the Stored Process Web Application, your own web applications. And PROC STP.

Yes, there's a PROC STP! It's not in the Base SAS 9.3 Procedures Guide, Second Edition, you need to look in the SAS 9.3 Stored Processes: Developer's Guide to discover it. It's worth looking, because the PROC offers a lot of stored process goodness.

Firstly, it's worth noting that PROC STP's LIST statement will show details about a specified stored process, including where the code is stored (don't forget that SAS V9.3 optionally allows stored process code to be stored in metadata instead of as an external file).

However, surely the best use of PROC STP is as a "super-macro". PROC STP allows you to call a stored process from any base SAS code (including another stored process or DI Studio user-written transform). The PROC's INPUTDATA, INPUTFILE, and INPUTPARAM statements allow your inputs to be specified, and their are OUTPUTxxx equivalents too.

It's an excellent addition to a SAS programmer's toolbox. However, I need to offer a couple of word of caution:

PASSWORD. To access the stored process definition, your code must have established a metadata server connection. Thus, in many cases, you will need to code an OPTIONS statement with a number of METAxxx parameters, including METAPASS with an appropriate password.

LOCALITY. The stored process code won't be executed as a stored process. Frankly, I'm not 100% clear on how it executes. It is not within a stored process server, but it is also not executed within the calling code's SAS session. It appears that a new workspace session is created, with its own WORK library, etc, and the stored process code is executed within this new environment. Allied with this is the fact that the stored process code must be directly accessible to your local environment. In practice, this means that the code needs to be in the metadata server or on your local server.

I don't yet have a lot of experience using PROC STP myself, and I haven't found much experience on the web either. I'm looking forward to experimenting more, and to seeing lots of quality papers on the subject at next year's SAS Global Forum.