We just took an international trip with our baby, who is just almost 3 months old. There were a few pain points we encountered, and some things we hadn’t even thought about before flying.

Contact the airline early about a bassinet.

At least some airlines have bassinets for babies. What I didn’t know was it was only for particular seats on the plane. Call the airline early about getting a seat with a bassinet. We tried to get the seats once we were at the gate, but it was too late.

Make sure you have enough time in layovers.

When you don’t have a baby, you can quickly grab your carry-on and run to your…

Imagine it’s your job is to write tests for your coworker’s black-boxed code.

Your coworker comes to you on Monday and says, “I’ve written the Add function. Can you write some tests to make sure it works?” You think for a few minutes and come up with the following ideas about addition:

  • x + y is the same as y + x
  • 0 + x is equal to x

Wonderful. You write your three unit tests, and your coworker runs them.

package mainimport (
// Read more about this style of unit testing at: // https://github.com/golang/go/wiki/TableDrivenTests func…

Let’s start simple.

Take a look at the two lines of Go below. How could we consicely explain what’s going on here?

x := 4
y := &x

You may say something like the following:

x is 4
y is the address of x

For a reference, let’s take a look at the same code in C or C++ so we can see the types.

int x = 4;
int* y = &x;

The & operator

Let’s take a look at the C line int* y = &x;

If we pretend& is a function, we would write that line as int* y =…


not a reptilian

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store