I Must Be Doing It Wrong

I’ve started this post several times, and still can’t figure out a clear path. I feel frustrated with the situation, and I don’t know enough to be able to make progress. Sometimes, writing a blog post helps me organize my thoughts so that I can see a way forward. So far, no luck. Once more, with feeling!

The Goal: learn to use Ruby and Rails.

Why: I would like to help an organization by working on software to solve their problems. To do that, I need to be familiar with the tools.

Continue reading “I Must Be Doing It Wrong”

It Writes Itself

Lotus is making an electric SUV.

My mother will probably crack up when (if) she reads that. Ars Technica is kind of excited about it, but man. You know how the Ford Pinto was really well known for exploding when it got rear-ended? So, what if, on the heels of that, Ford was all, “Okay, we see where this is going, so the next thing we’re going to build is a fuel tanker.” Go ask someone who was into cars in the 1970s about how good the electrical systems were in Lotus cars.

Electrical systems aside, I’m still coming down on the WTF side on this one. I mean, sure, the Porsche Cayenne has demonstrated that there are plenty of people who want to drive a sports car SUV, so of course Lotus will want some of that sweet, sweet money. Are you sure that Mrs. Peel will want someone to mom her ride?

Mirror, mirror

Today I wrote a simple command line utility to mirror the dependencies for a swift project. And it works! That’s pretty neat, in and of itself.

Then, because I could, I built a Docker image that has my utility installed, so I can use that image as the base for all my containerized application development. Now, when I’m on a ship in the middle of some ocean, or when my Internet connection has been severed because…well, they never do explain why…then I don’t have to sweat it.

Offline Swift – A Hint

I asked about mirroring and caching dependencies, over on the Swift forums, and I got an answer that I think might be helpful. It turns out that not too long ago, swift package manager added support for mirroring dependencies. It does this on a per-project basis, rather than being a global setting, which I can see how that’s probably a good thing. The proposal outlining how this works is described here.

So, it looks like the way to set up mirroring for a single project would be to do something like this:

  1. Resolve all the dependencies. Straightforwardly, swift build.
  2. Go through the Package.resolved file (which is JSON) and for each dependency’s repositoryURL, do a git clone of that repository into a mirror directory on the local machine.
  3. After cloning, go to your project’s directory and do a swift package config set-mirror —original-url <repositoryURL> —mirror-url <file://absolute_path_to_cloned_repo>

Now, you should be able to disconnect from the network and still be able to build your project, even if you delete the project’s .build folder. To update the mirrors, you’d want to go through the local mirror directory and for each child directory, go in and do a git pull, to fetch any updates.

And all of *that* feels like the sort of thing that a shell script, or maybe Perl, could do. Hmmmm.

Maybe…Don’t?

Today’s newspapers offer a feast of anxiety. A quick overview:

  • Russia/Ukraine war – many, many countries are proposing to stop purchasing petroleum exports from Russia. The US is proposing to start buying oil from Venezuela to replace the Russian oil they’d been buying, to try to avoid an energy price shock.
  • The bits of tires that get worn away as vehicles drive around are “micro plastics” or even “nano plastics” and when that sticky black dust gets washed off the streets and sidewalks and buildings and trees, it goes into rivers and lakes and the oceans and then the creatures that live in the water get sick and die.
  • Shell — the petroleum company — today apologized for saying, yesterday, that money was important and so they were going to keep buying Russian oil.
  • Russia, since a bunch of big tech companies are refusing to do business with them, are thinking of legalizing software piracy.

This is a kind of radical idea. It’s impractical. Consider it an aspirational stretch goal. What if we didn’t burn fossil fuel? What if, instead of traveling around in vehicles with tires, we more or less stayed put? What if stuff moved by rail and the last mile was janky carts with wooden wheels? What if, instead of subscribing to software as a service, you just paid your money up front and then you owned it, like a book? What if it was obnoxious to go online, so you only did it once a day?

Capitalist corporations are garbage. They are anti-life. They are embodiments of neural nets with selection criteria that do not include human welfare. What if all the humans said, “It’s actually okay for a corporation to die, if it means a human gets to live.”

What if, when faced with the option to do something horrible for ourselves or for others, we just…didn’t?

Characteristic: Overkill

So, we’re refugees. Also, I’ve been thinking about store-and-forward, intermittently-connected networks for a good long while. Looking at where life is going and how we plan to navigate it, I’m only going to be more intermittently-connected, with longer periods of isolation, not less/shorter. So, I want to start solving problems now, before I’m cut off from the wider Internet’s resources.

Email: pretty much a solved problem. It’s already store-and-forward. Compose an email, queue it up for delivery, and the next time my mail client can actually reach my SMTP server, it’ll get sent.

Documentation: Dash is great. It already pulls in updated documentation packages when my computer is connected, and it doesn’t need to be connected to the Internet in order to display already-downloaded documentation packages.

Development: If I use Docker and SPM and am careful about only referencing images that I’ve cached locally, and make sure that my package files refer to dependencies that I’ve got locally, then it should be okay. This is the most problematic bit. When I was doing all my development in Java, I ran a local archiva server and that way I could even blow away my maven cache and still have access to artifacts without the Internet. I really wish there were some kind of caching proxy for git repos. A superficial look around has found some bits and pieces, but nothing so fully-developed as archiva. Goblet comes close, but would require more work to make it usable at all, and still doesn’t solve the problem of, “the Internet is on time-out.”

Really? You Have Opinions?

“I see that you are wearing a garment decorated with shapes that are obviously linked to a widely-appreciated cultural artifact. I assume, therefore, that you would like to have a conversation about that with me, a stranger on the street, rather than go about your business in the shops, one of which I just witnessed you leaving and another which I see you are about to enter.”

How about, instead, you just nod and smile, maybe mutter, “Cool shirt, man,” and go about your own business?

T-shirts are great for several reasons, which I shall now enumerate.

  • They are easily cleaned. Throw in the washer, run through the dryer, no ironing and no hanging required.
  • They provide a small amount of insulation, so that they’re comfortable to wear under a wide range of temperatures. Walking down the street, sitting in a room, walking down the refrigerated section of the grocery store — it’s all good.
  • They are close-fitting, so they don’t generally flop into whatever mess one is dealing with. Sleeve in the dish water? Tail dragging along the counter? Nope. And, even when it does happen, see above re: cleaning.

However, t-shirts are also lousy, because humans are garbage. If I wear a plain white t-shirt, it feels a lot like underwear. Some folks have no problem walking around in their underwear while doing their errands; I am not one of them. I have internalized social norms from another age, one which held that there are standards of dress for going out in public, and visible underwear is Not On.

Colored t-shirts are widely available — so long as one is happy to have words and pictures on them. And honestly, the words and pictures are often attractive or interesting and therefore not a negative. But, and this is the part that sours me on living among humans, there’s a small but significant percent of the population that thinks, “Hey, I recognize those words/pictures! I Have Thoughts That I Must Express!”

You know who else thinks like that? My dog. And, just to be clear, when he’s out there expressing his thoughts, everyone within audible range is aware that my dog is an asshole.

Speed Is Relative

When Apple announced their custom CPU machines, part of the hype was how fast they are. I saw a bit of buzz like, “Oh man, my compile times are so amazingly fast,” from people who went ahead and got the Mac Mini with the M1 chip. I waited for the 16″ MacBook Pro, and I was expecting…well, you know, speed. That’s what everyone said, right?

In 1995, I worked at a startup in San Jose and we used PowerPC based Macs to build our software. We used CodeWarrior, because its compiler was way faster than MPW (and its UI was less user-abusive…some things don’t change; Apple’s developer tools still hate developers). Even so, when we kicked off a build, we had time for two (sometimes three) programmers to play a couple rounds of darts.

Today, I’m working on a project that builds in a Docker container. Because of this, every single time I rebuild, *everything* gets recompiled. When it’s two files, who cares? But when it’s hundreds…well, I don’t care what CPU you’re using because the process is not CPU bound. Compile times are I/O bound, once you’re not allowed to cache intermediate artifacts.

During this rebuild, I wrote a blog post. Next one, I’m gonna go to the bathroom. After that…practice the bagpipes?

Software Release!

I’m pleased to announce the release of an updated version of Stumpy. Mostly, the differences from the previous version will be invisible; the one user-facing difference being that, since I’m only supporting macOS 12+, I can wrap the list of servers in a ScrollView, so you don’t have to resize the window if you’re running a bunch of servers. (Like I do.)

Of course, I always get nervous when I get close to releasing software to production. There’s this tension between, “get it solid so you can ship,” and, “make it perfect so you are proud.” Part of being a professional is accepting solid over perfect, so now I’m busy filing bugs against my own software so that I can remember how I’m supposed to make it better. Honestly, I would love for all three of my readers to do likewise.

I’m only sort of kidding — I know that I’m the only one who cares about this particular project; after all, if more people cared, they’d have been feeding back to dumbster or to the previous version of Stumpy. Still, having more people makes it easier, a little bit. But, the fact that my email inboxes are full of so much malformed marketing bullshit suggests that the people who would really benefit from Stumpy don’t actually care.

Anyway. The (to me) interesting part is that I’ve rewritten the networking layer to use SwiftNIO. This has already simplified some of the architecture of the application, and it’s given me some really valuable experience with NIO. This will come in extremely handy with my future projects.