Skip to main content

C'est la Z

Lanternfish and lots of data (AOC 2021 Day 6)

Today we had to model the growth of the lanternfish population (problem here). Lanternfish spawn new lanternfish every seven days. The trick is that the original starting population consists of fish at different points in the cycle. For instance, if your input data was 3,2,4 then each fish would spawn a new fish in three, two, and four days respectively. The new fish would set their timers to 8 and start counting down to their spawn date on the next day and the original fish would reset it's timer to 6.
# COMMENTS

One man's complex is another man's simple (AOC 2021 Day 5)

Yesterday I wrote about the virtues of a simple straightforward solution as opposed to a super "clever" one. Today reminded me that what seems simple to one person might be clever to another. Having successfully survived bingo with a giant squid, Today's challenge had us navigating our sub so as to avoid dangerous parts of the ocean. We were given a bunch of lines represented by endpoints as input.
# COMMENTS

Working code is better than clever code (AOC 2021 day 4)

I always tell my students that the cleverest program is worthless if it doesn't actually work. There are always some kids in class that all too often try to write the fanciest solutions. They're the ones that write int l(char *s){return !*s?0:(l(++s)+1);} instead of something like: int string_length(char *s){ int i = 0; while (s[i] != 0){ i=i+1; } return i; } to calculate the length of a string.
# COMMENTS

Work through the example!!!!!

It's that time of year again. Yep, you got it. Time for Advent of Code. I'm not feeling nearly as motivated as in past years but so far so good. Finished the first three days. Today I got a good reminder - work through your examples. You can find today's problem here. For part 1 you got a list of binary numbers and had to figure out how many ones and zeros there were in any given digit.
# COMMENTS

Seats on a plane - addendum

While my last post was well received, I did have a few conversations where people asked why I did this with such a seemingly minor ethical issue. They wondered that with issues the Facebook algorithm, bail and sentencing algorithms, gerrymandering and other issues dominating the ethical conversation, why focus this topic around something that seems to affect far fewer people and might not even be such a big deal. After all, when it does come up, flight crews can probably ask a few people to shuffle seats and voila, problem solved.
# COMMENTS

Airline Seats - An Ethics Lesson

I've held off on sharing any details on my Ethics in CS class because I wanted to wait until some of it ran. I didn't want to talk about a topic and then find out that after we covered it I was all wrong. Now that we're well into the semester, I think it's time to share a few things. One of my premises when I designed the course was that most ethics courses are taken by either people who already have religion or people who see it as the "easy course" without programming.
# COMMENTS

Using Emacs Episode 80 Vertico, Marginalia, Consult, and Embark

In today's video, we'll take a look at a few new completion frameworks for Emacs. For years I've been using Ivy and have been very happy with it but since I decided to rebuild my Emacs config from scratch I thought I'd try the new kids on the block, Selectrum and Vertico along with some support packages. I've liked Ivy from day one and still do. To be honest, from a day to day point of view, I didn't notice much difference between Ivy and the newcomers but I do like their philosophies - they're supposed to be simple and minimalist and focus on the Emacs completion API without extending it.
# COMMENTS

Turning 54

So, tomorrow, October 19, is my birthday. The big 5 4. Okay, maybe it's not a traditionally big one. It doesn't end in a zero or a five but I think it rates. Why? Because it's one shy of 55. That's the magic age when I can retire collect my pension should I choose to do so. It's what you get when start young and put in over 30 years of service.
# COMMENTS

Feeling like an English teacher

So I'm teaching my Ethics and CS class for the first time. I originally designed the course but didn't teach it the first time around. That honor went to my friend, Master Teacher Topher Mykolyk. He of course did an amazing job - impossible to follow. Fortunately, this is a different cohort so they don't know how great Topher was for the course :-). Even though I have the syllabus and Topher's notes from last time around, first time through is very week to week but I think I'm starting to get my legs under me.
# COMMENTS

Using Emacs 79 Project

One of the comments on my last video talked about the new project management support Emacs includes in it's latest version - project.el. I remembered reading about it when it rolled around but then forgot and never checked it out. Up until recently when working in projects I used Projectile, a great package by Bozhidar Batsov, also known as Bug. I only used it when doing development work - that's when I find myself jumping around within a group of related files.
# COMMENTS