October 10, 2020

Finally got the first comments submitted to this blog and.. they’re spam by bots. Oh well! If you fancy leaving a real comment, feel free.

Today I had much of the day to myself as the family went to Mrs C’s parents for dinner and due to the “Rule of Six” I get to stay at home. I used this time getting a few chapters into Introduction to Algorithms by Cormen, Leiserson, Rivest and Stein, a somewhat intimidating textbook aimed at computer science students, and something that has sat in my library for years.

I’m trying to broaden my horizons somewhat more lately and while I have read quite a few academic papers in my time, I’ve never really slugged through a textbook of this size in the CS space due to all the mathematics I’d need to pick up.

To be honest, I needn’t have worried so much. Despite being a famously long textbook, Algorithms doesn’t just dump you into a land of mathematical equations and symbols but explains most of what it’s trying to say in plain English first. Luckily the first few chapters have mostly covered things I’m already familiar with:

  • The basics of algorithm efficiency
  • Loop invariants
  • Insertion sort and proving the correctness of an implementation
  • Analyzing the run-time of an algorithm
  • Calculating worst case and average case running times
  • Considering the growth of running time in terms of asymptotes
  • Incremental vs divide-and-conquer algorithms
  • Recurrence (not a concept I had considered academically before, but basically the idea of recursive complexity)
  • O(n) vs Ω(n) vs Θ(n) – was familiar with the first but filling in the gaps was useful here. O provides an asymptotic upper bound, Ω the lower, and Θ is for more generally referring to non-asymptotic running time which lies, beyond some point, between two constants, such as k1 and k2 here:

I’ve paused at chapter 4 where we begin to analyze a maximum-subarray problem as all of the above was more than enough for an afternoon.

Later in the evening I read Bite Size Python by April Speight which I received a few days ago. It’s very much a beginner-focused book and really to people of a younger age at that. Despite knowing most of what was in it, it was fun to browse and work through and I think it’ll be a good introduction to Python for many. I might do a video review going into a little more depth sometime. Furthermore, it’s fantastic to see a programming book by a Black author and I think this is worth supporting as the more voices we have in the programming space, the better things can be.

I also did some experimentation with https://www.nearlyfreespeech.net/ – a host that’s been around offering “pay as you go” hosting since 2002. It’s an unusual host in many ways but if you want to put up a basic Web page somewhere for cheap, its feature set is compelling. I’m using it to explore the ideas of running “serverless” functions in a more primative cgi-bin style environment than modern serverless environments tend to be. Partly as a joke, but.. there may be mileage in it.

Leave a Reply

Your email address will not be published. Required fields are marked *