Mailund on the Internet

On Writing, Science, Programming and more

  • Scoping Rules and NSE

    Earlier this week, I wrote some tweets about how you have to be careful about scopes when you do non-standard evaluation. I cover this in both Metaprogramming in R and Domain-Specific Languages in R, but this tweet Comprehensive overview of NSE. Should be of interest to @ThomasMailund @MilesMcBain @_ColinFay and @edwin_thoen — Deemah 🇺🇦 🇳🇴 (@dmi3k) September 17, 2018 made me write about it again—only this time in a twitter thread. Well, I say thread—I don’t actually know how to do that, it seams; I just replied to the tweet a bunch of times and apparently that doesn’t make a thread, it therefore my reply was hard to read.

    Read more…
  • Slides (CT chapters 3 and 4)

    I played around a little with my slides for chapter three of Introduction to Computational Thinking and made slides for chapter four. It takes surprisingly long to make these; I had expected to be done with the five chapters I use in my class this year a few weeks ago but I still have three chapters to go. I won’t run out of time—I have plenty of time to make slides between the first and last lecture—but it is eating into time I really should be using on The Joys of Hashing where a deadline is coming up. Anyway, here are the slides—let me know if you spot any obvious errors so I can fix them before my lectures.

    Read more…
  • Exercises (CT chapter 3)

    I have cleaned up the exercises for chapter three of Introduction to Computational Thinking. I’m still not exactly sure how best to provide them to my students, or if I can figure out some way to automatically test answers so they can be more interactive, but I have listed them below. I have listed my answers below the exercises, so if you want to do the exercises, then stop in time. As always, if you have comments or criticisms, or just suggestions for more exercises, I’m dying to hear. Below or above Here’s a game you can play with a friend: one of you think of a number between 1 and 20, both 1 and 20 included.

    Read more…
  • Complexity Exercises

    In the second lesson that I teach in our Computational Thinking in Bioinformatics I cover algorithmic complexity. It is chapter four in my (draft) book on the topic: Introduction to Computational Thinking. I have put exercises and my answers to them on GitHub. I still haven’t figured out the best way to give them to the students yet, but the can always read them on GitHub and download the source files where needed. Anyway, I know I always make mistakes both in phrasing the exercises and in answering them—not always substantial errors, but still. So if you have some time left and if you are interested in the topic, I would love to hear if there any obvious mistakes.

    Read more…
  • Slides for Computational Thinking (Chapter 3)

    I’m teaching four weeks of a class called Computational Thinking in Bioinformatics this year (the other weeks are taught by colleagues). It is this class that got me started on my book on the topic: Introduction to Computational Thinking. I have finished the chapters I need for the class—chapters three, four, five, seven and nine—but there is still a looong way to go before the book is done. Anyway, I am not writing on the book these days, but make slides for the lectures. That takes surprisingly long time. I have grown used to having slides to pick and choose from for any lecture, but I am starting from scratch here.

    Read more…
  • The Coming Storm

    If you are a member of Audible—and if you like audiobooks I think you should be—then they now give you two of six selected books for free every month. They call this Audible Originals, and while you only get six books to choose from, I am not complaining about getting something for free. I got two books, The Coming Storm by Michael Lewis—read by the author—and Emma by Jane Austen (I guess)—which I guess is an audio drama. I haven’t listened to it yet. I just finished The Coming Storm. It is pretty short, just a tad over two hours, so I finished it on my walk to and from work yesterday and today.

    Read more…
  • Premarkdown Plugins

    I’m working on a preprocessor for Markdown documents. I write all my books in Markdown, so this is something I have wanted to do for a while, to scratch a few itches I have. I write my books in Markdown and then I process them using Pandoc. If you are not familiar with that setup, then I have written a short book on the topic: The Beginner’s Guide to Markdown and Pandoc. For that book, because it is very short, I just have a single Markdown document containing the entire book, but usually, I have one file per chapter. Pandoc doesn’t handle that, but you can cat the files before you convert the Markdown source to PDF or ePUB documents.

    Read more…
  • Fluent Python

    I just finished reading Fluent Python. This is a really nice book on Python programming. It is not an introduction to Python programming, and it is not about specific packages, such as SciPy or Scikit-learn. Rather, it covers Python topics you might use in day-to-day programming and explains how you would write code in the most Pythonic way. Well, it covers mostly stuff you would use in everyday programming. It also covers co-routines and meta-programming; topics I do not expect you would use every day. From time to time, yes, but not every day. If you find that you need it, though, the coverage in Fluent Python is excellent.

    Read more…
  • New Books Page

    I have set up a page for the books I have written. Nothing fancy there, it is just a list together with the cover text, but it does collect all my books on one single page. I’m thinking of putting one sample chapter per book here. I need to check with my Apress contracts, but I believe I can do this as long as it is less than 10%.

  • New Blog

    Ok, so, I have had a lot of problems with keeping Wordpress and various plugins up to date on my old blog. Considering that I don’t write a whole lot of posts there, I decided that it simply wasn’t worth the effort. On top of that, the account I had on Aarhus University’s computers, where I could ssh into a file server and put pages in public_html, will soon be removed. They are simply phasing out those computers, because few really use them any more, and while I could keep ssh access to a virtual account, I don’t think it is worth the bother to do this just to keep a homepage.

    Read more…