Mailund on the Internet

On Writing, Science, Programming and more

  • OOP example in C

    I’m writing the chapter on function pointers in my C pointers book, and I want a nice example of how you can use them to implement rudimentary object-oriented programming with dynamic dispatch.

    Read more…
  • Reference counting lists in C

    I was playing with reference counting garbage collection last week, for something I want to add to my C pointers book. That chapter is still far in the future, and moving further into the future as the book seems to grow in front of me, but one day I will get to it.

    Read more…
  • Joys of Hashing

    I forgot to post about it when The Joys of Hashing came out, but it is never too late to blow my own horn. It is out and you should get it.

    Read more…
  • Generators in C

    Now that I am almost done with The Joys of Hashing, I am looking at the material I made last year for our Genome-scale Algorithms class. I implemented a toy read mapper as an example for the final project.

    Read more…
  • Elegant Scipy

    I was a little disappointed about this. I had hoped it would give a good overview of Scipy, but instead, it is a bunch of examples that use it. It is not that the examples aren’t interesting.

    Read more…
  • Seeing Further

    I also finished Seeing Further: The Story of Science, Discovery, and the Genius of the Royal Society yesterday. I found this a mixed back. When I bought it I thought it was a Bill Bryson book—I like those—but if I had checked the description just a little bit I would have seen that it is only edited by Bryson.

    Read more…
  • The Power of Habit

    In the weekend I finished The Power of Habit. This is a very interesting book. Duhigg writes about how we are run by habit to a degree I had not imagined.

    Read more…
  • Exercises (CT Chapter 9)

    Exercises Missing element You are given a sorted array, A. It contains n - 1 of the numbers from 1 to n. You should find the missing number. You can use the property that for all numbers i less than the missing number you have A[i] == i, while for all i larger than the missing number you have A[i] == i - 1.

    Read more…
  • Slides (CT Chapter 9)

    Here are some slides for chapter 9 of Introduction to Computational Thinking. Slides Handouts Handouts with notes

  • Erratas

    To my utter shock, it turns out that I am not perfect. There are mistakes in my books! A couple of readers made me aware of a typo in Functional Programming in R.

    Read more…