Category Archives: Uncategorized

Announcing DMS Calc

A few years back, I was playing Kerbal Space Program and had the need to convert back and forth between decimal degrees and degrees-minutes-seconds. I found some online tools to do it, but they were naive and forgot that floating point numbers are still kind of tricky on a computer. I wrote a post about that, and I also wrote a simple web form with Javascript to do it the right way. Anyway, for reasons, I deleted that code early this year and then, a couple months later, I started playing with KSP again.

Two days ago, I ran into the decimal degrees to DMS problem again, and still the free tools are doing it wrong. So this time, I wrote an app and sent it up to the App Store.

I Wrote A Thing

Hey, I wrote an app and got it published on the App Store! It’s free and it only does one thing: it lets you slide a selector back and forth and show the equivalent temperature readings in Fahrenheit and Celsius. So, if that’s a thing that you want on your phone, go check it out!

So, I took this class on iOS development with Swift, because I’m fed up with Flutter and I really like being able to program the devices I own. I got to the end of the course and was thinking, “Okay, so that all makes sense, now, what do I even want to make my phone do?” And then I thought, “You know what toy application everyone wants you to write after Hello World? A unit converter.”

The problem I have with these unit converter examples, though, is that while they’re great for giving you an example of how to use list selection tools (what unit do you want to convert from/to) and detecting user input (when do you actually compute the conversion) and update the display, they’re terrible if you actually want to get the conversion value. I mean, I’m sitting in a car and the temperature is set in Celsius, and I know it’s too hot, but what is the right temperature? This is a problem with numeric displays; unless the number is on a scale that I’ve internalized, it doesn’t really mean anything to me. Also, I don’t want to have to spend a whole lot of time typing or, for that matter, waiting for my phone to ask Google’s server on the other side of the planet. This is a straightforward calculation that could be done right here, right now, with an actual thermometer if it had the scales printed on each side.

So, I present you with a dead simple app. It’s got a slider that you drag back and forth. It shows a Fahrenheit temperature and a Celsius temperature. It’s got buttons on the interface to let you step up and down if you want to go slower. And, because I wanted to learn how to make an app for the Apple Watch, there’s one of those, too, and it uses the digital crown to do scrolling up and down of the temperature.

Yep, I Still Hate Your Framework

I have been writing a couple of mobile apps in Flutter for the past few months, and as I neared feature-complete ready-for-internal-beta I started getting frustrated by the framework’s limitations with the app stores. The build system won’t build an artifact that the Google Play Store will accept come August, and the iOS build has problems, too. I gave up and started working on a simple web game using flutter_web, only to find that it wouldn’t let me make a user interface that didn’t suck for typing. So, fine. I’m going back to Java. At least I can build and release a Java application that works right.

Cranky Old Guy

Yeah, so I’m listening to Surveillance Valley (see previous post) and it’s got me thinking all paranoid and crotchety, as one might expect. So now I’m reminiscing fondly about UUCP, UseNet, FidoNet, and RumorMonger/LACS. Thinking about how, if I were going to try to come up with some sort of communication network that was hard to spy on, I’d have to start with the idea that any participant can show up anywhere at any time.

This is sort of like when engineering management got all us developers in a room at Netflix after we had yet another database outage that cost the company gobs of money and cause much customer unhappiness. They told us, “Look, we can’t stand having our business vulnerable to single points of failure. We’ve gotta be redundant. So we’re going to the cloud. Amazon’s cloud. And you’re going to make it happen. How you do it is up to you, but that’s the fundamental truth. You also need to be aware that your head is on the block if your system fails. And here’s another truth: any single server in ‘the cloud’ can die, at any time, for, like, no reason. Get happy about that.”

Okay. So, what does that kind of network look like? Any message sender/consumer can appear at any time, at any place. Imagine a world where that is the thing that got built, instead of the Internet. Is that better?

What to Do

A five hour flight is enough time to write several unit tests. So, yesterday I started working on the band sets for 2019 and I wrote tests and new library functions and fixed a latent bug in an old library function. And now we’re in Hawaii!

Buncha Thoughts at Evening

  1. I’m a jerk.
  2. Dogs are awesome, and also jerks.
  3. Siri is useless for my life.

It’s creature dinner time, so I’m getting out the dishes and the food and starting to portion out everybody’s share. Some of the creatures are old and sedentary, some are young and boisterous, and not all are of the same species. Thus, portions are specifically assigned. And what am I thinking as I do this? That’s right: “Okay, who’s ready for dinner? Are all of my dogs who are good dogs going to get a dinner? Yes, yes they are!”

Continue reading

Building Everything from Scratch

You know what I love about programming? The part where I get to solve interesting problems. You know what isn’t interesting? solving the same problem over and over again. Even less interesting is having to solve a problem that I know someone else has solved but where I can’t copy the answer. That’s not only uninteresting, it’s frustrating.

So, I’m writing a tool in Java and I need for it to allow the user to input styled text (simple typeface stuff – italics, bold, strikethrough). We’re not changing font family and we’re not laying it out for print; we just need to be able to capture this style stuff. And then persist it. Ultimately, it’s going to be stored as XHTML. So I look around, and sure enough, JTextPane turns out to be the thing I need to be able to display the text. Pretty soon we’ll want to have inline images that the text can flow around, and that component can handle those things. So, that’s great.

Continue reading