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.

Monday 10 December 2012

How Do You Read?

[UPDATE: In this article, I recommend the use of Google Reader. Google retired Reader on 1st July 2013. This article still holds value; just substitute Feedly for Google Reader! I now highly recommend Feedly for reading news feeds.]

There's a lot of information out there in internetland; constantly being updated and added to. A lot of it is good, intelligent information, but it's spread across many web sites. Visiting each of those web sites on a regular basis, checking for updates, is time-consuming and frustrating.

Wouldn't it be so much easier if the new and updated information came to you when it was published, rather than you searching for it? But you don't want it sent to your email inbox because you're concerned that your inbox will become full-up. An RSS Feed Reader will solve all of your problems. It's like having your own personal newspaper, full of new and fresh content about things of your own choosing.

You don't need to download and install any software on your desktop if you use a browser-based RSS Feed Reader such as Google Reader. At the end of this article, I've provided a step-by-step guide to get you started.

RSS (Really Simple Syndication) is a way of collecting regularly changing web content from your favourite sites. It enables you to get all the latest information and news summaries in one place, as soon as it is published, without having to visit the individual websites you have taken the feed from.

To receive an RSS feed you will need a Feed Reader. This is a piece of software that automatically checks the feeds from your chosen sites and lets you read any new articles that have been added. And once you've read an article, most Feed Readers will then hide it so that you can easily distinguish between read and un-read articles. A variety of Feed Readers are available for different platforms. Some are accessed through your browser but you can also use a downloadable application.

Feed Readers bring automatically updated information straight to your desktop, tablet or mobile phone. You can monitor news, blogs, job listings, personals, and classifieds. More and more sites offer feeds, which you can identify by a small button that says either RSS (see the logo above) or XML. However, if you click one of these links, you will most likely get a page full of code in your browser. To properly read the feed, you need an RSS Feed Reader; take the URL of the page and paste it into the Subscribe option of your Feed Reader.

I use Google Reader on my desktop (via a browser), tablet and mobile phone. The advantage of a cloud-based reader like Google Reader is that its list of read and un-read articles is synchronised between all of my devices. So, when I'm sat on the train in the morning, I can read my feed via Google Reader on my tablet; if the train is full, I have to stand, and I don't want to hold my tablet, I can use Google Reader on my phone; and if I have some spare time during my lunch break, I can use the browser on my client's desktop computer to read my feed. Google Reader keeps a central record on new articles and read articles. All-in-all, I have my personal newspaper wherever I go, it's always up-to-date, and I never read the same article twice.

Google Reader isn't limited to Android devices and browsers for desktops; you can get suitable readers for Apple's iOS, e.g. MobileRSS and Byline; and you can try Flux and NextGen Reader on Windows Phone.

Over time, I've subscribed to a wide variety of web sites and blogs on a wide variety of topics (SAS, Android devices, motorsport, project management, technology, and my kids' own blogs). Some feeds are keepers, others I unsubscribe after a few days or weeks. Google Reader lets me keep my subscriptions in folders, so I can distinguish between topics.

Before I finish, let me offer one piece of advice. You need discipline in order to occasionally avoid becoming overwhelmed by the number of new articles. Unlike a daily newspaper that's has a predictable number of pages and articles each day, the number of articles appearing in your Feed Reader will vary. On occasion, you will have an overwhelming number to read. Don't be afraid to use the Mark As Read feature to ignore or skip them. Look at it this way.. If you hadn't started using your Feed Reader you probably wouldn't have seen those articles; so if you skip or ignore some articles occasionally, you haven't really lost anything. It takes discipline to "throw away" good information, but sometimes it's necessary.

All-in-all, I'd be lost without my Feed Reader. On each of my devices, I am kept up-to-date with all of the topics in which I hold an interest. And, as you may have noticed, some of those articles make their way into NOTE: from time-to-time.


Oh, so I convinced you? Fab. Here goes...

1. Launch a browser on your desktop, skip over to, create yourself a Google account if you don't already have one, and login

2. Subscribe to some content. Let's try a couple of examples...

3. You're first choice will be NOTE:, right?!
3a. Go to and look for Subscribe From A Feed in the right-hand margin
3b. Click the Posts button (showing the RSS icon) and then click the Add to Google button
3c. In the resulting screen, click the Add to Google Reader button
3d. It's all done - that was quick and easy. You're now in Google Reader, with the ten(?) most recent articles shown as unread. Read them and scroll down; Google Reader will automatically mark them as read as you scroll past the bottom of each article. In the left margin you'll see the number of unread articles in bold alongside the subscription

4. How about BI Notes blog? It doesn't show an RSS icon...
4a. We like the material at, but there no RSS icon to click
4b. No problem, just copy the URL, go to Google Reader, click Subscribe near the top of the left margin, enter the URL for BI Notes, and click Add
4c. All done. In the left margin of Google reader you now see two items in the list of Subscriptions; the bold numbers tell you how many unread articles you have

5. It's easy to unsubscribe from a feed; just  hover your mouse over the name of the feed in the list of Subscriptions; you'll see a little pull-down arrow appear at the right-hand end of the name of the feed; click on the pull-down arrow and select Unsubscribe from the menu

6. You can now download a Google Reader app on your mobile device(s), login, and see a synchronised list of subscriptions and unread articles. And your mobile app will allow you to add (and remove subscriptions) too

7. Once you've got more than a few feeds, spread across multiple topics, you can add folders to Google Reader and then move your feeds into them. Just hover your mouse over the name of the feed in the list of Subscriptions; you'll see a little pull-down arrow appear at the right-hand end of the name of the feed; click on the pull-down arrow and select New Folder from the menu

Happy reading!

Monday 3 December 2012

End-To-End Debugging with Six Sigma DMAIC

I've mentioned my use of Six Sigma techniques for debugging a couple of times before (5 Whys and Ishikawa diagrams) but a mention of  the Six Sigma approach to end-to-end problem resolution (and process improvement) is long-overdue.

Known as DMAIC (pronounced Duh-May-Ick), it's an abbreviation for Define, Measure, Analyse, Improve, and Control. Used in combination, the five steps in the DMAIC process can be used to identify and resolve your most complex issues. As part of the Six Sigma approach, DMAIC can be used to improve existing programs and applications (pro-actively fixing them before they break!).

The five steps lead a team logically through the process by defining the problem clearly, implementing solutions linked to root causes, and taking steps to ensure the solutions remain in place. You can try skipping some of the steps, but in my experience they each contribute a valuable part of the lasting solution. The basics of each step are:

DEFINE - First of all, make sure you have a clear and precise definition of the issue. This might include a list of symptoms, plus some information about the negative impact on users and/or the system. Make sure you understand priorities and objectives. All-in-all, this is an exercise in pulling together what the team already knows, and making sure that each member of the team is heading off to solve the same issue

MEASURE - Use the measurement phase to gather additional information about the issue and the impact of the issue. The aim is to gather as much information as is practical, for the purpose of exposing the root cause or causes of the issue. It may be appropriate to capture temporary/intermediate files or network traffic, or to look for patterns in the surrounding activity in the system. Remember that this is a data capture phase, you're not trying to solve the issue at this point

ANALYSE - In the analysis phase, we want to pinpoint and verify root causes in line with our priorities and objectives. Always be prepared to distrust the evidence or the means by which it was collected. Be careful to avoid "analysis paralysis", i.e. wasting time by reviewing data that isn't moving the investigation forward. Remember that the aim is to identify the root cause (or causes), not to define one or more solutions

IMPROVE - This phase identifies solutions, prioritises and selects them. It may be appropriate to implement a pilot of one or two solutions prior to finalising your decision and implementing the definitive solution. Your choice of solution may be influenced by impact analysis that shows the full knock-on effect of implementing each potential solution. Be sure to gain proper confirmation of success from appropriate stakeholders before implementing the definitive solution

CONTROL - Often overlooked, the control phase is post implementation of the fix or improvement. Use the control phase to make sure that lessons were learned and that the problem doesn't re-occur (nor problems of a similar nature). Add additional test steps to your regression testing suite and put additional control & validation steps in your application. If it's not practical to stop all potential re-occurrences  give thought to how the issue could have picked-up sooner and dealt with more quickly

The five steps seem like common sense, but in the heat of a high priority, complex issue it is easy to forget the some of these basics. I find it helps me a great deal to have the five steps at the back of my mind as my team and I investigate issues. I mentally tick-off each phase and makes sure that we've got all the information we need to proceed to the next step.

I hope you don't get any complex issues, but if you do (we all do, right?) then you will find DMAIC to be a useful guide.

Saturday 1 December 2012

NOTE: SAS Professionals Advent Calendar

It's December 1st, and that means it's time to hop over to the SAS Professionals web site to begin the daily pleasure of opening the advent calendar to bring some Christmas cheer - and possibly winning a gift.

And if you're not already a member, I recommend that you sign-up and check-out the Expert Channel's videos and the forums, and benefit from the ability to network with fellow SAS practitioners online!

And, don't forget to attend next year's SAS Professionals Convention in Marlow to grab more networking opportunities and to learn from papers delivered by a mixture of SAS staff and customers.

Our digital radios are tuned to Smooth Radio Christmas, and we'll be heading out to get our Christmas tree this weekend. I offer an early "merry Christmas" wish!