running vs code from the command line on mac

Today was my FIRST in person FRC (FIRST Robotics Challenge) meeting since COVID showed up. Very exciting! Right now the older students are teaching the younger students. Today was an excellent intro the the UNIX/Git Bash command line. Towards the end, they showed that you can type “code” at the Git Bash prompt and have VS Code open automatically. Then a student asked how to do it on Mac.

There’s an easy way to do it and a hard way to do it. I went with the hard way because I thought I knew what to do. If we had gone the easy way, we would have been done in the meeting. Which proves the point of the importance of reading documentation.

The easy way

Courtesy of the setup docs for Mac

  1. Open VS Code (using Spotlight Search/the UI)
  2. Open the command palette (command + shift + p)
  3. Type path
  4. Choose option Shell Command: Install ‘code’ command in PATH command.
  5. Close VS Code
  6. Open a new terminal window
  7. Type code

The hard way

I divided the hard way into five steps to explain what to do. We got through step 1 and the beginning of step 2 during the meeting.

The Hard Way – Step 1: Find VS Code

I expected VS Code to be in /Applications. On my computer, it is at /Applications/Visual Studio That was not where the student had it. After some googling and failed attempts at using Stack Overflow threads, we found an excellent tip.

  1. Hold option and click the Apple in the top nav
  2. Choose “System Information”
  3. Software > Applications
  4. Wait patiently. No really. Wait some more
  5. Scroll all the way down to “V” and click “Visual Studio Code”
  6. Read the location. It was under <user home>/wpiilib/vscode or something like that. (WPILive is the robotics library)

The student had the good idea to open it in Finder and drag to /Applications. (Open finder and hold option while choosing “Go”) for extra options.

The Hard Way – Step 2: Figure out where “code” executable is and add to PATH

We poked around in the Visual Studio folder but ran out of meeting time. At home, I tried again; this time using the find command

% pwd
/Applications/Visual Studio
% find . -name code -print

Ok. Then. It’s under Contents/Resources/app./bin/code in side the app directory. I knew it was somewhere in there.

The Hard Way – Step 3: Add to PATH

If you are still on the old shell, add the following line to your <user home>/.bash_profile file. If you’ve switched to zsh, use the .zshrc file instead.

export PATH="$PATH:/Applications/Visual Studio"

The Hard Way – Step 4: Reload the file

Run one of these to run the file you just edited and have your change take effect

source .bash_profile
source .zshrc

The Hard Way – Step 5: Launch VS Code



setting up mac office 2019

I updated to Office 2019 during the pandemic but didn’t use Word much during that time. Now I’m setting it up the way I like.

Show Non-Printable Characters

I find it useful to display the whitespace/line breaks etc. This was easy to turn back on.

Word > Preferences > View and then check “All” for “Show Non-Printing Characters”

Adding Styles Quickly

I need to quickly choose styles. In the previous version of Word I had this was a pull down in the top right of the ribbon. In Office 2019, it is Home > Styles Pane. Then my entire right pane is the list of styles. Include the current style as a derived style on top (ex: paragraph + italic)

This pane also has checkboxes for “show style guides” and “show direct formatting guides.” The former puts numbers/colors on the left side that matches the style. The later, highlights text with special styles (like italics).

This approach takes up more real estate than older Word. (where I could just see the text name of the style). I imagine I’ll get used to this quickly and the colors will start to mean something to me. Right now, it feels a bit like a map with the legend “elsewhere”.


I chose View > Navigation Pane and chose “Document Map” so I can quickly navigate to different parts of my document.

what does “in-person” mean for teams that aren’t all in the same location

I’ve been on a hybrid/distributed team for a long time. Immediately before the pandemic our team worked in the following arrangement (everyone worked 5 days a week regardless of location). Since this team was originally all in NY, I was very conscious of the language I used so NY wasn’t “the center of the universe.”

  • 3 people full time in the NY office
  • 2 people in another office in a different city
  • 1 person in yet a third office in a different city
  • 1 person in the NY office three days a week
  • 1 person in the NY office two days every three weeks
  • 1 person full time in her home office

During the pandemic we all worked from somewhere in our home. Some people had nice home offices. Some people worked from a creative arrangement in the middle of their apartment. I used language about myself like “I’m leaving work now” even though I was moving two feet away.

Right now, the NY office is doing a “back to the office” pilot and my team consists of

  • me physically in the NY office
  • one of my teammates physically in the NY office three days a week on a different floor (we weren’t on the same team when the pandemic started so our seats aren’t currently near each other.) It’s a pain to move so waiting until the department shuffles everyone’s seats for that.
  • everyone else at their home offices (I think everyone except the two of us choosing to be in the pilot has an actual home office)

Last week, I was using a bunch of different conference rooms in the NY office to test the new webcams and such. When I wrote up the experience, I used the phrase “in person.” One of my teammates immediately called me out on that. Which I appreciate. I certainly wasn’t thinking of the NY office as being the center of the universe when it was only myself and one other person from our team there. (at one of the meetings; the others I was the only one in the NY office for.) I was thinking “in-person” with reference to myself.

This got us talking and me thinking about various terms that can be used and various sensitivities that can exist around them. I’m using WFH in the comments column for brevity. If you don’t like that term, substitute another in your head to get to the gist. It’s hard to fully qualify every time. Especially in a discussion about terms and subtleties.

in-personEveryone works in person regardless of location.
homeThis doesn’t usually bother people. However, it isn’t always home. I worked for a week from a hotel. In some companies, a person could be working at Starbucks. It varies. I do like that this term is part of the WFH abbreviation. One of my remote teammates said she prefers home office or remote over home.
home officeI like this term when talking about people who actually have a home office. However, it is a term that has sensitivities to me because it includes an assumption that one has a space for a home office. (My WFH area is smaller than a cubical and not anywhere near as conducive to work.
onsiteThis is a location. If there is only one onsite location and everyone is WFH, it could work. However, in my case, there are three “onsite” locations involved so it doesn’t clarify much.
remoteDepending on the context, this could be a good term. In some ways, it has the same problem as “onsite.” However, it could also mean simply that people aren’t all together if not viewed from the lens of a common location.
distributedI like this term because it shows that there are varying locations. And it doesn’t make assumptions about a primary site.
teleworking or telecommutingI like that this is location agnostic. But it also implies that you aren’t at an office. Whereas distributed could mean any location.
virtualThis term assumes that it is replacing an in person thing. It also treats the activity as an alias.If I’m having a meeting, I’m having a meeting. It doesn’t matter if we are in the same room or on Zoom or whatever.

Finally, my teammate brought up this episode from The Big Bang Theory

Sheldon-bot : Can you tell me the specials this evening?

Penny: Sheldon, I’m not waiting on you.

Sheldon-bot: Obviously. I don’t even have water yet.

Penny: Because you’re not here.

Sheldon-bot: That’s discrimination against the otherwise located. I’m going to have to go over your head. Manager, manager. Oh, Lord, look who it is.