Simple web sites with GitHub Pages

5 Apr 2014

If you love git and GitHub, you’ll also love GitHub Pages, for producing websites using Markdown and git: you write pages in Markdown within a gh-pages branch in a git repository; when you push to GitHub, a corresponding site is automatically constructed.

Read the rest of this entry »

Startling lack of training in statistical computing

14 Mar 2014

It is shocking to me that a statistics department would offer a graduate-level statistical computing course only every fourth year.

I had been arguing for a statistical programming course: that we supplement the usual course on the theory of statistical computing (numerical linear algebra, EM algorithm, MCMC, etc.) with a course on the practice of statistical computing.

But I was assuming that the more theoretical statistical computing course was actually being taught.

If a department teaches a course at a frequency less than every-other-year, it’s unavailable to many students, or it comes too late in their training to be useful. And statistical computing should really be considered part of a statistics department’s core curriculum.

Update: As you might have anticipated, I’ve been asked to teach the course.

Googling errors

14 Feb 2014

@roguelynn tweeted the other day:

If attendees of this weekend’s intro to python workshop leave with one thing, it’ll be to Google your error messages first and foremost.

I had just talked about the technique in my Tools for Reproducible Research course, and I had a few recent examples.

Gtk-WARNING **: cannot open display:

I was logged into a department server, trying to clone a private repository from GitHub, and got an error like

(gnome-ssh-askpass:1731): Gtk-WARNING **: cannot open display:

I googled that, and the first item was a stackoverflow question, whose answer said “unset SSH_ASKPASS”, which totally worked.

except KeyError, k: raise AttributeError, k

AsciiDoc was giving me this error:

asciidoc -a data-uri -a toc -a toclevels=4 -a num example2.txt
  File "/usr/local/bin/asciidoc", line 101
    except KeyError, k: raise AttributeError, k
SyntaxError: invalid syntax

Google the “except KeyError” line, and you get to a Q&A on the AsciiDoc google group, which says “Asciidoc is Python 2, not 3.”

mclapply isn’t working in windows

I got a report that parallel processing in my R/qtl package wasn’t working in Windows.

I googled “mclapply isn’t working windows” (because mclapply was the function I was using) and got this stackoverflow page, which says:

since Windows does not have fork(), it will run standard lapply instead – no parallelization

Emacs key bindings in MS Word

12 Feb 2014

Collaboration on grant proposals has forced me to spend a lot of time writing in MS Word lately. I find my self typing emacs key strokes and then getting annoyed when I have to move my hand over to the arrow keys. (It’s maybe not as bad as typing Markdown marks within a LaTeX document, which I’ve also been doing.)

A google search on the title of this post got me to this post. I should have looked before.

Following that suggestion, I was able to get these:

C-b – CharLeft
C-f – CharRight
C-e – EndOfLine
C-p – LineUp
C-n – LineDown
C-a – StartOfLine
C-v – PageDown

I can’t figure out how to have M-v for PageUp, though, because M-v seems permanently stuck to “√”.

The procedure, in MS Word 2011 for Mac, is:

  1. Tools → Customize Keyboard
  2. Select “All Commands” under “Categories:”
  3. Select the command (e.g., RightChar) under “Commands:”
  4. Press the keyboard shortcut in the “Press new keyboard shortcut” box
  5. Click the Assign button
  6. Repeat for the other commands you want
  7. Click OK

I needed two more, C-d and C-k; it took me a while to figure out how to do it, as there didn’t seem to be any built-in commands. But you can just record a macro. I created these:

C-d – [DeleteCharacter] (as a macro)
C-k – [KillLine] (as a macro)

Here’s the procedure, in MS Word 2011 for Mac.

  1. Tools → Macros → Record Macro
  2. Give it a name with no spaces
  3. Click the keyboard button to assign a keystroke to it
  4. Select OK
  5. Type the set of key strokes
  6. Tools → Macros → Stop Recording

Womacs is a really extensive set of Visual Basic macros that looks really useful, but I was getting Visual Basic errors and didn’t want to spend any more time on it; grants to write…

Copyright of video lectures

9 Feb 2014

Quite a while back, I was wondering about copyright of video lectures produced by university faculty. In particular, did I need to get the university to sign some sort of waiver in order for the Jackson Laboratory to post a video of a lecture I’d given for a course there? (The Jackson Lab lawyers wanted that.)

I spoke to my family librarian, who pointed me to Carrie Kruse, directory of the College Library at UW-Madison. And really, librarians are the people to talk to about this sort of thing, as they not only think a lot about copyright and fair use, but also they’re on the side of more access. (But don’t hold Carrie accountable if I say anything wrong below; this is my own interpretation, 14 months after corresponding with her.)

In most jobs, the product of your work is owned by the company, even if they didn’t have anything to do with it. But universities have a different tradition. Typically, the university doesn’t assert any rights over a faculty member’s instructional materials. For example, if you write a textbook, you don’t have to negotiate with the university over its publication, nor do you have to give the university a cut of the royalty income. That’s different than patents.

UW-Madison has an explicit policy about faculty instructional materials. (Really, it’s a UW System policy.) As I understand it, the university will assert some rights over your instructional materials only if they had contributed special resources or support to their creation (for example, if university staff assisted you with the recording and editing of a video).

Returning to the video issue: since the university wasn’t involved in the production of the video, I didn’t have to get their okay.

Carrie mentioned another important thing to pay attention to: if I had used any photos or other media to which I don’t have rights, I need to be careful about their inclusion in videos posted online. Within a classroom, or in a video posted online but only made accessible to a defined group of students, inclusion of such material could fall under fair use. But if such material is included in a video that is posted online for general viewing, others may question my fair use claim.

That may explain why so many instructors here are using password-protected sites, like Learn@UW and Moodle. I can’t even look at my colleagues’ course material.

I dislike web pages via online forms. (Well, except for you, wordpress; I wish I’d started this blog with GitHub pages, but you’re okay.)

And I despise the password protection of instructional materials. If I spend a bunch of time preparing material, I want to distribute it as widely as possible. If another instructor uses it in their own class, I consider that a Good Thing.

I still don’t like it

9 Feb 2014

I got a book in the mail this week, a book I hadn’t ordered and would never have ordered. The publisher sent me a complimentary copy, as I’d reviewed the book proposal last year. (It’s the one where the author refused to allow me to have an electronic copy.)

Actually, I soundly trashed the proposal in my review. In the nicest possible way, of course. For example, I said:

And then there are things that are just plain wrong. For example, “We then express our confidence in the H0 with a p-value, which might crudely be considered the probability that the H0 is true.” That is not a crude interpretation of the p-value; that is just wrong.

It seems like if a reviewer says, “This particular book should not be adopted,” the publisher can interpret that to also mean, “and whatever you do, don’t send me a copy.”

knitr in a knutshell tutorial

6 Feb 2014

I spent a lot of time this week writing a short tutorial on knitr: knitr in a knutshell.

This is my third little tutorial. (The previous ones were a git/github guide and a minimal make tutorial.)

I’m pleased with these tutorials. In learning new computing skills, it can be hard to get started. My goal was to provide the initial motivation and orientation, and then links to other resources. I think they are effective in that regard.

I’ve gotten really excited about the tools for reproducible research. I think the main reason that statisticians have been so slow to adopt a reproducible workflow is a lack of training.

I’m hoping that these tutorials, plus the other materials that I’m putting together over the course of this semester, for my Tools for Reproducible Research course, will help.

But take a look at the material that Jeff, Roger, and Brian are developing for their Data Science MOOCs; you’ll see that mine are pretty humble contributions.

Things to avoid as a new faculty member

5 Dec 2013

The transition from graduate student or postdoc to tenure-track faculty member is hard. You discover that there are a ton of new things to learn.

Here are some thoughts on things to avoid.

  • You may see lots of ways in which your department could be improved; don’t try to fix all of them at once.
  • You may see needs for many new courses. Don’t try to develop all of them. Try to teach the same courses at least three years in a row.
  • Don’t agree to work with just any student who asks. While a good student can really help, a bad student can suck up all your time and energy. Students may be worried about money and feigning interest in order to get a research position, but if they’re not really interested, they won’t make much progress and it will be bad for both of you.
  • Don’t agree to collaborate with someone in the two weeks before a grant deadline. You might get stuck in a commitment with some total jerk. Find out if you’d really enjoy working with them, first.
  • Don’t agree to write a book chapter. It’s almost as much work as a formal paper, but not as many people will read it and it won’t count for much on your CV.

OMICS Keynote? No!

19 Nov 2013

I got the following email:

Dear Dr. Broman,

Greetings. Although we have not met, I believe that you know one of my colleagues [clip]. He regards you very highly, and after seeing your credentials I can understand why !

On behalf of the organizing committee, I am writing to invite you to be a keynote speaker at the 3rd International Conference & Exhibition on Biometrics & Biostatistics, which is scheduled for July 14-16, 2014, in Baltimore MD. Please see {} for the conference webpage and {} to view the program from the previous conference. Although the schedule for the upcoming conference has not yet been constructed, I anticipate that a keynote speaker will have approximately 40 minutes to talk. Moreover, my understanding is that the OMICS Group will waive the registration fee for a keynote speaker and will also cover two nights’ stay at the conference hotel.

Please let me know if you are available to participate.

Best Regards,

My response:

Dear [clip],

Thanks for thinking of me, but I must decline to participate.

I’ve only heard bad things about OMICS Group Conferences. They appear to exploit scientists desperate for recognition.

Consider the following posts about others’ experiences with OMICS Conferences:

The registration fee for the meeting is extraordinarily high ($800 now; $1000 after March 21), and looking at the agenda for the 2013 meeting, it’s hard to see how that could be worth it to anyone. Particularly odd is the session on Day 3 in which 4 of the 5 talks share the same title.


Fixing a font problem for XeLaTeX

11 Oct 2013

If the topic sounds boring, well, it is really boring. I write it down here in case it’s useful to someone.

I was working on a talk about git & GitHub, and chose a different font (Helvetica Neue, sort of the default Apple font). I think the default font for LaTeX/Beamer is a bit too tall and thin for slides. Here’s the default:

Slide with default font

And here’s what I wanted:

Slide with Helvetica Neue

But it didn’t work on unix

It worked fine with XeLaTeX on my Mac, but it wasn’t working in Unix, and I’d like the source to be portable to others.

XeLaTex was giving two errors:

Invalid fontname `Helvetica Neue', contains ' '
Font \zf@basefont="Helvetica Neue" at 10.0pt not loadable: Metric (TFM) file
or installed font not found.

It obviously wasn’t finding the font.

I futzed about for an hour, trying to figure out where fonts are located on my Mac, and where fonts are located on Unix, and doing various web searches. But no luck.

How I solved the problem

Finally, I read this post on fonts in xelatex, and following that set of ideas, I figured out what to do.

  • Switch to the TeX Gyre Heros font. It looks just like Helvetica to me.
  • Download
  • On unix, unzip the file (which contains eight .otf files) into ~/.fonts
  • On Mac, unzip the file, double-click the .otf files and select “Install font.” This uses the Font Book application.
  • In the .tex file, use \setsansfont{TeX Gyre Heros}

Not thoroughly tested, but it works on two systems.


Get every new post delivered to your Inbox.

Join 73 other followers