Just a notice that this blog is coming to the end of it’s life.
When it comes time for me to renew my hosting arrangements in the spring of 2018, I probably will not do it with this provider.
But, don’t despair! All of the content has been transferred to a blog on GitHub Pages. Just amble over to https://clartaq.github.io/yo-dave/. It’s all over there now.
Just a note about some weirdness in my work process and it’s solution.
A few weeks ago, I started noticing some weirdness in trying to use some tools with Leiningen while developing a program in Clojure. When running tools like
lein would fail with an error from
javac about an invalid flag. Initially these flags were for attempts to set the file encoding. And the file encoding kept changing.
Over time, these failures became more frequent. Always about passing an invalid flag to the java compiler. Finally, I was unable to run a REPL, run a program, or build an uberjar.
Long story short, it looks like it was related to the
JAVA_CMD environment variable. That had been set a loooong time ago and in fact pointed to the java compiler, not the VM. Simply removing the variable fixed things. Might have worked just by setting it to
java rather than
javac but I didn’t try it and so far nothing else has broken.
Still don’t know what caused things to get flaky in the first place since this variable was set so long ago.
Feeling a bit frustrated today, so I thought I would just vent a bit.
Why is that? Java is supposed to be the most popular programming language in the world. Tons of programmers working on it for many years. And yet it doesn’t seem to have as many flashy things written.
I don’t always want a web-based thing. Don’t want a half-gigabtye Electron app either.
I often feel the same way when working in Lisp or Clojure. Working with a demonstrably better language but not getting as far as quickly as someone working with a crap language.
End of rant.
It’s common knowledge that the JavaFX user interface tookit is single-threaded. When your JavaFX-based program is doing things that can take some time, you need to run those tasks on a separate thread(s) to keep the interface responsive.
Recently, I’ve been working on a program that can spend a lot of time reading and writing to the disk, but at the same time I want to retain the ability for the user to change views of the UI as the work proceeds. I also want to provide the opportunity for the user to cancel the background task at any time. I thought I would provide a couple of examples of how I did that in the program.
Just a short note on mixing Linux utilities with Windows. I wanted to set up a single button deployment of updates to a static web site. I had been using an rsync script, but it required me to manually enter authentication credentials every time it was used to send updates to a remote Ubuntu server.
I set up public key authentication, but it would not work with the permissions of the key files on the Windows machine where the updates were coming from. After struggling with this for a bit, I finally used Cygwin running on the Windows machine to set the permissions just as I would on a Linux system. After that, things worked fine — it’s a single click script with no intervention required.
Still don’t know how to get this done using Windows only. Too lazy to figure it out.
It was very unpleasant for me. I’ve been a user of Evernote almost from the beginning, and a Premium user for almost as long. But today I erased all of my notes and deactivated my account. “Why?” you might ask. Let me tell you.
- The price increase. Earlier in the Autumn, Evernote announced a price increase. It was pretty substantial, at least for me. At about the same time, they announced that they were moving our data to Google’s infrastructure in order to take advantage of improved economies of scale among other reasons. So they are lowering their costs of doing business but still increasing prices for customers. That just doesn’t sit well with me.
The Evernote approach highlights one of my big gripes about the way a lot of AI research is done these days. I don’t believe there is any real reason for requiring access to user data to “make sure things worked”. It’s a symptom that much current AI is being developed to work for the vendor, not the customer/user. The folks developing this technology are continuing on in the belief that our data somehow belongs to them, not us.
As for a replacement, I haven’t found one that can completely replace Evernote, but have looked at a few.
Getting Existing Notes out of Evernote
The first step in moving to another application was getting my existing notes out of Evernote. Evernote supports a nice export format called ENEX, which is a form of XML. If you have web clips, the exported data contains a bunch of indecipherable gobbledygook from the original web page. In the case of images, the exported notes can contain a lot of data relevant to the in-image search function. The files can be parsed with a relatively simple piece of software if you only want the simpler parts and don’t need to reproduce the original web page.
During the export process, I came across a few bugs. Evernote’s support group was very helpful at fixing the errors and I was able to export all of my notes successfully, even some as old as nine years.
I had used Microsoft’s OneNote in the past on a tablet with good handwriting recognition. When I tried to import my notes this time, it choked. It just couldn’t handle the organization of all those notes and produced something unusable.
Other programs (and there are tons of them) just don’t have the flexibility of Evernote. In the end, I settled on importing my notes into a wiki system. For the type of work I use my notes for, this seems to work fine.
The search goes on for a complete replacement, but I don’t feel crippled in the meantime.
The Elm language is often cited as an up-and-comer for web front end development. I was attracted to it largely because of the compiler’s friendly and extremely helpful error messages. It’s really attractive in many ways.
But when I started looking at examples, I often found myself thinking things like “Why is this so inconsistent?” or “Why is this syntax so complicated?“. And it finally occurred to me that I’ve been ruined by the way Clojure/ClojureScript/Lisp/Scheme do things. I can’t seem to go back.
Email is pretty old. It is older than the Internet. Despite the perennial claims that email is “dead”, it is still going strong. It’s also a bit complicated, which is why most folks set up an account with someone else (Yahoo!, Gmail, HotMail, ProtonMail, FastMail, etc.) who can take care of it for them.
However, if you want to host your own server, it can be done. If you are running Ubuntu 14.04 (and only that version at this time), MailInABox can handle most of the setup for you automatically.
It takes care of things like anti-virus, anti-spam, grey-listing, and HTTPS for you. The one area it cannot handle for you is the DNS setup. That’s something that is typically done with the domain registrar. And it seems to be different at each one, although there are tutorials appearing on the MailInABox web site that walk through the process at specific registrars. That was really the only difficulty I had.
There may be other problems getting other email services to accept email from your new server. They each have some arcane heuristic rules that block email before it even reaches their spam filters.
So, if you’re tired of having all of your email read just to send you more advertising, think about setting up your own server. It isn’t that hard anymore.
The Caddy server is a relatively new, easy-to-use server written in the Go programming language. It is very buzzword compliant. But, the nicest thing about it, in my opinion, is that it sets up SSL/TLS (Secure Sockets Layer/Transport Layer Security) certificates automatically from Let’s Encrypt to let you serve a site with HTTPS by default. The project is open source and the certificates are free.
Of course, WordPress is a very popular blogging platform. Caddy provides some guidance on getting WordPress up and running on the server. However, it wasn’t enough for me. Here’s some step-by-step guidance on how I got it working on some of my own self-hosted sites.
Earlier, I posted about how I set up servers hosted at CloudAtCost. There have been a few changes to that process. Rather than continually patching that post, here’s a new description. Again, this is for Ubuntu 14.04 which gets upgraded to 16.04 as part of the setup.