Welcome Gareth Stockdale from the BBC is the new @microbit_edu CEO micro:bit

Welcome Gareth Stockdale, new micro:bit CEO, from the BBC – The Micro:bit Educational Foundation has today announced that Gareth Stockdale will be joining the Foundation as CEO. Gareth joins from BBC Learning where he was joint lead for the original project that designed, developed and deployed the micro:bit to all year 7 or equivalent children…

I have a number of the micro:bit boards with some clever adapters from Adafruit.  This IS “the excellent platform” to start kids in learning about computers and programming.  Schools in the US are paranoid about soldering irons and the micro:bit helps by having large pads to use alligator clips.  A couple of AA batteries and a USB cable and your able to rock that code.  Even though the new federal budget makes it more difficult to contribute to any cause, I plan to help computer learning by donating to DonorsChoose.org.

My 10 yr old grandson will start with the Javascript Blocks editor, powered by MakeCode,  which is a clever drag and drop coding environment with the ability later to drill down into hardcore Javascript.  And as much as I am still in denial, Python is making a comeback and the micro:bit can go there too.

If you are so inclined to teach others the lesson plans include sample code, lecture material, whiteboard examples and teacher notes.  In the process of preparing to teach others, you might just learn something yourself.

via Welcome Gareth Stockdale from the BBC is the new @microbit_edu CEO @stockers1001 @BBC — Adafruit Industries – Makers, hackers, artists, designers and engineers!

SQL Server Machine Learning Services – Part 1: Python Basics

Image result for microsoft machine learning services images

With the release of SQL Server 2017, Microsoft changed the name of R Services to Machine Learning Services (MLS) and added support for Python, a widely implemented programming language known for its straightforward syntax and code readability. As with the R language, you can use Python to transform and analyze data within the context of a SQL Server database and then return the modified data to a calling application.

Here it is again “Python” being used for the programming language of data.  This series will introduce you to the renamed “R” now called “Machine Learning Services”.  MLS is a simple recipe, take the “R” stats engine, add a pinch of Python, add a cup of training.  This might be an interesting concept.  Guess I need to break out the Python in 30 Days book again.

 

Install basic HTTP server using NODE.JS

Http iframes are not shown in https pages in many major browsers. Please read this post for details.

Full page display version: Click here

 

SQL Server Column encryption

LockItThere are times when you need to encrypt just a column in a database table.  Most posts on this topic relate to a password that needs to be encrypted.  This example highlights encrypting Protected Health Information also known as PHI.  PHI fields can include medical id, beneficiary id, Medicaid id or address information.   Private information PI can include social security numbers, driver license id or inmate id.   Both PHI and PI information can and should be encrypted.

Some are fans of encrypting within the application (C#, Python, Ruby, .NET) others prefer to encrypt at the database engine level.  Encryption requires processing cycles at application, database or both levels, so choose carefully where you encrypt/de-encrypt.  This example will show how to perform encryption at the database level for a single column.

Encryption algorithms vary in level of encryption but basically the deeper the encryption the more processing cycles you will use.   In this example, we will use the RSA_2048 encryption algorithm.  This example will also be using an Asymmetric key (two parts) one part of the key embedded in the database, the other part external to the database and know to the developer.    If the PHI/PI data is copied out of the database in its encrypted form it can NOT be decoded because the database key is not available to whoever got the data.    If somehow the person has access to the database they can NOT decode the data without the developer key.   This protects the PHI/PI on either side of the database wall.  This type of encryption is not bulletproof if someone has access to the database and gets the developer key they could decode the PHI/PI.

SQL developers will frequently use Stored Procedures (SP) to code up access to the database for the applications.  If the developer key is used in any of those SP’s it becomes a risk because another database user could use this key to decode PHI/PI.   One way around this risk is to have the developer key passed as a parameter to the SP from the application.  This means someone would need to have both application and database access to decode.

Create an Asymmetric Key in the database

The first step is to create the Asym key in the database.  Connect to your server and login with a user who has admin access to the database.  Create a developer key that is only going to be known to the developer.

Create a Query to show how the Encryption Works

To show how the encryption works we will do a query and encrypt the Column Beneficiary ID which is considered to be PHI.  Please notice that the developer key is not needed in order to encrypt data.

Line 1: The database key we created is turned into an integer variable which will be used to encrypt the Beneficiary ID
Line 6: If we displayed this column it would be bad because this is the PHI column
Line 7: This is where the database key, now in @KEYID, will be used to encrypt the Beneficiary id

Encrypted Query Results

The results from this query are shown below, no PHI information is being displayed.

EncryptQuery

Notice that the (Encoded_BeneID) is an encrypted column and it is really long.  This de-identifies the Beneficiary ID which is considered PHI.   If this result were to be inserted into a table or converted to a file and sent to someone, it would still be secure.

Decrypt the Encrypted data

Making the assumption here that the encrypted data was loaded into a table named called BenePopulation we need to decrypt the Beneficiary ID.

Line 2: We get the database key
Line 5: We use the database key (@KEYID) and the developer key (S3cr3tStuff!) to decrypt the beneficiary id

More Secure Stored Procedure

Note: While this was nice and easy for a query it is not suggested that you code this into a stored procedure as this would reveal the super secret developer key.  To avoid this, the stored procedure (SP) we will create, will pass the developer key as a parameter to the SP.