My storage and backup system

07.03.2019 06:00

I have three backup systems, one in the cloud, one clone and one incremental backup.

The basics is that I use Arq to back up to Backblaze B2, and I use Time Machine to backup to an external drive, plus that I clone my system and the combined “archive” and Time Machine drive. Everything from old stuff, to time machine data and my Plex library live on that drive.

I recently changed all the drives. This is something I do every third year or so. When one of the drives starts to act up, I order new ones as fast as possible.

This time I went for two 5TB drives for the archive and as always a 500GB drive for cloning my system.

The reason I do this is that good NAS or external RAID systems are too expensive. When I compared the last time, the price of getting a future proof RAID, would basically be the same as one and half round of drives of my current system, before I started to buy drives.

The reality is that drives with built in USB interfaces have become so cheap, that I don’t see it ever making sense from a pure money perspective.

The thing that migh get me to do it however is the fact that the time it takes to clone a 5TB drive (it will probably be closer to 10TB the next time) is so long that I’m soon at a point where I kind of have to move to a raid.

How I use my Neo 2

05.03.2019 18:20

I have a Alpha Smart Neo2, it is a digital typewriter. A pretty damn great one. It is basically just a keyboard, with a small screen and some memory in it.

It lets me write, without having a full computer. I personally think it is a hell of a lot better than an iPad, if you just want to type words.

Most of my blog posts either starts out on paper or on this little thing; and most of those that start out on paper gets transcribe into to this little bad boy before it get to my computer.

The reason I love it is because it is small, the battery lasts forever, and I can just have it in the living room. And I don’t have the option of doing anything except writing. The way I use it is that I just write in the same file, and divide stuff up by adding a markdown style H1 header for each new thing, and once a week I connect it to my mac, open my Drafts.txt file in Emacs and transfer all my files (usually just the one) over.

A painful goodbye

03.03.2019 16:55

I’ve posted about this earlier in the week on my Micro blog. But my mum had to let our family dog of 11 year go on Tuesday. It was not a huge surprise because of her age. But still very hard, and a lot harder for my mother. And Luna will probably be very sad and confused when she can’t find her the next time we visit.

Tom Waits didn’t want to grow up, Nemi never dit. It’s great to see a dog of 10 years old play like she was 1.

Learning to use the Emacs keybindings

03.03.2019 11:37

I think I have written about this before, but I can’t remember. When I started to learn how to use Linux I first used nano, and then I got into VIM becuase the people that helped me used it. And obviously I became one of the people who mocked Emacs for being an OS.

Then Spacemacs hapened.

During the summer of 2018 I decided that I wanted to learn how to use the standard Emacs keybindings. I started doing it sometime in August, and now almost six months later I can say that I am somewhat competent using it. I’m not yet at the level where I can combine 25 shortscuts into someting nuts. But I’m at least advanced beginner or a beginning intermediate user.

This is how I went about doing this:

  1. I wrote down the basic commands I had to know, like saving files, opening files, quitting emacs, managing “windows” on a Index Card.
  2. I started a text file where I pasted interesting keybindings or answers to how to do something I used to do in VIM. And I used it as a FAQ while learning.
  3. Re-read Mastering Emacs.

The process was really slow and painful in the beginning. But after a few weeks, and getting stuff into my fingers it sped up. And today I actually prefer it to other keybindings.

The main reason I started learning it was because regular emacs with evil is kind of slow, and what I think when I’m at the other end of it is that Emacs makes a hell of a lot more sense after learning this.

Microsoft Sculpt Ergonomic Mouse

02.03.2019 19:26

So, I use Windows at work. It is not horrible, but I still hate it. I was looking for a mouse to have at home, just in case I had to work from home or something.

As I was looking I I realized that most of the options either was the same cheap Logitec thing I had at work, or something fancy with a million buttons or one of the two or three options that was good for my hand.

I decided to either get the cheapest possible or something that was good for my hands.

I decided to get this one from Microsoft because the other ergonomic one was from Logitec (you know the huge mouse with the big ball on it) almost three times as expensive.

This mouse is like a big flat ball. It is so large that you can rest your entire hand on top of it, instead of having to use moucles to hold up your hand. It is really comfortable to use, and I like it a lot.

I like it so much that I took the one I got to work and ordered a second one.

Surviving with two USB-C ports

02.03.2019 15:36

I started out with the idea that everything should be USB-C, when I first got my MacBook escape. But that is not working as long as you can’t get any C hubs.

What I have ended up with is a USB-C monitor, some chargers, a USB-C to A hub with four ports, some adapters and some very few USB-C versions of what I have for USB-A.

Having just two ports works, but I think it is far from ideal. And the minimum going forward should be 3 or 4; ideally way more.

The problem with USB-C is that you have USB-C and you have thunderbolt 3 both of them use the same plug but are very different.

The number of thunderbolt plugs you can have are a limit on the motherboard or logic board. And the number of USB ports are more or less without limits. But the latter have less features.

I think Apple should find some way to tell what is what and just have a lot of them on their Pro laptops. But it isn’t ideal.

Link dump

01.03.2019 17:48

Clojure and JDBC

24.02.2019 19:52

I love SQL, I know it well, and how to use it to make fast efficient operations that reflect what I want to do. It is not beautiful, but it works really well.

After starting with raw SQL, moving over to ORM’s of various types, mainly the Django one and Entity Framework, and a few abstractions that are kind of in the middle. Like for example Korma SQL, I’m back at regular SQL.

When I work in Clojure I use the JDBC bindings, and I use a very small section of it, because I don’t like most of the abstractions JDBC have added on top of SQL. I use the query and the execute! functions. The way you use JDBC(if you want to use it efficient) is that you use the with-db-connection macro to make sure that you don’t set up a new connection to the database for each operation.

Then you have the two methods, execute! is what you use when your query does not return any data, and query is what you use when it does. There are settings to control how the data are returned, if you want need that, everything from lists of lists to lists of maps, to functions etc (if you want it to be lazy)

JDBC is the option I prefer, it may not be the easiest option, but you don’t need to do all kinds of weird crap that you often need to when your abstraction of choice was not mad with your SQL command of choice in mind.

Emacs: defer or not

23.02.2019 20:40

If you start with plain emacs it will start very fast. More or less fast enough for you to not notice it. And for every plugin you add it will become a little bit slower. Some plugins contribute more to it than others. There are basically two ways to deal with this. Either to just let it load everything when you start Emacs or do defer it.

When you defer you either tell it to wait to do it after Emacs have started, or do this at a certain event.

I have tried many different combinations over the last year, and I have landed on not doing anything at all. The same kind of CPU time have to be spent no matter what you do. And I’d rather take another couple of sips of coffee while waiting for Emacs to load than to having to wait in the middle of something for something to load.

Another one on use-package

23.02.2019 16:57

I have written about use-package before, but I’m going to try again because I don’t think I got my point across.

Use-package is a emacs package that cotnains a macro called use-package, it makes it easy to deal with packages in a clean manner. n

If you take my typical emacs setup before emacs I had this long list of packages, that I looped over and checked if they were installed, if not I installed them. Then all of it was loaded and configured in a very speicifc manner to make sure it all worked. Use-package solves all of this.

The way it works is that it have a lot of different keywords that you can usem and the result is that you can avoid all kinds of nesting and weird issues, and just write the config in a way it makes sense to you. The reason I got started with it was because of the :ensure keyword, because that enabled me to install and load in one step.

Here is the documentation: https://jwiegley.github.io/use-package/keywords/. The way I have gone deeper and deeper into it is by starting simple and using new stuff as I see a place for it.