A wonderful reminder from Shawn Blanc that all those little in-the-moment annoyances we experience with our kids, will one day be cherished memories. shawnblanc.net/2019/11/a…

Beignets! (Les Bon Temps, Deep Ellum, TX)

I stumbled across some gameplay footage of one my favorite childhood games I had since forgotten about: Glover (N64/1998)

The visuals didn’t really bring back any memories for me, but the sounds were eerily familiar (in an almost-but-not-quite having flashbacks kind of way).

I’ve been following the WWDC coverage at wwdcbysundell.com, and it’s top-notch! There’s a great post on SwiftUI, if you’re curious what that’s all about.

Update on Freddy: after lots of rest and medication, he’s feeling much better! We were able to take him with us to the lake yesterday for some fun in the water.

Mimosa tree in bloom (Houston, TX)

Unexpected events

It’s been a rough few days.

On Sunday we noticed Freddy (our lovable 100lb goldendoodle) wasn’t acting like himself. He had stopped eating and playing, and slept most of the day.

Later that evening we noticed his abdomen was swollen, and took him to the vet first thing on Monday.

The vet took a few x-rays, and told us his spleen was very large (beyond normal) and that he needed an emergency ultrasound at a specialized animal hospital.

Once the ultrasound ruled out a twisted or ruptured spleen, they performed a needle aspiration and told us they’d need to send the sample off to pathology for analysis, and we’d get the results the next day. They told us lymphoma was the most likely candidate.

The 24 hour wait for the results to come in was awful.

We got the call on Tuesday, and the test was negative for lymphoma (the good news!) but they suspect an aggressive immune-related condition (less-good news).

He’s on several medications now to try and reverse the swelling and bring his energy levels back up.

We’re not sure if the medication will help yet. For now we’re taking it “one day at a time” as the doctors recommended, and keeping our hopes up.

mp-photo-alt[]=

Claiming his section of the couch 😂

Happy to see MacStories created a list of all of their Shortcuts. Great resource with tons of handy shortcuts.

Pretty cool set of updates to micro.blog today, including custom themes. Thanks @manton!

📷 Cold foggy morning in the mountains.

This was some seriously good BBQ.

I updated my micro.blog theme to use @ka’s excellent “Kiko: System Theme”, with a couple tweaks.

(thanks @ka for sharing!)

I recently started using Day One and think it’ll be a keeper for me. I use it like a “family blog”, posting pictures of the kids and things we’ve doing.

Emacs #2: Evil-mode

Back in August, I wrote about how I was starting to learn Emacs. I had planned to post weekly updates as I was learning, but life happened and I didn’t end up doing that. So from now on, I’ll just be numbering these posts with #1, #2, etc.

On the bright side, I’ve still been learning! Since the last post, I’ve:

  • Started using evil-mode!
  • Switched from Aquamacs to homebrew emacs.
  • Setup my ~/.emacs file with some packages.
  • Setup my color theme.

Evil-mode

I’ve been a vim user (occasionaly full time) for a several years, but I intentionally avoided evil-mode when I was getting started with Emacs. I wanted to learn the standard Emacs shortcuts first, before trying anything else.

Once I felt pretty confident with vanilla-emacs though, I was ready to get back some of that vim-awesomeness.

A quick google search turned up this talk and post by Aaron Bieber, both of which were great to help me get going.

Once I got everything setup, I instantly felt at home with evil-mode. I still had access to M-x function and all the Emacs modes I had learned, but now there was a nice layer of vim on top. Like icing on a cake! 🍰

I also setup evil-leader, and bound it to ,, to emulate my vim leader key.

Homebrew Emacs

Aquamacs had been serving me really while I was learning the ropes, but it was time to switch to something more standard. I’m on macOS, so I went with the homebrew cask version of emacs:

brew cask install emacs

.emacs and use-package

Now that I needed to install and configure plugins, I figured it was time to setup my ~/.emacs file.

In Aaron Bieber’s post he recommends use-package for auto-installing packages. It sounded similar to how I was using Vundle in vim, so I went with that.

Once I had use-package installed, I added in a couple of packages like powerline and markdown-mode to try it out.

I also added my ~/.emacs file to my dotfiles on GitHub, because open-source! 🎉

Notes

  • I stole some keyboard shortcuts and configurations from Aaron Bieber’s dotfiles. Thanks Aaron!
  • I updated my karabiner config to allow caps-lock to function as both escape and left-control.
  • I ran into an issue with the powerline separators being the wrong color, that required a special setting to fix.
  • I noticed that emoji aren’t rendering in Emacs. 😭
  • I’m still really glad I started out with Aquamacs. It was easy to install, and behaved more like a standard macOS application which made it easy to get going.

Screenshot

Now that I can install fancy packages, I added Dracula theme for some pretty colors. I also really like having powerline in the bottom.

emacs-2

I’m late writing my next emacs post, but I’ve been trying out lots of new things! I starting using the homebrew version of emacs and evil-mode, and it’s been great! Hoping to write it up soon.

Emacs #1: Getting Started

I started learning Emacs last week!

I’m not using it full-time just yet, for now I’m studying it own its own, and using it for small tasks while I learn the basics.

I decided to keep weekly notes (using Emacs of course!) of the things I learn along the way.

Get started

  • I started out by watching this video that shows off all the things Emacs can do.
  • Next I read this article.
  • I downloaded and installed Aquamacs, based on the recommendations in the article and video.
  • I updated my Karabiner config to remap caps-lock and return to left and right ctrl using this modifier.
  • I read through the built-in Emacs tutorial (using C-h t).
  • I practiced all the basic Emacs shortcuts like moving around, editing, and working with frames and buffers.

Notes

  • I’m still pretty slow moving around and editing files, but I can remember a good bit of the shortcuts without looking now.
  • I haven’t dug into major/minor modes much yet, but they seem really powerful.
  • The built-in help features using C-h are really helpful when I forget a shortcut.
  • I discovered that lots of apps like Alfred, MarsEdit, and GitHub’s web UI support some of the Emacs keybindings like C-n and C-p to navigate up/down menu items! Nifty! 🎉
  • Aquamacs supports lots of the standard macOS shortcuts, like ⌘+s and ⌘+w, which comes in handy (though I try not to use them).

Screenshot

Nothing fancy yet. Pretty much just the out-of-box Aquamacs.

Emacs #1

🎙️ A couple of podcasts I’ve recently discovered and been enjoying a lot:

Writing for yourself

Fellow micro.blog-er @kaa, on writing for yourself:

While it’s easy to fall into the trap of thinking that you’re writing on your website for the ‘internet’, the truth of the matter is that you’re actually writing these things and obsessing about it’s design primarily and sometimes exclusively for yourself.

I fall into this trap a lot. I’ll get a new idea for something I want to write about, then come the little voices.

No one cares about this.

Surely someone out there has already written about this.

You’re probably going to get something wrong anyways.

Somehow knowing that people might read what I write, and that it might not be very good, keeps me from writing altogether.

Getting into micro.blog has actually helped me a lot with this. I’ve found small, title-less posts, are somehow easier for me to write than regular posts. Maybe because they are less “official” feeling, and therefore less likely to be judged like a piece of writing.

I hope I can put Khaled’s words into practice and focus on writing more for myself.

Been working on some updates to the blog!

  • Photo posts now layout in a nice grid
  • New layout with sidebar for larger screens
  • Code blocks use a GitHub-y syntax color
  • Oh, and updated fonts!

⚾️ Play Ball!

Had a great time with the family at the Astros vs White Sox today!

📚 Finished reading Ben Horowitz’s “The Hard Thing About Hard Things.” Great book! Putting it on my top things list too.

Edit for iOS is the perfect little app for writing micro.blog posts! 👌

1) Write a quick note 💭✏️
2) Close app
3) Think about it ☕️⏱
4) Re-open later
5) Tweak and post! 🎉

Fact Snack
“I18n” (short for internationalization) came from “the letter i, followed by 18 letters, followed by n”. 🌐 – (Source)

Ruby Staircase Puzzle

The HackerRank puzzle I did this morning was a lot of fun, so I thought I’d share!

The puzzle was to create a “staircase” output where you’re given a number (let’s say 6), and should produce an output like this:

     #
    ##
   ###
  ####
 #####
######

The output should have an increasing number of right-aligned hashes #, up to the number given (so 6 lines in this case).

Here’s the final solution I came up with in Ruby:

def staircase(n)
  arr = (0...n).to_a.reverse.map do |i|
    arr = Array.new(n, "#")
    arr.fill(" ", 0...i)
    arr.join
  end
  puts arr.join("\n")
end

My basic idea was to create an array of chars for each line of the output, so the third line would be:

[" "," "," ","#","#","#"]

This led to discover the fill method, which sets a range of array elements to a new value (fancy 🥂!).

Since I wanted to each line’s array to have an increasing number of hashes at the end of the array, I decided to map over an array of decreasing numbers based on the input:

(0...6).to_a.reverse   #=> [5,4,3,2,1]

This allowed me to create a fully-filled array in each loop, and zero-out the front of array based on the current number:

arr = Array.new(6, "#")   #=> ["#","#","#","#","#","#"]
arr.fill(" ", 0...3)      #=> [" "," "," ","#","#","#"]

All that’s left then is to join each sub-array, and then join("\n") final array to get the staircase!

I’ve been doing some of these smaller puzzles each day before any of my “big” work, and I’ve really enjoyed it. It’s a great way to have fun and try weird/new ideas.