Modernization Hub

Modernization and Improvement
CT at Google: Facilitating Software and Game Development though Abstraction

CT at Google: Facilitating Software and Game Development though Abstraction

Duncan: Phones today can do
some pretty amazing things. The devices themselves
are pretty cool, but it’s the apps on them
that make them truly magical. Anyone who has
a smartphone today can get access to hundreds
of thousands of apps and download them at the touch
of a button. Dave: A big part is
that smartphones have become a lot more powerful over time. The way that developers
develop applications has also become a lot easier
over time. Duncan: You no longer need to be
an expert in computer science or have a huge team
of programmers. Some of the top games released have been written by
a single programmer in a week. Dave: So one of the things
that makes this a lot easier for app developers today is, there’s a lot of ready-to-use
code out there that can do really powerful
things for you. Duncan:
So let’s take that example of when you download an app. You’re just clicking a button,
and it starts downloading. The details aren’t
important there. You just use it. So, in programming, we call these ready-to-use
pieces of code APIs. Michal: API stands for application
programming interface. An API lets you do
really powerful things when you’re programming. So, on our team, we get to make
APIs for game developers. That means that we build code that developers can then use
in their games. Duncan: We have an API that lets
them make multiplayer games so people can compete in real-time
anywhere across the world. We also have an achievements API that lets developers
set up achievements for anyone to go chasing. We also have a leaderboards API that they can drop in
super quickly to allow friends to compete
with each other or to allow players like you to see how you rank
against the world. Michal: So features like
achievements or leaderboards, they’ve been around for years, but building them without an API
is really time-consuming. Developers would need to think
of a lot of things themselves, like, we need somewhere to store all the leaderboard information
and all the scores so that me and all my friends
would get a consistent view of everything that’s going on. We need some way
to send messages from the phones to report things
like new levels reached back to that central place
where we save all the data. And every developer would need
to do it again and again for every game that they write. What we provide is one place that developers
can just integrate with and it does all this for them. Dave: The process
of taking something complex and figuring out a simple way
to work with it is called abstraction. For example,
when you’re downloading that app to your phone, there’s all kinds
of complex stuff going on in the background. But you don’t need
to worry about it. It just works. Michal: While the use of APIs
can be thought of as simple, building these
is not necessarily as easy. We need to think
of all the details so that game developers
don’t have to. So for the leaderboards API, the developer really only needs
to tell us a couple of things. They need to tell us
who the player is, what score they got,
and what country they’re from. Dave:
So we had to think about: how are we going to store
the leaderboard data? How are we going to get
that data or modify that data? How are we gonna send messages
back and forth across the network to be able to
tell our computers what to do? But the nice thing was
that each of those pieces only had to worry
about their own job. We reduced the complexity
of the overall system by breaking it down
into smaller parts. The other hard part
of building APIs is making sure
that they’re flexible enough that you can keep doing
new things with them. We have to really careful
about changing the set of things that programmers give us,
what we call parameters. If we change those,
it’s possible the games developers build
might crash. So when you find
that right balance between flexibility
and complexity, you have a great API. So now developers
can just add a few lines of code
to their game and they can create
a fantastic leaderboard that connects them
with the whole world. Duncan: When you think about it,
APIs have changed the way that programs are written. They’ve saved programmers
thousands of hours. The same goes for every other
type of software out there. Banking, messaging,
and watching videos. These all use APIs,
and they’re only possible because programmers
used abstraction to make complex things simple. Dave: So by thinking
computationally, you can really take all the
smaller pieces of the problem that you can understand
and solve individually and then think about how all
those pieces can work together to solve a larger problem. And when you put it
all together, you can do something
really powerful and cool. So real-world problems
can be really fuzzy. A lot of times,
there isn’t just one single perfect answer
to anything. You have to look
at all the different ways you could solve the problem,
try different experiments, make mistakes–
it’s okay to make mistakes– and then,
at the end of all that, you might find out
you came up with a really good solution
to it.

1 comment on “CT at Google: Facilitating Software and Game Development though Abstraction

Leave a Reply

Your email address will not be published. Required fields are marked *