Title photo
frugal technology, simple living and guerrilla large-appliance repair

Regular blog here, 'microblog' there

Many of my traditional blog post live on this site, but a great majority of my social-style posts can be found on my much-busier microbloging site at updates.passthejoe.net. It's busier because my BlogPoster "microblogging" script generates short, Twitter-style posts from the Linux or Windows (or anywhere you can run Ruby with too many Gems) command line, uploads them to the web server and send them out on my Twitter and Mastodon feeds.

I used to post to this blog via scripts and Unix/Linux utilities (curl and Unison) that helped me mirror the files locally and on the server. Since this site recently moved hosts, none of that is set up. I'm just using SFTP and SSH to write posts and manage the site.

Disqus comments are not live just yet because I'm not sure about what I'm going to do for the domain on this site. I'll probably restore the old domain at first just to have some continuity, but for now I like using the "free" domain from this site's new host, NearlyFreeSpeech.net.

Tue, 29 Jan 2019

Video: Introducing Mozart's Clarinet

Principal clarinetist Antony Pay of the Orchestra of the Age of Enlightenment demonstrates and discusses the clarinet as it existed in Mozart's time. This five-key instrument is what a musician would have used to play Mozart's Clarinet Concerto in A at the time it was composed.

Videos: From the clavichord to the modern piano

David Schrader explains how keyboard instruments evolved from the clavichord to the modern grand piano.

And yes, he does play them:

Sat, 12 Jan 2019

My article on SICP and HtDP was linked on Hacker News, and here's what I said in the comment thread

I went to Hacker News, as I do, and I found an article I wrote some time ago linked in the feed.

In case you need to know more before you click, here is the title of my original article on the books Structure and Interpretation of Computer Programs and How to Design Programs: If not SICP, then what? Maybe HTDP?.

The Hacker News link prompted a very long discussion.

Here is what I wrote in that thread:

I'm the author of the original blog post, and I wanted to say that SICP, as well as HtDP, and even a book like Robert Sedgewick's Computer Science (https://www.amazon.com/Computer-Science-Interdisciplinary-Robert-Sedgewick/dp/0134076427/). are in a completely different category than more mainstream how-to-program books (like anything from O'Reilly, Manning, No Starch, Pragmatic Programmers) and even the other popular college texts like Y. Daniel Liang's Introduction to Java Programming and Data Structures (https://www.amazon.com/Introduction-Programming-Structures-Comprehensive-Version/dp/0134670949/) or the book in my intro class, Tony Gaddis' Starting Out with C++: Early Objects (https://www.amazon.com/Starting-Out-Early-Objects-9th/dp/0134400240/).

Supposedly all of these books assume (or at least allow for) no background in programming, but I think the reality is that taking SICP or even HtDP into the intro class at a non-elite university or a community college would be a complete non-starter and/or abject failure.

What I'm trying to say is that there is a place for both of these approaches: A deep look into computer science, and the nuts and bolts of basic "get it done" programming.

Should both of these things happen in a single class, or series of classes? I think the answer is yes. But how to do that and not leave non-elite students back on the road is another matter.

I believe that the HtDP authors think that the "domain-specific knowledge" required of SICP was a barrier.

And I also understand how advanced CS students think that a class focused on how to manipulate strings, use loops, deal with variables of various types, and work with basic logic in the context of a specific computer language is NOT computer science.

But in my view, most students -- and all average students -- need to crawl quite a way, then walk, before they can run.

Even Sedgewick's Computer Science, which focuses on Java and has a wealth of great questions/assignments all along the way, could really be a barrier to students who aren't steeped in math and science. I learned some math while going through the book, but I didn't learn so much programming. Liang's approach might be too basic for someone who has already done years and years of programming but is way more approachable for those who have not.

My guess is that many professors tried SICP and had a very poor rate of success. I fully support a selective class that says, "this is very hard, but you will learn a lot and look at the world in a different way, and if you really want to understand computer science, this is the class for you."

But there also needs to be more of a gateway class for future programmers (not necessarily graduate-school-bound CS majors) that eases them into the world of writing code. Offering the basics and sneaking in some CS seems better than doing it the other way around.

In a way, it's like the difference between carpentry and architecture. You can teach people who want to build houses how to design them, but at some point they're going to have to get out a saw, hammer and nails and make something happen.

What I'm trying to get at here is the idea that computer programming and computer science are different things taught in different ways. It's possible and probably advantageous to teach both at once, but there's quite a devil in those particular details, and nobody seems to be happy with how it's done. The CS-first, math-problems-out-front approach has the potential to alienate non-elite students and should probably be restricted to those who know what they're getting into.

Wed, 09 Jan 2019

I have a new domain

I have a new domain, and I'm wondering what to do with it. I'm thinking about using it on DigitalOcean.

Migrating this blog to https

There's really no reason to migrate this blog from http to https, but I'm doing it anyway. At least temporarily.

My hosting company now supports free SSL out of the box without requiring you to purchase a certificate. Let's Encrypt made it stupid for them to hold out. They probably got 100 requests a week to install Let's Encrypt certificates, and they were actually charging money to do that.

I made the required changes in my .htaccess file.

Two things didn't work. I could probably live with both, but they can be fixed.

I run this site using Ode, and I modifed my ode_config file to include https. That was easy.

First, I am already redirecting a cgi script to a folder (so the .cgi path doesn't show).

But when I added the rules to 'force' https, they broke when forcing https on the root directory.

What I mean is that a reader who typed in stevenrosenberg.net/blog would instead get the formerly hidden path to the .cgi file.

I solved that with a permanent redirect in the .htaccess.

Here is what I have in .htaccess right now:

RewriteEngine on
RewriteRule ^blog/?(.*)$ /cgi-bin/ode.cgi/$1 [QSA]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*) https://stevenrosenberg.net/$1 [R=301,L]
Redirect permanent http://stevenrosenberg.net//cgi-bin/ode.cgi/ https://stevenrosenberg.net/blog
Options -Indexes

That worked for this blog, but it broke some other things unrelated to it.

The change from http to https also broke comments by Disqus, which sees this as a full URL change. If I stayed with https, I would have to migrate my "old" comments to the new https entries and change the configuration for Disqus to allow for new comments.

At the moment this site isn't a big comment magnet, so I'm going to put this part of the migration on hold until I am sure I want to stay with https. This site is a blog with zero interactivity besides the Disqus comments, and that doesn't really make https a necessity. I'm not asking you for any information whatsoever. Only Disqus does that, and either you trust them, or you don't.

Maybe https prevents some kinds of attacks on this site, but if it goes pear-shaped, I'll notice, and that could happen any number of other ways. In some sense, https could be giving people on all sides a false sense of security. But if all goes right (and, axiomatically, nothing goes wrong), https adds some measure of security.

Update: I turned https off again. It broke a bunch of non-Ode things I have on this domain, and it's just not worth it. For future projects, I will use https, but for now this domain is better without it.

Using Fedora Modularity in Fedora 28

Modularity is one of the big new features in Fedora 29, but it's also available in Fedora 28.

What is Modularity? As the project leader says in Fedora Magazine:

Modularity lets us ship different versions of packages on the same Fedora base. This means you no longer need to make your whole OS upgrade decisions based on individual package versions. For example, you can choose Node.js version 8 or version 10, on either Fedora 28 or Fedora 29. Or you can choose between a version of Kubernetes which matches OpenShift Origin, and a module stream which follows the upstream.

I want Node.js 10 instead of v.8, so I figured I'd try it out. I'm still running Fedora 28. I haven't upgraded yet. The upgrade from F27 to F28 didn't go so smoothly that I'm eager to do it just yet.

If you want to try Modularity in F28, it helps to read the docs.

First you have to enable the Modular Repository:

$ sudo dnf install fedora-repos-modular

Then you can check for available modules:

$ dnf module list

I like to live on the edge, so I'm going to install Node.js 11:

$ sudo dnf module install nodejs:11

That worked, and now I have Node.js 11. Remember, read the documentation -- that's how I got this far.