Posts in "notes"

Why Study Functional Programming?

Learning functional programming is an opportunity to discover a new way to represent programs, to approach problems, and to think about languages.

I’m interested in functional programming. It might be time soon to sit down and start wrapping my head around it.

Link

Why I Hate Frameworks

So you don’t have any hammers? None at all?

This is a perfect explanation of what’s wrong with modern web development. Scary thing is it was written in 2005.

Link

Performance comparison - counting words in Python, Go, C++, C, AWK, Forth, and Rust

A basic solution reads the file line-by-line, converts to lowercase, splits each line into words, and counts the frequencies in a hash table. When that’s done, it converts the hash table to a list of word-count pairs, sorts by count (largest first), and prints them out.

A fascinating read, and the results are surprising. For example, I honestly would have thought the pure Unix implementation would be faster than tested. It also surprises me that Swift is so slow. I wonder if someone who knows the language well could produce an optimized version for this sorting problem.

Link

More shell, less egg - All this

Relating to the previous link, I can’t believe I’ve never posted a link to this Dr. Drang classic about Donald Knuth and Doug McIlroy’s differing approaches to the word counting problem.

Knuth wrote his program in WEB, a literate programming system of his own devising that used Pascal as its programming language. His program used a clever, purpose-built data structure for keeping track of the words and frequency counts; and the article interleaved with it presented the program lucidly. McIlroy’s review started with an appreciation of Knuth’s presentation and the literate programming technique in general. He discussed the cleverness of the data structure and Knuth’s implementation, pointed out a bug or two, and made suggestions as to how the article could be improved.

And then he calmly and clearly eviscerated the very foundation of Knuth’s program.

Classic.

Link

What Would Happen If We Slowed Down?

If you worked deeply and regularly on a reasonable portfolio of initiatives that move the needle, and were sufficiently organized to keep administrative necessities from dropping through the cracks, your business probably wouldn’t implode, and your job roles would likely still be fulfilled. This shift from a state of slightly too much work to not quite enough, in other words, might be less consequential than we fear.

This reminds me of initiatives to cut down to a 4-day work week. If I remember correctly, tests have shown that productivity does not go down, and workers have a better quality of life.

Link

Habits, UI changes, and OS stagnation | Riccardo Mori

Riccardo Mori posting last month on how macOS has stagnated roughly since Lion.

And with Mac OS it feels like its journey is over, the operating system has found a place to settle and has remained there for years. Building new stuff, renovating, rearranging, etc., but always on site, so to speak.

This reminds me of a post I wrote in 2018 about some features I’d love to see in the Mac. I’m still waiting for anything I wrote about to be shipped.

Link