Cornering A Bug

I have a Pro, my trusty old circa 2013 model, somewhat on the old side, running MacOSX Big Sur 11.7.10. It works well enough for everything that I need it for, a basic daily driver for work, most of all.

I spotted a great deal at , a 1 terabyte SSD device for a song and so I got it. Then after I unpacked it and setup on it, so it would serve as a backup for my MacBook I noticed a curious bug. Once I had the drive mounted, it worked well, but when I ejected the drive, sometimes it would give me a error that it couldn’t be mounted. I went off to to search, and came across a bunch of people who were experiencing very similar errors with their SanDisk devices. I found that after I rebooted my MacBook, the problem seemed to go away.

With complicated bugs, often times the trigger is either complicated or multi-step, and for a brief while, the problem with this drive returned. It would come and go, seemingly at random. Sometimes when I plugged it in, it would without issue, and other times it would simply not, and off to , where when I tried to force the mount, it refused with the cryptic error and only clear after a reboot.

I started to really concentrate on all the things I was doing, all the little mindless actions that I do at the start and end of the day, because something was causing this seemingly random bug to appear. One day, last week, I caught myself doing the very thing that triggers this bug!

I have my MacBook Pro, it’s plugged into a standard powered USB 3.0 hub, and then I have a 2TB standard external HDD and the 1TB SDD backup drive plugged into the USB Hub. When I eject the drives at the end of the day, and then unplug them both from the hub shortly afterwards, the drives will both re-mount without an issue. Every single time.

When I eject the drives, and instead pull the USB Hub off the side of the MacBook, after that, the standard HDD will mount without a problem, but the SanDisk SDD drive will always fail to mount with the cryptic error.

I don’t know for certain where this bug actually is, but my educated guess is that it has something to do with USB Bus Enumeration or perhaps some sort of flag that doesn’t get set properly either in my MacBook Pro, the USB Hub, or the SanDisk SDD device.

If you have a SanDisk SDD like I have, and it tosses random mount errors on Big Sur, give this a shot. Eject and then unplug the device, see if that doesn’t clear it up, because it did for me.

New Editor: Ulysses

Aside

For what seems like ages, I have been on the witless search for the best text editor for my MacBook Pro. Trying BBEdit, TextWrangler, Atom, MacVim, Pages, TextEdit… the list just goes on and on. Along with this fools errand, I’ve also been searching for the best font to use. What a pile of wet monkey spit this entire task has been.

So enter Ulysses. I was interested in this a while back, but the app wouldn’t function on my system at the time because I was living in denial about Mac OSX Mojave. I was happy with Yosemite and I was going to be damned if I was going to upset every apple cart I had and upgrade to Mojave. But then app after app started to upgrade on me, and over time it was easier to capitulate to Mojave and upgrade to it. Now that I’m using Mojave, I decided to give Ulysses another shot. So far, I don’t hate it, which is about as much as I was expecting honestly. It’ll take more time to actually see how it works as a new text editor, so right now I will just say that the jury is out.

Next to that is the font issue. There is a theme that covers editors, fonts, and even can be extended to movies, music, and comic books, and that is that there are so many options that someone who is on the outside looking in simply cannot choose one place to start. Websites are full of suggestions and sometimes those are handy, you can spot a font that you’ve seen in your application and you can try it out, while other times you get advice that Font XYZ is really quite amazing and then you discover that you have to pay for it, or the application you want to use simply won’t let you use that font. So instead of fretting over endless font choices I just threw a dart and ended up with Open Sans. Maybe it’ll work for me, maybe it will drive me bananas. Although maybe the editors will do that first.

So we’ll see just what we have in store for Ulysses in the days and weeks to come. This editor also comes with a method that might be able to publish to my WordPress Blog, and that will be the next test, to see if it does what it promises.

Upgraded Mac Mini, Contacts Woes

A dear family member upgraded their old Mac Mini to a new Mac Mini over the holiday break and from afar, I helped by making some key suggestions on how to get the data moved from the old machine to the new machine. Specifically, using Apple’s own Time Machine to restore the data back to where it belonged on the new computer. I did this through another person, by fielding technical questions from remote.

Everything appeared to go well, except Contacts was a problem. But after a few restarts, Contacts wasn’t a problem. So everything was fine and we moved on. Then I got a new call for help, that the Contacts application had crashed and refused to restart. I started my remote assistance program and shared the desktop session with the faraway computer. The Contacts app was well and truly not opening. I went to ~/Library/Application Support/AddressBook and moved the folder to the Desktop, started Contacts app, and it started with the owners details and the entry for Apple. Then I closed the Contacts app, deleted the AddressBook folder that was created by default because I had moved the previous one to the Desktop, and I undid that. I then started Contacts and it opened. The user went to an entry they wanted to remove, and the app crashed. And then it was stuck again. I did the AddressBook folder out/delete/in two-step and got it back to work, but then figured out that some of the entries worked fine, while others caused the application to crash.

So after I got everything back and running in Contacts, I backed up the contacts using the Export Contacts feature. I then emptied the AddressBook folder again, started Contacts, and then Imported from the backup. Once again, the entry that was causing the crash made the application crash. So whatever it was, it was data driven and somehow got included in the backup feature. I had another option, a long shot, but I tried it. So I got everything in Contacts up and running, selected everything, saved everything as a VCARD file instead, then used TextEdit to find the entry that the end user really didn’t want and removed it manually. Then I restarted an empty version of Contacts, which ran fine, imported the VCARD data back into Contacts, and then after that, everything was fine.

So there is something from probably High Sierra’s Contacts that drives Catalina’s Contacts nuts. Its something that survives backups, but doesn’t survive being shuttled through VCARD. If you have any problems with toxic entries causing Contacts to crash, select all the cards, export them as VCARD, empty out ~/Library/Application Support/AddressBook and then reimport everything. It works. I don’t know why, but it works.

This is the sort of foolishness that I expect from Microsoft, not Apple. Tsk Tsk Tsk Apple.

Apple iOS 13 or How To Kill An App

Apple released iOS 13.0 a few days ago, and then a series of iterative updates from there. The last I checked, we are now up to iOS 13.1.2. They have updated the Reminders app, and in doing so, and making the updates non-functional across their entire platform across the version barrier of iOS 12 and 13, iOS on iPad and iPadOS, and Mojave/Catalina they have, with a single stroke, killed their Reminders app for me. I was looking forward to the update to Reminders, maybe replacing the rather dull Toodledo app on my devices, and then they did it. Reminders only works if you “Convert” and if you do, it’s a one way deal. So now there is little to no point in actually using Reminders since it doesn’t work everywhere I am any longer, but it does push me further into using Toodledo and reinforces my purchase of another year of premium service with Toodledo.

I have just fielded a question about Exchange and sent items in iOS 13. It appears that iOS may not be successfully chaining Exchange emails into conversations. I will have to look into that today.

Vim’s Red Pill

I started this foray into Vim a few days ago. I’ve been talking with folks on
Mastodon.technology about exploring Vim and inspired by their learning and
exploration of this application that has been around publicly since 1991.

Vim is just a plain text editor, it’s ubiquitous on a lot of Linux and Unix
based operating systems, and less so on others. While I was in college the
professors in computer science were very fond of Emacs, so I sort of remember a
bit about Emacs and that I didn’t know Vim at all, nor did I really care for
it. Now that I’m older, I’m looking for new things to learn and Vim is quite a
good challenge for that.

The Learning Curve for Vim Resembles The Cliffs of Insanity

Learning this editor is a sheer climb straight up, on an imaginary learning
curve. There is very little that anyone who comes at Vim without any knowledge
of it will be able to understand. You get a little motd blurb on a blind open
with the name of the application and its version detail. You can’t really write
anything into the screen until you accidentally hit a command for getting into
the — INSERT — mode, like A, O, or I, or the lowercase equivalents. Over time
you start to accumulate more skills and you rely on the cheatsheets a lot less
than you were at the start.

Once the learning is done, then you start to move forward with the
customization part of the application. Vim is improved by plugins that enhance
or sometimes detract from the core use of the application. If you can get a
plugin to work, that is. Sometimes they just don’t, and there isn’t any clear
way to force the issue. Much of the plugins now live on GitHub, and sometimes
your mileage may vary when you are looking for help. For example, one plugin
which is for autocompletion at first seemed to be exactly what I was looking
for, but the fit wasn’t right for me. There is nothing on GitHub, for that
project, that even mentioned Q&A or anything like that. One thing that I have
learned is that sometimes when you add plugins to Vim, they can get “stuck” in
the Session system which forces you to dump your session details and start from
scratch. But once I was happy with how everything came together, it is a very
powerful editor.

Once You Pop A Red Pill, You Can’t Stop!

The first foray into Vim starts with editing. Then I started to look at some of
the other things that this editor could do. I fiddled a bit with Markdown, that
went well, and then afterwards I moved on to installing the Mutt mail
application. I have dwelled, perhaps malingered at Mac OSX Yosemite so when I
started to look into Mutt on my Macbook Pro, the Homebrew system complained a
lot about how some things would likely be broken because I was unwilling to
install the latest and greatest version of the Mac OSX operating system.
Everything worked out for the best in the end, and I got Mutt working for both
my Gmail account as well as my Office365 Hosted Exchange account at work. As a
funny side note, Mutt works well with IMAP servers however there was a bit of
skullduggery with the SMTP authenticator settings. For Mutt, this is the
general plan for a standard IMAP .muttrc file:

set ssl_starttls=yes
set ssl_force_tls=yes
set imap_user ='username@gmail.com'
set imap_pass = 'password'
set from='username@gmail.com'
set realname='First Last'
set folder = imaps://imap.gmail.com/
set spoolfile = imaps://imap.gmail.com/INBOX
set postponed="imaps://imap.gmail.com/[Gmail]/Drafts"
set header_cache ="~/.mutt/cache/headers"
set message_cachedir = "~/.mutt/cache/bodies"
set certificate_file = "~/.mutt/certificates"
set smtp_url ='smtp://username@gmail.com:password@smtp.gmail.com:587/'
set move = no
set imap_keepalive = 900
set smtp_authenticators = 'gssapi:login'
set signature ="~/.mutt/gmailsig"
unset sig_dashes

While the last bit, for smtp_authenticators simply won’t work with Office365.
To get that to work with Mutt, you’ll need this line in its place:

set smtp_authenticators = 'login'

Once I was able to get all that figured out, I then had another way to see my
email, through the Mutt email client. It wasn’t until this point, after being
able to login and logout, and receive new email and send new email that I
looked over my email to discover that almost all of it is HTML encoded. Which
makes reading it a headache in Mutt. But that wasn’t the point! The point was,
Mutt helped bring Vim closer to me. I may use it, or I might not. The HTML is a
definite headache so it’ll die a slow death because of HTML.

Distraction Free Writing

Vim’s editing powers are one part of it, the other part is the sheer speed and
usefulness of the application. There are a lot of systems that I use that seem
to have these little lags for text entry, like the system is always a few
microseconds behind registering what I want to do, which when typing in text,
is to do just that. It’s only slightly present on my Macbook, but often times
very present in apps on my iPhone. I’ll never know why user text input isn’t
the number one thing for any device to do first. Everything else can wait, be
put aside, but my typing? That should take top billing each and every time! So
with a full-screen iTerm2 screen, Vim is almost a killer app for distraction
free writing. I like line numbers on the side, and margins on either side, so
for me, this is almost a perfect arrangement. Plus the cost can’t be beat, Vim
is free. Another big draw for me is that Vim should be useful still even on
very low-powered computers, if it turns on, if it can run Linux (or Mac, or
Windows even) then it can run Vim.

Where Do We Go From Here?

We’ll see where I take Vim in the weeks to come. There is a lot of travel
coming up for me and I expect I’ll be doing a lot of blogging during it.
Writing everything out in Vim, saving it as Markdown, and then importing it
into WordPress. I suppose I could very well just email it into my blog as well,
we’ll have to work on that workflow in the future. Maybe I’ll find a WordPress
installation that works and be able to leverage Vim more directly with that
system. We shall see.

Derailing Robocalls

If you have an iPhone as your mobile device, you can set up a foolproof filter for pretty much all Robocalls, unwanted solicitations, or anything else that bothers you with multiple calls on your mobile phone.

The first step is to create a Voicemail Greeting that lets people know that they have to introduce themselves with their numbers first, and then once they exist in your Contact List, then your phone will ring and you might answer it. If your callers don’t know, then they will never get through.

The second step is to make sure your Contact List in your iPhone is as up-to-date as you can make it. Trim out any junk, do your best to de-dupe the list, get it so it is nice and tidy.

Third step is to go into Settings, then to Do Not Disturb settings, Turn Do Not Disturb ON, set Schedule if you want it off, although I just leave my phone on DND permanently. Silence Always, and in the Phone section, “Allow Calls From” and set that to “All Contacts”. Turn Repeated Calls off, and any other setting is your personal preference.

When inbound calls arrive, they will be checked via their Caller ID presentation with your Contact List. If they don’t know which number will match in your Contact List, then your phone will never ring. It will obviously ring for the caller, until they arrive in Voicemail, and then they leave a message introducing themselves, which is after all, a civilized way of using these devices. If you met someone IRL, then you’d have to create a contact for them in order for them to ring your iPhone.

If you have any other iOS device, like an iPad, you should configure that the same way as your iPhone so when it is connected over Wifi it doesn’t ring the way you don’t want it to.

After that, you won’t get any more inbound calls unless they are from your Contact List. No fuss, no muss.

Strategy to Inbox Zero

Earlier in the week I had talked to a friend about my unmanageable email pile in my Inbox, about 78 pieces of email just sitting there, dwelling on the edge of my consciousness and weighing on me. Is there something there that I should take care of? Did I miss something important? So I started to chat and to do some research.

There are many strategies out there, and I adapted them for my own use, and so far it has worked out marvelously well. Here’s how I process my email:

  1. Create sorting folders. I created a host of new subfolders in my work email account which runs under a hosted version of Microsoft Exchange. Because folders sort alphabetically, I forced the sort using number indexes and dashes.
    1. 1-Email Management
      1. 1-Today
      2. 2-This Week
      3. 3-This Quarter
      4. 4-FYI
      5. 5-Toodledo
      6. 6-Done/Sort
    2. 2-Help Desk
    3. 3-To Evernote
    4. 4-Barracuda
    5. 5-Syslog Alerts
    6. 6-ATP
  2. Then I sort the Inbox into the “Email Management” folder structure. If something has to be done today, it goes to 1-Today, and so on and so forth. My first consideration is the due-date for the item in my Inbox. If the item is purely informational, it goes into the 4-FYI box.
  3. I have rules set up in my email application, which happens to be Apple Mail. If I get email from Toodledo, my favorite To-Do system, they are moved into that folder. Anything from my Spiceworks Ticket sytem ends up in the 2-Help Desk folder. The messages from my Barracuda backup appliance end up in the 4-Barracuda folder, all my incoming Kiwi Syslog alerts end up in 5-Syslog Alerts, and finally the Advanced Threat Protection from Hosted Exchange reports get filed in 6-ATP. Rules are a huge part of keeping your neck above water when it comes to emails. There are a lot of purely informational emails that have zero urgency and very low importance, you want to keep them to go through them, but they don’t need to clog up your Inbox. Rules can help you sweep a lot of these away automatically. Always flag your junk mail, review that occaisonally to drag it for any false-positives.
  4. If an item is a request for help from work, and it didn’t come in as a ticket originally, those need to be pushed into the ticketing system. Thankfully Spiceworks allows you to forward emails into the ticket system by sending forwarded mail to whatever mailbox you’ve configured for the Spiceworks system. There are a litany of hashtag controls you can place in the email body to configure how tickets are arranged. My Cisco CUCM system is configured to also kick voicemails to me as attached MP3 emails, if they are requests for help, they likewise end up being forwarded with some extra flavor text to stomp down on confusion.
  5. If an item isn’t help, is urgent, is rather important, and has a clear date and time I will forward the email to my Toodledo using the configured email address on that system. Toodledo has a flag system that works on the Subject line. My preferred method is to alert people to events, include Toodledo as a BCC addressee, and then add at the end of the Subject line this text fragment: @work :1 day #{duedate} where the field duedate is whatever the date is that is relevant. Send it, forget it, it’s in the Toodledo list.
  6. The next step is to cycle through folders in Email Management, starting with Today and then reviewing all the rest. The Today folder is the action items that can be done today, or are due today. After completion, simple things are thrown away, but anything more elaborate or anything that touches on CYA gets sorted into the 3-To Evernote Folder.
  7. Evernote is a bottomless notekeeping system that I also use, and I leverage Evernote as a destination for all my CYA emails, and each quarter the extracted Sent Items from my Exchange account. I don’t trust Microsoft at all, I’d rather keep things in Evernote. Microsoft has a 50GB quota, Evernote does not have a quota. At the end of each week, I have a “Sharpen The Saw” task in Toodledo that I run, and a part of that is running along the structure in the 3-To Evernote folder, which includes all the emails across the branches of the company I work for, and all the vendors I have relationships with. Every Quarter, I search for all the emails for the previous block of time, soon Q1-2019 will be over so I search for all Q1-2019 emails and also move them into Evernote.
    1. The Evernote move is accomplished in two steps. The first step is to extract all the attachments out of the emails in my Exchange account, I use Mac Automator for that purpose, and here’s how it’s configured:
      1. Get Selected Mail Messages – Get selected messages.
      2. Get Attachments from Mail Messages – Save attachments in: “Attachments”
    2. I then run the Automator workflow, and all the attachments are put in a folder on my Desktop called Attachments. I then bulk rename them with their folder, a date such as 20190301 (YYYYMMDD), and then select them all and drag them into the right notebook in Evernote.
    3. Then I highlight all the relevant emails in my Mail App that I intend to send to Evernote, and I have created a General Service in my Mac called “Send To Evernote” which is actually another Automator Workflow, called “Send To Evernote.workflow”, that has this content:
      1. Run AppleScript:
        1. on run {input, parameters}
           -- Slightly modified version of Efficient Computing's AppleScript: http://efficientcomputing.commons.gc.cuny.edu/2012/03/17/copy-email-message-in-mail-app-to-evernote-applescript/
           tell application "Mail"
            --get selected messages
            set theSelection to selection
            --loop through all selected messages
            repeat with theMessage in theSelection
             --get information from message
             set theMessageDate to the date received of theMessage
             set theMessageSender to sender of theMessage
             set theMessageSubject to the subject of the theMessage
             set theMessageContent to the content of theMessage
             set theMessageURL to "message://%3c" & theMessage's message id & "%3e"
             --make a short header
             set theHeader to the all headers of theMessage
             set theShortHeader to (paragraph 1 of theHeader & return & paragraph 2 of theHeader & return & paragraph 3 of theHeader & return & paragraph 4 of theHeader & return & return)
             --import message to Evernote
             tell application "Evernote"
              set theNewNote to (create note with text (theShortHeader & theMessageContent))
              set the title of theNewNote to theMessageSubject
              set the source URL of theNewNote to theMessageURL
              set the creation date of theNewNote to theMessageDate
             end tell
             -- move the email message to archive and make it bloody obvious
             set background color of theMessage to blue
             set acc to account of mailbox of theMessage
             move theMessage to mailbox "Archive" of acc
            end repeat
           end tell
           return input
          end run

           

      2. It takes some time, but it efficiently moves the text parts of the emails selected into Evernote, using my default Notebook, called IN BOX.
      3. I select everything in the Evernote notebook IN BOX and move it to where it has to go, the destination notebook within Evernote itself. The messages all end up in the Archive folder, so then after that I hunt them down and delete them out of Exchange. Then empty the trash out of Exchange.
  8. In the end, I have a very slim Exchange account, a well fleshed out Evernote data store where I can search for all my email CYA details that I might need later on, and it also works on the web and over mobile apps as well. It’s very handy.
  9. It only took me a little while, maybe an hour tops to sort my Inbox and get to Inbox Zero. Then the cycling through the subfolders helped give me a handle on both urgency and importance, and I have a far better sense that I am actually on-top of my emails.

 

Giving Chrome Some Pep

I’ve been using Google Chrome on my Macbook Pro for a long while, and I’ve noticed that some websites take some time to get moving along. In some ways, it feels like the browser is panting and trying to catch its breath. So today, while trying to solve a work problem I accidentally stumbled over a neat way to give my Chrome browser a little bit of a boost in performance. It seems to benefit when I use sites that are interactive, like my work help desk site or PNC online banking for example.

The trick is, create a small RAM drive on the system, and then copy the Chrome profile over, link to that profile so Chrome can find it, and then start to use Chrome. As Chrome works, things like settings and cache data go to RAM instead of the HD on my MacBook Pro. Then I use rsync to copy data into a backup folder just in case my MacBook pro suffers a kernel panic or something else that would accidentally dump the RAM drive.

There are a few pieces to this, mostly from scripts I copied off the network.

I copied the script called mount-tmp.sh and made only a few small adjustments. Specifically changed the maximum RAM drive size to 512MB.

Then I created two different bash scripts to check-in the profile to the RAM drive and then to check-out the profile from the RAM drive back to the HD. Since I wrote them from scratch, here they are:

check-in.sh


#!/bin/bash
/Users/andy/mount_tmp.sh
mv /Users/andy/Library/Application\ Support/Google/Chrome/Default ~/tmp
ln -s /Users/andy/tmp/Default /Users/andy/Library/Application\ Support/Google/Chrome/Default
rsync -avp -delete /Users/andy/tmp/Default /Users/andy/Library/Application\ Support/Google/Chrome/Default_BACKUP
echo “Complete.”

check-out.sh


#!/bin/bash
rsync -avp -delete /Users/andy/tmp/Default /Users/andy/Library/Application\ Support/Google/Chrome/Default_BACKUP
rm /Users/andy/Library/Application\ Support/Google/Chrome/Default
mv /Users/andy/tmp/Default /Users/andy/Library/Application\ Support/Google/Chrome
/Users/andy/mount_tmp.sh umount
echo “Complete.”

If you give this a shot as well, I would love to hear from you about your experiences with this little speed improvement hack! Hope you enjoy!

DayOne 2.0 to Evernote Migration

Years ago I started to write a personal journal. Mostly the application I used was Microsoft Word, sometimes other text editors, and I’ve always been on the search for a better way to conduct my journaling habit. When I started using Apple’s Mac, I discovered Bloom Built’s DayOne journaling software. DayOne came highly recommended on many pro-Mac websites, so I bought in. Everything was going fine with journaling for a while, and then I noticed that the authors of DayOne were going to release DayOne 2.0. I eagerly jumped onboard with this update and forged ahead. The feature set was welcome, multiple journals, a more refined syncing experience with an online service run by the manufacturer (turned out to be AWS), and I was rather happy. The new syncing system also came with extensions for one of my favorite online time-savers, IFTTT. What more could I ask for?

Then the updates started. I noticed in my Mac App Store application that there was a listed update for DayOne 2.0, and I clicked on it, and the system acted as if there was no update present. A deviation from the expected behavior that I thought was some glitch or bug. So I dived into the problem and searched Google for hints. There were so many options in the Google Index that I figured one of them should solve my problem. In the end, I had completely roto-rootered the entire Mac App Store. I tried one last time, and still, DayOne 2.0 refused to update. I gave up, figuring that was something that maybe a reinstallation of the Operating System would solve because it was a behavior that was unexpected and this sort of thing doesn’t happen with Apple products in my common experience. So then, resistant to being beaten by a bug I forced the issue with the App Store and tried to download the update to DayOne 2.0. I discovered to my chagrin that the update required the next edition of the Mac OS, El Capitan. I have a vested interest in staying with Yosemite; I’m happy with my MacBook using Yosemite, so why should I upgrade the OS to satisfy an application?

The next injury came shortly after that. While using DayOne 2.0, I was rather miserable since the software acted so downright sluggish. I would type, and the application would just pinwheel or pause, and then in a blur, all my words would spill into the display with the same rate at which I type. I wasn’t getting the instant response to keyboard actions that I was expecting. I verified that other applications behaved properly, TextWrangler, for example, behaves perfectly fine to my expectations, so this isn’t a system problem, it’s a DayOne 2.0 problem. Previously to this, I had sprung for a copy of Little Snitch on my Mac to help me better control my network interfaces. Little Snitch had options to block an application from accessing the network. So on a lark, I figured I would test the sluggish application, DayOne 2.0 by blocking its network access with Little Snitch. It was like turning a lightswitch! The sync component was broken, showing a red exclamation mark, but man, text entry was back to normal, and tag entry was super quick as well. I didn’t have to wait for pinwheel after pinwheel to get where I was going. I wanted to journal, to get my text entered into the system for safekeeping and remembering. So for a while, I would use Little Snitch to damage DayOne 2.0 so I could use the application the way I wanted to, the way I expected to. I then wrote to Bloom Built and asked them if they would update the application for the users who didn’t want to march forward with El Capitan or Sierra, and declined. It was a longshot, but I figured it was in their best interest to address their application to the largest group of users, and that would presumably mean even people using Yosemite. It wasn’t to be.

So then after thinking about it for a while, and growing weary of the rather extended procedure to get Little Snitch to help me block DayOne 2.0’s broken sync routines, I made the fateful decision to switch my journaling to Evernote. Why Evernote? Because it was on all my devices, just like DayOne 2.0 (at least Mac devices), and Evernote already had integrations with IFTTT, so that was set. Evernote was something I knew, and the Evernote syncing routines were significantly better than DayOne’s syncing routines. Saying that has to be tempered by the fact that sometimes Evernote’s syncing routines also break, but the one-off hard-to-diagnose sync error is better than a broken sync routine that throws pinwheels when you type text or try to enter tags, as it is with DayOne 2.0. Evernote also has one extra feature, which wasn’t a part of the decision but now that I’ve made the switch, I’m glad for, and that is you can highlight text in Evernote and encrypt it using AES. This is something that DayOne 2.0 had as a promise, but they were by all appearances dragging their heels when it came to journal security.

I then started writing all my new journal entries in Evernote. That was very straightforward. However I left about 11,000 entries behind in DayOne 2.0. I started looking at the ways to get that data out of DayOne 2.0. There are a few options, the creation of text data, PDF data, HTML data, or JSON data. So I started extracting entries out of my DayOne 2.0 journal trying to import them into Evernote. What I wanted was individual entries to move over to Evernote and be individual entries there as well. Everything that comes out of the exporter in DayOne 2.0 comes out as chunks. One big HTML file, one big PDF file, one big JSON file, and one big Text file. There is no easy way to get individual entries out one-at-a-time unless you wanted to manually slog through every single entry. At 11,000 entries, that wasn’t going to happen. I have no patience for that. So then I started to look at ways to hack my DayOne 2.0 exports, since the people that wrote DayOne 2.0 didn’t have anything helpful, and all the other tools I found online were solely written for DayOne 1.0, something I couldn’t use. I didn’t have a Journal.dayone file, I had an AWS hosted JSON chunk. So the hackathon commenced. HTML was a giant headache, since there isn’t any way to easily split HTML up into chunks, syntactically speaking, at least not with the data that DayOne 2.0 exports. The PDF was a mess, one immense PDF and the text was in 8-point, it’d be fine if I was 20 years old, and didn’t mind slogging through a monolithic PDF file for a date. I even tried to hack around JSON in my limited way. I got JSON out to CSV but then realized that my instinct to make the CSV a data source for a mail-merge and mail-merge my journal out to individual entries was going to be a bust. Macs don’t do mail merge at all. I made peace with that a long while ago, not that I ever had any work that needed mail merge. So there was only one format left, the most basic format, text.

DayOne 2.0 spits out a journal into one monolithic text export file. So I have to figure out how to hack this text file up into pieces. I spent a long while with the bash terminal, screwing around with csplit and discovering the subtle differences between Apple’s implementation of csplit and GNU’s implementation of csplit. After a night of blind hacking, I gave up on csplit. Of course, by this time I had also given up on DayOne 2.0, it wasn’t the application I wanted anymore. My feelings had soured against the manufacturer, for only going so far with their export code and leaving the rest for me to hack out on my own. I was irritated and felt gypped that they didn’t just go one step further and include an “export individual entries” checkbox somewhere. But I got over my funk; I burned that bridge there was no reason to keep on complaining about it. I was moving to Evernote and Bloom Built was pretty much post-fire, all sad ashes soaked with water. Nights of searching and hacking on this monolithic text file and I eventually found the solution. The first step comes with Perl:

#!/usr/bin/perl

undef $/;
$_ = <>;
$n = 0;

for $match (split(/Date:\t/)) {
open(O, ‘>temp’ . ++$n);
print O $match;
close(O);
}

This little script is something I found through Google. I’m far too lazy to hack this out on my own if I’m brutally honest. The keyword in DayOne 2.0 entries in this monolithic text file is “Date:” followed by a tab character. Every entry starts with this key. So, export my DayOne 2.0 journal to Journal.txt, and then run this script against it: ./split.pl Journal.txt. Perl tears the file into perfect chunks ready for action. But the files are temp001, temp002, temp003, so on and so forth. Two lines then add the last crowning bits to each file. The first tacks on a txt extension and the second one grabs the first line of each file and makes that line the new filename. In DayOne 2.0, the first line is the date line. So now my entries have their dates as their filenames. This is just a compromise, I would have much preferred to have the dates preserved in the file metadata, but hey, you get what you get:

for f in temp*; do mv $f $f.txt;done
for f in temp*; do mv $f “$(head -n 1 $f).txt”;done

So for my test journal, I exported from DayOne 2.0 into Text, chopped it all up using Perl, and used the bash shell to hack the names to where I was happy. Then lasso the entire batch of files and drag them into Evernote. Once I had this done for all my journals, I closed DayOne 2.0 and left it alone. There is no point in trashing it, let it dwell on in a ghostly non-life for all I care. Evernote at least has proper behavior when it comes to text entry, tag entry, and the syncing routines are better. Plus Evernote will never abandon me the way Bloom Built did. They’ll never stop updating Evernote for Yosemite, or if they do, it’ll be so far down the pike that I get a new laptop and all of this is just so much foolish wrangling anyways.

In the end, I won. I won against an annoying choice made by a company I used to love; I won against a file format that seems so dumb, and I was able to shoehorn years of journaling without having to abandon my past or make it so annoyingly inaccessible that it would be the same as abandoning it.

If you find an interest in switching from DayOne 2.0 to Evernote, this is one way to do it. There may be better ways, clever ways to convert the JSON to the Evernote import file format, perhaps. But I didn’t care enough to slog through JSON, this is my way, in all its dumb glory. Of course, my tags in DayOne 2.0 are shot, and the tagging in Evernote is a manual affair, so that was another little compromise. Perhaps if I have dull weekends or evenings, I can hack out the tags over time. Having the entries and losing the tags is an acceptable loss. At least I no longer need to force Little Snitch to break DayOne 2.0 so I can use it. Heh, that’s still something that makes me shake my head in disbelief. That you have to do it this way is such a mess.

Assert The Win

Sometimes it’s the best thing to assert you win and walk away from a toxic problem. So far today I’ve done that quite a bit. What have I abandoned?

I’ve walked away from Facebook. It’s been four days since I even logged into Facebook and since then I haven’t missed it. I’ve been catching up on my news; the Spiceworks Community board consumes a lot of time. Then after that, I turned my attention to my Pocket list. There just isn’t enough time anymore to deal with Facebook. When I logged into it, I had eighteen notifications, and I frowned and realized that I didn’t care that much. I’m writing a lot of my thoughts into my journal after coming to the realization that sharing with others isn’t going to be a positive experience. Now nearly everything on Facebook is an unpleasant experience. So, abandoning toxic things seems to be a good thing for me.

Another toxic system is Office365. Microsoft and I go back for a long while, right along with my almost palpable hate for that company and their products. Going into just how Office365 lets me down is very dull. Nearly every interaction has me wishing I could just close my laptop, put it in my backpack and run away from my life. Everything that has some Microsoft technology associated with it has me frowning in deep disappointment. Alas, there is no way to escape the Great Beast of Redmond, so we gnash our teeth and endure the horrors.

The final horror is WordPress itself. I use a stock theme, Twenty-Twelve. It’s not a custom theme. It’s not slick or responsive. It’s just a dumb theme. So while reading my blog, I realized just how much I wanted to change the line-spacing for my post entries. This is where my expectations fork, there is an Apple fork and an “Everything Else” fork. The Apple fork has been proven time and time again, that the answer is simple and shallow and easy to get to, understand what the change will do, and make it work. Then there is everything else. Here we have WordPress itself. I wanted to change the line-spacing on my theme. So I go to the Dashboard, and I spend ten minutes blindly stabbing at possible places where this option might be hiding to no effect. Then I do a Google search, which is the first and last place that most possible solutions are born and die. A good Google search almost always results in the answer you are after. So, “WordPress vertical line spacing” led to a place that eventually had the solution in it, but the theme didn’t match what I was expecting. This is the core of frustration, so I modified the search to include the themes name itself, and that helped. I found the setting, and it was in a CSS stylesheet file. I left the WWW when it was still HTML only. CSS irritates me. But anyways, hack CSS, that’s the answer. It’s a dumb answer, but that’s it. So I find about 130 places where line-height is an option. I laugh bitterly at the number. Which section to edit? Are you sure? So I gave it a shot. I set the line-height to 2.0 and then looked at my site. I can’t tell if it improved or not. But the most adaptive solution is to assert it did what I wanted. Mark the win as a notch and move on. Do I care? Well, I wanted to do something. I did something. Did it work? Probably not.

But then we get back to that first fork. That’s why I love Apple so much. Nearly everything they touch MAKES SENSE. I don’t have to struggle with some labyrinthine mystery. Maybe my edits will work, maybe they will break whatever it is, maybe it won’t matter. Maybe any setting I change will be overridden somewhere else, by something that was never documented. That’s the core design principle of both WordPress and Microsoft. I suppose we should just be happy that the most basic functions work. Much like the Internet itself, the fact that any of this works is a daily miracle.

So instead of writing a huge rant, one that nobody wants to read and nobody cares about I will assert that I won, psychologically move forward and be able to forget the conditions that led me to those particular experiences. The blog doesn’t work like you want? Don’t go there. Facebook a cesspool of ugly humanity? Skip it. Microsoft? Ah, if only it would burn to the ground. But we can’t have what we wish, even if we’d do anything for our dreams to come true.

So! Hooray! A Win! Facebook, WordPress, Office365! Just stop worrying about the bomb. It’s “Someone Else’s Problem®”