How to actually create an SSH key (on Mac) Mar 4
This is a quick command-by-command reference for how to create an SSH key. It's essentially a stripped down version of this nicely-written tutorial for using SSH keys with Digital Ocean droplets. I'm assuming you're doing this on a Macbook of some sort, and that you're familiar with the basic Mac terminal commands.
Open your Mac terminal and follow these steps:
-
cd ~
-
ssh-keygen -t rsa
- Hit enter to accept the default file path.
- Make and remember a passphrase if you want to (you don’t have to). Hit enter.
- Your terminal should print out something like: “Your identification has been saved in /Users/YOURNAME/.ssh/id_rsa."
- Copy-paste that file path from your terminal, and use it to cd to the .ssh folder. (Omit the /id_rsa part at the end of the file path.) Your cd command should look something like:
cd /Users/YOURNAME/.ssh
cat id_rsa.pub
- Your terminal should have printed out your SSH public key, starting with “ssh-rsa” and ending with something like “yourname@Your-Macbook.local”.
- Copy-paste that entire thing, including the "ssh-rsa" and "yourname@Your-Macbook.local" bits at the beginning and end. This is your SSH public key. It's not a secret the way a password is, so it's ok to send around. Use it wherever you need an SSH public key that is associated with your computer.
How to actually set up subl (on Mac) Jan 25
This post is a command-by-command walkthrough on how to set up subl, the command line tool that comes with the text editor Sublime Text. Once you've done this, you'll be able to use the subl
command to open files and directories directly from your terminal. You'll also be able to make Sublime the default text editor used by command line tools such as git. I'll include instructions for git specifically, so that when you do git commit
(for example) you can write your commit message in Sublime instead of vim, the default text editor in the Mac terminal.
Why this post?
Among text editors, Sublime is often recommended for beginners, because it's easier than vim or emacs. Still, I remember struggling with "simple" installation and configuration tasks as a beginner. The subl instructions from the Sublime documentation are just one step long, but in practice, you get errors and end up on Stack Overflow, piecing together the prerequisites that the documentation just blithely assumed you already knew. This kind of confused puzzling is actually totally normal in programming, and you get used to it with experience, but it can be demoralizing when you're starting out. So, for beginners, I've put together this one-stop-shop for getting Sublime set up as your default editor.
My assumptions
- You're using a Mac computer running OS X or later
- You've used the Mac command line before (AKA Terminal) and you know what 'cd' and 'ls' mean. If you don't, you can probably still follow along. And here's a quick command line crash course.
- You've already installed Sublime Text, specifically Sublime Text 2. These instructions may work for other versions too, but I haven't tested that. You'll need to slightly modify commands wherever "Sublime Text 2" appears.
- You’ve already installed git (for the part where we make Sublime the default editor for git)
How to install the subl command line tool
Step one: First, we'll check that you have a ~/bin
directory set up, and create one if you don't. In your terminal, enter these commands:
cd ~
ls
You should see a list of folders and files from your "home directory." Do you see bin
listed among them? If not, enter this command before moving to step two:
mkdir bin
Side note: cd ~
simply takes you to your home directory. It took me a long time to figure out that ~
is simply shorthand for your "home directory" path, which is usually something like /Users/aliceyu
, with /
representing your "root directory." This was surprisingly hard to google up.
Step two: Double-check that you have Sublime Text 2 installed in your root Applications folder. This will generally be the case if you're on your own computer and didn't do anything unusual when installing Sublime. To be sure, enter this command:
ls /Applications
You should see Sublime Text 2.app
listed among your applications. If not, you will need to download Sublime, or modify the command in step three if you have it installed elsewhere on your computer.
Step three: We'll create an "alias" of the subl file in your bin directory. It’s ok if you don’t quite know what that means. Copy and enter this command:
sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl
Step four: Now we'll edit your .bash_profile
. It's just a little special file that lives in your home directory. (Sidenote: because it starts with a ".", it doesn’t show up when you type ls
in your home directory, but it does show up if you type ls -a
.)
Enter these commands:
cd ~
vim .bash_profile
This opens your .bash_profile file inside your terminal, using vim, the default text editor used by the Mac terminal. It may be disorienting if you're not used to vim, but stick with me.
Press “i” to get into vim “insert” mode.
Paste in this line:
export PATH=$HOME/bin:$PATH
I recommend you ALSO add this line, which will make Sublime your default editor for most things (but make sure you have added the previous line too):
export EDITOR='subl -w'
Press “esc” to get back into “command” mode.
Type this command and hit enter, to save and close the .bash_profile we’ve just edited:
:wq
Step five: You should now have the subl command line tool set up and working! Let’s test it out. First enter the command exit
, which will close Terminal. Then reopen Terminal and try this command:
subl --help
That ought to bring up the help text for Sublime, which means it worked. If you have any programming projects, cd
into your project folder and run subl <filename>
to open a file in Sublime Text, or run subl .
to open the entire directory that you're in.
How to set Sublime as your default editor for git
This part is a bit easier. Again, I’m assuming you’ve already installed git. Open your terminal and enter this command:
git config --global core.editor "subl -n -w"
I don’t believe it matters what directory you’re in. I ran mine from my home directory.
If that worked, the next time you do git commit
, it should open Sublime and you’ll type your commit message there. Don’t forget you need to save and exit your commit message in order for your commit to go through. I use the keyboard shortcuts cmd s
to save and cmd w
to close the current tab in Sublime.
And that's it! Drop me a line if you found this helpful. Credit to the Sublime docs, the Github docs, this StackOverflow, and my friends Ross and Jake for helping me when I was doing this myself for the first time.
How to pick up practically any habit Nov 26
Around June of this year, I decided I wanted to make a habit out of learning to program.
I had been picking things up here and there since moving to California two years prior. I wrote my first web app in a single three-day sprint during an “app week” we had at work, and I attended a local JavaScript study group on and off.
But I had never been consistent about it. I was interested in programming, and I had a lot of fun during app week, but my job was non-technical, and there was nothing external to make sure I would keep learning. So I came up with a little hack for encouraging myself to learn a bit of programming every single day.
My hack was basically a variant of Jerry Seinfeld's famous "Don't Break the Chain" advice, with a few extra implementation details to help it really stick.
And it’s worked wonderfully! Since kicking it off on May 28, I have studied programming every single day with the exception of only 6 days, plus one week of “permitted break" for Burning Man. It's nearly December now, so that's an average of only 2 days skipped per month.
I’m currently on my longest streak ever — in fact, yesterday marked 100 consecutive days of programming study. It's a simple but powerful hack, and it can be applied to virtually any habit that you want to perform on a daily basis. I’m excited to share the recipe so you too can become awesomer at whatever goals you care about right now.
In a nutshell
“Commit to doing a tiny version of your habit every single day, then prominently track how many consecutive days you’ve met that commitment."
It's basically "Don't Break the Chain," with a “high score” element thrown in, where you're tracking — in some prominently visible place — exactly how long your current chain is.
For the purposes of developing a habit, that score — how many Consecutive Days you’re on — is the only performance metric you need to worry about. Not how much weight you can lift, or how many JavaScript concepts you’ve mastered, or how many blog posts you've published. Just your Consecutive Days.
And no matter how far you’ve made it already, that metric will stop you from getting complacent. In fact, the more successful you’ve been, the stronger the incentive to keep going. I just logged 100 study days in a row. If I fail to study today, I'll be forced to log “0 days in a row" tonight. And I’ll have to get back on the horse tomorrow at “1 day in a row." My beautiful chain will be gone, after building it for literally months, and I’ll have to rebuild it from scratch. I'm pretty sure I'll make sure I study today.
The detailed recipe
Step One: Translate your goal into a daily activity.
Think about something you want to improve about yourself, and figure out what actual daily activity would help you get there. For many goals, this part is easy. If you want to “be fit,” you should exercise every day. If you want to be a great writer, you should write every day. If you want to be a great programmer, you should program every day.
Other goals might require a bit more creativity. If you want to be more outgoing, perhaps you could try interacting with a stranger every day, even if it's just a smile on the train or telling the barista you like their haircut.
By the way, I strongly recommend launching only one new habit at a time. I've since picked up an exercise habit using this same technique, but I only kicked it off after my study habit was well underway. So feel free to brainstorm lots of things you want to improve, to get yourself excited, but for the steps after this one, select one goal to focus on.
Step Two: Turn that daily activity into a tiny, tiny commitment.
You’re allowed to go beyond your commitment on any given day of, of course, but the commitment itself should be so trivial that you could stick to it even on your very worst day, as long as you remember to do it. This step is very important, and very easy to get wrong.
When we’re dreaming, our inclination is to think big. "I’m going to go to the gym every day! I’m going to run a marathon by the end of the year!" But remember: the point of this hack is to build a habit, to make something into an automatic daily part of your life. You’re much more likely to fail at your goals because you ended up not doing the thing at all, than because you did it every day, but not hard enough.
In that spirit, you should think small when choosing your daily commitment.
Imagine coming home after a horrible day where every possible thing that could go wrong did go wrong, and you didn’t sleep enough the previous night, and you have a headache, and your body feels crappy, and your mind is a fog. And you suddenly remember it’s almost midnight and you haven’t done your commitment yet today. Your commitment should be so small that you could succeed at it even under these conditions.
“Go to the gym every day” is much, much too big a commitment for an exercise habit.
“Do a single pushup” is much better.
For my programming goal, my commitment is “15 minutes of studying per day.” And that studying can take any form, so on bad days, I am allowed to just read some relevant blog posts, or watch part of a computer science lecture.
If you want to pick up flossing, and you hate flossing, your habit commitment might be “floss just the space between your two front teeth.” It sounds silly, but trust me on this.
Once you’ve kicked off your commitment, a good test is to look at the days when you derailed (and you will derail at least a few times), and figure out why. For my study habit, it was always: “I just forgot.” Which means my study commitment is a good size… every single day that I remembered my commitment, I was able to do it. If you ever have a derailment that’s something like: “I remembered my commitment, but I just couldn’t bring myself to do it that day,” your commitment is probably too large.
Step Three: Pick a "default time" to do your tiny commitment.
Think about your existing routines and habits, and decide where in your day you could easily fit this new habit. Maybe it’s first thing in the morning when you get up, or during your lunch break, or as soon as you arrive at your workplace, or right before you brush your teeth for the night. It can help to set a reminder on your phone that will alarm every day to remind you.
If your days are highly variable, you can do something like I do: every morning, I set alarms on my phone for when I intend to exercise and when I intend to study. My policy is that when the alarm goes off, I am allowed to hit “snooze” (which causes it to alarm again in 10 minutes), and I am allowed to reschedule the alarm, but I am not allowed to simply turn the alarm off, until I have started my commitment for the day.
Remember: if you did Step Two correctly and chose a sufficiently tiny commitment, your main derailment risk is simply forgetting to do it one day. Good defaults and reminder systems help protect you against this.
Step Four: Choose somewhere to track your Consecutive Days score.
It should be a place you will definitely see every day. A bathroom mirror where you brush your teeth is a good example. Get a whiteboard marker and write on your bathroom mirror:
- Most recent day: <date>
- Consecutive days: <number>
That’s all you really need. Optional things you might also like to track include:
-
Kickoff date: to make it official when your daily habit commitment has begun. You can look back on this date later with pride, and think: “wow, I’ve done this habit almost every day since <kickoff date>!"
-
Total days skipped: how many days have you NOT met the daily habit commitment? This incentivizes you to get back on the horse right away when you derail (and like I said, derailing is normal). When “consecutive days” resets to 0, that number can’t get any worse if you fail your commitment the following day also, but “total days skipped” can.
-
Longest streak: what's the biggest “Consecutive Days” score you’ve ever logged, since your kickoff date? When my current streak is my longest streak, I simply write “current” there, which gives me an extra incentive to keep going. It also gives you something to work toward when you restart after a derailment — trying to beat your current high score.
Step Five: When you’re ready, go for it!
Ceremoniously write “0” next to “consecutive days."
Do your tiny habit commitment.
Write the current date next to “most recent day."
Ceremoniously erase the “0” and write in “1” next to “consecutive days."
And that’s it! You’re off to the races!
Closing thoughts
I’ve included a lot of advice in this post, but the important thing is to just start. Don’t fret too much over whether you’ve set it up just right and followed the advice perfectly. Just take a swing at it and let the game mechanics take it from there. As long as your “Consecutive Days” number is somewhere you can see it, you’ll want to see it go up.
Remember that derailments are normal and just part of the game. Take them as learning opportunities: was your habit commitment too large? Did you simply forget, and need to strengthen your reminder systems, or choose a different default time? It also helps to take a moment to reflect and appreciate how cool it is that you've been doing this thing almost every day, when before, you were hardly doing it at all. Allow yourself to feel proud of what you have accomplished, and get back on the horse.
So what is Alice Dash all about? Nov 20
I was thinking a bit today about “what kind of blog” I want Alice Dash to be. I had named it after the #alice- channel I have in my house Slack team, inspired by the sense of ease and informality and flow that I experience when writing there. I envisioned it as simply a place to put my thoughts and writings in a more accessible format, when something interesting came out of #alice- or someplace similar. I figured I would apply a very light coat of editing (if any) and prioritize being prolific over being "good."
But today, I was thinking of reposting a relationship litmus test that I came up with in #alice-, and part of me was like: "nah, I don’t want this to be a Relationships blog."
But then, another part of me was like: "wait, didn’t you tell yourself that the whole point of Alice Dash was to be a place where you could post anything you were thinking about, without worrying about whether it was 'good' or 'on brand' or thematically related to the other stuff you're posting?"
Didn't you tell yourself that you named it after your Slack channel because you wanted it to be merely a slightly more public version of #alice- itself?
And that if you wanted to be ambitious about some particular piece of content — if you wanted to spend a lot of time editing and thinking about audience and value prop and view counts etc — that you would take that stuff to Medium?
I spent a lot of time working on the writer's block post that I put up yesterday. I knew, partway through, that I was Trying Hard on this one, and not simply doing the thing where I ramble in #alice- and lightly package parts of it for alicedash.com.
And I asked myself why.
And I was like: "I want it to be good! I want to get the blog off to a good start! After that, I can drop the try-harding."
And maybe that's a valid excuse. But I'm also now feeling a sense of: "well, now that I’ve set the bar there, I’ll feel weird posting sloppy stuff."
Or: “People won’t know that this blog is supposed to be just a casual unambitious rambling-ground, and they’ll critique it like it’s a Serious Blog."
Or: “My friends who are savvy about marketing and personal brand will Judge Me."
So I'm following up yesterday's post with this post to address: "what is this blog about, really?"
I'll probably clean up yalice.me at some point and make that my main Personal Brand portal. I could have a section that lists Medium posts as the main attraction that's meant to convey: “read Alice’s brain fruits and be dazzled by them!” And a relatively modest link to alicedash.com, with proper framing around what Alice Dash is, which is probably something like: "This is just an eclectic journal thing. I make no promises about its quality or posting schedule. Feel free to subscribe to it if you just find me to be a personally interesting character for some reason, but I won't try to sell you on that."
I think right now, I should be focusing primarily on just publishing a lot of content. If I want to build audience around a certain topic, I should spin that out as a separate Serious Blog with a mailing list, etc. Like if I wanted to do a blog centered around coding / learning to code, or personal finance for entrepreneurs, or tiny living.
But first, I should practice posting frequently and without care to Alice Dash. Separate out the “write and publish prolifically" skill from the “content marketing” skill. Learn to play before learning to work, kill whatever hangups I have that cause me to take forever to publish anything, and let free the prolific writer within.
So that's what Alice Dash is all about. And this post took 40 minutes to edit, compared to 9 hours for yesterday's. Big improvement.
How to beat writer's block using Slack Nov 19
So I counted just now, and apparently I've written about 15,000 words in the last three weeks. About a third of a novel, going by the Nanowrimo convention.
To clarify: I'm not doing Nanowrimo, this happened mostly by accident, and it is not normal for me to write so much. Writing is generally hard for me, but these 15,000 words were easy. I'm pretty giddy about it, and eager to share the trick that caused it.
To back up: like most of my peers, I've had A Blogging Goal since forever. It's an accepted truism in Silicon Valley that everyone who wants to be anyone should write — that even if it took you 20 years to get good and build up an audience, a good blog is so valuable that you ought to start right away. And like most people who want to write, I struggle.
I've been told I'm a good writer, actually. When I worked at Meteor, I wrote a lot for the blog and mailing list. My post on why web beginners should start with Meteor has been one of the Meteor blog's most popular of all time, and apparently inspired people to do drastic things like quit their job. Back in college, I wrote some fanfiction, one of which has 156 reviews saying things like: "Such an emotional yet beautiful fic. I've never cried like that reading something before." To this day, six years later, I still get about one notification a week saying someone has left me "kudos" on one of my stories.
The problem is: getting myself to write has historically been a laborious process involving a lot of procrastination, self-flagellation, accountability systems, locking myself in rooms, turning off WiFi, putting phones on airplane mode, pomodoros, goal-alignment meditation, and all kinds of other willpower-consuming attempts to impose discipline onto a brain that dives headlong toward the nearest source of internet fuckery and self-distraction whenever I ask it: "….sooo, shall we write today?" Even when it was my full-time job to write for Meteor, it took so much effort and willpower to have a good writing day, that I could only manage it about once a week, maybe two or three times if I was feeling cheerful and getting plenty of sleep and one of the posts was allowed to be formulaic.
My main problem is in the rough-drafting phase, the "don't think, just write" early bit that is critical if you want to be prolific, and not merely good. I have premature editing syndrome like it's a disease.
So whence these 15,000 words?
The thingy in a nutshell
Here it is: Do your rough drafting in a Slack chat channel instead of in a document.
That's it. It sounds a bit too-simple and anticlimatic written down, but "I accidentally 15,000 words" crosses the threshhold where perhaps I'm On To Something and should share it anyway.
My personal slack channel wasn't originally conceived of as a writing aid — I figured I would mostly use it as a place to write down my goals for the day, in a place where my roommates might see and hold me accountable. But it's turned out to be the perfect place to ramble stream-of-consciousness style about whatever I'm thinking about, which is what good rough-drafting is all about.
The how-to
-
Set up a Slack team with a few trusted friends. These should be people that you like and find easy to talk to, people with whom you feel safe sharing half-baked ideas. In my case, my roommates and I already had a house Slack team, just for chatting and bantering and keeping on the same page about house things.
-
Create a personal channel and add your friends to it. Mine is called #alice-. Channel purpose: "Alice talks to herself, and maybe to you!"
-
Write liberally about whatever's on your mind. Think out loud. Ramble. Keep it casual — you're just talking to yourself, after all. Your friends can read along (if they want to) at their own pace. And not everything you write has to be Deep Thoughts and Future Blog Posts. Funny incidents and pictures from your day are A-OK too. Just share what's going on with you.
-
Copy-paste the interesting stuff for editing. Now and then, something interesting and potentially blog-shaped will emerge from your ramblings. Now is the part where you're allowed to move your words into a document and do some editing.
Why it seems to work
Email and chat are so ubiquitious in our lives — so frequently and casually used — that it probably doesn't even feel like writing to you. It's more like talking. You're just having a conversation with a person on the other side. Words flow so much more readily when you're looking at a chat input box or a Gmail compose window, compared to staring at a blank paper or text editor. It somehow bypasses the part of your brain that makes "just writing" hard.
With chat in particular, the medium encourages you to write just a sentence or two at a time, and it prevents you from easily going back and editing the previous line. Once you've hit enter, the focus jumps to the next bit of thought. And unlike a text editor, a chat client feels like it's listening. There's a quiet expectancy to the blank input line. You're in the middle of a long train of thought, and you don't want to leave your listener hanging for too long with only "alice is typing…" to look at. So you get to your point, and resist stalling for the perfect words, and keep the momentum moving forward. Perfect rough-drafting form, in other words.
Why Slack in particular?
There are a lot of chat clients out there, but I think Slack is particularly well suited for writing long-form. For a few reasons:
-
Multiple independent channels. Slack makes it easy to create any number of channels (i.e. chat rooms), each with its own purpose. I can write as much as I want in #alice- channel without getting in the way of other things my roommates might want to talk about.
-
No unnecesssary notifications. Imagine writing a long essay a sentence at a time over Facebook Messenger or Gchat. Your friend's phone would be going off every few seconds for a long time, whereas Slack doesn't ping people unless they've been explicitly mentioned. When you write new stuff in your Slack channel, your friends will simply see that your channel has unread messages, the next time they open Slack.
-
Good for both conversations and monologues. Perhaps THE great thing about Slack is that it's good for having a back-and-forth in real time, but it's also great for writing a bunch of stuff and then having other people read it later. Slack makes it easy for people to find where they left off and catch up, or react in real time if they happen to be on when you are.
-
Nice mobile versions. Perhaps half the writing I've done in #alice- has been on my phone. I can write in my channel immediately any time I have an interesting thought, then later I can easily copy-paste from the Slack desktop app for editing.
A Slack channel has a quiet, passive-listening quality that makes it really easy to talk to. It doesn't have the "Hey! I'm talking to you right now!" loudness of a strictly realtime chat like Messenger, which would tend to make you shy about posting to the chat.
"Alice talks to herself…" — There's a kind of safe privacy in the Slack channel, like writing in a private journal.
"… and maybe to you!" — But a kind of pointfulness and purpose that a journal lacks. Someone is listening and interested in what you have to say. They might be following along in real time, or they might not. You're not bothering them, either way.
So everything is easy now, right?!
Not exactly. Editing is still a lot of work. It took me nine hours across four days to go from the bit of #alice- ramblings that prompted this post to the finished product, and that process still did involve a lot of procrastination, self-flagellation, etc.
But all the same, historically I've been bottlenecked on rough-drafting, and now I find myself bottlenecked on editing, and that's a big improvement. I now have maybe half a dozen posts sketched out in rough chat form, just waiting and itching to be turned into proper blog posts. Getting started has always been the hardest part for me. Once I have the thoughts in words, however rough, the rest is relatively easy.
Even if you don't publish, I believe the writing itself to be the most important part, especially when you're starting out. It's more important than the medium or distribution. Writing helps you clarify your thoughts, and have more and better thoughts. If you find you write more easily in the form of chats or emails, please do take full advantage of that, and give yourself permission to feel good about writing that takes place in this context. It's "real" writing. It counts. And if something interesting happens to come out of your chat ramblings, and your friends clamor for a shareable link, you can always choose to package up a "proper" blog post. The point of publishing is merely to make your thoughts easier to share outside of your small, trusted Slack audience.
So that's what I've got for now. Welcome to AliceDash.com! I hope to have more for you soon.