I’ve been writing in the Ruby language since sometime in 2002, but if I was looking for a job, I don’t know enough to call myself a ruby programmer. I don’t know rails or anything of the other cool things people do with ruby. I’ve learned to use gems, but haven’t bothered to learn how to write them myself.
But I’m not opposed to learning. I just haven’t gotten around to it yet.
Or so I thought. Then I ran into rubocop, which is a sort of linter and style cop. Those can be helpful, so I thought I’d give it a try. And it’s mostly good. Except it’s opinionated, and some of their opinions are wrong. For example:
the indentation should be four spaces, not two.
parallel assignment is the bomb
I use double quotes (") pretty much everywhere I’m not forced to use single quotes (').
You need space inside parentheses (although I will grant the extra whitespace is less important with syntax highlighting than without it).
And if I’m declaring a RE that’s so complicated I’m using /x flag, then don’t tell me to use /.../ instead of %r<...>.
And speaking of which, go ahead and use $1 and $' when retrieving the results of an RE match. (In moderation.) Honestly, this is a tie. Go ahead and use named groups if you want to.
But you can’t fight city hall. If some younglings want to make Ruby over in the style of Python, well, that’s a crying shame. Ruby is supposed to occupy the perfect spot between Perl and Python. But these kids today! If they’re on your lawn, you might as well go along with their misguided project. And that brings us to rufo, the ruby reformatter. You can use it to do like 10% of the things that rubocop whinges about.
I just saw it. It’s the best superhero movie I’ve seen in years, probably since Wonder Woman. The third act was only okay, but even so, it was significantly better than Avengers Endgame or Infinity War, Thor Ragnarok, or Guardians of the Galaxy 2. The mid credit scene detracted from this movie, at least for me, although my companion thought it was an enhancement.
For a long time, I’ve been in the habit of installing Xcode on Macs, even though I wasn’t developing software. (Partly because I wasn’t sure what I needed to run Fink/MacPorts/Homebrew, and partly because I think FileMerge is pretty sweet, even if it’s the last thing on this list of features.) But lately, the typical Xcode update is like 7 GB, and I just don’t need it.
So I wanted to know how to get rid of these monstrous downloads. And I found out. First, you get rid of Xcode. But that’s only step one:
$ cc xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist Use sudo xcode-select --switch path/to/Xcode.app to specify the Xcode that you wish to use for command line developer tools, or use xcode-select --install to install the standalone command line developer tools. See man xcode-select for more details.
I’ve been learning (or maybe beginning to learn) the Rust programming language. (It was a toss-up between that and Go, and I probably picked wrong, but I won’t know until I know a lot more than I do now.)
I’m only beginning to play with these. But I was surprised to see so much activity developing command line utilities. There is some misunderstanding of the Unix philosophy, but it’s understandable (cat isn’t for viewing files, but of course that’s how most of us use it). Yay open source!