Vim: Always Learning

Vi (or Vim in it’s modern incarnation) is a text editor. It’s a modal text editor. You can switch from insert mode to normal mode. Insert mode is where you type text into your document, and normal mode is where you type commands that do all sorts of functions. It’s incredibly powerful, incredibly complicated and even exiting the editor is not obvious. 🙂

So it’s always great when I dive into learning something new about Vim. There’s always something new to learn about Vim, even after more than twenty years of using it. I think there should be a Duolingo for Vim.

So, when you’re watched that, and watched it again, and again to understand it, have a look at the following presentation showing off the power of Vim without plugins.

When you just want to use Vim faster …

The power of Vim is in the commands. That also means it requires practice to learn those commands because they’re usually keyboard shortcuts. There’s no Edit menu to remind you to use something you just learned. With just a few core concepts and memorized keys or functions you can be very efficient at moving around or manipulating text.

It’s always Vi

Things I learned recently:

  • :set number relativenumber from the last video and this blog post.
  • :sfind is a game changer. I set the base path to my public_html and sfind will open a file in a new split without figuring out the path.
  • I need to install ctags.

And so much more ..

Canyon – music brings us together

Thank you James for sharing this lovely short video. I remember reading somewhere that the music that defines us, or that we "really get" is the music we hear in our twenties. This leads to disenchantment in later years because everything's changed, and it's not the same "as the good ol' days".

The thing is, you're not the only one who loves that music, and that's a wonderful bonding experience. A recent episode of First Dates Ireland (yes, yes, I'll watch it sometimes) featured a couple who bonded over music, only as friends but they now had someone to go to gigs with. Unfortunately this clip doesn't show any of their banter about music, but it's the only one I could find of them!

And this is the only time you'll read about First Dates Ireland on this blog, I promise!

Dealing with Lightroom Lens Profiles

Lightroom Classic CC supports a wide range of lenses but if you're not shooting in RAW you'll probably be out of luck if you want to apply a lens profile. All the built-in lens profiles were made with RAW files in mind. If you're shooting Jpeg then you're out of luck.

I usually shoot RAW but a few weeks ago I used Jpeg to do some street photography. All was well until I tried to correct the lens distortion. Lightroom couldn't find any lens profile! I thought my Lightroom install had been corrupted somehow. The list of lenses only included one Tamron lens, and not the right one.

After much searching and testing I figured out what to do. Paths are for a Mac. You'll find Mac and Windows paths in this blog post by the Lightroom Queen but the ideas are the same. Copy file, rename, edit, restart Lightroom.

  • Custom lens profiles go in the directory ~/Library/Application Support/Adobe/CameraRaw/LensProfiles/1.0/
  • The built in lens profiles are packaged with Lightroom, so find Lightroom in Applications, right click on it and then "Show Package Contents" to browse into it. You'll find the lens profiles in Contents/Resources/LensProfiles/1.0/
  • Look for the profile for your lens and copy it into the same camera/lens/ directory structure in the ~/Library/Application Support/Adobe/CameraRaw/LensProfiles/1.0/ directory.
  • Rename the new lens profile file, removing the " – RAW" string from the end of the filename.
  • Edit that file in a text editor and change every instance of stCamera:CameraRawProfile="True" to stCamera:CameraRawProfile="False". There will be quite a few of them for a zoom lens.
  • Restart Lightroom, apply lens profile to your Jpeg file.

When Bob Started a Syndicate

The other day I was reading through the very last issue of Ace Magazine when I came across an "In the Works" preview of a game called Bob. It was the temporary name given to a work-in-progress game by developers Bullfrog.

It meant nothing to me until I saw the screenshots.

That looks very familiar! It was the classic Bullfrog game, Syndicate!

Bob looked like a much more complex game than Syndicate turned out to be so I'm glad the game was tweaked and tuned before release. It's one of the few games I've actually finished, except for the American Revolt add-on. I never even managed to complete the first level in that! I haven't found much online that links the name Bob to Syndicate but this great RPS article does. That was published in 2008 and it's amusing to see the comments wishing for a remake of the game. We got them, they didn't make quite the same splash as the original.

Syndicate had the veneer of strategy. You could separate out your agents and send them off in different directions, but really, the most fun was to be had when all four were rocking gauss guns and causing all sorts of mayhem!

The very last level in Syndicate was really hard. You'd last all of about 10 seconds before succumbing to superior firepower until you figured out the right strategy to complete it. If you've already played it, or know you'll never do so, check out the video below:

Syndicate was followed by the American Revolt add-on. It comes packaged with the GOG release so you've no excuse not to try it, except that it's hard as nails. I don't feel bad saying that I had no idea how to complete the first level until I saw this ..

Syndicate Wars followed as a proper sequel some time later, but IMO it comes nowhere near being as immersive and addictive as the original Syndicate. I didn't like the graphics and it didn't sit right with me at all.

A modern remake of Syndicate came out in 2012, which I bought in 2014, but it only runs on Windows so I haven't played it much.

In 2015 a spiritual successor to the original Syndicate was released, Satellite Reign. It looks beautiful, and the screenshots have that Syndicate vibe but to play it is painful.

On a more positive note, there's also Free Synd, a GPLed implementation of the Syndicate game engine. The last release was in 2016 however.

The original 1993 version of Syndicate is available on GOG. I highly recommend it. Even if your computer isn't powerful it's bound to be better than even the most expensive home PC or Amiga of the time. GOG have packaged the game with Dosbox so it's a one click install and run. The game is cheap and well worth checking out if you're a gamer.

Want 3 months of Backblaze?

Ho Ho Ho! The folks at Backblaze must be feeling the Christmas cheer as they're adding 3 months of Backblaze backup to anyone who signs up within the next 21 days.

I’m a huge fan of Backblaze, having paid for the service since 2013 and had to recently use their backup to restore more than 3GB of photos I took on December 1st and 2nd.

So, if you’re not backing up your data I can recommend Backblaze. Sign up here for a free trial, and if you buy a subscription you’ll get 3 months free, but only if you sign up within the next 21 days. I get 3 months free as well which will make me very happy too. 🙂

The Importance of Backups

How many backups do you have of your important files? I have several backups of my photo archive:

* A local rsnapshot (incremental) backup made every six hours.
* A local copy of my photos directory, which is a straight copy, including deletions. Synced daily.
* A copy on another server synced daily.
* An online cloud backup on Backblaze.

And I still managed to lose a few days worth of photos.

Late last month I took delivery of a new 8TB external drive. I benchmarked it and it was just a bit better than any of my existing drives so I decided to make that the primary location for my photos. I called it “cats”.

Previously my photos lived on a drive imaginatively called “data”, but that would now become my secondary copy.

With my photo archive copied over (all 2.3TB of it), I edited my backup script so it would not accidentally erase my photos on cats, especially not any newly imported photos. I updated rsnapshot so it used cats rather than data, and made sure that Backblaze was backing up cats too. It all looked like it would work perfectly!

The next day I didn’t take any photos, or the next, I took a couple of photos with my phone but didn’t transfer them to my laptop immediately. Then one morning I took a photo of the sunrise, and the following day I did the same.
I edited a few of the images and uploaded one on the same day. Nothing wrong at all.
The next day I went into Cork to photograph Glow Cork and got some nice long exposure photos of the lights. I went in the next day on December 3rd and did the same.

I worked on a couple of shots, but I was busy, and didn’t have time to work on photos until this evening when my world fell apart as Lightroom reported it only had the smart previews for my latest photos. With a sinking feeling and forced calm I checked the 2017 folder. It all looked good, until 2017-11-19 that is. Nothing there after that.

I frantically checked my backup script again and again, poring over each line to make sure the right files were being copied to the right place but it looked ok.
I checked my rsnapshot folder. That should surely have the missing files. No. No, it didn’t.
I checked my other server and the files weren’t there either. They stopped at 2017-11-19.

I checked Backblaze, and the backup made today ended in 2017-11-19 too.

Dumbfounded and a little desperate I started clicking on the end date in Backblaze, going back a few hours, then a day, and another day when I found something weird. I found my December 1st and 2nd photos, but not in the cats drive, but in the data drive!

I’d forgotten to update my Lightroom import preset. Lightroom was still copying my images into the data drive, and then my backup script would delete them the next day. Rsnapshot wasn’t backing them up either because it was now looking at the cats drive.

I started a restore of my December photos off Backblaze. The 3.7GB of data is still downloading. Luckily I hadn’t formatted my camera SD card so my December 3rd photos were still there too, waiting to be copied over again. Once converted to DNG, copied into place, renamed and metadata data updated, Lightroom was happy with those files.

I learned a lot about Backblaze. Without it I would have completely lost my December photos, including this one and the photo at the top of this post.

However, I could not find backups of photos shot from November 20th to 30th. Most of those were sunrise photos, copied to the laptop after the daily backup script had run so Backblaze should have had a day to back those photos up. The restore process offers hourly backups over the last two days, then daily for the next 7 days, then weekly going back a month.

I suspect that Backblaze considered the daily backup done sometime around 7am UTC right after my backup script had deleted the files but that doesn’t explain how I was able to find my December shoot because that was past the hourly deadline. I need to contact Backblaze to find out why.

I still recommend using Backblaze. Last week several factors conspired to make my backup fail:
1. My DSL has a relatively slow 1Mbps upload.
2. I had my laptop unplugged from my external drives for several hours.
3. Backblaze doesn’t immediately back files up.

Then there’s the bad luck to find this problem after more than a week when Backblaze changes to weekly snapshots. It has it’s limitations but it still saved a bunch of my photos and I am very thankful to have it!

I’ve already changed my backup script so it won’t mirror deletions. If I’m going to delete files I’m going to do it soon after copying them onto my laptop and I remove files so rarely it’s not needed in the backup script.