Whiteboard White-knuckling – Part 6


This past weekend I thought about the dilemma that resulted from expecting J to do the insertion sort exactly how it was detailed online. Today I tried something new. And it worked!

Today’s whiteboarding session was a selection sort. Easy stuff right? Instead of giving J a problem to whiteboard immediately, I wrote down the word Firefox and cut up the paper so each piece had a single letter. I had J sit down and I put the letters in front of him.

Then I explained the selection sort algorithm. As he did the first pass through the letters, I adapted the lesson on the fly and asked him to “Narrate the decisions your finger is making as you move through the list and select the items to sort.”

He pointed out his finger and pulled out the “e” first.

I asked him, “How did you know that the ‘e’ was the first character to pull out? He said, and pointed with his finger, “I go through the list. And the ‘e’ was the lowest letter. So I pulled it out.”

As we went through the sorting algorithm J asked, “What do I do with the array when I pull it out? Do I compare the rest of the elements with the now empty space in the array?”

This caused me to pause.

“It’s kind of dependent on the language you’re using,” I answered. “When someone asks you what language you’re most familiar with, what do you tell them?”

He thought for a bit and responded, “Java.” Then I asked another question, “What language are you programming in now?” He said, “We’re doing operating systems right now, but even that is in Java.”

I was about to pivot and ask him to write out the pseudo code on the whiteboard in Java. Then I thought to ask another question, “Are you still interested in pursuing secure computing?”

Then we launched into a conversation about how he’s not being asked to program that much during this, his last semester of undergraduate work.

Keeping my thoughts to myself, I said, “Ok, we’re going to pursue C programming from now on.” With his interest in pursuing a career in secure computing, digital forensics, and national defense, we’re going to spend the rest of our time together, focusing on pointers, addresses, null-terminated strings, and the rest of the C gotchas I struggled with (and still struggle with).

“Amor fati. Love everything that happens to you.” – Seneca

Whiteboard White-knuckling Part 5

Whiteboard White-knuckling Part 4

Whiteboard White-knuckling Part 3

Whiteboard White-knuckling Part 2

Whiteboard White-knuckling Part 1


Whiteboard White-knuckling – Part 5


Just finished the insertion sort with J. He got the sort working correctly. After doing this sort with Nick the other day. I was able to see that there needed to be a check to see if the input array had only one item. The nature of the insertion sort algorithm requires the user to check the second element in the array against the first one.

Perhaps the lesson to learn here is that all programmers will code a problem in a hundred different and small ways. Yet another lesson in life that, each person is unique and the solutions offered will never come in exactly how you expect them to.

Lessons pointed out today:

  • Be careful of your indentation. The if and else at the bottom of your code looks like it’s a new code block and not part of the while. Keep this in mind!
  • I really enjoy the data structure you drew on the right side. I particularly like to see all the data constrained in little boxes.
  • Proposed the question, “What would you do if you entered a codebase where the original authors used brackets on the line following the for statement?” J answered: “I would conform my coding style to theirs.” I smiled, “Excellent answer.”

“Look at today as an investment in tomorrow.” – Unknown

Whiteboard White-knuckling Part 4

Whiteboard White-knuckling Part 3

Whiteboard White-knuckling Part 2

Whiteboard White-knuckling Part 1

Swift Pair Programming – Session 4

Today Nick and I worked on the insertion sort in swift. The biggest problem we ran into was learning how to iterate through an array in swift backward. We ended up using “stride” to define the start, end, and increment amount.

Here’s the code for stride:

for index in stride(from: 5, to: 1, by: -1) {

There is also a way to do this in swift using the reverse function:

// Print 10 through 1
for i in reverse(1...10) {

Next week we’ll be tackling the merge sort.

Whiteboard White-knuckling – Part 4


Today I had J take another shot at whiteboarding an insertion sort. I ran into a problem. How do you tell someone their sort is correct or incorrect without sharing what the sort is actually meant to do? There are ways to create your own sorting algorithm, but is it still an insertion sort if it doesn’t have 2 arrays?

Communicating this dilemma to J, I decided to go old school. Paper prototyping old-school. I wrote out the word “Firefox” (the string he was sorting) and cut out the letters so that each letter was on its own piece of paper.

Then I demonstrated the sort. And I used 2 arrays to hold the unsorted list and the sorted list. Today I gave the slips of paper to J to review the insertion sort on his own. He’s whiteboarding the insertion sort now. Excited to see how this comes up. Glad to pinpoint specific points in communication and eventual understanding.

Whiteboard White-knuckling Part 3

Whiteboard White-knuckling Part 2

Whiteboard White-knuckling Part 1

Self-criticism is one of the most common obstacles to great performance in any field

“Self-criticism is one of the most common obstacles to great performance in any field. It’s often called the silent killer of business, because so many executives suffer from it, yet so few dare to speak out about it. I’ve heard a variety of people, from junior associates to the most senior executives, privately admit that much of their workday was consumed by negativity, their inner critics constantly pointing out their failings, or predicting disappointing outcomes for their projects and initiatives. In some cases, they (and I) were amazed that they got anything done at all, considering that, as one executive reported, ‘Eighty percent of my day is spent fighting my inner critic.'” – The Charisma Myth

I’m still working on quieting the inner critic. Buddhists call it the “Monkey Mind”: that endless, chattering, berating, irritating, loud, abrasive voice that constantly mocks, taunts, and trashes us.

The worst part of this, and something we can get hung up on is, this voice is us! Or is it? Where does this voice come from? I believe it comes from unregulated self-hate. How do we stamp out the monkey? Is there a metaphorical banana we can give him to quiet him down? It’s hard to talk when you’re eating right?

Words frame our entire world view. Words frame our sense of self. Words encapsulate and border in our personalities. Have you ever heard the saying, “Words can’t express how upset I feel right now.”

We all know there are limits to words. Words are limiting. How do we make this obstacle become the way? We need to prune words of self-loathing from our conversations with ourselves. Let’s play a game:

What are some of the worst things you can say about yourself?

  • I suck at programming. Everyone’s going to find out.
  • I’m so angry right now!
  • I hate you.

Here are different ways to phrase them.

  • I’ve assessed my strengths and pinpointed my weaknesses in programming. I can study hard and work on the parts I’ve identified.
  • I’m experiencing anger right now.
  • I’m experiencing frustration now. It will pass. Please give me time to calm myself down and I will loop back around with you to discuss this further.

In Buddhism, we talk about feeling anger rather than saying, “I am angry.” We do not identify with the anger and become our anger. We realize that anger is a passing feeling. And we know that most feelings only last about 2 minutes.


Think about the words you use when you are condeming yourself. Try to be aware of the way you are talking to yourself. Are the words your inner critic lobs at you compassionate? What can you do to take the sting out of your own worst enemy? Trim his words. Craft your self-message to build yourself up.