SlideShare uma empresa Scribd logo
1 de 32
Baixar para ler offline
Abstract:	
  
	
  
TM351	
  is	
  a	
  new	
  course	
  on	
  databases,	
  data	
  explora:on	
  and	
  simple	
  data	
  visualisa:on,	
  
due	
  for	
  first	
  presenta:on	
  in	
  2015J.	
  The	
  course	
  will	
  require	
  students	
  to	
  make	
  use	
  of	
  
several	
  different	
  databases	
  and	
  work	
  with	
  them	
  in	
  an	
  interac:ve	
  fashion.	
  The	
  course	
  
team	
  are	
  proposing	
  to	
  use	
  a	
  virtual	
  machine	
  (VM)	
  to	
  deliver	
  all	
  the	
  course	
  soKware	
  
to	
  student	
  as	
  an	
  integrated	
  package,	
  allowing	
  the	
  same	
  "student	
  soKware	
  lab"	
  
configura:on	
  to	
  run	
  on	
  different	
  plaMorms	
  (Windows,	
  OS/X,	
  Linux)	
  or	
  even	
  on	
  a	
  cloud	
  
server.	
  The	
  main	
  user	
  interface	
  to	
  the	
  services	
  being	
  run	
  on	
  the	
  VM	
  will	
  be	
  via	
  a	
  web	
  
browser	
  on	
  the	
  student's	
  host	
  opera:ng	
  system	
  (that	
  is,	
  their	
  "normal"	
  one)	
  in	
  the	
  
form	
  of	
  an	
  IPython	
  Notebook.	
  This	
  interface	
  provides	
  a	
  blend	
  of	
  text	
  cells	
  (wriYen	
  
using	
  markdown)	
  that	
  can	
  display	
  HTML	
  text,	
  images,	
  etc,	
  and	
  executable	
  code	
  cells.	
  
Code	
  cells	
  can	
  be	
  edited	
  by	
  students	
  and	
  then	
  the	
  code	
  fragments	
  contained	
  within	
  
them	
  executed	
  on	
  a	
  cell	
  by	
  cell	
  basis,	
  the	
  output	
  from	
  the	
  code	
  execu:on	
  being	
  
inserted	
  within	
  the	
  document.	
  
	
  	
  
In	
  this	
  presenta:on,	
  I	
  will	
  review	
  the	
  ra:onale	
  for	
  adop:ng	
  the	
  use	
  of	
  a	
  virtual	
  
machine	
  to	
  deliver	
  soKware	
  environments	
  to	
  students,	
  and	
  demonstrate	
  how	
  we	
  
intend	
  to	
  make	
  use	
  of	
  IPython	
  notebooks	
  for	
  the	
  delivery	
  of	
  interac:ve	
  course	
  
materials.	
  	
  Possible	
  applica:ons	
  to	
  other	
  courses	
  will	
  also	
  be	
  reviewed,	
  along	
  with	
  a	
  
considera:on	
  of	
  possible	
  workflows	
  associated	
  with	
  the	
  produc:on,	
  maintenance	
  
and	
  student	
  use.	
  
1	
  
TM351	
  –	
  a	
  new	
  course,	
  currently	
  in	
  produc:on…	
  
	
  
-­‐  Level	
  3	
  
-­‐  30	
  points	
  
-­‐  First	
  presenta:on	
  slated	
  for	
  October	
  2015	
  (15J)	
  
2	
  
It’s	
  replacing	
  a	
  “tradi:onal”	
  databases	
  course,	
  but	
  we’re	
  planning	
  quite	
  a	
  twists…	
  
What	
  those	
  twists	
  are	
  in	
  content	
  terms,	
  though,	
  is	
  the	
  subject	
  of	
  an	
  other	
  
presenta:on…	
  
3	
  
What	
  I	
  am	
  going	
  to	
  talk	
  about	
  are	
  two	
  new	
  things	
  we’re	
  exploring	
  in	
  the	
  context	
  of	
  
the	
  course,	
  and	
  which	
  we’re	
  hopefully	
  might	
  also	
  prove	
  aYrac:ve	
  to	
  other	
  course	
  
teams.	
  
4	
  
The	
  first	
  thing	
  are	
  virtual	
  machines.	
  
	
  
These	
  have	
  already	
  been	
  used	
  on	
  a	
  couple	
  of	
  other	
  OU	
  courses	
  –	
  TM128	
  and	
  M812	
  
both	
  use	
  virtual	
  machines	
  –	
  but	
  we	
  are	
  taking	
  a	
  more	
  fundamental	
  view	
  about	
  how	
  
to	
  use	
  notebooks	
  to	
  delivering	
  interac:ve	
  teaching	
  material	
  as	
  well	
  as	
  soKware	
  
applica:on	
  services.	
  
	
  
So	
  what	
  is	
  a	
  virtual	
  machine?	
  
5	
  
We’re	
  all	
  familiar	
  with	
  the	
  idea	
  that	
  a	
  student	
  can	
  run	
  OU	
  supplied	
  soKware,	
  either	
  
third	
  party	
  soKware	
  or	
  OU	
  created	
  soKware,	
  or	
  a	
  combina:on	
  of	
  both	
  in	
  the	
  case	
  of	
  
open	
  source	
  applica:ons	
  where	
  we	
  take	
  some	
  open	
  code	
  and	
  then	
  modify	
  it	
  
ourselves,	
  on	
  the	
  student’s	
  own	
  desktop.	
  
6	
  
We	
  may	
  even	
  require	
  students	
  to	
  install	
  more	
  that	
  one	
  piece	
  of	
  soKware,	
  perhaps	
  
further	
  requiring	
  that	
  these	
  applica:ons	
  can	
  interoperate.	
  
	
  
With	
  a	
  move	
  to	
  be	
  be	
  “open”	
  and	
  agnos:c	
  towards	
  a	
  par:cular	
  opera:ng	
  system,	
  
there	
  are	
  considerable	
  challenges	
  to	
  be	
  faced:	
  
	
  
-­‐  soKware	
  libraries	
  should	
  ideally	
  be	
  cross	
  plaMorm	
  rather	
  than	
  mul:ple	
  na:ve	
  
implementa:ons	
  of	
  the	
  ostensibly	
  the	
  same	
  applica:on;	
  
-­‐  soKware	
  versions	
  across	
  applica:ons	
  should	
  update	
  in	
  synch	
  with	
  each	
  other;	
  
-­‐  the	
  UI,	
  or	
  look	
  and	
  feel,	
  should	
  be	
  the	
  same	
  across	
  plaMorms	
  –	
  or	
  we	
  have	
  more	
  
wri:ng	
  to	
  do;	
  
-­‐  support	
  issues	
  are	
  likely	
  to	
  scale	
  badly	
  for	
  us	
  as	
  we	
  have	
  to	
  cope	
  with	
  more	
  
varia:ons	
  on	
  the	
  configura:on	
  of	
  individual	
  student	
  machines	
  (for	
  example,	
  
different	
  opera:ng	
  systems,	
  different	
  versions	
  of	
  the	
  same	
  opera:ng	
  system);	
  
	
  
7	
  
One	
  way	
  of	
  mi:ga:ng	
  against	
  change	
  is	
  to	
  seYle	
  on	
  a	
  single	
  UI	
  space	
  –	
  such	
  as	
  a	
  
browser.	
  
	
  
Applica:ons	
  can	
  be	
  built	
  solely	
  within	
  the	
  browser,	
  and	
  made	
  available	
  to	
  the	
  user	
  
requiring	
  liYle	
  more	
  desktop	
  (or	
  server)	
  applica:on	
  support	
  other	
  than	
  a	
  web	
  server.	
  
	
  
Applica:on	
  front	
  ends	
  wriYen	
  in	
  HTML5	
  and	
  Javascript	
  can	
  provide	
  an	
  experience	
  
rich	
  enough	
  to	
  rival	
  that	
  of	
  a	
  na:ve	
  applica:on.	
  
	
  
Applica:on	
  front	
  ends	
  can	
  also	
  be	
  created	
  for	
  applica:ons	
  running	
  as	
  services	
  either	
  
on	
  the	
  students’	
  desktop	
  or	
  via	
  a	
  remote	
  server.	
  
	
  
Applica:ons	
  can	
  draw	
  on	
  files	
  in	
  a	
  folder	
  on	
  the	
  student’s	
  desktop	
  machine,	
  and	
  the	
  
browser	
  can	
  be	
  used	
  to	
  save	
  files	
  (e.g.	
  from	
  the	
  internet)	
  into	
  that	
  folder.	
  
8	
  
To	
  get	
  round	
  the	
  problem	
  of	
  having	
  to	
  install	
  soKware	
  onto	
  mul:ple	
  different	
  
possible	
  system	
  configura:ons,	
  how	
  much	
  easier	
  would	
  it	
  be	
  if	
  we	
  knew	
  exactly	
  what	
  
opera:ng	
  system	
  each	
  student	
  was	
  running	
  and	
  	
  they	
  were	
  all	
  running	
  exactly	
  the	
  
same	
  opera:ng	
  system.	
  
	
  
Virtualisa:on	
  plaMorms	
  such	
  as	
  Viirtualbox	
  and	
  VMware	
  are	
  cross-­‐plaMorm	
  
applica:ons	
  that	
  can	
  be	
  downloaded	
  to	
  a	
  student’s	
  own	
  machine	
  and	
  that	
  then	
  allow	
  
an	
  addi4onal	
  guest	
  opera4ng	
  system	
  to	
  be	
  installed	
  in	
  its	
  own	
  container	
  running	
  on	
  
the	
  the	
  student’s	
  own	
  computer	
  (the	
  host)	
  via	
  the	
  virtualisa4on	
  pla;orm.	
  
	
  
The	
  guest	
  opera:ng	
  system	
  and	
  the	
  soKware	
  that	
  runs	
  on	
  the	
  guest	
  opera:ng	
  system	
  
are	
  said	
  to	
  define	
  a	
  virtual	
  machine	
  or	
  “VM”.	
  
	
  
The	
  virtual	
  machine	
  can	
  be	
  defined	
  by	
  a	
  central	
  service	
  and	
  then	
  delivered	
  to	
  the	
  
students	
  in	
  such	
  a	
  way	
  that	
  each	
  receives	
  a	
  copy	
  of	
  exactly	
  the	
  same	
  virtual	
  machine	
  
in	
  terms	
  of	
  its	
  opera:ng	
  system	
  and	
  the	
  applica:ons	
  preinstalled	
  onto	
  it.	
  
9	
  
What	
  this	
  means	
  is	
  that	
  we	
  can	
  define	
  a	
  VM,	
  preinstall	
  soKware	
  onto	
  it,	
  and	
  ship	
  it	
  to	
  
students	
  so	
  they	
  can	
  run	
  it	
  via	
  a	
  virtualisa:on	
  plaMorm	
  installed	
  onto	
  their	
  machine.	
  
	
  
The	
  VM	
  can	
  run	
  applica:ons	
  as	
  services,	
  exposing	
  their	
  UIs	
  via	
  a	
  browser.	
  Files	
  can	
  
easily	
  be	
  shared	
  between	
  the	
  host	
  and	
  guest	
  machines.	
  
	
  
As	
  far	
  as	
  students	
  are	
  concerned,	
  all	
  they	
  need	
  to	
  do	
  is	
  install	
  a	
  virtualisa:on	
  system	
  
onto	
  their	
  computer,	
  and	
  then	
  the	
  same	
  OU	
  virtual	
  machine	
  into	
  that	
  system	
  
irrespec:ve	
  of	
  the	
  opera:ng	
  system	
  they	
  happen	
  to	
  be	
  running.	
  
	
  
10	
  
It	
  is	
  also	
  possible	
  to	
  run	
  the	
  VM	
  on	
  a	
  remote	
  server,	
  with	
  the	
  students	
  accessing	
  the	
  
services	
  running	
  in	
  that	
  VM	
  via	
  their	
  browser.	
  
	
  
This	
  means	
  that	
  students	
  can	
  access	
  services	
  using	
  computers	
  that	
  themselves	
  may	
  
not	
  be	
  capable	
  of	
  installing	
  or	
  running	
  par4cular	
  applica4ons	
  –	
  such	
  as	
  some	
  tablet	
  
computers.	
  
11	
  
Notebook	
  compu:ng	
  is	
  my	
  great	
  hope	
  for	
  the	
  future.	
  Notebook	
  compu4ng	
  is	
  like	
  
spreadsheet	
  compu4ng,	
  a	
  	
  democra:sa:on	
  of	
  access	
  to	
  and	
  the	
  process	
  of	
  prac:cally	
  
based,	
  task	
  oriented	
  compu:ng.	
  
	
  
Spreadsheets	
  help	
  you	
  get	
  stuff	
  done,	
  even	
  if	
  you	
  don’t	
  consider	
  yourself	
  to	
  be	
  a	
  
programmer.	
  My	
  hope	
  is	
  that	
  the	
  notebook	
  metaphor	
  –	
  and	
  it’s	
  actually	
  quite	
  an	
  old	
  
one	
  –	
  can	
  similarly	
  encourage	
  people	
  who	
  don’t	
  consider	
  themselves	
  programmers	
  
to	
  do	
  and	
  to	
  use	
  programmy	
  things.	
  
12	
  
Notebook	
  compu4ng	
  buys	
  us	
  in	
  to	
  two	
  ways	
  of	
  thinking	
  that	
  I	
  think	
  are	
  useful	
  from	
  a	
  
pedagogical	
  perspec:ve	
  –	
  that	
  is,	
  pedagogy	
  not	
  just	
  as	
  a	
  way	
  of	
  teaching	
  but	
  also	
  as	
  a	
  
way	
  of	
  learning	
  in	
  the	
  sense	
  of	
  learning	
  about	
  something	
  through	
  inves4ga4ng	
  it.	
  
	
  
Here,	
  I’m	
  thinking	
  of	
  an	
  inves:ga:on	
  as	
  a	
  form	
  of	
  problem	
  based	
  learning	
  –	
  I’m	
  not	
  
up	
  enough	
  on	
  educa:onal	
  or	
  learning	
  theory	
  to	
  know	
  whether	
  there	
  is	
  a	
  body	
  of	
  
theory,	
  or	
  even	
  just	
  a	
  school	
  of	
  thought,	
  about	
  “inves:ga:ve	
  learning”.	
  
	
  
These	
  two	
  ways	
  of	
  thinking	
  are	
  literate	
  programming	
  and	
  reproducible	
  research.	
  
13	
  
In	
  case	
  you	
  haven’t	
  already	
  realised	
  it,	
  code	
  is	
  an	
  expressive	
  medium.	
  Code	
  has	
  its	
  
poets,	
  and	
  ar:sts,	
  as	
  well	
  as	
  its	
  architects,	
  engineers	
  and	
  technicians.	
  One	
  of	
  the	
  
grand	
  masters	
  of	
  code	
  is	
  Don	
  –	
  Donald	
  –	
  Knuth.	
  
	
  
Don	
  Knuth	
  said	
  “A	
  literate	
  programmer	
  is	
  an	
  essayist	
  who	
  writes	
  programs	
  for	
  
humans	
  to	
  understand”	
  as	
  part	
  of	
  a	
  longer	
  quote.	
  Here’s	
  that	
  longer	
  quote:	
  
	
  
“Literate	
  programming	
  is	
  a	
  programming	
  methodology	
  that	
  combines	
  a	
  programming	
  
language	
  with	
  a	
  documenta:on	
  language,	
  making	
  programs	
  more	
  robust,	
  more	
  
portable,	
  and	
  more	
  easily	
  maintained	
  than	
  programs	
  wriYen	
  only	
  in	
  a	
  high-­‐level	
  
language.	
  
“Computer	
  programmers	
  already	
  know	
  both	
  kind	
  of	
  languages;	
  they	
  need	
  only	
  learn	
  
a	
  few	
  conven:ons	
  about	
  alterna:ng	
  between	
  languages	
  to	
  create	
  programs	
  that	
  are	
  
works	
  of	
  literature.	
  A	
  literate	
  programmer	
  is	
  an	
  essayist	
  who	
  writes	
  programs	
  for	
  
humans	
  to	
  understand,	
  instead	
  of	
  primarily	
  wri:ng	
  instruc:ons	
  for	
  machines	
  to	
  
follow.	
  When	
  programs	
  are	
  wriYen	
  in	
  the	
  recommended	
  style	
  they	
  can	
  be	
  
transformed	
  into	
  documents	
  by	
  a	
  document	
  compiler	
  and	
  into	
  efficient	
  code	
  by	
  an	
  
algebraic	
  compiler.”	
  
	
  
Notebooks	
  are	
  environments	
  that	
  encourage	
  the	
  programming	
  of	
  wri:ng	
  literate	
  
code.	
  Notebooks	
  encourage	
  you	
  to	
  write	
  prose	
  and	
  illustrate	
  it	
  with	
  code	
  –	
  and	
  the	
  	
  
14	
  
The	
  other	
  idea	
  that	
  the	
  notebooks	
  buy	
  is	
  into	
  is	
  reproducible	
  research.	
  I	
  love	
  this	
  idea	
  
and	
  think	
  you	
  should	
  too.	
  It	
  lets	
  archiving	
  make	
  sense.	
  
	
  
Do	
  I	
  really	
  have	
  to	
  say	
  any	
  more	
  than	
  just	
  show	
  that	
  quote?	
  
	
  
Now	
  you	
  may	
  say	
  that	
  that’s	
  all	
  very	
  well	
  for,	
  I	
  don’t	
  know,	
  physics	
  or	
  biology,	
  or	
  
science,	
  or	
  economics.	
  Or	
  social	
  science	
  in	
  general,	
  where	
  they	
  do	
  all	
  sorts	
  of	
  
inexplicable	
  things	
  with	
  sta:s:cs	
  and	
  probably	
  should	
  try	
  to	
  keep	
  track	
  of	
  what	
  they	
  
doing.	
  
	
  
But	
  not	
  the	
  humani:es.	
  
	
  
But	
  that’s	
  not	
  quite	
  right,	
  because	
  in	
  the	
  digital	
  humani4es	
  there	
  are	
  computa:onal	
  
tools	
  that	
  you	
  can	
  use.	
  Par:cularly	
  in	
  the	
  areas	
  of	
  text	
  analysis	
  and	
  visualisa:on.	
  Such	
  
as	
  some	
  of	
  the	
  visualisa:ons	
  we	
  saw	
  in	
  the	
  first	
  part	
  of	
  this	
  presenta:on.	
  
	
  
But	
  you	
  need	
  a	
  tool	
  that	
  democra:ses	
  access	
  to	
  this	
  technology.	
  You	
  need	
  an	
  
environment	
  that	
  the	
  social	
  scien:sts	
  found	
  in	
  the	
  form	
  of	
  a	
  spreadsheet.	
  
	
  
But	
  beYer.	
  
	
  
15	
  
(I	
  also	
  like	
  to	
  think	
  of	
  notebooks	
  as	
  a	
  place	
  where	
  I	
  can	
  have	
  a	
  conversa4on	
  with	
  
data.).	
  
16	
  
So	
  how	
  do	
  notebooks	
  help?	
  
	
  
The	
  tool	
  I	
  want	
  to	
  describe	
  is	
  –	
  are	
  –	
  called	
  IPython	
  Notebooks.	
  
	
  
IPython	
  Notebooks	
  let	
  you	
  execute	
  code	
  wriYen	
  in	
  the	
  Python	
  programming	
  language	
  
in	
  an	
  interac:ve	
  way.	
  But	
  they	
  also	
  work	
  with	
  other	
  languages	
  –	
  Javascript,	
  Ruby,	
  R,	
  
and	
  so	
  on,	
  as	
  well	
  as	
  other	
  applica:ons.	
  I	
  use	
  a	
  notebook	
  for	
  drawing	
  diagrams	
  using	
  
Graphviz,	
  for	
  example.	
  
	
  
They	
  also	
  include	
  words	
  –	
  of	
  introduc:on,	
  of	
  analysis,	
  of	
  conclusion,	
  of	
  reflec:on.	
  
	
  
And	
  they	
  also	
  include	
  the	
  things	
  the	
  code	
  wants	
  to	
  tell	
  u,	
  or	
  that	
  the	
  data	
  wants	
  to	
  
tell	
  us	
  via	
  the	
  code.	
  The	
  code	
  outputs.	
  
	
  
(Or	
  more	
  correctly,	
  the	
  code+data	
  outputs.)	
  
17	
  
(I	
  also	
  like	
  to	
  think	
  of	
  notebooks	
  as	
  a	
  place	
  where	
  I	
  can	
  have	
  a	
  conversa4on	
  with	
  
data.).	
  
18	
  
(I	
  also	
  like	
  to	
  think	
  of	
  notebooks	
  as	
  a	
  place	
  where	
  I	
  can	
  have	
  a	
  conversa4on	
  with	
  
data.).	
  
19	
  
(I	
  also	
  like	
  to	
  think	
  of	
  notebooks	
  as	
  a	
  place	
  where	
  I	
  can	
  have	
  a	
  conversa4on	
  with	
  
data.).	
  
20	
  
The	
  first	
  thing	
  notebooks	
  let	
  you	
  do	
  is	
  write	
  text	
  for	
  the	
  non-­‐coding	
  reader.	
  Words.	
  In	
  
English.	
  (Or	
  Spanish.	
  Or	
  French.	
  I	
  would	
  say	
  Chinese,	
  but	
  I	
  haven’t	
  checked	
  what	
  
character	
  sets	
  are	
  supported,	
  so	
  I	
  can’t	
  say	
  that	
  for	
  definite	
  un:l	
  I	
  check!)	
  
	
  
“Literate	
  programming	
  is	
  a	
  programming	
  methodology	
  that	
  combines	
  a	
  programming	
  
language	
  with	
  a	
  documenta:on	
  language”.	
  That’s	
  what	
  Knuth	
  said.	
  But	
  we	
  can	
  take	
  it	
  
further.	
  Past	
  code.	
  Past	
  documenta:on.	
  To	
  write	
  up.	
  To	
  story.	
  
	
  
The	
  medium	
  in	
  which	
  we	
  can	
  write	
  our	
  human	
  words	
  is	
  a	
  simple	
  text	
  markup	
  
language	
  called	
  markdown.	
  
	
  
If	
  you’ve	
  ever	
  wriYen	
  HTML,	
  it’s	
  not	
  that	
  hard.	
  
	
  
If	
  you’ve	
  ever	
  wriYen	
  and	
  email	
  and	
  wrapped	
  asterisks	
  around	
  a	
  word	
  or	
  phrase	
  to	
  
emphasise	
  it,	
  or	
  wriYen	
  a	
  list	
  of	
  items	
  down	
  by	
  puxng	
  each	
  new	
  item	
  onto	
  a	
  new	
  
line	
  and	
  preceding	
  it	
  with	
  a	
  dash,	
  it’s	
  that	
  easy.	
  
21	
  
Here’s	
  a	
  notebook,	
  and	
  here’s	
  some	
  text.	
  
	
  
There’s	
  also	
  some	
  code.	
  
	
  
But	
  note	
  the	
  text	
  –	
  we	
  have	
  a	
  header,	
  and	
  then	
  some	
  “human	
  text”.	
  
	
  
You	
  might	
  also	
  no:ce	
  some	
  up	
  and	
  down	
  arrows	
  in	
  the	
  notebook	
  toolbar.	
  These	
  
allow	
  us	
  to	
  rearrange	
  the	
  order	
  of	
  the	
  cells	
  in	
  the	
  notebook	
  in	
  a	
  straighMorward	
  way.	
  
	
  
In	
  a	
  sense,	
  we	
  are	
  encouraged	
  to	
  rearrange	
  the	
  sequence	
  of	
  cells	
  into	
  an	
  order	
  that	
  
makes	
  more	
  sense	
  as	
  a	
  narra:ve	
  for	
  the	
  reader	
  of	
  the	
  document,	
  or	
  in	
  the	
  execu:on	
  
of	
  an	
  inves:ga:on.	
  
	
  
The	
  downside	
  of	
  this	
  is	
  that	
  we	
  can	
  author	
  a	
  document	
  in	
  a	
  ‘non-­‐linear’	
  way	
  and	
  then	
  
linearise	
  it	
  for	
  final	
  distribu:on	
  simply	
  by	
  reordering	
  the	
  order	
  in	
  which	
  the	
  cells	
  are	
  
presented.	
  
	
  
There	
  are	
  constraints	
  though	
  –	
  if	
  a	
  cell	
  computa4onally	
  depends	
  on	
  the	
  result	
  of,	
  or	
  
state	
  change	
  resul:ng	
  from,	
  the	
  execu:on	
  of	
  a	
  prior	
  cell,	
  their	
  rela:ve	
  ordering	
  
cannot	
  be	
  changed.	
  
22	
  
As	
  well	
  as	
  human	
  readable	
  text	
  cells	
  –	
  markdown	
  cells	
  or	
  header	
  cells	
  at	
  a	
  variety	
  of	
  
levels	
  –	
  there	
  are	
  also	
  code	
  cells.	
  
	
  
Code	
  cells	
  allow	
  you	
  to	
  write	
  (or	
  copy	
  and	
  paste	
  in)	
  code	
  and	
  then	
  run	
  it.	
  
	
  
Applica:ons	
  give	
  you	
  menu	
  op:ons	
  that	
  in	
  the	
  background	
  copy,	
  paste	
  and	
  execute	
  
the	
  code	
  you	
  want	
  to	
  run,	
  or	
  apply	
  to	
  some	
  par:cular	
  set	
  of	
  data,	
  or	
  text.	
  
	
  
Code	
  cells	
  work	
  the	
  same	
  way,	
  but	
  they’re	
  naked.	
  They	
  show	
  you	
  the	
  code.	
  
	
  
At	
  this	
  point	
  it’s	
  important	
  to	
  remember	
  that	
  code	
  can	
  call	
  code.	
  
	
  
Thousands	
  of	
  lines	
  of	
  code	
  that	
  do	
  really	
  clever	
  and	
  difficult	
  things	
  can	
  be	
  called	
  from	
  
a	
  single	
  line	
  of	
  code.	
  OKen	
  code	
  with	
  a	
  sensible	
  func:on	
  name	
  just	
  like	
  a	
  sensible	
  
menu	
  item	
  label.	
  A	
  self-­‐describing	
  name	
  that	
  calls	
  the	
  masses	
  of	
  really	
  clever	
  code	
  
that	
  someone	
  else	
  has	
  wriYen	
  	
  behind	
  the	
  scenes.	
  
	
  
But	
  you	
  know	
  which	
  code	
  because	
  you	
  just	
  called	
  it.	
  Explicitly.	
  
	
  
Let’s	
  see	
  an	
  example	
  –	
  not	
  a	
  brilliant	
  example,	
  but	
  an	
  example	
  nonetheless.	
  
23	
  
Here’s	
  some	
  code.	
  
	
  
It’s	
  actually	
  two	
  code	
  cells	
  –	
  in	
  one,	
  I	
  define	
  a	
  func:on.	
  In	
  the	
  second,	
  I	
  call	
  it.	
  
	
  
(Already	
  this	
  is	
  revisionist.	
  I	
  developed	
  the	
  func:on	
  by	
  not	
  wrapping	
  it	
  in	
  a	
  func:on.	
  It	
  
was	
  just	
  a	
  series	
  of	
  lines	
  of	
  code	
  that	
  wrote	
  to	
  perform	
  a	
  par:cular	
  task.	
  
	
  
But	
  it	
  was	
  a	
  useful	
  task.	
  So	
  I	
  wrapped	
  the	
  lines	
  of	
  code	
  in	
  a	
  func:on,	
  and	
  now	
  I	
  can	
  
call	
  those	
  lines	
  of	
  code	
  just	
  by	
  calling	
  the	
  func:on	
  name.	
  
	
  
I	
  can	
  also	
  hide	
  the	
  func:on	
  in	
  another	
  file,	
  outside	
  of	
  the	
  notebook,	
  then	
  just	
  include	
  
it	
  in	
  any	
  notebook	
  I	
  want	
  to…	
  
	
  
…or	
  within	
  a	
  notebook,	
  I	
  could	
  just	
  copy	
  a	
  set	
  of	
  lines	
  of	
  code	
  and	
  repeatedly	
  paste	
  
them	
  into	
  the	
  notebook,	
  applying	
  them	
  to	
  a	
  different	
  set	
  of	
  data	
  each	
  :me…	
  but	
  that	
  
just	
  gets	
  messy,	
  and	
  that’s	
  what	
  being	
  able	
  to	
  call	
  a	
  bunch	
  of	
  lines	
  of	
  coped	
  wrapped	
  
up	
  in	
  a	
  func:on	
  call	
  avoids.	
  
24	
  
As	
  far	
  as	
  reproducible	
  research	
  goes,	
  the	
  ability	
  of	
  a	
  notebook	
  to	
  execute	
  a	
  code	
  
element	
  and	
  display	
  the	
  output	
  from	
  execu4ng	
  that	
  code	
  means	
  that	
  there	
  is	
  a	
  one-­‐
to-­‐one	
  binding	
  between	
  a	
  code	
  fragment	
  and	
  the	
  data	
  on	
  which	
  it	
  operates	
  and	
  the	
  
output	
  obtained	
  from	
  execu:ng	
  just	
  that	
  code	
  on	
  just	
  that	
  data.	
  
25	
  
The	
  output	
  of	
  the	
  code	
  is	
  not	
  a	
  human	
  copied	
  and	
  pasted	
  artefact.	
  
	
  
The	
  output	
  of	
  the	
  code	
  –	
  in	
  this	
  case,	
  the	
  result	
  of	
  execu:ng	
  a	
  par:cular	
  func:on	
  –	
  is	
  
only	
  and	
  exactly	
  the	
  output	
  from	
  execu:ng	
  that	
  func:on	
  on	
  a	
  specified	
  dataset.	
  
	
  
26	
  
The	
  output	
  of	
  a	
  code	
  cell	
  is	
  not	
  limited	
  to	
  the	
  arcane	
  outputs	
  of	
  a	
  computa:onal	
  
func:on.	
  
	
  
We	
  can	
  display	
  data	
  table	
  results	
  as	
  data	
  tables.	
  
27	
  
We	
  can	
  also	
  generate	
  rich	
  HTML	
  outputs	
  –	
  in	
  this	
  case	
  an	
  interac:ve	
  map	
  overlaid	
  
with	
  markers	
  corresponding	
  to	
  loca:ons	
  specified	
  in	
  a	
  dataset,	
  and	
  with	
  lines	
  
connec:ng	
  markers	
  as	
  defined	
  by	
  connec:ons	
  described	
  in	
  the	
  original	
  dataset.	
  
	
  
We	
  can	
  also	
  delete	
  the	
  outputs	
  of	
  all	
  the	
  code	
  cells,	
  and	
  then	
  rerun	
  the	
  code,	
  one	
  
step	
  –	
  one	
  cell	
  –	
  aKer	
  the	
  other.	
  Reproducing	
  results	
  becomes	
  simply	
  a	
  maYer	
  of	
  
rerunning	
  the	
  code	
  in	
  the	
  notebook	
  against	
  the	
  data	
  loaded	
  in	
  by	
  the	
  notebook	
  –	
  and	
  
then	
  comparing	
  the	
  code	
  cell	
  outputs	
  to	
  the	
  code	
  cell	
  outputs	
  of	
  the	
  original	
  
document.	
  
	
  
Tools	
  are	
  also	
  under	
  development	
  that	
  help	
  spot	
  differences	
  between	
  those	
  outputs,	
  
at	
  least	
  in	
  cases	
  where	
  the	
  outputs	
  are	
  text	
  based.	
  
28	
  
So	
  can	
  we	
  run	
  virtual	
  machines	
  and	
  IPython	
  notebooks	
  together?	
  
29	
  
The	
  IPython	
  notebooks	
  are	
  actually	
  browser	
  based	
  front	
  end	
  applica:ons	
  being	
  
powered	
  by	
  an	
  IPython	
  server…	
  
30	
  
It’s	
  easy	
  enough	
  to	
  run	
  the	
  IPython	
  server	
  on	
  a	
  virtual	
  machine,	
  either	
  running	
  as	
  a	
  
guest	
  VM	
  on	
  a	
  student’s	
  host	
  computer,	
  or	
  running	
  as	
  on	
  online	
  service	
  accessed	
  by	
  
the	
  student	
  via	
  the	
  web	
  using	
  their	
  own	
  web	
  browser.	
  
31	
  
There	
  is	
  a	
  lot	
  more	
  that	
  could	
  be	
  said	
  –	
  for	
  example:	
  
-­‐  workflows	
  around	
  the	
  building/provisioning	
  of	
  virtual	
  machines,	
  
-­‐  how	
  we	
  might	
  be	
  able	
  to	
  host	
  such	
  machines	
  either	
  centrally	
  or	
  as	
  a	
  self-­‐service	
  
op:on,	
  
-­‐  the	
  corollary	
  between	
  notebook	
  style	
  compu:ng	
  and	
  spreadsheets,	
  
-­‐  the	
  no:on	
  of	
  conversa4ons	
  with	
  data,	
  
-­‐  etc.	
  etc.	
  
32	
  

Mais conteúdo relacionado

Semelhante a New Databases Course Delivers Software via Virtual Machine and IPython Notebooks

Paper aegis 2
Paper aegis 2Paper aegis 2
Paper aegis 2satyres
 
OBJECT ORIENTED ROGRAMMING With Question And Answer Full
OBJECT ORIENTED ROGRAMMING With Question And Answer  FullOBJECT ORIENTED ROGRAMMING With Question And Answer  Full
OBJECT ORIENTED ROGRAMMING With Question And Answer FullManas Rai
 
Simulagora (Euroscipy2014 - Logilab)
Simulagora (Euroscipy2014 - Logilab)Simulagora (Euroscipy2014 - Logilab)
Simulagora (Euroscipy2014 - Logilab)Logilab
 
parallel programming models
 parallel programming models parallel programming models
parallel programming modelsSwetha S
 
CE-LEARNING-CTS2016_paper_5
CE-LEARNING-CTS2016_paper_5CE-LEARNING-CTS2016_paper_5
CE-LEARNING-CTS2016_paper_5Manoj Kumar
 
A report on mvc using the information
A report on mvc using the informationA report on mvc using the information
A report on mvc using the informationToushik Paul
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)ijceronline
 
modern-guide-to-container-monitoring-and-orchestration.pdf
modern-guide-to-container-monitoring-and-orchestration.pdfmodern-guide-to-container-monitoring-and-orchestration.pdf
modern-guide-to-container-monitoring-and-orchestration.pdfGuillaume Kpotufe
 
Introduction to Java Enterprise Edition
Introduction to Java Enterprise EditionIntroduction to Java Enterprise Edition
Introduction to Java Enterprise EditionAbdalla Mahmoud
 
A New Software Architecture for LMS with SCORM Support
A New Software Architecture for LMS with SCORM SupportA New Software Architecture for LMS with SCORM Support
A New Software Architecture for LMS with SCORM SupportNicolas Casel
 
Secure Computing With Java
Secure Computing With JavaSecure Computing With Java
Secure Computing With Javawhite paper
 
Cloud computing and its application in libraries
Cloud computing and its application in librariesCloud computing and its application in libraries
Cloud computing and its application in librariesNabi Hasan
 

Semelhante a New Databases Course Delivers Software via Virtual Machine and IPython Notebooks (20)

V5I1-IJERTV5IS010514
V5I1-IJERTV5IS010514V5I1-IJERTV5IS010514
V5I1-IJERTV5IS010514
 
Paper aegis 2
Paper aegis 2Paper aegis 2
Paper aegis 2
 
OBJECT ORIENTED ROGRAMMING With Question And Answer Full
OBJECT ORIENTED ROGRAMMING With Question And Answer  FullOBJECT ORIENTED ROGRAMMING With Question And Answer  Full
OBJECT ORIENTED ROGRAMMING With Question And Answer Full
 
Simulagora (Euroscipy2014 - Logilab)
Simulagora (Euroscipy2014 - Logilab)Simulagora (Euroscipy2014 - Logilab)
Simulagora (Euroscipy2014 - Logilab)
 
parallel programming models
 parallel programming models parallel programming models
parallel programming models
 
CE-LEARNING-CTS2016_paper_5
CE-LEARNING-CTS2016_paper_5CE-LEARNING-CTS2016_paper_5
CE-LEARNING-CTS2016_paper_5
 
VIRTUAL LAB
VIRTUAL LABVIRTUAL LAB
VIRTUAL LAB
 
unit 1.pptx
unit 1.pptxunit 1.pptx
unit 1.pptx
 
A report on mvc using the information
A report on mvc using the informationA report on mvc using the information
A report on mvc using the information
 
International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
 
ThorICBASS
ThorICBASSThorICBASS
ThorICBASS
 
modern-guide-to-container-monitoring-and-orchestration.pdf
modern-guide-to-container-monitoring-and-orchestration.pdfmodern-guide-to-container-monitoring-and-orchestration.pdf
modern-guide-to-container-monitoring-and-orchestration.pdf
 
1061 (m2)
1061 (m2)1061 (m2)
1061 (m2)
 
Wise6 davidson
Wise6 davidsonWise6 davidson
Wise6 davidson
 
Introduction to Java Enterprise Edition
Introduction to Java Enterprise EditionIntroduction to Java Enterprise Edition
Introduction to Java Enterprise Edition
 
A New Software Architecture for LMS with SCORM Support
A New Software Architecture for LMS with SCORM SupportA New Software Architecture for LMS with SCORM Support
A New Software Architecture for LMS with SCORM Support
 
Secure Computing With Java
Secure Computing With JavaSecure Computing With Java
Secure Computing With Java
 
Cloudcpmuting journal
Cloudcpmuting journalCloudcpmuting journal
Cloudcpmuting journal
 
Cloud computing and its application in libraries
Cloud computing and its application in librariesCloud computing and its application in libraries
Cloud computing and its application in libraries
 
Video wiki
Video wikiVideo wiki
Video wiki
 

Mais de Tony Hirst

15 in 20 research fiesta
15 in 20 research fiesta15 in 20 research fiesta
15 in 20 research fiestaTony Hirst
 
Jupyternotebooks ou.pptx
Jupyternotebooks ou.pptxJupyternotebooks ou.pptx
Jupyternotebooks ou.pptxTony Hirst
 
Virtual computing.pptx
Virtual computing.pptxVirtual computing.pptx
Virtual computing.pptxTony Hirst
 
ouseful-parlihacks
ouseful-parlihacksouseful-parlihacks
ouseful-parlihacksTony Hirst
 
Gors appropriate
Gors appropriateGors appropriate
Gors appropriateTony Hirst
 
Robotlab jupyter
Robotlab   jupyterRobotlab   jupyter
Robotlab jupyterTony Hirst
 
Fco open data in half day th-v2
Fco open data in half day  th-v2Fco open data in half day  th-v2
Fco open data in half day th-v2Tony Hirst
 
Notes on the Future - ILI2015 Workshop
Notes on the Future - ILI2015 WorkshopNotes on the Future - ILI2015 Workshop
Notes on the Future - ILI2015 WorkshopTony Hirst
 
Community Journalism Conf - hyperlocal data wire
Community Journalism Conf - hyperlocal data wireCommunity Journalism Conf - hyperlocal data wire
Community Journalism Conf - hyperlocal data wireTony Hirst
 
Residential school 2015_robotics_interest
Residential school 2015_robotics_interestResidential school 2015_robotics_interest
Residential school 2015_robotics_interestTony Hirst
 
Data Mining - Separating Fact From Fiction - NetIKX
Data Mining - Separating Fact From Fiction - NetIKXData Mining - Separating Fact From Fiction - NetIKX
Data Mining - Separating Fact From Fiction - NetIKXTony Hirst
 
A Quick Tour of OpenRefine
A Quick Tour of OpenRefineA Quick Tour of OpenRefine
A Quick Tour of OpenRefineTony Hirst
 
Conversations with data
Conversations with dataConversations with data
Conversations with dataTony Hirst
 
Data reuse OU workshop bingo
Data reuse OU workshop bingoData reuse OU workshop bingo
Data reuse OU workshop bingoTony Hirst
 
Inspiring content - You Don't Need Big Data to Tell Good Data Stories
Inspiring content - You Don't Need Big Data to Tell Good Data Stories Inspiring content - You Don't Need Big Data to Tell Good Data Stories
Inspiring content - You Don't Need Big Data to Tell Good Data Stories Tony Hirst
 
Lincoln jun14datajournalism
Lincoln jun14datajournalismLincoln jun14datajournalism
Lincoln jun14datajournalismTony Hirst
 
Lincoln Journalism Research Day - Data Journalism
Lincoln Journalism Research Day - Data JournalismLincoln Journalism Research Day - Data Journalism
Lincoln Journalism Research Day - Data JournalismTony Hirst
 

Mais de Tony Hirst (20)

15 in 20 research fiesta
15 in 20 research fiesta15 in 20 research fiesta
15 in 20 research fiesta
 
Dev8d jupyter
Dev8d jupyterDev8d jupyter
Dev8d jupyter
 
Ili 16 robot
Ili 16 robotIli 16 robot
Ili 16 robot
 
Jupyternotebooks ou.pptx
Jupyternotebooks ou.pptxJupyternotebooks ou.pptx
Jupyternotebooks ou.pptx
 
Virtual computing.pptx
Virtual computing.pptxVirtual computing.pptx
Virtual computing.pptx
 
ouseful-parlihacks
ouseful-parlihacksouseful-parlihacks
ouseful-parlihacks
 
Gors appropriate
Gors appropriateGors appropriate
Gors appropriate
 
Robotlab jupyter
Robotlab   jupyterRobotlab   jupyter
Robotlab jupyter
 
Fco open data in half day th-v2
Fco open data in half day  th-v2Fco open data in half day  th-v2
Fco open data in half day th-v2
 
Notes on the Future - ILI2015 Workshop
Notes on the Future - ILI2015 WorkshopNotes on the Future - ILI2015 Workshop
Notes on the Future - ILI2015 Workshop
 
Community Journalism Conf - hyperlocal data wire
Community Journalism Conf - hyperlocal data wireCommunity Journalism Conf - hyperlocal data wire
Community Journalism Conf - hyperlocal data wire
 
Residential school 2015_robotics_interest
Residential school 2015_robotics_interestResidential school 2015_robotics_interest
Residential school 2015_robotics_interest
 
Data Mining - Separating Fact From Fiction - NetIKX
Data Mining - Separating Fact From Fiction - NetIKXData Mining - Separating Fact From Fiction - NetIKX
Data Mining - Separating Fact From Fiction - NetIKX
 
Week4
Week4Week4
Week4
 
A Quick Tour of OpenRefine
A Quick Tour of OpenRefineA Quick Tour of OpenRefine
A Quick Tour of OpenRefine
 
Conversations with data
Conversations with dataConversations with data
Conversations with data
 
Data reuse OU workshop bingo
Data reuse OU workshop bingoData reuse OU workshop bingo
Data reuse OU workshop bingo
 
Inspiring content - You Don't Need Big Data to Tell Good Data Stories
Inspiring content - You Don't Need Big Data to Tell Good Data Stories Inspiring content - You Don't Need Big Data to Tell Good Data Stories
Inspiring content - You Don't Need Big Data to Tell Good Data Stories
 
Lincoln jun14datajournalism
Lincoln jun14datajournalismLincoln jun14datajournalism
Lincoln jun14datajournalism
 
Lincoln Journalism Research Day - Data Journalism
Lincoln Journalism Research Day - Data JournalismLincoln Journalism Research Day - Data Journalism
Lincoln Journalism Research Day - Data Journalism
 

Último

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

Último (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

New Databases Course Delivers Software via Virtual Machine and IPython Notebooks

  • 1. Abstract:     TM351  is  a  new  course  on  databases,  data  explora:on  and  simple  data  visualisa:on,   due  for  first  presenta:on  in  2015J.  The  course  will  require  students  to  make  use  of   several  different  databases  and  work  with  them  in  an  interac:ve  fashion.  The  course   team  are  proposing  to  use  a  virtual  machine  (VM)  to  deliver  all  the  course  soKware   to  student  as  an  integrated  package,  allowing  the  same  "student  soKware  lab"   configura:on  to  run  on  different  plaMorms  (Windows,  OS/X,  Linux)  or  even  on  a  cloud   server.  The  main  user  interface  to  the  services  being  run  on  the  VM  will  be  via  a  web   browser  on  the  student's  host  opera:ng  system  (that  is,  their  "normal"  one)  in  the   form  of  an  IPython  Notebook.  This  interface  provides  a  blend  of  text  cells  (wriYen   using  markdown)  that  can  display  HTML  text,  images,  etc,  and  executable  code  cells.   Code  cells  can  be  edited  by  students  and  then  the  code  fragments  contained  within   them  executed  on  a  cell  by  cell  basis,  the  output  from  the  code  execu:on  being   inserted  within  the  document.       In  this  presenta:on,  I  will  review  the  ra:onale  for  adop:ng  the  use  of  a  virtual   machine  to  deliver  soKware  environments  to  students,  and  demonstrate  how  we   intend  to  make  use  of  IPython  notebooks  for  the  delivery  of  interac:ve  course   materials.    Possible  applica:ons  to  other  courses  will  also  be  reviewed,  along  with  a   considera:on  of  possible  workflows  associated  with  the  produc:on,  maintenance   and  student  use.   1  
  • 2. TM351  –  a  new  course,  currently  in  produc:on…     -­‐  Level  3   -­‐  30  points   -­‐  First  presenta:on  slated  for  October  2015  (15J)   2  
  • 3. It’s  replacing  a  “tradi:onal”  databases  course,  but  we’re  planning  quite  a  twists…   What  those  twists  are  in  content  terms,  though,  is  the  subject  of  an  other   presenta:on…   3  
  • 4. What  I  am  going  to  talk  about  are  two  new  things  we’re  exploring  in  the  context  of   the  course,  and  which  we’re  hopefully  might  also  prove  aYrac:ve  to  other  course   teams.   4  
  • 5. The  first  thing  are  virtual  machines.     These  have  already  been  used  on  a  couple  of  other  OU  courses  –  TM128  and  M812   both  use  virtual  machines  –  but  we  are  taking  a  more  fundamental  view  about  how   to  use  notebooks  to  delivering  interac:ve  teaching  material  as  well  as  soKware   applica:on  services.     So  what  is  a  virtual  machine?   5  
  • 6. We’re  all  familiar  with  the  idea  that  a  student  can  run  OU  supplied  soKware,  either   third  party  soKware  or  OU  created  soKware,  or  a  combina:on  of  both  in  the  case  of   open  source  applica:ons  where  we  take  some  open  code  and  then  modify  it   ourselves,  on  the  student’s  own  desktop.   6  
  • 7. We  may  even  require  students  to  install  more  that  one  piece  of  soKware,  perhaps   further  requiring  that  these  applica:ons  can  interoperate.     With  a  move  to  be  be  “open”  and  agnos:c  towards  a  par:cular  opera:ng  system,   there  are  considerable  challenges  to  be  faced:     -­‐  soKware  libraries  should  ideally  be  cross  plaMorm  rather  than  mul:ple  na:ve   implementa:ons  of  the  ostensibly  the  same  applica:on;   -­‐  soKware  versions  across  applica:ons  should  update  in  synch  with  each  other;   -­‐  the  UI,  or  look  and  feel,  should  be  the  same  across  plaMorms  –  or  we  have  more   wri:ng  to  do;   -­‐  support  issues  are  likely  to  scale  badly  for  us  as  we  have  to  cope  with  more   varia:ons  on  the  configura:on  of  individual  student  machines  (for  example,   different  opera:ng  systems,  different  versions  of  the  same  opera:ng  system);     7  
  • 8. One  way  of  mi:ga:ng  against  change  is  to  seYle  on  a  single  UI  space  –  such  as  a   browser.     Applica:ons  can  be  built  solely  within  the  browser,  and  made  available  to  the  user   requiring  liYle  more  desktop  (or  server)  applica:on  support  other  than  a  web  server.     Applica:on  front  ends  wriYen  in  HTML5  and  Javascript  can  provide  an  experience   rich  enough  to  rival  that  of  a  na:ve  applica:on.     Applica:on  front  ends  can  also  be  created  for  applica:ons  running  as  services  either   on  the  students’  desktop  or  via  a  remote  server.     Applica:ons  can  draw  on  files  in  a  folder  on  the  student’s  desktop  machine,  and  the   browser  can  be  used  to  save  files  (e.g.  from  the  internet)  into  that  folder.   8  
  • 9. To  get  round  the  problem  of  having  to  install  soKware  onto  mul:ple  different   possible  system  configura:ons,  how  much  easier  would  it  be  if  we  knew  exactly  what   opera:ng  system  each  student  was  running  and    they  were  all  running  exactly  the   same  opera:ng  system.     Virtualisa:on  plaMorms  such  as  Viirtualbox  and  VMware  are  cross-­‐plaMorm   applica:ons  that  can  be  downloaded  to  a  student’s  own  machine  and  that  then  allow   an  addi4onal  guest  opera4ng  system  to  be  installed  in  its  own  container  running  on   the  the  student’s  own  computer  (the  host)  via  the  virtualisa4on  pla;orm.     The  guest  opera:ng  system  and  the  soKware  that  runs  on  the  guest  opera:ng  system   are  said  to  define  a  virtual  machine  or  “VM”.     The  virtual  machine  can  be  defined  by  a  central  service  and  then  delivered  to  the   students  in  such  a  way  that  each  receives  a  copy  of  exactly  the  same  virtual  machine   in  terms  of  its  opera:ng  system  and  the  applica:ons  preinstalled  onto  it.   9  
  • 10. What  this  means  is  that  we  can  define  a  VM,  preinstall  soKware  onto  it,  and  ship  it  to   students  so  they  can  run  it  via  a  virtualisa:on  plaMorm  installed  onto  their  machine.     The  VM  can  run  applica:ons  as  services,  exposing  their  UIs  via  a  browser.  Files  can   easily  be  shared  between  the  host  and  guest  machines.     As  far  as  students  are  concerned,  all  they  need  to  do  is  install  a  virtualisa:on  system   onto  their  computer,  and  then  the  same  OU  virtual  machine  into  that  system   irrespec:ve  of  the  opera:ng  system  they  happen  to  be  running.     10  
  • 11. It  is  also  possible  to  run  the  VM  on  a  remote  server,  with  the  students  accessing  the   services  running  in  that  VM  via  their  browser.     This  means  that  students  can  access  services  using  computers  that  themselves  may   not  be  capable  of  installing  or  running  par4cular  applica4ons  –  such  as  some  tablet   computers.   11  
  • 12. Notebook  compu:ng  is  my  great  hope  for  the  future.  Notebook  compu4ng  is  like   spreadsheet  compu4ng,  a    democra:sa:on  of  access  to  and  the  process  of  prac:cally   based,  task  oriented  compu:ng.     Spreadsheets  help  you  get  stuff  done,  even  if  you  don’t  consider  yourself  to  be  a   programmer.  My  hope  is  that  the  notebook  metaphor  –  and  it’s  actually  quite  an  old   one  –  can  similarly  encourage  people  who  don’t  consider  themselves  programmers   to  do  and  to  use  programmy  things.   12  
  • 13. Notebook  compu4ng  buys  us  in  to  two  ways  of  thinking  that  I  think  are  useful  from  a   pedagogical  perspec:ve  –  that  is,  pedagogy  not  just  as  a  way  of  teaching  but  also  as  a   way  of  learning  in  the  sense  of  learning  about  something  through  inves4ga4ng  it.     Here,  I’m  thinking  of  an  inves:ga:on  as  a  form  of  problem  based  learning  –  I’m  not   up  enough  on  educa:onal  or  learning  theory  to  know  whether  there  is  a  body  of   theory,  or  even  just  a  school  of  thought,  about  “inves:ga:ve  learning”.     These  two  ways  of  thinking  are  literate  programming  and  reproducible  research.   13  
  • 14. In  case  you  haven’t  already  realised  it,  code  is  an  expressive  medium.  Code  has  its   poets,  and  ar:sts,  as  well  as  its  architects,  engineers  and  technicians.  One  of  the   grand  masters  of  code  is  Don  –  Donald  –  Knuth.     Don  Knuth  said  “A  literate  programmer  is  an  essayist  who  writes  programs  for   humans  to  understand”  as  part  of  a  longer  quote.  Here’s  that  longer  quote:     “Literate  programming  is  a  programming  methodology  that  combines  a  programming   language  with  a  documenta:on  language,  making  programs  more  robust,  more   portable,  and  more  easily  maintained  than  programs  wriYen  only  in  a  high-­‐level   language.   “Computer  programmers  already  know  both  kind  of  languages;  they  need  only  learn   a  few  conven:ons  about  alterna:ng  between  languages  to  create  programs  that  are   works  of  literature.  A  literate  programmer  is  an  essayist  who  writes  programs  for   humans  to  understand,  instead  of  primarily  wri:ng  instruc:ons  for  machines  to   follow.  When  programs  are  wriYen  in  the  recommended  style  they  can  be   transformed  into  documents  by  a  document  compiler  and  into  efficient  code  by  an   algebraic  compiler.”     Notebooks  are  environments  that  encourage  the  programming  of  wri:ng  literate   code.  Notebooks  encourage  you  to  write  prose  and  illustrate  it  with  code  –  and  the     14  
  • 15. The  other  idea  that  the  notebooks  buy  is  into  is  reproducible  research.  I  love  this  idea   and  think  you  should  too.  It  lets  archiving  make  sense.     Do  I  really  have  to  say  any  more  than  just  show  that  quote?     Now  you  may  say  that  that’s  all  very  well  for,  I  don’t  know,  physics  or  biology,  or   science,  or  economics.  Or  social  science  in  general,  where  they  do  all  sorts  of   inexplicable  things  with  sta:s:cs  and  probably  should  try  to  keep  track  of  what  they   doing.     But  not  the  humani:es.     But  that’s  not  quite  right,  because  in  the  digital  humani4es  there  are  computa:onal   tools  that  you  can  use.  Par:cularly  in  the  areas  of  text  analysis  and  visualisa:on.  Such   as  some  of  the  visualisa:ons  we  saw  in  the  first  part  of  this  presenta:on.     But  you  need  a  tool  that  democra:ses  access  to  this  technology.  You  need  an   environment  that  the  social  scien:sts  found  in  the  form  of  a  spreadsheet.     But  beYer.     15  
  • 16. (I  also  like  to  think  of  notebooks  as  a  place  where  I  can  have  a  conversa4on  with   data.).   16  
  • 17. So  how  do  notebooks  help?     The  tool  I  want  to  describe  is  –  are  –  called  IPython  Notebooks.     IPython  Notebooks  let  you  execute  code  wriYen  in  the  Python  programming  language   in  an  interac:ve  way.  But  they  also  work  with  other  languages  –  Javascript,  Ruby,  R,   and  so  on,  as  well  as  other  applica:ons.  I  use  a  notebook  for  drawing  diagrams  using   Graphviz,  for  example.     They  also  include  words  –  of  introduc:on,  of  analysis,  of  conclusion,  of  reflec:on.     And  they  also  include  the  things  the  code  wants  to  tell  u,  or  that  the  data  wants  to   tell  us  via  the  code.  The  code  outputs.     (Or  more  correctly,  the  code+data  outputs.)   17  
  • 18. (I  also  like  to  think  of  notebooks  as  a  place  where  I  can  have  a  conversa4on  with   data.).   18  
  • 19. (I  also  like  to  think  of  notebooks  as  a  place  where  I  can  have  a  conversa4on  with   data.).   19  
  • 20. (I  also  like  to  think  of  notebooks  as  a  place  where  I  can  have  a  conversa4on  with   data.).   20  
  • 21. The  first  thing  notebooks  let  you  do  is  write  text  for  the  non-­‐coding  reader.  Words.  In   English.  (Or  Spanish.  Or  French.  I  would  say  Chinese,  but  I  haven’t  checked  what   character  sets  are  supported,  so  I  can’t  say  that  for  definite  un:l  I  check!)     “Literate  programming  is  a  programming  methodology  that  combines  a  programming   language  with  a  documenta:on  language”.  That’s  what  Knuth  said.  But  we  can  take  it   further.  Past  code.  Past  documenta:on.  To  write  up.  To  story.     The  medium  in  which  we  can  write  our  human  words  is  a  simple  text  markup   language  called  markdown.     If  you’ve  ever  wriYen  HTML,  it’s  not  that  hard.     If  you’ve  ever  wriYen  and  email  and  wrapped  asterisks  around  a  word  or  phrase  to   emphasise  it,  or  wriYen  a  list  of  items  down  by  puxng  each  new  item  onto  a  new   line  and  preceding  it  with  a  dash,  it’s  that  easy.   21  
  • 22. Here’s  a  notebook,  and  here’s  some  text.     There’s  also  some  code.     But  note  the  text  –  we  have  a  header,  and  then  some  “human  text”.     You  might  also  no:ce  some  up  and  down  arrows  in  the  notebook  toolbar.  These   allow  us  to  rearrange  the  order  of  the  cells  in  the  notebook  in  a  straighMorward  way.     In  a  sense,  we  are  encouraged  to  rearrange  the  sequence  of  cells  into  an  order  that   makes  more  sense  as  a  narra:ve  for  the  reader  of  the  document,  or  in  the  execu:on   of  an  inves:ga:on.     The  downside  of  this  is  that  we  can  author  a  document  in  a  ‘non-­‐linear’  way  and  then   linearise  it  for  final  distribu:on  simply  by  reordering  the  order  in  which  the  cells  are   presented.     There  are  constraints  though  –  if  a  cell  computa4onally  depends  on  the  result  of,  or   state  change  resul:ng  from,  the  execu:on  of  a  prior  cell,  their  rela:ve  ordering   cannot  be  changed.   22  
  • 23. As  well  as  human  readable  text  cells  –  markdown  cells  or  header  cells  at  a  variety  of   levels  –  there  are  also  code  cells.     Code  cells  allow  you  to  write  (or  copy  and  paste  in)  code  and  then  run  it.     Applica:ons  give  you  menu  op:ons  that  in  the  background  copy,  paste  and  execute   the  code  you  want  to  run,  or  apply  to  some  par:cular  set  of  data,  or  text.     Code  cells  work  the  same  way,  but  they’re  naked.  They  show  you  the  code.     At  this  point  it’s  important  to  remember  that  code  can  call  code.     Thousands  of  lines  of  code  that  do  really  clever  and  difficult  things  can  be  called  from   a  single  line  of  code.  OKen  code  with  a  sensible  func:on  name  just  like  a  sensible   menu  item  label.  A  self-­‐describing  name  that  calls  the  masses  of  really  clever  code   that  someone  else  has  wriYen    behind  the  scenes.     But  you  know  which  code  because  you  just  called  it.  Explicitly.     Let’s  see  an  example  –  not  a  brilliant  example,  but  an  example  nonetheless.   23  
  • 24. Here’s  some  code.     It’s  actually  two  code  cells  –  in  one,  I  define  a  func:on.  In  the  second,  I  call  it.     (Already  this  is  revisionist.  I  developed  the  func:on  by  not  wrapping  it  in  a  func:on.  It   was  just  a  series  of  lines  of  code  that  wrote  to  perform  a  par:cular  task.     But  it  was  a  useful  task.  So  I  wrapped  the  lines  of  code  in  a  func:on,  and  now  I  can   call  those  lines  of  code  just  by  calling  the  func:on  name.     I  can  also  hide  the  func:on  in  another  file,  outside  of  the  notebook,  then  just  include   it  in  any  notebook  I  want  to…     …or  within  a  notebook,  I  could  just  copy  a  set  of  lines  of  code  and  repeatedly  paste   them  into  the  notebook,  applying  them  to  a  different  set  of  data  each  :me…  but  that   just  gets  messy,  and  that’s  what  being  able  to  call  a  bunch  of  lines  of  coped  wrapped   up  in  a  func:on  call  avoids.   24  
  • 25. As  far  as  reproducible  research  goes,  the  ability  of  a  notebook  to  execute  a  code   element  and  display  the  output  from  execu4ng  that  code  means  that  there  is  a  one-­‐ to-­‐one  binding  between  a  code  fragment  and  the  data  on  which  it  operates  and  the   output  obtained  from  execu:ng  just  that  code  on  just  that  data.   25  
  • 26. The  output  of  the  code  is  not  a  human  copied  and  pasted  artefact.     The  output  of  the  code  –  in  this  case,  the  result  of  execu:ng  a  par:cular  func:on  –  is   only  and  exactly  the  output  from  execu:ng  that  func:on  on  a  specified  dataset.     26  
  • 27. The  output  of  a  code  cell  is  not  limited  to  the  arcane  outputs  of  a  computa:onal   func:on.     We  can  display  data  table  results  as  data  tables.   27  
  • 28. We  can  also  generate  rich  HTML  outputs  –  in  this  case  an  interac:ve  map  overlaid   with  markers  corresponding  to  loca:ons  specified  in  a  dataset,  and  with  lines   connec:ng  markers  as  defined  by  connec:ons  described  in  the  original  dataset.     We  can  also  delete  the  outputs  of  all  the  code  cells,  and  then  rerun  the  code,  one   step  –  one  cell  –  aKer  the  other.  Reproducing  results  becomes  simply  a  maYer  of   rerunning  the  code  in  the  notebook  against  the  data  loaded  in  by  the  notebook  –  and   then  comparing  the  code  cell  outputs  to  the  code  cell  outputs  of  the  original   document.     Tools  are  also  under  development  that  help  spot  differences  between  those  outputs,   at  least  in  cases  where  the  outputs  are  text  based.   28  
  • 29. So  can  we  run  virtual  machines  and  IPython  notebooks  together?   29  
  • 30. The  IPython  notebooks  are  actually  browser  based  front  end  applica:ons  being   powered  by  an  IPython  server…   30  
  • 31. It’s  easy  enough  to  run  the  IPython  server  on  a  virtual  machine,  either  running  as  a   guest  VM  on  a  student’s  host  computer,  or  running  as  on  online  service  accessed  by   the  student  via  the  web  using  their  own  web  browser.   31  
  • 32. There  is  a  lot  more  that  could  be  said  –  for  example:   -­‐  workflows  around  the  building/provisioning  of  virtual  machines,   -­‐  how  we  might  be  able  to  host  such  machines  either  centrally  or  as  a  self-­‐service   op:on,   -­‐  the  corollary  between  notebook  style  compu:ng  and  spreadsheets,   -­‐  the  no:on  of  conversa4ons  with  data,   -­‐  etc.  etc.   32