Toggling Transparency in iTerm2

I recently started developing full-time in Vim again because all my code has to run on remote virtual machines. I like using iTerm2 with some transparency enabled so I can see what’s going on in my browser, but it’s started giving me a headache now that I’m spending all day in my terminal. I couldn’t find a built-in hotkey for toggling transparency in iTerm2, so I cooked something up with AppleScript.

  1. Launch Automator, which comes pre-installed with your Mac.
  2. When prompted for a new document type, select “Service”.step-2
  3. In the “Actions” tab on the left, search for “applescript”.step-3
  4. Drag the “Run AppleScript” result into the window on the right.step-4
  5. Copy and paste this script into the text area, then hit the hammer icon to build it.

    tell application "iTerm"
        if the transparency of the current session of the current window > 0 then
            repeat with aWindow in windows
                tell aWindow
                    repeat with aTab in tabs of aWindow
                        repeat with aSession in sessions of aTab
                            tell aSession
                                set transparency to 0
                            end tell
                        end repeat
                    end repeat
                end tell
            end repeat
        else
            repeat with aWindow in windows
                tell aWindow
                    repeat with aTab in tabs of aWindow
                        repeat with aSession in sessions of aTab
                            tell aSession
                                set transparency to 0.3
                            end tell
                        end repeat
                    end repeat
                end tell
            end repeat
        end if
    end tell
    

    step-5

  6. Change the dropdown boxes on top so that they read “Service receives no input in iTerm”. You may have to click “Other…” in order to select iTerm.step-6
  7. Save this as “Toggle Transparency”.step-7
  8. Open System Preferences, and go to the Keyboard section, then the Shortcuts tab, then the Services category.step-8
  9. Click on “Add Shortcut” next to “Toggle Transparency”, and record a key combination. I use Cmd + Shift + U.

Try it out! Open iTerm2, and hit your key combination a few times. You can also run the script by click on iTerm2 in your menu bar and going to Services. You may want to tweak the AppleScript I provided if your default profile has transparency because my default profile does not have transparency. Just flip the transparency values of 0.3 and 0.

Notes on Verbal Judo

Verbal-Judo.jpg

George Thompson was a PhD-wielding, blackbelt-wearing, college professor turned cop turned “Verbal Judo” instructor who sadly, passed away in 2011. I read the first half of his book (chapters one through twelve) in one sitting. It was full of actionable advice for dealing with difficult situations, and Thompson sprinkled it with funny anecdotes that made the lessons stick. The second half of the book wasn’t nearly as interesting to me. I might have to re-read those chapters a year from now, after I’ve practiced the lessons in the earlier chapters.

  1. The ultimate goal is to move a disagreeable person to the point of voluntary compliance
  2. Let insults roll off you. Do not defend, do not counterattack. Just laugh it off. An attack only carries the weight you allow it to.
  3. There are three major types of people
    1. Nice people, who will do what you ask them to
    2. Difficult people, who will keep asking “why?” — you want to tell them how it benefits them
    3. Whimps, who dislike authority but don’t have the guts to confront it, who will gossip and plot revenge in the shadows — call them out, force them to either make a point in public or stop.
  4. Eleven things to avoid saying
    1. “Come here!” — the other person will hear “go away”. Instead say “can I chat with you?”
    2. “You wouldn’t understand” — it sounds like an insult. Instead say “I hope I can explain this.
    3. “Because those are the rules” — it makes you a mindless enforcer. Instead, explain how the rules, in context, lead to everyone’s well-being.
    4. “It’s none of your business” — it makes the other person feel like an outsider. Instead, say “I don’t feel comfortable revealing that”.
    5. “What do you want me to do about it?” — you’re evading responsibility. Instead, explain that you want to help, but can’t, and direct them to someone who can.
    6. “Calm down” — it’ll just make people more upset. Instead, ask them what’s wrong. They’re upset about something and want to talk.
    7. “What’s your problem?” — puts the other person on the defensive. Instead, say “what’s the matter? how can I help?”
    8. “You never/You always” — avoid absolute generalizations as they’re usually lies. Instead, explain that “when you do X, I feel Y”.
    9. “Don’t make me repeat myself” — it forces you to act in the future and puts the person on the defensive. Instead, say “it’s important that you understand this, so listen carefully”.
    10. “I’m doing this for your own good” — it’s condescending and turns your listener into a cynic. Instead, offer concrete examples of the good you’re trying to achieve.
    11. “Be reasonable!” — you’re calling the other person unreasonable, and inviting more conflict. Instead, be reasonable with them. Summarize their position in their own words, and use that to help them think logically and less destructively.
  5. If someone has been emotionally hijacked, help them postpone action until they’re stable again: “give it 24 hours, and we’ll talk again.” Don’t say “don’t do that”, or try to reason them out of doing something.
  6. Deflect, don’t block, verbal attacks. Use “strip phrases”. When someone insults you, thank them, and then pivot and say what you need to get your job done.
  7. If you need to interrupt someone, paraphrase them.
  8. The Five-Step Hard Style
    1. Ask
    2. Set context (in response to “why?”)
    3. Present options in the person’s best interest
    4. Ask if any cooperation is possible
    5. Act
  9. Name the type of people who you struggle to deal with, and you won’t be as easily hijacked the next time you deal with then.
  10. Listening is actually the job of the speaker. You have to communicate in a way that your audience will respond well to.
  11. Words account for less than 10% of what you’re communicating. Your tone of voice and other nonverbal cues are far more important.
  12. Verbal Judo is also useful at home, and in the workplace.
  13. If you need to give criticism, give it first, then praise. Reversing the order makes the praise seem insincere.
  14. Be specific with your praise. Don’t just say “good job on that”, go into detail.

Notes on Drive

Drive

I told myself that I’d read Drive after finishing The Mythical Man-Month, but I lost interest in the latter pretty quickly. Drive’s “surprising” truth isn’t all that surprising to those of us who are fortunate enough to be creative workers in a frothy tech industry: after a certain point, material compensation isn’t as important to us as the joy we get from doing our work.

I discovered when I reached the end of the book that taking notes on Drive was superfluous; the end of the book is packed with helpful reference material, including an executive summary. Nevertheless, these may come in useful:

  • Motivation has changed through the ages
    • Food, and not being killed
    • Basic needs are met, seek reward and avoid punishment more broadly
    • Motivation 2.1: Loosened dress codes, more flexible hours
    • Motivation 3.0: autonomy, mastery, purpose
  • Problems with carrots and sticks
    • They can extinguish intrinsic motivation
    • They can diminish performance
    • They can crush creativity
    • They can crowd out good behavior
    • They can encourage cheating, shortcuts, and unethical behavior
    • They can become addictive
    • They can foster short-term thinking
  • Carrots work if the task is dull, but you have to acknowledge that it’s boring and necessary, then let people complete the task in their own way.
  • Friedman’s two types of people
    • Type A: Excessive competition drive, aggressiveness, impatience, and a harrying sense of time urgency. Significantly more likely to develop heart disease.
    • Type B: Just as intelligent as ambitious as Type A, but their ambition steadies them, and gives them confidence and security.
  • McGregor’s two outlooks on employees
    • Theory X: People dislike work, fear responsibility, crave security, and badly need direction.
    • Theory Y: Work is as natural as play or rest. People are creative and ingenious, and they will seek responsibility under proper conditions.
  • Pink’s two types of people
    • Type X: fueled by extrinsic desires, concerned about the rewards that activities lead to, rather than the inherent satisfaction of the activity itself.
    • Type I: fueled by intrinsic desires, concerned about the inherent satisfaction of the activity, rather than the rewards that it leads to.
    • Type I’s almost always outperform Type X’s in the long run.
    • Type I’s don’t disdain money or recognition. Employee compensation must hit a baseline or their motivation will crater regardless of their type.
    • Pay a Type I enough and you’ll take money off the table, allowing them to focus on their work. For a Type X, money is the table.
    • Type I’s are physically and psychologically healthier.
    • Humans are, by default, Type I.
  • Autonomy
    • Autonomy is the most important of the three basic human needs.
    • Empowerment is not autonomy. It is simply a more civilized form of control.
    • Type I behavior emerges when people have autonomy over the four T’s:
      • Task. The “20% time” that companies like Google, Atlassian, and DOW give their employees results in many new products.
      • Time. Lawyers are universally sullen because they bill by the hour, and law is a zero-sum game.
      • Technique
      • Team
  • Mastery
    • A mental state of Flow is how people achieve mastery.
    • In Flow, the relationship between what someone has to do and what they can do is perfect.
    • There are two things companies can do to help employees achieve mastery:
      • Give them “Goldilocks Tasks” — challenges that are not too challenging but not too simple.
      • Trigger the positive side of the Sawyer Effect, and turn work into play.
    • Achieving mastery is painful. Therefore, grit is essential to mastery. In fact, it is as essential as talent.