Megan Taylor

front-end dev, volunteacher, news & data junkie, bibliophile, Flyers fan, sci-fi geek and kitteh servant

Home

I am a Developer at Forsman & Bodenfors. Previously, I was the Developer for Jewish National Fund, where one of my projects won an award. In my free time, I teach code to high school students with CodeNation. Some of my projects are on GitHub, because I learn more when others can critique my code. I blog about what I’m learning and random tidbits that catch my fancy.

Recent Work

The Story Exchange

NYC Farmers Market Locator

Quiz Web App

Shopping List Web App

Recent Posts

post

Permutations vs Anagrams vs Palindromes

Check Permutation: Given two strings, write a method to decide if one is a permutation of the other.

I’m working through algorithm exercises with a group of people, and there was a lot of confusion about what permutation means, and how it differs from anagrams and palindromes.

So, to clarify:

A permutation is one of several possible variations, in which a set of things (like numbers, characters or items in an array) can be ordered or arranged. A permutation of characters does not have to have meaning.

Example: Given the string abcd, the permutations are abcd, abdc, acbd, acdb, adbc, adcb, bacd, badc, bcad, bcda, bdac, bdca, cabd, cadb, cbad, cbda, cdab, cdba, dabc, dacb, dbac, dbca, dcab and dcba

An anagram is a word, phrase, or name formed by rearranging the characters of a string. An anagram must have meaning, it can’t just be gibberish.

Example: These words are anagrams of carets: caters, caster, crates, reacts, recast, traces

A palindrome is a word, phrase, or sequence that reads the same backward as forward. A palindrome must have meaning, it can’t just be gibberish.

Example: Civic, level, madam, mom and noon are all palindromes.

All palindromes and anagrams are permutations, but not all permutations are either anagrams or palindromes.

post

Documenting a Clean MacOS Mojave Install

I’m reviving a 2013 MacBook Pro with a clean install and fresh setup. This is mostly documentation for myself.

System Preferences

Install some apps

LastPass
Dropbox
Chrome
Chrome Sync + Extension Settings (must check each extension and copy from previous settings manually)
Mac App Store Apps

Homebrew

At this point I decided to take the opportunity to learn something new. A coworker had recently taught us about dotfiles at our weekly tech check-in, so I wanted to see if I could install the rest of my apps using Homebrew.

I installed Homebrew and Homebrew Bundle and created a Brewfile based on what I had installed on my work machine. I created a dotfiles folder in my Documents folder and stored the Brewfile in the dotfiles folder. Then I opened that directory in Terminal and ran brew bundle.

Mischief managed!

Last couple of steps to reach basic usability:

  • make bash auto-complete case insensitive with echo "set completion-ignore-case On" >> ~/.inputrc
  • setup git/ssh keys

At this point it’s been about 1.5 hours since I started.

My Specific App Setup / Persnickety Shit

Add licenses for Alfred, Bartender, BetterTouchTool and HyperDock
Setup/log into Airdroid, Alfred, Bartender, BetterTouchTool, Franz, HyperSwitch, HyperDock, Kindle, ReadKit, Slack, Spillo, Stretchly, Todoist (copy settings for ReadKit and Spillo from previous settings manually)
Add Spillo, ReadKit, Chrome, Slack, Franz to dock
Install SetApp apps
Customize right-click menu
Enable dragging by swiping on trackpad:
System Preferences > Accessibility > Mouse & Trackpad > Trackpad Options > Enable dragging
Enable git colorized output: git config --global color.ui auto
Setup VSCode with Settings Sync extension (Gist)
Add git auto-completion: https://www.linkedin.com/pulse/how-enable-git-tab-completion-bash-mac-os-x-conor-livingston/

post

Reducing dependency on console.log

A co-worker recently brought to my attention that I always reach for console.log when I’m trying to figure out why some code is not behaving as I expect. It’s rather like always reaching for a hammer and ignoring the screwdrivers and wrenches. Sometimes a hammer is the right tool. Sometimes it’s not. Ultimately, scattering console.log around your code like fairy dust is not a particularly effective debugging method.

 
These are some things I’m reading to branch out and get comfortable with more debugging tools and techniques:

I hope these links are helpful to others looking to improve their debugging processes!