bsc-projects-14.html
changeset 311 841fdad7fcdc
parent 300 bd70a062ebb2
child 312 9506d4bc0a08
equal deleted inserted replaced
310:4846ce596db9 311:841fdad7fcdc
    42     defined as “a person who enjoys exploring the details of programmable systems and 
    42     defined as “a person who enjoys exploring the details of programmable systems and 
    43     stretching their capabilities, as opposed to most users, who prefer to learn only the minimum 
    43     stretching their capabilities, as opposed to most users, who prefer to learn only the minimum 
    44     necessary.&rdquo; I am always happy to supervise like-minded students.</H4>  
    44     necessary.&rdquo; I am always happy to supervise like-minded students.</H4>  
    45 
    45 
    46 <ul class="striped">
    46 <ul class="striped">
    47 <li> <H4>[CU1] Regular Expression Matching and Partial Derivatives</H4>
    47 <li> <H4>[CU1] Regular Expression Matching and Derivatives</H4>
    48 
    48 
    49   <p>
    49   <p>
    50   <B>Description:</b>  
    50   <B>Description:</b>  
    51   <A HREF="http://en.wikipedia.org/wiki/Regular_expression">Regular expressions</A> 
    51   <A HREF="http://en.wikipedia.org/wiki/Regular_expression">Regular expressions</A> 
    52   are extremely useful for many text-processing tasks such as finding patterns in texts,
    52   are extremely useful for many text-processing tasks such as finding patterns in texts,
    54   introduced in 1950 by <A HREF="http://en.wikipedia.org/wiki/Stephen_Cole_Kleene">Stephen Kleene</A>,
    54   introduced in 1950 by <A HREF="http://en.wikipedia.org/wiki/Stephen_Cole_Kleene">Stephen Kleene</A>,
    55   you might think regular expressions have since been studied and implemented to death. But you would definitely be
    55   you might think regular expressions have since been studied and implemented to death. But you would definitely be
    56   mistaken: in fact they are still an active research area. For example
    56   mistaken: in fact they are still an active research area. For example
    57   <A HREF="http://www.home.hs-karlsruhe.de/~suma0002/publications/ppdp12-part-deriv-sub-match.pdf">this paper</A> 
    57   <A HREF="http://www.home.hs-karlsruhe.de/~suma0002/publications/ppdp12-part-deriv-sub-match.pdf">this paper</A> 
    58   about regular expression matching and partial derivatives was presented last summer at the international 
    58   about regular expression matching and partial derivatives was presented last summer at the international 
    59   PPDP'12 conference. They even work on a followup paper that has not yet been presented at any
    59   FLOPS'14 conference. The task in this project is to implement their results.</p>
    60   conference. The task in this project is to implement their results.</p>
       
    61 
    60 
    62   <p>The background for this project is that some regular expressions are 
    61   <p>The background for this project is that some regular expressions are 
    63   &ldquo;<A HREF="http://en.wikipedia.org/wiki/ReDoS#Examples">evil</A>&rdquo;
    62   &ldquo;<A HREF="http://en.wikipedia.org/wiki/ReDoS#Examples">evil</A>&rdquo;
    64   and can &ldquo;stab you in the back&rdquo; according to
    63   and can &ldquo;stab you in the back&rdquo; according to
    65   this <A HREF="http://tech.blog.cueup.com/regular-expressions-will-stab-you-in-the-back">blog post</A>.
    64   this <A HREF="http://tech.blog.cueup.com/regular-expressions-will-stab-you-in-the-back">blog post</A>.
    66   For example, if you use in <A HREF="http://www.python.org">Python</A> or 
    65   For example, if you use in <A HREF="http://www.python.org">Python</A> or 
    67   in <A HREF="http://www.ruby-lang.org/en/">Ruby</A> (probably also other mainstream programming languages) the 
    66   in <A HREF="http://www.ruby-lang.org/en/">Ruby</A> (or also a number of other mainstream programming languages according to this
       
    67   <A HREF="http://www. computerbytesman.com/redos/">blog</A>) the 
    68   innocently looking regular expression <code>a?{28}a{28}</code> and match it, say, against the string 
    68   innocently looking regular expression <code>a?{28}a{28}</code> and match it, say, against the string 
    69   <code>aaaaaaaaaaaaaaaaaaaaaaaaaaaa</code> (that is 28 <code>a</code>s), you will soon notice that your CPU usage goes to 100%. In fact,
    69   <code>aaaaaaaaaaaaaaaaaaaaaaaaaaaa</code> (that is 28 <code>a</code>s), you will soon notice that your CPU usage goes to 100%. In fact,
    70   Python and Ruby need approximately 30 seconds of hard work for matching this string. You can try it for yourself:
    70   Python and Ruby need approximately 30 seconds of hard work for matching this string. You can try it for yourself:
    71   <A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/re.py">re.py</A> (Python version) and 
    71   <A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/re.py">re.py</A> (Python version) and 
    72   <A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/re.rb">re.rb</A> 
    72   <A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/re.rb">re.rb</A> 
    74   mounting a nice <A HREF="http://en.wikipedia.org/wiki/Denial-of-service_attack">DoS attack</A> against 
    74   mounting a nice <A HREF="http://en.wikipedia.org/wiki/Denial-of-service_attack">DoS attack</A> against 
    75   your program if it contains such an &ldquo;evil&rdquo; regular expression. Actually 
    75   your program if it contains such an &ldquo;evil&rdquo; regular expression. Actually 
    76   <A HREF="http://www.scala-lang.org/">Scala</A> (and also Java) are almost immune from such
    76   <A HREF="http://www.scala-lang.org/">Scala</A> (and also Java) are almost immune from such
    77   attacks as they can deal with strings of up to 4,300 <code>a</code>s in less than a second. But if you scale
    77   attacks as they can deal with strings of up to 4,300 <code>a</code>s in less than a second. But if you scale
    78   the regular expression and string further to, say, 4,600 <code>a</code>s, then you get a <code>StackOverflowError</code> 
    78   the regular expression and string further to, say, 4,600 <code>a</code>s, then you get a <code>StackOverflowError</code> 
    79   potentially crashing your program.
    79   potentially crashing your program. Moreover (beside the problem of being painfully slow) according to this
       
    80   <A HREF="http://www.haskell.org/haskellwiki/Regex_Posix">report</A>
       
    81   nearly all POSIX regular expression matchers are actually buggy.
    80   </p>
    82   </p>
    81 
    83 
    82   <p>
    84   <p>
    83   On a rainy afternoon, I implemented 
    85   On a rainy afternoon, I implemented 
    84   <A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/re3.scala">this</A> 
    86   <A HREF="http://www.dcs.kcl.ac.uk/staff/urbanc/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/re3.scala">this</A> 
    97   expression matchers in Python and Ruby.
    99   expression matchers in Python and Ruby.
    98   </p>
   100   </p>
    99 
   101 
   100   <p>
   102   <p>
   101   Now the authors from the 
   103   Now the authors from the 
   102   <A HREF="http://www.home.hs-karlsruhe.de/~suma0002/publications/ppdp12-part-deriv-sub-match.pdf">PPDP'12-paper</A> mentioned 
   104   <A HREF="http://www.home.hs-karlsruhe.de/~suma0002/publications/ppdp12-part-deriv-sub-match.pdf">FLOPS'14-paper</A> mentioned 
   103   above claim they are even faster than me and can deal with even more features of regular expressions
   105   above claim they are even faster than me and can deal with even more features of regular expressions
   104   (for example subexpression matching, which my rainy-afternoon matcher cannot). I am sure they thought
   106   (for example subexpression matching, which my rainy-afternoon matcher cannot). I am sure they thought
   105   about the problem much longer than a single afternoon. The task 
   107   about the problem much longer than a single afternoon. The task 
   106   in this project is to find out how good they actually are by implementing the results from their paper. 
   108   in this project is to find out how good they actually are by implementing the results from their paper. 
   107   Their approach is based on the concept of partial derivatives introduced in 1994 by
   109   Their approach is based on the concept of derivatives introduced in 1994 by
   108   <A HREF="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.56.2509&rep=rep1&type=pdf">Valentin Antimirov</A>.
   110   <A HREF="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.56.2509&rep=rep1&type=pdf">Valentin Antimirov</A>.
   109   I used them once myself in a <A HREF="http://www.inf.kcl.ac.uk/staff/urbanc/Publications/rexp.pdf">paper</A> 
   111   I used them once myself in a <A HREF="http://www.inf.kcl.ac.uk/staff/urbanc/Publications/rexp.pdf">paper</A> 
   110   in order to prove the <A HREF="http://en.wikipedia.org/wiki/Myhill–Nerode_theorem">Myhill-Nerode theorem</A>.
   112   in order to prove the <A HREF="http://en.wikipedia.org/wiki/Myhill–Nerode_theorem">Myhill-Nerode theorem</A>.
   111   So I know they are worth their money. Still, it would be interesting to actually compare their results
   113   So I know they are worth their money. Still, it would be interesting to actually compare their results
   112   with my simple rainy-afternoon matcher and potentially &ldquo;blow away&rdquo; the regular expression matchers 
   114   with my simple rainy-afternoon matcher and potentially &ldquo;blow away&rdquo; the regular expression matchers 
   113   in Python and Ruby (and possibly in Scala too).
   115   in Python and Ruby (and possibly in Scala too). The application would be to implement a fast lexer for
       
   116   programming languages. 
   114   </p>
   117   </p>
   115 
   118 
   116   <p>
   119   <p>
   117   <B>Literature:</B> 
   120   <B>Literature:</B> 
   118   The place to start with this project is obviously this
   121   The place to start with this project is obviously this
   129   Finally, there are millions of other pointers about regular expression
   132   Finally, there are millions of other pointers about regular expression
   130   matching on the Web. I found the chapter on Lexing in this
   133   matching on the Web. I found the chapter on Lexing in this
   131   <A HREF="http://www.diku.dk/~torbenm/Basics/">online book</A> very helpful.
   134   <A HREF="http://www.diku.dk/~torbenm/Basics/">online book</A> very helpful.
   132   Test cases for &ldquo;<A HREF="http://en.wikipedia.org/wiki/ReDoS#Examples">evil</A>&rdquo;
   135   Test cases for &ldquo;<A HREF="http://en.wikipedia.org/wiki/ReDoS#Examples">evil</A>&rdquo;
   133   regular expressions can be obtained from <A HREF="http://en.wikipedia.org/wiki/ReDoS#Examples">here</A>.
   136   regular expressions can be obtained from <A HREF="http://en.wikipedia.org/wiki/ReDoS#Examples">here</A>.
       
   137   
   134   </p>
   138   </p>
   135 
   139 
   136   <p>
   140   <p>
   137   <B>Skills:</B> 
   141   <B>Skills:</B> 
   138   This is a project for a student with an interest in theory and some
   142   This is a project for a student with an interest in theory and some
   177   <p>
   181   <p>
   178   An alternative is to not generate machine code, but build a compiler that compiles to
   182   An alternative is to not generate machine code, but build a compiler that compiles to
   179   <A HREF="http://www.w3schools.com/js/">JavaScript</A>. This is the language that is supported by most
   183   <A HREF="http://www.w3schools.com/js/">JavaScript</A>. This is the language that is supported by most
   180   browsers and therefore is a favourite
   184   browsers and therefore is a favourite
   181   vehicle for Web-programming. Some call it <B>the</B> scripting language of the Web.
   185   vehicle for Web-programming. Some call it <B>the</B> scripting language of the Web.
   182   Unfortunately, JavaScript is probably one of the worst
   186   Unfortunately, JavaScript is also probably one of the worst
   183   languages to program in (being designed and released in a hurry). <B>But</B> it can be used as a convenient target
   187   languages to program in (being designed and released in a hurry). <B>But</B> it can be used as a convenient target
   184   for translating programs from other languages. In particular there are two
   188   for translating programs from other languages. In particular there are two
   185   very optimised subsets of JavaScript that can be used for this purpose:
   189   very optimised subsets of JavaScript that can be used for this purpose:
   186   one is <A HREF="http://asmjs.org">asm.js</A> and the other is
   190   one is <A HREF="http://asmjs.org">asm.js</A> and the other is
   187   <A HREF="https://github.com/kripken/emscripten/wiki">emscripten</A>.
   191   <A HREF="https://github.com/kripken/emscripten/wiki">emscripten</A>.
   237   But if Scala is a problem, my code can also be translated quickly into any other functional
   241   But if Scala is a problem, my code can also be translated quickly into any other functional
   238   language. 
   242   language. 
   239   </p>
   243   </p>
   240 
   244 
   241   <p>
   245   <p>
   242   <B>PS:</B> Compiler projects, like this [CU2] and [CU3], consistently received high marks in the past.
   246   <B>PS:</B> Compiler projects, like this [CU2] and [CU6], consistently received high marks in the past.
   243   I suprvised four so far and none of them received a mark below 70% - one even was awarded a prize.
   247   I suprvised four so far and none of them received a mark below 70% - one even was awarded a prize.
   244   </p>
   248   </p>
   245 
   249 
   246 <li> <H4>[CU3] Language Translator into JavaScript</H4>
   250 <li> <H4>[CU3] Slide-Making in the Web-Age</H4>
       
   251 
       
   252   <p>
       
   253   The standard technology for writing scientific papers in Computer Science  is to use
       
   254   <A HREF="http://en.wikipedia.org/wiki/LaTeX">LaTeX</A>, a document preparation
       
   255   system originally implemented by <A HREF="http://en.wikipedia.org/wiki/Donald_Knuth">Donald Knuth</A>
       
   256   and <A HREF="http://en.wikipedia.org/wiki/Leslie_Lamport">Leslie Lamport</A>.
       
   257   LaTeX produces very pleasantly looking documents, can deal nicely with mathematical
       
   258   formulas and is very flexible. If you are interested, <A HREF="http://openwetware.org/wiki/Word_vs._LaTeX">here</A>
       
   259   is a side-by-side comparison between Word and LaTeX (which LaTeX &ldquo;wins&rdquo; with 18 out of 21 points).
       
   260   Computer scientists not only use LaTeX for documents,
       
   261   but also for slides (really, nobody who wants to be cool uses Keynote or Powerpoint).
       
   262   </p>
       
   263 
       
   264   <p>
       
   265   Although used widely, LaTeX seems nowadays a bit dated for producing
       
   266   slides. Unlike documents, which are typically &ldquo;static&rdquo; and published in a book or journal,
       
   267   slides often contain changing contents that might first only be partially visible and
       
   268   only later be revealed as the &ldquo;story&rdquo; of a talk or lecture demands.
       
   269   Also slides often contain animated algorithms where each state in the
       
   270   calculation is best explained by highlighting the changing data.
       
   271   </p>
       
   272 
       
   273   <p>
       
   274   It seems HTML and JavaScript are much better suited for generating
       
   275   such animated slides. This <A HREF="http://www.impressivewebs.com/html-slidedeck-toolkits/">page</A>
       
   276   links to 22 slide-generating programs using this combination of technologies. 
       
   277   <A HREF="http://www.impressivewebs.com/html-slidedeck-toolkits/">Here</A> are even more such
       
   278   projects. However, the problem with all of these project is that they depend heavily on the users being
       
   279   able to write JavaScript, CCS or HTML...not something one would like to depend on given that
       
   280   &ldquo;normal&rdquo; users likely only have a LaTeX background. The aim of this project is to invent a
       
   281   very simple language that is inspired by LaTeX and then generate from code written in this language
       
   282   slides that can be displayed in a web-browser.
       
   283   </p>
       
   284 
       
   285  <p>
       
   286  This sounds complicated, but there is already some help available:
       
   287  <A HREF="http://www.mathjax.org">Mathjax</A> is a JavaScript library that can
       
   288  be used to display mathematical text, for example
       
   289 
       
   290  <blockquote>
       
   291  <p>When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are
       
   292  \(x = {-b \pm \sqrt{b^2-4ac} \over 2a}\).</p>
       
   293  </blockquote>
       
   294 
       
   295  by writing code in the familiar LaTeX-way. This can be reused. There are also plenty of JavaScript
       
   296  libraries for graphical animations (for example
       
   297  <A HREF="http://raphaeljs.com">Raphael</A>,
       
   298  <A HREF="http://svgjs.com">SVG.JS</A>,
       
   299  <A HREF="http://bonsaijs.org">Bonsaijs</A>,
       
   300  <A HREF="http://jsxgraph.uni-bayreuth.de/wp/">JSXGraph</A>). The inspiration for how the user should be able to write
       
   301  slides could come from the LaTeX packages <A HREF="http://en.wikipedia.org/wiki/Beamer_(LaTeX)">Beamer</A>
       
   302  and <A HREF="http://en.wikipedia.org/wiki/PGF/TikZ">PGF/TikZ</A>.
       
   303  </p>
       
   304 
       
   305   <p>
       
   306   <B>Skills:</B> 
       
   307   This is a project requires good knowledge of JavaScript. You need to be able to
       
   308   parse a language and translate it to a suitable part of JavaScript using
       
   309   appropriate libraries. Tutorials for JavaScript are <A HREF="http://www.w3schools.com/js/">here</A>.
       
   310   A parser generator for JavaScript is <A HREF="http://pegjs.majda.cz">here</A>. There are probably also
       
   311   others. If you want to avoid JavaScript there are a number of alternatives: for example the
       
   312   <A HREF="http://elm-lang.org">Elm</A>
       
   313   language has been especially designed for implementing easily interactive animations, which would be
       
   314   very conveninet for this project.
       
   315   </p>
       
   316 
       
   317 <li> <H4>[CU4] An Online Student Voting System</H4>
       
   318 
       
   319   <p>
       
   320   <B>Description:</B>
       
   321   One of the more annoying aspects of giving a lecture is to ask a question
       
   322   to the students and no matter how easy the question is to not 
       
   323   receive any answer. Recently, the online course system 
       
   324   <A HREF="http://www.udacity.com">Udacity</A> made an art out of
       
   325   asking questions during lectures (see for example the
       
   326   <A HREF="http://www.udacity.com/overview/Course/cs253/CourseRev/apr2012">Web Application Engineering</A> 
       
   327   course CS253).
       
   328   The lecturer there gives multiple-choice questions as part of the lecture and the students need to 
       
   329   click on the appropriate answer. This works very well in the online world. 
       
   330   For  &ldquo;real-world&rdquo; lectures, the department has some 
       
   331   <A HREF="http://en.wikipedia.org/wiki/Audience_response">clickers</A>
       
   332   (these are little devices which form a part of an audience response systems). However, 
       
   333   they are a logistic nightmare for the lecturer: they need to be distributed 
       
   334   during the lecture and collected at the end. Nowadays, where students
       
   335   come with their own laptop or smartphone to lectures, this can
       
   336   be improved.
       
   337   </p>
       
   338 
       
   339   <p>
       
   340   The task of this project is to implement an online student
       
   341   polling system. The lecturer should be able to prepare 
       
   342   questions beforehand (encoded as some web-form) and be able to 
       
   343   show them during the lecture. The students
       
   344   can give their answers by clicking on the corresponding webpage.
       
   345   The lecturer can then collect the responses online and evaluate them 
       
   346   immediately. Such a system is sometimes called
       
   347   <A HREF="http://en.wikipedia.org/wiki/Audience_response#Smartphone_.2F_HTTP_voting">HTML voting</A>. 
       
   348   There are a number of commercial
       
   349   solutions for this problem, but they are not easy to use (in addition
       
   350   to being ridiculously expensive). A good student can easily improve upon
       
   351   what they provide. 
       
   352   </p>
       
   353 
       
   354   <p>
       
   355   The problem of student polling is not as hard as 
       
   356   <A HREF="http://en.wikipedia.org/wiki/Electronic_voting">electronic voting</A>, 
       
   357   which essentially is still an unsolved problem in Computer Science. The
       
   358   students only need to be prevented from answering question more than once thus skewing
       
   359   any statistics. Unlike electronic voting, no audit trail needs to be kept
       
   360   for student polling. Restricting the number of answers can probably be solved 
       
   361   by setting appropriate cookies on the students
       
   362   computers or smart phones.
       
   363   </p>
       
   364 
       
   365   <p>
       
   366   <B>Literature:</B> 
       
   367   The project requires fluency in a web-programming language (for example 
       
   368   <A HREF="http://en.wikipedia.org/wiki/JavaScript">Javascript</A>,
       
   369   <A HREF="http://en.wikipedia.org/wiki/Go_(programming_language)">Go</A>, 
       
   370   <A HREF="http://www.scala-lang.org/">Scala</A>). However JavaScript with
       
   371   the <A HREF="http://nodejs.org">Node.js</A> extension seems to be best suited for the job.
       
   372   <A HREF="http://www.nodebeginner.org">Here</A> is a tutorial on Node.js for beginners.
       
   373   For web-programming the 
       
   374   <A HREF="http://www.udacity.com/overview/Course/cs253/CourseRev/apr2012">Web Application Engineering</A>
       
   375   course at <A HREF="http://www.udacity.com">Udacity</A> is a good starting point 
       
   376   to be aware of the issues involved. This course uses <A HREF="http://www.python.org">Python</A>.
       
   377   To evaluate the answers from the students, Google's 
       
   378   <A HREF="https://developers.google.com/chart/image/docs/making_charts">Chart Tools</A>
       
   379   might be useful, which is also described in this 
       
   380   <A HREF="http://www.youtube.com/watch?v=NZtgT4jgnE8">youtube</A> video.
       
   381   </p>
       
   382 
       
   383   <p>
       
   384   <B>Skills:</B> 
       
   385   In order to provide convenience for the lecturer, this project needs very good web-programming skills. A  
       
   386   <A HREF="http://en.wikipedia.org/wiki/Hacker_(programmer_subculture)">hacker mentality</A>
       
   387   (see above) is probably also very beneficial: web-programming is an area that only emerged recently and
       
   388   many tools still lack maturity. You probably have to experiment a lot with several different
       
   389   languages and tools.
       
   390   </p>
       
   391 
       
   392 <li> <H4>[CU5] Raspberry Pi's and Arduinos</H4>
       
   393 
       
   394   <p>
       
   395   <B>Description:</B>
       
   396   This project is for true hackers! <A HREF="http://en.wikipedia.org/wiki/Raspberry_Pi">Raspberry Pi's</A>
       
   397   are small Linux computers the size of a credit-card and only cost &pound;34 (see picture left below). They were introduced
       
   398   in 2012 and people went crazy...well some of them. There is a
       
   399   <A HREF="https://plus.google.com/communities/113390432655174294208?hl=en">Google+</A> community about Raspberry Pi's that has more
       
   400   than 150k of followers. It is hard to keep up with what people do with these small computers. The possibilities
       
   401   seem to be limitless. The main resource for Raspberry Pi's is <A HREF="http://www.raspberrypi.org">here</A>.
       
   402   There are <A HREF="http://www.themagpi.com">magazines</A> dedicated to them and tons of
       
   403   <A HREF="http://www.raspberrypi.org/phpBB3/viewforum.php?f=39">books</A> (not to mention
       
   404   floods of <A HREF="https://www.google.co.uk/search?q=raspberry+pi">online</A> material).
       
   405   Google just released a
       
   406   <A HREF="http://googlecreativelab.github.io/coder/">framework</A>
       
   407   for web-programming on Raspberry Pi's truning them into webservers.
       
   408   </p>
       
   409 
       
   410   <p>
       
   411   <A HREF="http://en.wikipedia.org/wiki/Arduino">Arduinos</A> are slightly older (from 2005) but still very cool (see picture right below). They
       
   412   are small single-board micro-controllers that can talk to various external gadgets (sensors, motors, etc). Since Arduinos
       
   413   are open-software and open-hardware there are many clones and add-on boards. Like for the Raspberry Pi, there
       
   414   is a lot of material <A HREF="https://www.google.co.uk/search?q=arduino">available</A> about Arduinos.
       
   415   The main reference is <A HREF="http://www.arduino.cc">here</A>. Like the Raspberry Pi's, the good thing about
       
   416   Arduinos is that they can be powered with simple AA-batteries.
       
   417   </p>
       
   418 
       
   419   <p>
       
   420   I have two such Raspberry Pi's including wifi-connectors and two <A HREF="http://www.raspberrypi.org/camera">cameras<A>.
       
   421   I also have two <A HREF="http://www.freaklabs.org/index.php/Blog/Store/Introducing-the-Freakduino-Chibi-An-Arduino-based-Board-For-Wireless-Sensor-Networking.html">Freakduino Boards</A> that are Arduinos extended with wireless communication. I can lend them to responsible
       
   422   students for one or two projects. However, the aim is to first come up with an idea for a project. Popular projects are
       
   423   automated temperature sensors, network servers, robots, web-cams (<A HREF="http://www.secretbatcave.co.uk/electronics/shard-rain-cam/">here</A>
       
   424   is a <A HREF="http://www.raspberrypi.org/archives/3547">web-cam</A> directed at the Shard that can
       
   425   <A HREF="http://www.secretbatcave.co.uk/software/shard-rain-cam-quantifying-cloudy/">tell</A>
       
   426   you whether it is raining or cloudy). There are plenty more ideas listed
       
   427   <A HREF="http://www.raspberrypi.org/phpBB3/viewforum.php?f=15">here</A> for Raspberry Pi's and
       
   428   <A HREF="http://playground.arduino.cc/projects/ideas">here</A> for Arduinos.
       
   429   </p>
       
   430 
       
   431   <p>
       
   432   There are essentially two kinds of projects: One is purely software-based. Software projects for Raspberry Pi's are often
       
   433   written in <A HREF="http://www.python.org">Python</A>, but since these are Linux-capable computers any other
       
   434   language would do as well. You can also write your own operating system as done
       
   435   <A HREF="http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/">here</A>. For example the students
       
   436   <A HREF="http://www.recantha.co.uk/blog/?p=4918">here</A> developed their own bare-metal OS and then implemented
       
   437   a chess-program on top of it (have a look at their very impressive
       
   438   <A HREF="http://www.youtube.com/watch?v=-03bouPsfEQ&feature=player_embedded">youtube</A> video).
       
   439   The other kind of project is a combination of hardware and software; usually attaching some sensors
       
   440   or motors to the Raspberry Pi or Arduino. This might require some soldering or what is called
       
   441   a <A HREF="http://en.wikipedia.org/wiki/Breadboard">bread-board</A>. But be careful before choosing a project
       
   442   involving new hardware: these devices
       
   443   can be destroyed (if &ldquo;Vin connected to GND&rdquo; or &ldquo;drawing more than 30mA from a GPIO&rdquo;
       
   444   does not make sense to you, you should probably stay away from such a project). 
       
   445   </p>
       
   446 
       
   447   <p>
       
   448   <center>
       
   449   <img style="-webkit-user-select: none; cursor: -webkit-zoom-in;
       
   450   "src="http://upload.wikimedia.org/wikipedia/commons/3/3d/RaspberryPi.jpg" width="313" height="209">
       
   451 
       
   452   <img style="-webkit-user-select: none; cursor: -webkit-zoom-in;
       
   453   "src="http://upload.wikimedia.org/wikipedia/commons/3/38/Arduino_Uno_-_R3.jpg" width="240" height="209">
       
   454   </center>
       
   455   </p>
       
   456 
       
   457   <p>
       
   458   <B>Skills:</B> 
       
   459   Well, you must be a hacker; happy to make things. Your desk might look like this:
       
   460   <center>
       
   461   <img style="-webkit-user-select: none; cursor: -webkit-zoom-in;
       
   462   "src="http://www.inf.kcl.ac.uk/staff/urbanc/rpi-photo.jpg" width="209" height="313">
       
   463   </center>
       
   464   </p>
       
   465 
       
   466 <li> <H4>[CU6] Language Translator into JavaScript</H4>
   247 
   467 
   248   <p>
   468   <p>
   249   <b>Description:</b> 
   469   <b>Description:</b> 
   250   <A HREF="http://www.w3schools.com/js/">JavaScript</A> is a language that is supported by most
   470   <A HREF="http://www.w3schools.com/js/">JavaScript</A> is a language that is supported by most
   251   browsers and therefore is a favourite
   471   browsers and therefore is a favourite
   282   difference between these projects and this one is that they translate into relatively high-level
   502   difference between these projects and this one is that they translate into relatively high-level
   283   JavaScript code; none of them use the much lower levels <A HREF="http://asmjs.org">asm.js</A> and 
   503   JavaScript code; none of them use the much lower levels <A HREF="http://asmjs.org">asm.js</A> and 
   284   <A HREF="https://github.com/kripken/emscripten/wiki">emscripten</A>.
   504   <A HREF="https://github.com/kripken/emscripten/wiki">emscripten</A>.
   285 </p>
   505 </p>
   286 
   506 
   287 <li> <H4>[CU4] Slide-Making in the Web-Age</H4>
   507 
   288 
   508 
   289   <p>
   509 <li> <H4>[CU7] An Infrastructure for Displaying and Animating Code in a Web-Browser</H4>
   290   The standard technology for writing scientific papers in Computer Science  is to use
       
   291   <A HREF="http://en.wikipedia.org/wiki/LaTeX">LaTeX</A>, a document preparation
       
   292   system originally implemented by <A HREF="http://en.wikipedia.org/wiki/Donald_Knuth">Donald Knuth</A>
       
   293   and <A HREF="http://en.wikipedia.org/wiki/Leslie_Lamport">Leslie Lamport</A>.
       
   294   LaTeX produces very pleasantly looking documents, can deal nicely with mathematical
       
   295   formulas and is very flexible. If you are interested, <A HREF="http://openwetware.org/wiki/Word_vs._LaTeX">here</A>
       
   296   is a side-by-side comparison between Word and LaTeX (which LaTeX &ldquo;wins&rdquo; with 18 out of 21 points).
       
   297   Computer scientists not only use LaTeX for documents,
       
   298   but also for slides (really, nobody who wants to be cool uses Keynote or Powerpoint).
       
   299   </p>
       
   300 
       
   301   <p>
       
   302   Although used widely, LaTeX seems nowadays a bit dated for producing
       
   303   slides. Unlike documents, which are typically &ldquo;static&rdquo; and published in a book or journal,
       
   304   slides often contain changing contents that might first only be partially visible and
       
   305   only later be revealed as the &ldquo;story&rdquo; of a talk or lecture demands.
       
   306   Also slides often contain animated algorithms where each state in the
       
   307   calculation is best explained by highlighting the changing data.
       
   308   </p>
       
   309 
       
   310   <p>
       
   311   It seems HTML and JavaScript are much better suited for generating
       
   312   such animated slides. This <A HREF="http://www.impressivewebs.com/html-slidedeck-toolkits/">page</A>
       
   313   links to 22 slide-generating programs using this combination of technologies. 
       
   314   <A HREF="http://www.impressivewebs.com/html-slidedeck-toolkits/">Here</A> are even more such
       
   315   projects. However, the problem with all of these project is that they depend heavily on the users being
       
   316   able to write JavaScript, CCS or HTML...not something one would like to depend on given that
       
   317   &ldquo;normal&rdquo; users likely only have a LaTeX background. The aim of this project is to invent a
       
   318   very simple language that is inspired by LaTeX and then generate from code written in this language
       
   319   slides that can be displayed in a web-browser.
       
   320   </p>
       
   321 
       
   322  <p>
       
   323  This sounds complicated, but there is already some help available:
       
   324  <A HREF="http://www.mathjax.org">Mathjax</A> is a JavaScript library that can
       
   325  be used to display mathematical text, for example
       
   326 
       
   327  <blockquote>
       
   328  <p>When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are
       
   329  \(x = {-b \pm \sqrt{b^2-4ac} \over 2a}\).</p>
       
   330  </blockquote>
       
   331 
       
   332  by writing code in the familiar LaTeX-way. This can be reused. There are also plenty of JavaScript
       
   333  libraries for graphical animations (for example
       
   334  <A HREF="http://raphaeljs.com">Raphael</A>,
       
   335  <A HREF="http://svgjs.com">SVG.JS</A>,
       
   336  <A HREF="http://bonsaijs.org">Bonsaijs</A>,
       
   337  <A HREF="http://jsxgraph.uni-bayreuth.de/wp/">JSXGraph</A>). The inspiration for how the user should be able to write
       
   338  slides could come from the LaTeX packages <A HREF="http://en.wikipedia.org/wiki/Beamer_(LaTeX)">Beamer</A>
       
   339  and <A HREF="http://en.wikipedia.org/wiki/PGF/TikZ">PGF/TikZ</A>.
       
   340  </p>
       
   341 
       
   342   <p>
       
   343   <B>Skills:</B> 
       
   344   This is a project requires good knowledge of JavaScript. You need to be able to
       
   345   parse a language and translate it to a suitable part of JavaScript using
       
   346   appropriate libraries. Tutorials for JavaScript are <A HREF="http://www.w3schools.com/js/">here</A>.
       
   347   A parser generator for JavaScript is <A HREF="http://pegjs.majda.cz">here</A>. There are probably also
       
   348   others.
       
   349   </p>
       
   350 
       
   351 <li> <H4>[CU5] An Online Student Voting System</H4>
       
   352 
       
   353   <p>
       
   354   <B>Description:</B>
       
   355   One of the more annoying aspects of giving a lecture is to ask a question
       
   356   to the students and no matter how easy the question is to not 
       
   357   receive any answer. Recently, the online course system 
       
   358   <A HREF="http://www.udacity.com">Udacity</A> made an art out of
       
   359   asking questions during lectures (see for example the
       
   360   <A HREF="http://www.udacity.com/overview/Course/cs253/CourseRev/apr2012">Web Application Engineering</A> 
       
   361   course CS253).
       
   362   The lecturer there gives multiple-choice questions as part of the lecture and the students need to 
       
   363   click on the appropriate answer. This works very well in the online world. 
       
   364   For  &ldquo;real-world&rdquo; lectures, the department has some 
       
   365   <A HREF="http://en.wikipedia.org/wiki/Audience_response">clickers</A>
       
   366   (these are little devices which form a part of an audience response systems). However, 
       
   367   they are a logistic nightmare for the lecturer: they need to be distributed 
       
   368   during the lecture and collected at the end. Nowadays, where students
       
   369   come with their own laptop or smartphone to lectures, this can
       
   370   be improved.
       
   371   </p>
       
   372 
       
   373   <p>
       
   374   The task of this project is to implement an online student
       
   375   polling system. The lecturer should be able to prepare 
       
   376   questions beforehand (encoded as some web-form) and be able to 
       
   377   show them during the lecture. The students
       
   378   can give their answers by clicking on the corresponding webpage.
       
   379   The lecturer can then collect the responses online and evaluate them 
       
   380   immediately. Such a system is sometimes called
       
   381   <A HREF="http://en.wikipedia.org/wiki/Audience_response#Smartphone_.2F_HTTP_voting">HTML voting</A>. 
       
   382   There are a number of commercial
       
   383   solutions for this problem, but they are not easy to use (in addition
       
   384   to being ridiculously expensive). A good student can easily improve upon
       
   385   what they provide. 
       
   386   </p>
       
   387 
       
   388   <p>
       
   389   The problem of student polling is not as hard as 
       
   390   <A HREF="http://en.wikipedia.org/wiki/Electronic_voting">electronic voting</A>, 
       
   391   which essentially is still an unsolved problem in Computer Science. The
       
   392   students only need to be prevented from answering question more than once thus skewing
       
   393   any statistics. Unlike electronic voting, no audit trail needs to be kept
       
   394   for student polling. Restricting the number of answers can probably be solved 
       
   395   by setting appropriate cookies on the students
       
   396   computers or smart phones.
       
   397   </p>
       
   398 
       
   399   <p>
       
   400   <B>Literature:</B> 
       
   401   The project requires fluency in a web-programming language (for example 
       
   402   <A HREF="http://en.wikipedia.org/wiki/JavaScript">Javascript</A>,
       
   403   <A HREF="http://en.wikipedia.org/wiki/Go_(programming_language)">Go</A>, 
       
   404   <A HREF="http://www.scala-lang.org/">Scala</A>). However JavaScript with
       
   405   the <A HREF="http://nodejs.org">Node.js</A> extension seems to be best suited for the job.
       
   406   <A HREF="http://www.nodebeginner.org">Here</A> is a tutorial on Node.js for beginners.
       
   407   For web-programming the 
       
   408   <A HREF="http://www.udacity.com/overview/Course/cs253/CourseRev/apr2012">Web Application Engineering</A>
       
   409   course at <A HREF="http://www.udacity.com">Udacity</A> is a good starting point 
       
   410   to be aware of the issues involved. This course uses <A HREF="http://www.python.org">Python</A>.
       
   411   To evaluate the answers from the students, Google's 
       
   412   <A HREF="https://developers.google.com/chart/image/docs/making_charts">Chart Tools</A>
       
   413   might be useful, which is also described in this 
       
   414   <A HREF="http://www.youtube.com/watch?v=NZtgT4jgnE8">youtube</A> video.
       
   415   </p>
       
   416 
       
   417   <p>
       
   418   <B>Skills:</B> 
       
   419   In order to provide convenience for the lecturer, this project needs very good web-programming skills. A 
       
   420   <A HREF="http://en.wikipedia.org/wiki/Hacker_(programmer_subculture)">hacker mentality</A>
       
   421   (see above) is probably very beneficial: web-programming is an area that only emerged recently and
       
   422   many tools still lack maturity. You probably have to experiment a lot with several different
       
   423   languages and tools.
       
   424   </p>
       
   425 
       
   426 <li> <H4>[CU6] An Infrastructure for Displaying and Animating Code in a Web-Browser</H4>
       
   427   
   510   
   428 <p>
   511 <p>
   429   <B>Description:</B>
   512   <B>Description:</B>
   430   The project aim is to implement an infrastructure for displaying and
   513   The project aim is to implement an infrastructure for displaying and
   431   animating code in a web-browser. The infrastructure should be agnostic
   514   animating code in a web-browser. The infrastructure should be agnostic
   449   Good skill in lexing and language parsing, as well as being fluent with web programming (for
   532   Good skill in lexing and language parsing, as well as being fluent with web programming (for
   450   example JavaScript).
   533   example JavaScript).
   451   </p>
   534   </p>
   452 
   535 
   453 
   536 
   454 <li> <H4>[CU7] Implementation of a Distributed Clock-Synchronisation Algorithm developed at NASA</H4>
   537 <li> <H4>[CU8] Implementation of a Distributed Clock-Synchronisation Algorithm developed at NASA</H4>
   455   
   538   
   456   <p>
   539   <p>
   457   <B>Description:</B>
   540   <B>Description:</B>
   458   There are many algorithms for synchronising clocks. This
   541   There are many algorithms for synchronising clocks. This
   459   <A HREF="http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/20120000054_2011025573.pdf">paper</A> 
   542   <A HREF="http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/20120000054_2011025573.pdf">paper</A> 
   479   concurrency. You can do this for example in the programming language
   562   concurrency. You can do this for example in the programming language
   480   <A HREF="http://www.scala-lang.org/">Scala</A> with the help of the 
   563   <A HREF="http://www.scala-lang.org/">Scala</A> with the help of the 
   481   <A HREF="http://akka.io">Akka</a> library. This library enables you to send messages
   564   <A HREF="http://akka.io">Akka</a> library. This library enables you to send messages
   482   between different <I>actors</I>. <A HREF="http://www.scala-lang.org/node/242">Here</A> 
   565   between different <I>actors</I>. <A HREF="http://www.scala-lang.org/node/242">Here</A> 
   483   are some examples that explain how to implement exchanging messages between actors. 
   566   are some examples that explain how to implement exchanging messages between actors. 
   484   </p>
       
   485 
       
   486 
       
   487 
       
   488 
       
   489 <li> <H4>[CU8] Raspberry Pi's and Arduinos</H4>
       
   490 
       
   491   <p>
       
   492   <B>Description:</B>
       
   493   This project is for true hackers! <A HREF="http://en.wikipedia.org/wiki/Raspberry_Pi">Raspberry Pi's</A>
       
   494   are small Linux computers the size of a credit-card and only cost &pound;34 (see picture left below). They were introduced
       
   495   in 2012 and people went crazy...well some of them. There is a
       
   496   <A HREF="https://plus.google.com/communities/113390432655174294208?hl=en">Google+</A> community about Raspberry Pi's that has more
       
   497   than 150k of followers. It is hard to keep up with what people do with these small computers. The possibilities
       
   498   seem to be limitless. The main resource for Raspberry Pi's is <A HREF="http://www.raspberrypi.org">here</A>.
       
   499   There are <A HREF="http://www.themagpi.com">magazines</A> dedicated to them and tons of
       
   500   <A HREF="http://www.raspberrypi.org/phpBB3/viewforum.php?f=39">books</A> (not to mention
       
   501   floods of <A HREF="https://www.google.co.uk/search?q=raspberry+pi">online</A> material).
       
   502   Google just released a
       
   503   <A HREF="http://googlecreativelab.github.io/coder/">framework</A>
       
   504   for web-programming and for turning Raspberry Pi's into webservers.
       
   505   </p>
       
   506 
       
   507   <p>
       
   508   <A HREF="http://en.wikipedia.org/wiki/Arduino">Arduinos</A> are slightly older (from 2005) but still very cool (see picture right below). They
       
   509   are small single-board micro-controllers that can talk to various external gadgets (sensors, motors, etc). Since Arduinos
       
   510   are open-software and open-hardware there are many clones and add-on boards. Like for the Raspberry Pi, there
       
   511   is a lot of material <A HREF="https://www.google.co.uk/search?q=arduino">available</A> about Arduinos.
       
   512   The main reference is <A HREF="http://www.arduino.cc">here</A>. Like the Raspberry Pi's, the good thing about
       
   513   Arduinos is that they can be powered with simple AA-batteries.
       
   514   </p>
       
   515 
       
   516   <p>
       
   517   I have two such Raspberry Pi's including wifi-connectors and two <A HREF="http://www.raspberrypi.org/camera">cameras<A>.
       
   518   I also have two <A HREF="http://www.freaklabs.org/index.php/Blog/Store/Introducing-the-Freakduino-Chibi-An-Arduino-based-Board-For-Wireless-Sensor-Networking.html">Freakduino Boards</A> that are Arduinos extended with wireless communication. I can lend them to responsible
       
   519   students for one or two projects. However, the aim is to first come up with an idea for a project. Popular projects are
       
   520   automated temperature sensors, network servers, robots, web-cams (<A HREF="http://www.secretbatcave.co.uk/electronics/shard-rain-cam/">here</A>
       
   521   is a <A HREF="http://www.raspberrypi.org/archives/3547">web-cam</A> directed at the Shard that can
       
   522   <A HREF="http://www.secretbatcave.co.uk/software/shard-rain-cam-quantifying-cloudy/">tell</A>
       
   523   you whether it is raining or cloudy). There are plenty more ideas listed
       
   524   <A HREF="http://www.raspberrypi.org/phpBB3/viewforum.php?f=15">here</A> for Raspberry Pi's and
       
   525   <A HREF="http://playground.arduino.cc/projects/ideas">here</A> for Arduinos.
       
   526   </p>
       
   527 
       
   528   <p>
       
   529   There are essentially two kinds of projects: One is purely software-based. Software projects for Raspberry Pi's are often
       
   530   written in <A HREF="http://www.python.org">Python</A>, but since these are Linux-capable computers any other
       
   531   language would do as well. You can also write your own operating system as done
       
   532   <A HREF="http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/">here</A>. For example the students
       
   533   <A HREF="http://www.recantha.co.uk/blog/?p=4918">here</A> developed their own bare-metal OS and then implemented
       
   534   a chess-program on top of it (have a look at their very impressive
       
   535   <A HREF="http://www.youtube.com/watch?v=-03bouPsfEQ&feature=player_embedded">youtube</A> video).
       
   536   The other kind of project is a combination of hardware and software; usually attaching some sensors
       
   537   or motors to the Raspberry Pi or Arduino. This might require some soldering or what is called
       
   538   a <A HREF="http://en.wikipedia.org/wiki/Breadboard">bread-board</A>. But be careful before choosing a project
       
   539   involving new hardware: these devices
       
   540   can be destroyed (if &ldquo;Vin connected to GND&rdquo; or &ldquo;drawing more than 30mA from a GPIO&rdquo;
       
   541   does not make sense to you, you should probably stay away from such a project). 
       
   542   </p>
       
   543 
       
   544   <p>
       
   545   <center>
       
   546   <img style="-webkit-user-select: none; cursor: -webkit-zoom-in;
       
   547   "src="http://upload.wikimedia.org/wikipedia/commons/3/3d/RaspberryPi.jpg" width="313" height="209">
       
   548 
       
   549   <img style="-webkit-user-select: none; cursor: -webkit-zoom-in;
       
   550   "src="http://upload.wikimedia.org/wikipedia/commons/3/38/Arduino_Uno_-_R3.jpg" width="240" height="209">
       
   551   </center>
       
   552   </p>
       
   553 
       
   554   <p>
       
   555   <B>Skills:</B> 
       
   556   Well, you must be a hacker; happy to make things. Your desk might look like this:
       
   557   <center>
       
   558   <img style="-webkit-user-select: none; cursor: -webkit-zoom-in;
       
   559   "src="http://www.inf.kcl.ac.uk/staff/urbanc/rpi-photo.jpg" width="209" height="313">
       
   560   </center>
       
   561   </p>
   567   </p>
   562 
   568 
   563 <li> <H4>[CU9] Proving the Correctness of Programs</H4>
   569 <li> <H4>[CU9] Proving the Correctness of Programs</H4>
   564 
   570 
   565  <p>
   571  <p>
   604 </TD>
   610 </TD>
   605 </TR>
   611 </TR>
   606 </TABLE>
   612 </TABLE>
   607 
   613 
   608 <P>
   614 <P>
   609 <!-- hhmts start --> Last modified: Tue Aug  5 17:37:49 BST 2014 <!-- hhmts end -->
   615 <!-- hhmts start --> Last modified: Fri Sep 19 11:11:36 BST 2014 <!-- hhmts end -->
   610 <a href="http://validator.w3.org/check/referer">[Validate this page.]</a>
   616 <a href="http://validator.w3.org/check/referer">[Validate this page.]</a>
   611 </BODY>
   617 </BODY>
   612 </HTML>
   618 </HTML>