My name is Vince Knight and I'm a lecturer in Operational Research at Cardiff University with interests in game theory and queueing theory. I'll be using this blog to post about various things mainly including math and software...
www.vincent-knight.com
I've just finished screencasting, editing and uploading 21 videos to a playlist on +YouTube.
Quite frankly I'm exhausted (I started this morning), it's been a long day and I'll be happy to not have to drag another 'Ken Burns' effect boundary box around for quite a while...
Anyway, the videos are for a new course I'm teaching our +Cardiff University first year undergraduates. LaTeX has never actually been on the curriculum before and I'm throwing it in at the end of a long term (where students will mostly be learning Python and +Sage Mathematical Software System).
There are a bunch of really really great LaTeX tutorials all over the web but I thought I'd put together really short videos (the longest is around the 4 minute mark but all the others are less than 2 minutes) that just show syntax. By watching these videos no one will be a LaTeX expert (that's where the other tutorials come in).
The other particularity of these videos is that I've done them entirely using +writeLaTeX (https://www.writelatex.com/) which is a great cloud based LaTeX environment. If you don't know about writeLaTeX take a look at this great video by +John Hammersley (1 of the guys behind +writeLaTeX):
The great advantage of writeLaTeX is that I can include 2 links in the description of every video I've put together:
1. A link that creates a blank document so that anyone watching my video can right then and there try out the code.
2. A 'read only' link to the actual document I used during the video. Once this document is being viewed anyone can choose to make a copy of it so that they can play with the actual finished article.
For example: here's the video showing how to include inline mathematics:
I'm hoping this will all be quite helpful to my students and in particular encourage the use of LaTeX by removing certain difficulties that some have with the installation process.
I'm also making these videos public in case they might be helpful to others (a large chunk of the videos I've put together for the programming aspects of this course are 'Unlisted' as I don't think they'd interest anyone).
There are a couple of other cloud based LaTeX environments out there (sorry for mentioning them here +John Hammersley!) including the 1 that is a part of the ridiculously awesome https://cloud.sagemath.com/. At the moment though, the user friendliness and amazing response to users (on G+ +writeLaTeX are extremely helpful) makes this an ideal tool for learning LaTeX.
One of my most viewed videos on +YouTube is the following (briefly demonstrating how to import csv files in to +python):
I'm in the middle of preparing various teaching materials for an upcoming class on coding for mathematicians. I'm teaching this class in a flipped classroom (if you don't know what that is circle +Robert Talbert on G+ who posts a lot of great stuff about it) and as a result I've been screen casting a lot recently. Some of these clips are solely intended for my students (as I don't believe they'd be of interest to anyone else 'to do this exercise try and think about what your base case would be for the recursion to terminate'). I'm just starting to screen cast for the +Sage Mathematical Software System part of the course and needed to put together a little something as to how to import data in to a Sage notebook. As the above video seemed quite helpful to people I thought I'd put together another one that might be helpful.
import csv
f = open(DATA + 'reg', 'r') # Open the data file using the special DATA variable
data = csv.reader(f)
data = [row for row in data] # Read data using csv library
f.close()
data = [[row[2], row[1]] for row in data[1:]] # Only use data that is of interest, remove unwanted columns and 1st row
a, b = var('a, b') # Declare symbolic variables
model(t) = a * t + b # Define model
fit = find_fit(data, model, solution_dict=True) # Find fit of model to data
model.subs(fit) # View the model
p = plot(model.subs(fit), 5, 11, color='red') # Plot fit
p += list_plot(data) # Plot data
p
I am still understanding IBL but it is one of many teaching methodologies that use a constructivist model (here's a post by +Dana Ernst about an article that claims that these approaches aren't that great). I have spoken about constructivism before when reviewing a great education book. The basic concept of constructivism is that students need/should learn through a personal 'construction of the concepts'. IBL does this by giving students the reigns to the direction and also the discovery of the content of a course (I am sure +Dana Ernst, +Theron Hitchman and others could either forgive me or correct my brief summary).
This is often done (although not exclusively, take a look at +Bret Benesh's post) done through the use of student presentations and generally needs a non-lecture based approach: which is difficult with a large number of students!.
Theron's post on G+ got a lot of comments with people offering advice and +Bret Benesh wrote a nice blog post suggesting a peer learning approach.
I thought I would throw in my two cents as I have recently designed a new course that made use of peer learning.
The course is a statistical programming course on our MSc programme here at +Cardiff University.
You can see all the resources for the course here.
To deal with large teaching numbers in that class (this was the first year of running and it had 27 students but I certainly believe that my approach is scalable and I designed it thinking that I'd have 40+ students at times). I used a peer learning approach based on flipped classrooms, problems and with a hint of IBL thrown in.
First of all it took a lot of preparation. I flipped the class completely putting together a full set of notes as well as a full set of videos (you can see them on the site).
I made groups of 3/4 out of all the students.
For every topic, I put together a set of problems that all the groups where told they had to complete. I called these 'challenges' (it seemed a bit snappier) and you can see them on the course website.
Every class (this course was taught in 8 sessions over a 4 week period) started with the me asking who would like to present a solution to the challenge.
The students were aware that their final mark for the course would take in to account participation in these presentations but I made it clear that the corresponding contribution would be mainly based on the fact that they tried and not necessarily how good a job they did. In essence I did not really care whether or not they managed to do the challenges, I just wanted them to work on it!
By the beginning of the 5th session, students were happy to present and needed no gentle nudging from me. In fact some of the students who presented started off by saying "I didn't manage to do this but this is what I tried". Seeing that students got that it was ok to not succeed at something was really great to see. Whenever that happened the students would start discussing amongst themselves how to do a particular problem: and would teach each other!
Throughout all of this, I would sit at the back of the room and vary rarely say anything at all. At times I would perhaps nudge a bit with a "does anyone know a different way to do that?".
One of my favourite memories of the course was towards the end when at the beginning of one session I did not prompt the students to start the class. All of them were just chatting amongst themselves (not about the course) and I was sat at the back observing. After a while one of the students turned around and looked at me questionably. I just smiled. She got up, told everyone that they should get started and the class started teaching itself. That day I didn't actually say anything.
I think this happened to work well because the challenges were designed in such a way so that students were lead through the curriculum but given the nature of the course I also made sure that they had plenty of resources with which they could practice things further.
I encouraged the students to find other resources then the ones I put together and also encouraged them to share their solutions with each other after each session (I believe they used a dropbox folder but I emphasised that I would stay out of the way).
The whole course culminated with one of the assessments being a presentation where the students (still in their group) had to teach me something that was not in the resources made available to them. I wrote about this here and one of the things a group put together was this cool gif of the Mandlebrot set:
I'm currently going through a teaching certification process and have blogged about it many times. You can see my various portfolios [here](http://www.vincent-knight.com/home/teaching/pcutl) but if I am to take only one sentence from everything I've done so far it would be this pretty cool definition of teaching:
"To create learning opportunities."
I believe that teaching in a constructivist framework does exactly that and I really hope that large classrooms do not dissuade educators from using it :)
Anyway, what I hoped would be a perhaps helpful post for +Theron Hitchman ended up just being another page or two of me rambling on...
This is the fourth post in a series of posts reflecting on the teaching and learning in a recent course I've taught on SAS and R. This post will be quite different in nature to the previous posts which looked at students choices between SAS and/or R in their assessment:
Here I would like to talk about how I deliver teaching materials (notes, exercises, videos etc) to my students.
All of the teaching materials for the course can be found here: drvinceknight.github.io/MAT013/. How they got there and why I think it's a great place for them to be will be what I hope to discuss... A Virtual Learning Environment that was not as good as alternatives.
At +Cardiff University we have a VLE provided that is automatically available to all our students that all lecturers are encouraged to use. So when I started teaching I diligently started using the service but it had various aspects that did not fit well with my workflow (having to upload files on every change, clunky interface that actually seemed optimised for IE and various other things). It was also awkward (at the time, I believe that this has been addressed now) for students to use the environment on smart phones etc...
As an alternative, I setup a very simple website using google sites and would use +Dropbox's public links to link pdfs and other resources for my students. An example of such a delivery is these basic Game Theoretical materials. This gave me great control, I no longer had to mess around with uploading versions of files, every change I made was immediately online and also as the site was pretty simple (links and pdfs) it was easily accessible to students on all platforms (I could also include some YouTube videos). An immediate consequence of this approach is that my materials are all publicly available online.
To anyone, our students or not. The first thing I did was check with +Paul Harper: the director of the MSc course that I was only teaching on at the time that this was ok. We chatted about it a bit and were both happy to carry on. My main train of thought was that there are far better resources already available online so mine might as well be. (I've subsequently checked with our School's director of learning and teaching and there's no internal regulations against it which is nice to know about +Cardiff University)
There is a huge amount of talk about open access in research (I won't go in to that here) but less so to some extent in teaching. I did find this interesting newspaper article that ponders as to "Why don't more academics use open educational resources?". This offers a good general discussion about open education resources.
I would feel very very humbled if anyone chose to actually use my resources. I'm at the early part of my career and am still learning so I don't think that will happen anytime soon but there is another more important benefit to having my teaching stuff online for everyone.
I always post about any new courses I'm working on, on G+ and am grateful to get a fair bit of feedback from other academics around the world. This in itself gives me a certain level of confidence in front of my students who know that what I'm teaching them is verifiable by anyone in the world. I've often changed a couple of things based on feedback by other academics and I think that's brilliant. To some extent my teaching resources are not just reviewed by a couple of peers in my university but also by anyone online who might be interested in them.
(It would be great if research worked this way too)
Through G+ (I've posted about how awesome a tool G+ is as an academic personal development tool) I learnt about git and github. If you don't know about git watch this video by +Zoë Blade is very helpful:
After a while I jumped in and starting using it. After a little longer while I found out that you can use github to host a website:
Using this I it is really easy to put together a very basic website that has all the teaching materials. The added benefit is that the materials are now all in a github repo which opens them up even more (using dbox, only the pdf files were in general in view) whereas now everything is (md, tex source files etc...) and theoretically if anyone wanted to they could pull etc...
I'm certainly not the first person to put teaching stuff up on github, (watching people like +Dana Ernst, +Theron Hitchman and various others do it is what made me jump in).
The github repo for my R and SAS course can be found here and here are some other teaching things I have up on github (with the corresponding webpage if I've gotten around to setting it up):
To finish off here are the various reasons I have for putting my teaching stuff up on github:
Openness:
my students know that this is viewable by everyone which hopefully gives the resources a level of confidence;
people on G+ and elsewhere are able to point out improvements and fixes (if and when they have time);
Access: the sites are really simple (basic html with links) so they can be viewed on more or less anything;
Ease of use: I don't have to struggle to use whatever system is being used. If it's an option I kind of refuse to use stuff that makes me less efficient (an example of this is our email system: I use gmail). At the moment the system I like is github + git.
I wrote a blog post (which is the most read thing I've ever written - online or offline - I think) showing how to combine various things like tikz, makefiles, +Sage Mathematical Software System etc to automate the process of creating a course site so I'll put a link to that here.
I'm in the middle of putting together a new course for our undergraduates at Cardiff University. The course is called 'Computing for Mathematics' and will introduce our first year students to programming in general (using python) as well as how a mathematics package can help them during there degree (we'll be using +Sage Mathematical Software System which is a natural extension from python and is also super awesome).
I was prepping some stuff on recursion (which I'm really looking forward to teaching to our mathematics students given the connection to induction) and came across a bunch of posts stating the lack of speed generally associated to recursion:
I thought I'd write some (python) code to see how much slower recursion was. All the code (and data) is in this github repo.
Binary search
The first algorithm I thought I'd take a look at was binary search. I tried to write each algorithm in as basic a way as possible so as to allow for the best possible comparison.
Iterative
Here's the algorithm written iteratively:
def iterativebinarysearch(target):
"""
Code that carries out a binary search
"""
first = 0
last = len(data)
found = False
while first <= last and not found:
index = int((first + last) / 2)
if target == data[index]:
found = True
elif target < data[index]:
last = index - 1
else:
first = index + 1
return index
Recursive
And here's the algorithm written recursively:
def recursivebinarysearch(target, first, last):
"""
Code that carries out a recursive binary search
"""
if first > last:
return False
index = int((first + last) / 2)
if target == data[index]:
return index
if target < data[index]:
return recursivebinarysearch(target, first, index - 1)
else:
return recursivebinarysearch(target, index + 1, last)
return index
The experiment
I timed 10 runs of each of these algorithms on data sets of varying size, for each size choosing a random 1000 points to search. The data is all available in this github repo.
Here's a scatter plot (with fitted lines) for all the data points:
A part from the fact that binary search seems very good indeed, there's not that much going on here apart from perhaps a slight tendency for iterative approach to be a bit slower.
I decided to take a look at the mean time (over the 1000 searches done for each data set):
This seems to show that the iterative approach is slow but again it's not very clear. This is mainly due to the fact that I haven't done any clever analysis. The data sets are pretty big (10,001,000 data points plotted in the 1st graph and 10,001 in the 2nd) so to do anything really useful I'd have to take a look at the data a bit more carefully (the two csv files: 'recursivebinarysearch.csv' and 'iterativebinarysearch.csv' are both on github).
I thought I'd try a 'simpler' algorithm as there are perhaps a bunch of things going on with the binary search (size of data set, randomness of points chosen etc...).
Computing Factorial
The other algorithm I decided to look at was the very simple calculation of $n!$.
Iteration
Here's the simple algorithm written iteratively:
def iterativefactorial(n):
r = 1
i = 1
while i <= n:
r *= i
i += 1
return r
Recursion
Here's the algorithm written recursively:
def recursivefactorial(n):
if n == 1:
return 1
return n * recursivefactorial(n - 1)
The experiment
This was a much easier experiment to analyse however as the timings increased I thought it would also be interesting to look at the ratio of the timings:
We see that first of all the iterative algorithm seems to perform better but as the size of $n$ increases we notice that this improvement is not as noticeable. My computer maxed out it's stack limit so I won't be checking anything further but I wonder if the ratio would ever get bigger than 1... (This data set: 'factorial.csv' is also on github).
I'm sure that there's nothing interesting in all this from a computer scientists point of view but I found it a fun little exercise :)
This is the third post is a small series of posts reflecting on my teaching in a new class (all teaching materials can be found here) introducing students to SAS and R on our MSc course. The two previous posts have so far just been a reflection on student's attitudes towards each piece of software.
In the first of those posts I said how I was slightly surprised at how students had chosen to use SAS for 1 particular question where they had the option of the language. In my opinion it was a problem much easier to tackle with R (all the course works, class tests etc can be found on this site). I also mentioned in that post how I asked students which language they preferred. Almost all students answered that it depends on the task (which is a great answer) but after pushing them for a particular decision a strong majority seemed to prefer R. I posted on G+ recently about a particular interaction I've had subsequently with a student which seemed to confirm this attitude of needing to find the correct tool for the correct job.
In the second post I described how students in their group presentations (asking them to teach me something I had not taught them) mostly evaluated SAS v R for certain tasks. It was great to see them identify strengths and weaknesses for each language.
This post is about their choices in their individual coursework.
Similar to their class test (which I discuss in the first post of this series) there was a question which allowed students to choose a language in this individual coursework component of the class (which can be found here).
In my opinion this question made use of quite a big data set (generated by some research I'm currently doing) and I thought it would probably be simpler to approach in SAS. About 52% of the class agreed with me whilst 48% seemed to still prefer R. First of all, I could be wrong and R could indeed be better suited for this question, secondly it might also be a reflection of the personal preferences that the students seemed to indicate when I asked: most students seemed to prefer R. If the latter is the case then I suppose it's nice to see that students not just realise that there's a better tool for a given job but also a better tool for a particular person doing a given job. I'll be keeping a track of this over the years and see how (if) it changes.
In my next post in this series I'll start to reflect on some of the teaching methodologies I used.
This is my second post in a series of posts (the first one is here) about a SAS/R course that I've recently finished teaching to MSc students at +Cardiff University.
I taught this course using a hybrid of flipped classrooms / IBL (although I'm cautious when using the term IBL as I'm not entirely sure my approach fits with any variation of Moore's methods). I gave students access to all the content of the class before hand (including notes, exercises and a series of screencasts - all the materials are here if they're of interest). The students were then given "challenges" and had to deliver their solutions to as presentations to the other students in the class. The aim of this was to get the students to teach themselves/each other and quite often I would not actually have to say much at all during a class (this allowed for a better use of 'me' by the students during the lab sessions).
In the previous post I described how students chose to use SAS and/or R in their class test. Most students chose SAS despite displaying a preference for R when asked.
The above is 1 of 3 assessments that the students have had to go through. This post is about the second assessment: a group presentation. In this presentation I asked students to teach an aspect of SAS or R that had not been covered in class (you can see the brief here).
I believe that this is a particularly important thing to assess as I in no way can pretend to teach them everything. It's important that they know how to learn new things that they might need in their career.
I was expecting groups to select a particular language and then a particular topic but interestingly most groups chose to look at both languages and compare strengths and merits.
I had 6 groups and here are the subjects that they looked at:
Time series forecasting: both in SAS and R;
Principal component analysis: both in SAS and R;
Random sampling: both in SAS and R;
Survey sampling (in SAS) and the creating a gif of the Mandelbrot set (in R);
Scorecard building in SAS;
Mapping and spatial analysis: in R.
The 3 groups who carried out a single thing in both SAS and R did a good job of describing strengths and weaknesses of both languages. It was a pleasure to see and again reassures me that an important message has gotten across to the students which is that there is not 1 best tool but an appropriate tool for a particular job.
I'm planning on putting the code/slide up for these talks for them to serve as resources for students doing the course next year but I want to wait till I've marked their final piece of work and asked the students if they mind. In the mean time I'll repost this gif of the Mandelbrot set made by 1 of the groups (I thought this was cool!):
I still want to write generally about the teaching/learning methods in this class and will do that later but if it's of interest my PCUTL portfolio is available here and in there I describe and justify a lot of what I'm doing.
I'm going to be writing a couple of posts looking back at a class I've taught that's just coming to an end (at the time of writing this I've got one more group presentation to see).
The course teaches SAS and R in parallel on our MSc course (if it's of interest all the teaching materials are here).
I'll be blogging about this class as I taught it a bit differently to the usual "Students Listen - Teachers Lecture" style. I'll get back to that more in future posts (although a lot of what I've done is in my PCUTL module 2 portfolio).
The purpose of this post will be to briefly discuss two questions that were on my class test that I feel give some (very shallow) information as to how the students experienced the course. (The class test was made of 4 questions: q1 - a simple task to be performed in both SAS and R, q2 - a task in SAS, q3 - a task in R and finally q4 - a task in either language.)
The class is taught over 5 weeks:
Week 1: Introduction and basic statistics
Week 2: Data manipulation
Week 3: Programming
Week 4: Extras (for example we take a look at proc optmodel and ggplot2).
Week 5: A 2 hour class test
The first question on the class test (you can see it here) asked the students to rank their enjoyment of each week (the purpose of this question was to give them a nice easy starting point). So a ranking of 1 implied a favorite week while a ranking of 5 implied the least favorite.
This plot shows the mean ranking given to each week:
This data and the following discussion should be taken with no implied rigour: I'm not analysing this too closely and also students might just have written down any sequence of rankings without thinking about things too much (this was after all a test).
First of all it does seem that the students enjoyed the class test the least (which I guess is to be expected).
Secondly, it looks like the first week was perhaps less enjoyed in general.
I think this is also to be expected, I taught the class in a way that I don't believe would have been familiar to the students (I tried to encourage them to teach each other and themselves) so perhaps that first week was just a bit too unfamiliar. I'll try and rectify that in future years (if only by pointing students to what students from previous years did).
Now for the second point.
By design I hope that the students learn how to carry out various programming tasks in SAS and R seeing the strengths and weaknesses of each language as they go. The last question of the class test (again here) involved a bit of data manipulation on small data sets and I believe that the main difficulty was that this question did not force a language on the students. In essence choosing the language was the most important point of the question.
My personal approach would have been to use R for this particular question but interestingly most students chose SAS. Some used a combination (often starting in SAS before realising that perhaps R was better suited which led to a bit of a clumsy hybrid). On average SAS was used by 77% of the students for question 4 (some of which managed the task very well!).
During the group presentations I've been asking students afterwards a "this does not count" question (ie making it clear that there's no wrong or right answer to this and that I'm simply interested/curious):
'If you were starting a consultancy company tomorrow but could use only one package: ether SAS or R which would you pick?'
The really pleasing thing is that almost all of the students miss the constraint in my question and immediately reply something like:
"It depends on the kind of consultancy we'll be doing."
I re-iterate the constraint (after telling them that that's the actual right answer :)), I'd say that a majority of students seem to prefer R. Perhaps the biais towards SAS in the class test was due to the conditions (time was short) but overall it's been nice to see that most students realise that it's about finding the right tool for a particular job.
I'm yet to see the individual course work that they'll be handing in this week, which is of a very similar format. I wonder which language they'll have picked for Q4...
In a previous post (which is by far the most popular thing on this blog which is mainly due I believe to a kind retweet by +John Cook and SciPyTip) I describe the makefiles I use to write large documents containing Tikz diagrams and +Sage Mathematical Software System plots in multiple formats (pdf, html and docx) using markdown and pandoc.
This is a short follow up post to fix one minor thing. In the previous post if you created hyper links in your markdown file (say pointing to another markdown document, which for my purposes was multiple chapters in some teaching notes) then all the formats (pdf, html and docx) would all point to the same format.
Here's a slight modification of the pandocipy_given_file.py script (from the previous post) which will use sed to replace the .md to the relevant format in all links.
#!/usr/bin/env python
from sys import argv
from os import system
e = argv[1][:-3]
print e
system("sed 's/.md/.html/g' %s > tmp" % (e + ".md"))
system("pandoc -s tmp -N -o " + e + ".html --mathjax")
system("sed 's/.md/.docx/g' %s > tmp" % (e + ".md"))
system("pandoc tmp -o " + e + ".docx")
system("sed 's/.md/.pdf/g' %s > tmp" % (e + ".md"))
system("pandoc tmp -N -o " + e + ".pdf --latex-engine=xelatex")
system("rm tmp")
This script creates a temporary file (tmp- this is actually important to make sure that the makefile doesn't think that you're recurrently changing the md files) that sed makes sure has the correct format for each link and pandoc can use to get the required files. For example the sed 's/.md/.html/g' command will replace all instances of ".md" with ".html". If you're not familiar with sed it's a *nix program that allows you to do find and replace in files "easily" (it's still a bit of voodoo to me). The script can be used by simply typing:
python pandocipy_given_file.py file.md
(Which assumes that file.md has all links sending to other md files.)
I use this script in the makefile as I did in the previous post:
The final line of that file is not relevant to this blog post but it just runs a python script that will generate the website for the course (which is still a work in progress!). That python script doesn't do anything fancy but it goes in to each Chapter document for example and reads the Chapter title which it uses to write the index.html file. All this allows me to modify a given md file and simply run make to update the website file.
If any of this is of interest the github repo is here.
Note that in this particular case the links being "format loyal" is mainly useful for the `html` files to the general audience. The loyal links in pdf and docx format are mainly useful to me as all the paths are relative to my setup. I'm posting this again so that I don't forget it but also in case it's useful to others (you can obviously use sed to replace other things).
So I've posted before on multiple occasions about PCUTL which is a higher education certification process I'm currently undergoing. One of the things I paid particular attention to in my latest portfolio (a copy of which can be found at the previous link) is accessibility of teaching notes.
Generally this implies making sure students have notes in a format that they can easily manipulate (for example change font size and color). This is often implied to mean that notes should be written in .doc format. As a mathematician this isn't really an option as all our teaching material really requires to be written in LaTeX.
I have spent some time being amazed by pandoc which is a really smart piece of software that allows you to take documents in various languages and output to a variety of other languages. Here's a video I made showing how I use like to use pandoc to get notes in html,pdf and .docx format (I wrote a blog post here about it):
My entire SAS/R programming course I'm currently teaching was written this way (you can find the notes etc here).
I've recently started writing a new course: a game theory course.
This course needs a bunch of diagrams and plots (as opposed to the previous that basically had a bunch of screenshots). I wanted to use the same overall system but planned on using tikz for the diagrams (tikz lets you draw nice diagrams using code) and perhaps thought about using sagetex (I use +Sage Mathematical Software System a lot but have never used sagetex which lets you have sage code inside of a LaTeX document) for the plots.
After searching around for a bit I didn't see how I was going to be able to use the awesome pandoc to create teaching notes in multiple formats using the above approach. There was no way for pandoc to take the tikz code and output a separate image file for the html (and whatever it needs for .docx).
This blog post is a summary of my approach.
Which basically uses a couple of things:
Some tikz code that creates a standalone pdf image;
A script that converts a pdf to a png (so that it can be used in html);
A makefile so that I can recompile only the tikz code that needs to be recompiled;
That is how I get my tikz diagrams.
I also have a similar system to create plots from sage and I'll also show the makefile I use to get pandoc to sort out the files I want.
Creating standalone pngs with tikz and makefiles
To create a standalone tikz image you need to use the standalone document class. Once you've done that you can just use normal tikz code:
The above for example creates the following standalone image (note that if you pdflatex it you obviously get a pdf which would be great if you were just pdflatex'ing a bigger document but I'll get to creating a png next):
I've then written a short python script (I'm sure this could be done as easily in bash but I'm just more comfortable in python) that can act on any given tex file to convert it to png:
#!/usr/bin/env python
from sys import argv
from os import system
system("pdflatex %s" % (argv[1]))
system("convert -density 300 %s.pdf %s.png" % (argv[1][:-4], argv[1][:-4]))
This makes use of convert which is a program that can convert pdf to png (more info here but it's natively on Mac OS and *nix I believe).
I call that python file convert_tex_to_png.py and so I can convert any tex file by doing: python convert_tex_to_png.py file.tex
I'm going to put all these image files (tex and png) in a folder called images and there's (now that I'm done) about 70 image files in there so every time I change or write a new tex file I don't want to compile all the files and I also don't want to have to waste time compiling the particular file I've written.
So I've used makefiles.
Now I've tried to use makefiles before but in all honesty they confuse the heck out of me. I spent a while going through a bunch of tutorials but most of them look at c code. For those who don't know, a makefile is basically a short program that gives instructions to compile certain files. When written well these are great as by simply typing make you can recompile any file that has been modified (and not necessarily all of them!).
So here's the makefile I've converged to using (after heuristically trying a bunch of stuff from stackoverflow):
I save the above file calling it `makefile` so that it is run by default when calling `make`. This will take all the tex files (that have been modified) and output the corresponding png files as required. Note I can also type make clean to remove all auxiliary files (aux, log and pdf).
I find this really useful as I can modify a bunch of tex files and once I'm ready simply run make to get all the pngs as required.
I'll briefly show the (basically same) code I use to get plots from sage as standalone pictures.
Creating standalone pngs with sage and makefiles
I put all the plots created via sage in a plots directory. Here's an example graph created with sage:
The sage code to do that is here:
f(a,b)=a^3/3+3/4*b^2+(1-a-b)^2/2
p = contour_plot(f,(0,.5),(0,.5),colorbar=True,axes_labels=["$\\alpha$","$\\beta$"],contours=100, cmap='coolwarm',fill=True)
p.axes_labels(['$\\alpha$','$\\beta$'])
p.save("L18-plot01.png")
The makefile (which will keep all png files up to date based on the sage files in the directory):
(I can similarly use make clean to remove the .py files that get created when running sage in cli).
The final thing I'll show is how to write a makefile to get pandoc to output the required file formats.
Using a makefile with pandoc
So I write all of my notes in markdown. For various reasons which include:
Pandoc likes markdown as input (it can also handle tex and html though);
I like markdown;
I can incorporate latex in markdown when needed.
If a student ever wanted to modify the markdown but didn't know LaTeX they'd have an honest chance of knowing what was going on (if you don't know markdown it really is worth taking a look at this short video)
Thus my makefile must be able to compile all modified markdown files. I use a similar approach to the approach I had for tikz diagrams which is to write a short python script:
#!/usr/bin/env python
from sys import argv
from os import system
e = argv[1][:-3]
print e
system("pandoc -s " + e + ".md -N -o " + e + ".html --mathjax")
system("pandoc " + e + ".md -o " + e + ".docx")
system("pandoc " + e + ".md -N -o " + e + ".pdf --latex-engine=xelatex")
(pandocipy_given_file.py is the name of the above python script).
There are basically three pandoc commands going on there. The first creates the html with the LaTeX math being rendered by mathjax, the second creates the .docx format and the last one creates the pdf (using the xelatex engine).
The final piece of the puzzle is to use the following makefile:
The way that makefiles work (I think) is to indicate what files you want as an output (and what those files are dependent on). So for example my previous makefiles wanted to output pngs with tex and sage files as dependencies. Here I use the required output as html and the dependencies are the md files.
Using the above I can change any md file and simple type make to get all the pdf, html and docx files updated.
Summary and a couple of things I don't want to forget
I have 3 directories here. The first: Course_notes contains the md files and corresponding python script and makefile. Course_notes also contains 2 other directories: images and plots which both contain the images and plots as I've described above.
So in the md files I refer to an image as so:

I'm using pdf as the prescribed format of the notes for the course (students are welcome to use html and docx if they wish but I'm recommending pdf) and in general xelatex will sometime move images around to better format the text.
To make sure things don't get confusing I want to be able to \ref and \label images. The easiest way I've found to do this without messing around with the html (who knows what happens with docx, life is too short to worry about everything) is to use the \text:
In the excellently drawn image shown\text{ in Figure \ref{C01-img03}} we see that...

Pandoc is clever enough to simply ignore what is in the \text when converting to html and docx so that you get documents in html and docx that won't have a reference to the figure (but in general they won't reorder the images) and the pdf will have the documents referenced as you can see in these screenshots (showing pdf and html):
pdf:
html:
I've mainly posted this to make sure I remember how to do it but it might be helpful for others. I'm sure it could be improved by getting rid of my python scripts and having everything in the makefile. I tried that but had a hard time getting wildcards to work as I did so I didn't try anything more complicated. Finally there are ways to get makefiles to run makefiles in subdirectories so it would be nice I guess to also do that so that a single `make` in the highest directory would sort out everything.
I'll be putting all the teaching notes up on github so will link to that repository when I've done it.
I've just finished putting the finishing touches to a course that I'm teaching with a flipped classroom approach which required me spending a fair amount of time putting together some screencasts and various other resources (the class website can be found here).
That's now done and the course is about to start. I'm more or less immediately starting to work on a course I'm teaching next academic year: a 3rd year undergraduate game theory course. I currently teach some basic game theory on our MSc course which just covers some normal form game stuff. I'm really looking forward to prepping and teaching this course.
I've actually compiled a list of 19 books but some of those I have on my kindle so here's a picture of some of the actual books:
To get started I thought I'd compile a list of books that could be of interest to the students. I have read a lot of these, flicked through some and am more or less aware of the existence of others. I thought I'd categorise some of these and might well at some part start reviewing them (similarly to my previous blog series which was ultimately inspired by +Theron Hitchman's series of posts reviewing differential geometry books). The 3 categories are:
Helpful books to deal with the content of the course;
Interesting books to delve in to further concepts from the course;
Other cool books.
1. Helpful books to deal with the content of the course
The course is an introductory course to game theory looking at concepts such as normal form games, evolutionary game theory and games with incomplete information. Here's the books that I feel could prove helpful to students:
2. Interesting books to delve in to further concepts from the course
Here are some books that could be of further interest to the student, perhaps considering a certain aspect of the course in detail and/or looking in to other things:
For my pcutl portfolio we have recently been considering inclusivity and diversity. One particular issue that has grabbed my attention is distribution of teaching materials. In particular some students (some with Dyslexia for example) find reading plan black on white pdfs difficult. As such they'd rather have notes in a format that they might be able to modify.
As a math teacher there's not much we can do about distributing pdfs made with LaTeX apart from making the LaTeX code itself available.
I looked around a bit and discovered pandoc which is awesome. It allows you to create multiple formats of any particular file. I discussed this with my pcutl group at some point and here's a pic of the main idea we put together:
This works pretty well and I've been using it for a while. In particular it's great for mathematics as pandocs "flavour" of markdown allows for LaTeX.
It started taking me a while to "bash" my way through "pandocing" all my files in any given folder so I wrote a python script that will take all markdown files in a particular directory and spit out html, pdf and docx versions of the file.
In this post I won't be reviewing any particular piece of literature. In fact this post will be the last one in this series as I've run out of time and momentum. I spent the past week working like crazy on my pcutl portfolio and so I didn't have the time to blog about some of the texts I've read through.
In this post I'll simply list some literature that I'd have liked to blog about if I had the time.
That is just a small selection of papers and books, I'm sure I'm missing out a bunch of excellent ones that were pointed out to me on G+ and elsewhere.
I thought I'd also include a section on blogs. There are some awesome bloggers around that post some great stuff about education, I most certainly will forget a bunch of great ones but here they are (where possible I've also linked to their G+ profile, that's probably where I met them).
In all the posts of this series I gave a mark out of 10 to each paper as far as usefulness to my PCUTL portfolio is concerned. Without a doubt the most useful piece of literature is "Approaches to Learning: A Guide for Teachers" by Jordan et al.. I really recommend that book: it's great.
This is the second book I'm reviewing in this series:
This book looks at various aspects of teaching in 3 parts:
Identifying good teaching;
How to practice good teaching;
How to develop as a teacher.
Those three parts go across various chapters and everything in this book is informed from interviews with university teachers that have won awards recognizing their excellence:
44 instructors from Australia
18 instructors from Hong Kong
The whole book is basically a bunch of observations sprinkled with interview quotes. It's nice to read.
Here's a list of the Chapters:
Introduction
Method
Generalisability of perceptions of quality in teaching
Aims
What to teach
How to teach
Motivating students
Planning courses and lessons
Teaching large classes
Managing discussion and group work
Ways of encouraging active learning
Assessment
Influences on good teachers
Obtaining feedback
Conclusion
There first thing I quite liked in this book is that despite the large number of teachers considered and also the 2 different cultural aspects it was apparently possible to identify a bunch of common concepts of "good teaching".
"In Chapter 4 we established that the award-winning teachers believed that teaching was a process of facilitating student learning."
My PCUTL mentor Cath put this quite nicely at the beginning of the whole process when during a discussion she summarised:
"Teaching is creating learning opportunities"
So after spending some time going over common principals of good teaching. The book goes in to details about various aspects and day to day details. For example in Chapter 12 various aspects of assessment are considered and at one point the book considers "Peer assessment of contribution to group project". This section of the book interested me quite a bit as it's something I've been looking in to with +Paul Harper, it's nice to have some quote from teachers who use group evaluation forms. Here's what Stephanie Hanrahan a Sport Psychology lecturer from Queensland says:
"When I first started doing group assignments basically everyone in the group got the same mark and of course that didn't go over well if one student was carrying everybody else or whatever. Now I get each person in the group to fill out a group evaluation form."
There are various other aspects of teaching that are considered in the book such as the use of technology, using problem based learning and various other things (looking at the Chapters should give an indication as to what is considered).
The final part of the book looks at how these good teachers "came in to existence":
"Many if not most, academics started their teaching careers with no formal training in teaching. Most of the existing university courses for new teachers are recent introduction."
The main conclusion from this part of the book in my opinion is that it takes time to become a good teacher and there are various ways of getting there which include influence from other teachers, feedback from students and a bunch of other stuff.
Conclusion
Big fan of this book. It covers a lot of aspects and as it's recent a bunch of these teachers are "around" so this book feel very relevant. A bunch of good references and ideas.
Here's my "PCUTL Mark" out of 10 which I'm using to say how useful this piece of literature is to me in the scheme of my pcutl portfolio (so it's not meant as a reflection of the quality of the paper which is subjective):
In the fourth post in my series I described briefly some of the learning models presented in "Approaches to Learning: A Guide for Teachers". One of the pedagogic models very well described in that book is Behaviouralism, and one important contribution to Behaviouralism is Bloom's taxonomy.
Bloom's taxonomy is a model that attempts to link external and internal behaviour (a feature lacking in classical Behaviouralism which only considered external stimuli as having an effect on learning). What bloom did was put together various levels of learning. Here's the Cognitive skills:
Knowledge
Comprehension
Application
Analysis
Synthesis
Evaluation
This document by Shorser (if my memory serves me correctly passed on to my by +Paul Harper) maps the above general taxonomy to mathematics.
The document first of all lists the above levels, describing them. It then goes on to list some keywords for evaluating each of them. For example: Knowledge - "List" and Evaluation - "Rank".
The final part of the document gives some examples of questions for each level of learning.
Conclusion
This is a handy little document to have if only to use as a cheat sheet (so to speak) when setting exam questions and evaluating students learning.
Here's my "PCUTL Mark" out of 10 which I'm using to say how useful this piece of literature is to me in the scheme of my pcutl portfolio (so it's not meant as a reflection of the quality of the paper which is subjective):
PCUTL Mark: 5 (Not extremely useful for PCUTL but a great reference document)
I'm a huge G+ fan. Ever since a friend of mine got me an invite (in the early days it was invite only) I've been an active user. I've written a blog post about my use of G+ from the point of view of an academic and it can be found here. I use G+ to talk about research but I've also recently started to use it in teaching, happily enjoying some interactions with students on their and finding it an easy way to share relevant content with my class (in my last class more than 60% of my students viewed my posts on G+ before class).
This paper offers a comparison of the educational potential for 3 social networks:
Facebook (which I'm no longer on since G+ came about)
Twitter
G+
The paper starts by describing some prior research looking at social media and education, for example a study by Junco et al. showed that students who engaged with twitter for various 'academic related discussions' achieved amongst other things better gpas.
A table is offered comparing the various social networks. It is noted that Facebook and G+ offer various similarities (as opposed twitter). In particular highlighting that they both have "recipient control". I haven't used Facebook for a while so not too sure what is now in place to offer that but G+ is entirely about controlling who sees what (which is why it's my particular social network of choice).
The paper carries on to describe a variety of interactions that were had through G+ between teachers and students but also students and students. The paper briefly discusses the use of Hangouts for virtual office hours.
The paper ends by describing some recommendations for the use of social networks in a teaching environment:
"Establish guidelines for using social media within your course" (Help the students make use of the service)
"Define acceptable policies" (Set boundaries for what is legitimate collaboration)
"Model desirable behaviour and usage" (Teachers should be active: paving the way)
Conclusion
I thought this paper was pretty good. From a biased point of view (again I'm a huge G+ fan) it was nice to see G+ in educational literature. On a disappointing note, the ever changing face of social networks means that this paper is slightly outdated already. For example the recent introduction of 'communities' in G+ is not considered in the paper. I plan on using communities in my next class as a way of directing open information.
Here's my "PCUTL Mark" out of 10 which I'm using to say how useful this piece of literature is to me in the scheme of my pcutl portfolio (so it's not meant as a reflection of the quality of the paper which is subjective):
The book looks at various aspects of learning, indeed the early chapters talk about various pedagogic models as well as educational philosophy. It is well written and has a great conclusion section at the end of every chapter highlighting some of the main ideas and implications for educators.
Here's a list of the Chapters (I'm not going to get sued for that right?):
Philosophy of education
Behaviourism
Cognitivism
Constructivism
Social Learning
Cultural Learning
Intelligence
Life course development
Adult learning
Values
Motivation
The learning body
Languages and learning
Experiential and competency-based learning
Blended learning
The future
As you can see it covers quite a lot of stuff. The first chapter describes Educational Philosophy and covers ideas such as Empiricism and Socratic dialog. I enjoyed reading this chapter quite closely as I hadn't thought philosophically about education in a rigorous way before.
"Even in distance or online learning contexts, it is important to create a learning environment that allows for the possibility of multiple interpretations in order to guide learners towards a better understanding of concepts."
I liked the quote but asked if it was relevant to Mathematics, is there room for interpretation in the meaning of a theorem?
+Theron Hitchman responded by saying that in fact he often discussed the interpretation of everything in class, including theorems (Theron, I apologise for paraphrasing you). I thought that was pretty cool as it must be an immediate way to gain feedback as to the understanding of theorems (not just their proofs).
I've read the first 4 chapters pretty closely and there are some great things in there. In particular I think it's helped me identify myself as a Social Constructivist and I like the idea of a Zone of Proximal Development described by Vygotsky.
I've actually attempted (with quite a low level of confidence) to "summarise" the first 4 chapters in the following picture:
There's obviously far too much in this book for me to review it in further details but other chapters I though were interesting included the blended learning chapter which talks about the use of technology in the classroom (although most of the stuff in there is pretty basic I feel). The final chapter talks about what the Teacher of the future "will be". I won't say anymore but I'll just put down one quote that I thought was awesome:
"If knowledge can be accessed in a multiplicity of ways, then learners will choose teachers for their ability to engage, both with the knowledge and the learning. It will require a different set of aptitudes from the teacher, requiring artistry rather than a set of technical skills. Teachers will have a role in motivating learners through personal coaching, and in scaffolding support learners in their personal projects. Teachers will be freed from knowledge transmission or duplication, to act as critical friends and guides for learners."
Conclusion
I think this book really is great. Lots of stuff in there looking at various aspect of teaching and learning. Further more each chapter has a bunch of other references which prove the book to be a great reference text to have on my bookshelf (shame that there's no kindle edition...).
Here's my "PCUTL Mark" out of 10 which I'm using to say how useful this piece of literature is to me in the scheme of my pcutl portfolio (so it's not meant as a reflection of the quality of the paper which is subjective):
PCUTL Mark: 9 (As far as utility to my portfolio is concerned, I doubt I'll find more useful as I need to specifically consider various pedagogic models which are all nicely explained in this book.).