[MUSIC PLAYING]
DOUG STEVENSON: Hey, everybody.
Welcome to Meet Firebase, where you
get to meet the Googlers that make Firebase happen.
On the show with me today is Pedro Nunes.
Pedro.
PEDRO NUNES: Hey, everyone.
DOUG STEVENSON: Good to have you on the show.
PEDRO NUNES: Nice to be here.
DOUG STEVENSON: What do you do with the Firebase team?
PEDRO NUNES: I'm the tech lead for the front end for crash
reporting, and I also help out around the console,
around the whole other products as well.
And I've been focusing most recently
on mobile responsiveness of the console.
DOUG STEVENSON: If anyone at home
has used Firebase Crash Reporting,
they've probably seen your work already.
PEDRO NUNES: Hopefully.
Hopefully they liked it, too.
DOUG STEVENSON: Yeah.
I like it.
I've got a lot of use out of it.
But about you, where are you from?
PEDRO NUNES: Originally, I'm from Portugal.
I was born in a tiny island between Lisbon
and New York called Terceira.
It means third in Portuguese.
And it's part of the Archipelago of the Azores.
DOUG STEVENSON: Ah, the Azores.
PEDRO NUNES: Yeah, Anthony Bourdain likes it.
DOUG STEVENSON: Yeah.
Yeah.
Well, that's how I found out about it too,
watching his show.
So what are some interesting thing about the Azores?
PEDRO NUNES: It's extremely green.
It's extremely beautiful and untouched.
Nature is just overwhelmingly beautiful.
It also has very interesting and unique traditions,
namely around bullfighting.
But in that traditional way that we know.
It has a different philosophy behind it.
You also have very interesting culinary dishes,
especially being an active volcano zone.
There's a very well-known stew, at least in Portugal,
that is cooked underground.
So you go to near a geyser zone.
And you dig the hole.
And you wrap food around the blanket,
bury it, come back four hours later.
It's great.
DOUG STEVENSON: And the volcano cooks the stew?
PEDRO NUNES: Yes, the soil is that hot.
DOUG STEVENSON: Wow.
PEDRO NUNES: It's amazing.
DOUG STEVENSON: I have to try that sometime.
PEDRO NUNES: You should.
DOUG STEVENSON: So you were born in the Azores
and then you moved to Portugal.
What did you do there?
PEDRO NUNES: I moved to the mainland,
together with my family, when I was about six,
and grew up part of my life there as well.
And then eventually I joined college
in Coimbra, which is a very old college, very interesting
experience as well.
DOUG STEVENSON: You know.
And you studied computer science there.
PEDRO NUNES: I did.
DOUG STEVENSON: And then at the beginning of your career
you became a software engineer.
But you didn't stick with that.
So what happened?
PEDRO NUNES: I didn't.
I worked there for two years in Portugal.
And eventually I wanted to try something else.
I wanted to see what it was like to live abroad,
to work abroad, to do other types of work.
And I did.
There was an opportunity to join Google in Ireland
doing customer support, and that's what I started doing.
DOUG STEVENSON: So you transferred essentially
into a customer support role.
PEDRO NUNES: Right.
DOUG STEVENSON: But you still found ways
to make your engineering background work.
PEDRO NUNES: That's correct.
I was doing customer support.
And after a while of doing support,
you end up realizing, at least in our case,
that there's a lot of processes that look repetitive.
And if something is repetitive enough,
then you can automate it.
So I started automating some of those processes,
and doing internal tooling and dashboards for that department.
And eventually I moved back into engineering again.
DOUG STEVENSON: And so you became a software engineer
at Google.
And then you joined the Firebase team, which
is kind of where we are now.
PEDRO NUNES: True.
DOUG STEVENSON: You mentioned you grew up
in the Portgual area.
Then you moved to Ireland.
And you didn't stay there.
You actually like, traveled all over the world.
PEDRO NUNES: Yeah, I've been traveling a lot.
Traveling is something that I love.
It just provides me with unique experiences and knowledge
of people and the world.
It's just like building software, right?
You cannot feel one experience.
It needs to be dynamic enough.
And if you don't understand really the people,
and how different places are markets or whatever,
it's never going to be great.
DOUG STEVENSON: And so how widely have
you traveled throughout the world?
PEDRO NUNES: I've been to about 50 countries,
a little bit more.
DOUG STEVENSON: Wow, 50 countries.
But what is one place in particular
that really stood out to you, where you really
had a great experience?
PEDRO NUNES: Every place is very unique
and very different and special in many ways.
Most recently, I was in Vietnam.
And that was a very unique experience.
You travel through this isolated region.
You see these small communities that live and work
in the rice fields every day.
You understand that the same constructs
that we have in our society as being rich or as being poor,
it's really different.
They don't care about your color, about your height,
about your anything.
They just give you everything.
People are just genuinely good.
It was an amazing learning experience.
DOUG STEVENSON: So you've probably,
I imagine, taken all these experiences
and brought them into the Firebase experience
to some degree.
So I know in the Firebase team you've
tried to make the Firebase console very
easy to use on mobile devices.
PEDRO NUNES: Yes.
Yes.
There is something that is very important.
Not only about mobile responsiveness
so that you can--
it's important to see crash details
or whatever it is that you are looking
for at that particular moment without having
to wait to get home or to get to a desktop.
But also because throughout the world
there's different infrastructure.
So it's important to make the console very responsive
and very fast on slow connections,
on all these different types of environments,
so that it becomes accessible for everyone.
DOUG STEVENSON: For crash reporting, in particular,
I imagine there's a particular need to be able to triage
and respond to crashes.
PEDRO NUNES: There is.
We actually made that.
And it became very evident.
And it's actually highly used now with the new release
of the alerts, which gives an entry point to the console.
And I mean, when was the last time you opened
an alert on your desktop?
You usually do that on as you go.
The button says View Detail, doesn't say Open Later.
That's exactly the point.
DOUG STEVENSON: Yeah.
So I hope a lot of people find that very helpful,
being able to view the console more easily on a mobile device.
So something in the news recently,
Google announced that they are acquiring Fabric,
which includes Crashlytics, which is
another crash reporting tool.
And so I think a lot of developers
are probably wondering, which one do I choose?
Do I choose Crashlytics, or do I choose Firebase Crash
Reporting?
What kind of advice do you have for them about that?
PEDRO NUNES: Well, developers should evaluate both options
and go with the one that serves their immediate needs.
Crashlytics joining Google should not
affect anybody live today or tomorrow.
Google should provide a smooth transition
throughout the process, as time evolves.
DOUG STEVENSON: All right.
Great.
So it sounds like no matter what developers choose,
Google's got their back so that they
won't have to have some sort of rocky transition.
PEDRO NUNES: That's right.
They should not.
DOUG STEVENSON: OK.
So I have a game to play with you now about crash.
PEDRO NUNES: All right.
DOUG STEVENSON: So I have a tablet here.
And what I've got is a series of code chunks
that either definitely will crash or may crash, depending
on some circumstances.
I'd like you to take a look at these and see what you think,
and we'll score them at the end.
The first one is Java.
PEDRO NUNES: Right.
I can see that much.
DOUG STEVENSON: OK.
PEDRO NUNES: These will essentially raise
an out of bonds exception.
DOUG STEVENSON: Out-of-bounds.
PEDRO NUNES: Yeah.
When the i reaches the length.
DOUG STEVENSON: Right.
So how would you fix this one?
PEDRO NUNES: Remove the equal.
DOUG STEVENSON: Remove the equal.
So it's just i less than.
PEDRO NUNES: Right.
DOUG STEVENSON: Args.length.
OK.
Yeah.
So, yeah, we're definitely crawling off
the end of the array.
All right.
Next question.
This one is C.
PEDRO NUNES: Ooh.
It has been a while.
DOUG STEVENSON: This is a little tricky one.
PEDRO NUNES: This is a little tricky one.
So there's a pointer, a char pointer.
There's two x's.
I actually don't know how this is going to go.
DOUG STEVENSON: It's a trick because the code looks
like it's trying to replace the first character of the string
from R to T, and then printing it out,
but that second line where the string pointer equals T, that's
actually going to crash because it's not
indexing into the string.
It's actually messing with the string pointer itself.
So it looks like it will work, but it actually doesn't work.
PEDRO NUNES: All right.
DOUG STEVENSON: Let's move on to the next one.
This one is back to Java.
PEDRO NUNES: So you have a function f.
S is null.
You switch on arg if arg equals key.
And you want to know the length of S.
These might crash if there's no default on the switch.
These will crash if arg does not eventually
match key 1 or key 2.
DOUG STEVENSON: Yeah.
So with the exception?
PEDRO NUNES: The exception?
This is null pointer exception.
DOUG STEVENSON: Null pointer exception.
That's right.
Very cool.
Let's go to the next one.
PEDRO NUNES: So you have an object routes
that has bunch of entries that are functions.
Then you have this dispatch function,
which is going to call on this.
The parameter route will potentially
have the value of route one or route two.
So yeah.
This will fetch one of those functions,
and need to call that function.
DOUG STEVENSON: So what about the value of route?
PEDRO NUNES: Yeah the value of route will be like route one,
for example.
Correct?
And you're going to call that function again and again
and again.
I don't understand.
DOUG STEVENSON: Well, let's take a look.
Consider if route doesn't match one
of the entries in the route's object.
PEDRO NUNES: If route has the value of Doug, for example.
DOUG STEVENSON: Why would it have the value of me?
PEDRO NUNES: Right.
That'll be undefined.
Undefined is not a functions.
That's classic.
Then you're going to call a function
with undefined and with args.
You're going to call the routes with undefined.
DOUG STEVENSON: Yeah, you're going to end up
with an undefined function.
PEDRO NUNES: Exactly.
DOUG STEVENSON: Coming out of that.
And then what happens if you try to call a function--
PEDRO NUNES: Undefined is not a function,
which is that classic Java script error.
DOUG STEVENSON: Yeah.
Yeah.
It's a JavaScript version of null pointer.
PEDRO NUNES: Yeah.
It's terrible.
It's been tormenting me for years.
DOUG STEVENSON: Yeah.
You and me both.
All right, we have one more.
PEDRO NUNES: All right.
DOUG STEVENSON: What do you think of this one?
PEDRO NUNES: While the monkey is hungry,
you want Firebase to send the monkey bananas?
DOUG STEVENSON: Yeah, I don't know about that one.
That seems like something that Nate maybe added into our game.
I'm not to talk to Nate about tampering with our games again.
SPEAKER: Hey, don't touch my bananas.
PEDRO NUNES: It's interesting.
I'm kind of hungry myself.
DOUG STEVENSON: Yeah.
I think-- well, if you know Nate,
this could be an infinite loop, because he seems
to be hungry all the time.
PEDRO NUNES: [INAUDIBLE].
DOUG STEVENSON: Yeah, we'll have to see how this algorithm
actually works for him.
All right, Pedro, thanks for playing the game.
PEDRO NUNES: Thanks for having me.
DOUG STEVENSON: And I'll talk later
about tampering with the game.
It seems to cause some difficulty.
For everyone watching at home, you
can subscribe to the Firebase channel
on YouTube to get updates on all our video content.
My name is Doug Stevenson.
This is Pedro Nunes.
I'll see you next time.
[APPLAUSE]