WEBVTT

00:00.000 --> 00:12.480
So, I'm Evan Patton, I'm the lead software engineer for the MIT App and Venture Project.

00:12.480 --> 00:19.240
We've been an open source project for about 15 years now, thank you.

00:19.240 --> 00:23.400
And App and Venture is a web-based programming environment that you can use for making your

00:23.400 --> 00:25.200
own mobile phone applications.

00:25.200 --> 00:29.800
It uses a block-based coding environment, somewhere to other languages that we've seen in

00:29.800 --> 00:32.640
the Deverem today.

00:32.640 --> 00:36.560
And the product, though, at the end of the day, is an actual application that you can

00:36.560 --> 00:40.000
install and run on your robot device.

00:40.000 --> 00:44.360
So the project was started in 2008 at Google, it was eventually open source and is now

00:44.360 --> 00:46.600
managed and run at MIT.

00:46.600 --> 00:51.000
We've had over 23 million users use our system to build applications and they've made over

00:51.000 --> 00:54.320
113 million projects amongst them.

00:54.320 --> 00:58.920
We have about 1.4 million users per month, so quite a decent number of people around the world

00:58.920 --> 00:59.920
using it.

00:59.920 --> 01:05.200
But up the core of App and Venture's mission is this idea of computational action and the

01:05.200 --> 01:10.080
principal investigator of our project, Hal Abelson, says that young people really should

01:10.080 --> 01:15.040
be able to use computation as the means of having direct impact on their lives and their

01:15.040 --> 01:16.040
communities.

01:16.040 --> 01:19.760
And this is how they learn because they can actually build something that's going to make

01:19.760 --> 01:23.560
a difference that they can see.

01:23.560 --> 01:27.920
So App and Venture is used worldwide, it's used in pretty much every country on the planet.

01:27.920 --> 01:31.120
We've got millions of users and countries and hundreds of thousands and others.

01:31.120 --> 01:37.560
And again, as I mentioned, we have about 23 million users since we started.

01:37.560 --> 01:40.560
And there are a number of projects, just some examples.

01:40.560 --> 01:45.560
So one project is a group of students and Texas made an app for a blind student in their

01:45.560 --> 01:49.520
class to help him navigate around the school.

01:49.520 --> 01:55.320
Girl and Kentucky made an app to help remind her of grandfather with dementia when to take

01:55.320 --> 01:57.960
his medications.

01:57.960 --> 02:01.800
A group of teenage girls in Moldova made an app to help track water quality.

02:01.800 --> 02:05.040
So they would go in there and measure the quality of water wells and then capture that

02:05.040 --> 02:10.040
data in an app and then you could look up the water quality near you.

02:10.040 --> 02:15.120
Group of young girls in the Darby Slaman India made an app to help schedule time collecting

02:15.120 --> 02:18.560
water so that they were able to make sure that they got water in other resources they

02:18.560 --> 02:21.040
needed for household chores.

02:21.040 --> 02:25.280
And then some elementary school students in Hong Kong also made dementia related app to try

02:25.280 --> 02:31.040
to help their grandparents kind of keep track of the things they need to do day-to-day.

02:31.040 --> 02:33.240
Of course, it's not just restricted to young kids, right?

02:33.240 --> 02:36.280
Like, our goal is that everyone should be able to build an app.

02:36.280 --> 02:44.280
So we ran a global AI hackathon last year and this team from Brazil made this app called Zodengwe,

02:44.280 --> 02:48.440
which is basically they use teachable machine to train a model that they could then run

02:48.440 --> 02:53.960
inside of their application to detect whether mosquito larva were infected with the Dengwe virus

02:53.960 --> 02:54.960
or not.

02:54.960 --> 03:00.680
So I think a target, the eradication of the larva to try to reduce the spread of the disease

03:00.680 --> 03:05.320
and they were able to do that with 95% accuracy so that they could take a phone go out

03:05.320 --> 03:10.920
into the field, take a picture of some mosquito larva and then decide whether they need

03:10.920 --> 03:13.000
to administer pesticides.

03:13.000 --> 03:17.840
So it's a great way of how computational action be used to make a real difference with

03:17.840 --> 03:20.120
what I got the mentor.

03:20.120 --> 03:24.840
We also have a fairly robust community so you can go to community.appinventor.mit.edu

03:24.840 --> 03:30.040
where we have people offering help as well as extensions and things like that.

03:30.040 --> 03:35.040
So briefly, I'm just going to show app inventor, I know I showed pictures in the slides,

03:35.040 --> 03:42.160
this is an app that I was working on earlier.

03:42.160 --> 03:45.320
And what you do is you have this little companion app that runs on your phone as you can

03:45.320 --> 03:48.040
see broadcast on screen there.

03:48.040 --> 03:52.920
And then this is going to connect up and it's going to establish a session between my phone

03:52.920 --> 03:56.200
and the app in my browser.

03:56.200 --> 04:00.760
And this is typical of what you might want to do if you are using an external device

04:00.760 --> 04:01.760
via Bluetooth, right?

04:01.760 --> 04:05.640
So if any of you have people here used Bluetooth before for various things like actual

04:05.640 --> 04:07.840
programming Bluetooth a little bit.

04:07.840 --> 04:13.160
So internally underneath Bluetooth, you have all these UUIDs of things as you can see here.

04:13.160 --> 04:17.920
Here are the UUIDs for talking to a micro bit and I've got my little micro bit connected

04:17.920 --> 04:19.760
here as well.

04:19.760 --> 04:21.560
And so this is what you may have to do.

04:21.560 --> 04:25.360
But app inventor, we want to try to make things a little bit easier to try to give those

04:25.360 --> 04:30.680
higher levels of abstraction so that it's not as difficult for people to make use of these

04:30.680 --> 04:32.000
devices.

04:32.000 --> 04:37.160
So in the context of this app, or I could go back, let me just go back here to my design.

04:37.160 --> 04:40.440
And you can see how things work in real time.

04:40.440 --> 04:45.080
I can, for example, let's say I want to make all these buttons fill the screen so I can

04:45.080 --> 04:48.520
just say, you know, fill parent.

04:48.520 --> 04:51.680
And then as I make my changes, you'll see that the phone updates automatically.

04:51.680 --> 04:56.160
So I can very quickly get a sense of what changes I'm making and how they're going to

04:56.160 --> 05:01.360
potentially affect what I see and how I interact with my application.

05:01.360 --> 05:02.520
But this is really messy, right?

05:02.520 --> 05:06.000
Like I don't want to have to deal with UUIDs and all that stuff.

05:06.000 --> 05:10.560
So in app inventor, we did come up with a way of making extensions to the system.

05:10.560 --> 05:14.360
And so that's what I want to dedicate the bulk of my talk to you today.

05:14.360 --> 05:18.760
There's just a proliferation of Bluetooth being able to devices these days.

05:18.760 --> 05:22.280
I've seen a whole bunch of them today walking around to some of the other devarums, some

05:22.280 --> 05:23.280
of the other workshops.

05:23.280 --> 05:28.200
So I thought it'd be a great opportunity to talk about how you can do this in app inventor.

05:28.200 --> 05:32.360
So in app inventor, because we're actually building real native apps at the end of the day,

05:32.360 --> 05:36.480
you're writing actual code underneath to make that happen.

05:36.480 --> 05:40.240
So extensions in app inventor are written in Java.

05:40.240 --> 05:41.640
Because of that, they're Android only.

05:41.640 --> 05:45.640
They're also political reasons why they're Android only.

05:45.640 --> 05:49.080
And you can use them both in live development environment and compile apps.

05:49.080 --> 05:55.520
So for example, by pop back here for a second, and I go back to the designer and I expand

05:55.520 --> 06:00.000
the extensions category, we have this Bluetooth low energy extension, which is one that we

06:00.000 --> 06:02.040
publish from our group.

06:02.040 --> 06:08.520
And then the microbit example, which is the one that we're going to go through today.

06:08.520 --> 06:16.920
And what I can do here, if I go back, is these are being loaded in live companion.

06:16.920 --> 06:19.320
That's the app that I just showed you on the screen.

06:19.320 --> 06:20.760
But you can also compile your apps.

06:20.760 --> 06:23.440
So it's beneficial to be able to do that.

06:23.440 --> 06:26.320
There's a caveat when you're building and designing an extension.

06:26.320 --> 06:30.440
If you need to add new Android permissions to make it work, you can only use it in

06:30.440 --> 06:32.040
the compile versions.

06:32.040 --> 06:38.240
And that just is something to do with how they Android system manages permissions.

06:38.240 --> 06:42.040
So if you're interested in building an extension for app inventor, there's really just two

06:42.040 --> 06:43.040
prerequisites.

06:43.040 --> 06:45.040
First, you need the JDK.

06:45.040 --> 06:47.640
Again, because we're talking about building Java.

06:47.640 --> 06:50.960
And then we use Apache ant for managing our build system.

06:50.960 --> 06:52.600
Again, it's a fairly old project.

06:52.600 --> 06:55.720
So things like Gradle didn't exist back then.

06:55.720 --> 06:59.160
And then there are a number of different ways you can design and build extensions.

06:59.160 --> 07:01.640
What I'm going to be showing today is the first one, building it actually in the source

07:01.640 --> 07:03.480
tree of app inventor.

07:03.480 --> 07:06.080
We provide an extension template, which is a little bit more lightweight.

07:06.080 --> 07:08.440
It makes it a little bit faster to build extensions.

07:08.440 --> 07:13.520
And then there have been a couple of open source projects on our community that other contributors

07:13.520 --> 07:18.400
have made, such as Russian fast, but I'm not going to go into those today.

07:18.400 --> 07:22.760
I think the rush posts is something like a thousand posts long at this point.

07:22.760 --> 07:30.360
Definitely a very robust discussion about how to use it and make it better.

07:30.360 --> 07:35.560
In terms of our extensions, if you actually look at one under a microscope, it's really

07:35.560 --> 07:37.200
just a zip file.

07:37.200 --> 07:38.920
And it contains the following items.

07:38.920 --> 07:42.840
You'll see an icon, for example, to show up in app inventor.

07:42.840 --> 07:48.360
And then we've got both the Java compile classes and the Android compile text file to be able

07:48.360 --> 07:53.560
to load it into the companion app, and then additional metadata for exposing the functionality

07:53.560 --> 08:00.600
in the blocks, and when you're building your applications.

08:00.600 --> 08:03.120
And so this is where the talk gets a bit code heavy.

08:03.120 --> 08:06.520
I have uploaded all the slides, so the pre-tox system.

08:06.520 --> 08:10.840
If you want, you can go and you can literally copy and paste all the code into a file and

08:10.840 --> 08:12.120
it will compile.

08:12.120 --> 08:17.560
But first thing you need to do is you need to be able to clone the extension repository

08:17.560 --> 08:21.960
because we're building an extension for Bluetooth.

08:21.960 --> 08:26.600
I've gone ahead and I cloned it by cloning the Bluetooth low energy extension branch from

08:26.600 --> 08:29.760
our extensions repository.

08:29.760 --> 08:33.480
And then this is sort of your standard Java pre-ample.

08:33.480 --> 08:34.480
You have to have a package.

08:34.480 --> 08:38.440
I created mine called microbit, and then I imported a bunch of standard dependencies that

08:38.440 --> 08:46.000
you need for app inventor, including some annotations and runtime utilities and things like that.

08:46.000 --> 08:49.000
And this is the most basic form of an extension.

08:49.000 --> 08:50.160
You have some metadata.

08:50.160 --> 08:55.360
You need to tell app inventor about both things itself, such as a version number, which

08:55.360 --> 08:58.640
is shown to the user if they need to know what version they're using.

08:58.640 --> 09:02.200
And you need to tell it that it's an extension, obviously, and then you can give things

09:02.200 --> 09:06.680
like a help URL, for example.

09:06.680 --> 09:10.240
And then you need to tell the system that's actually external to the system.

09:10.240 --> 09:13.880
By default, app inventor kind of assumes that everything you build in the source tree is

09:13.880 --> 09:18.640
intended for use and app inventor, and the cell is a known app quite.

09:18.640 --> 09:23.640
And then the rest of this is just a standard Java object.

09:23.640 --> 09:25.040
If you compile of this, it will work.

09:25.040 --> 09:30.000
You can go and you can run ant extensions in the build tree, and you will get an extension

09:30.000 --> 09:31.160
file out.

09:31.160 --> 09:33.440
It will not do anything useful, right?

09:33.440 --> 09:35.360
It just simply shows up.

09:35.360 --> 09:38.080
And then it's in your app, but you can't do anything with it, because we haven't given

09:38.080 --> 09:41.280
a functionality yet.

09:41.280 --> 09:44.720
So kind of going back and looking at this, right?

09:44.720 --> 09:50.720
So we have these UUIDs that the microbit folks have defined for interacting with a microbit.

09:50.720 --> 09:54.840
So what I did is I moved those over into Java.

09:54.840 --> 09:58.440
And we need to have a reference to our Bluetooth connection.

09:58.440 --> 10:01.960
So that's in there as well.

10:01.960 --> 10:05.680
And then when we think about app inventor components, we're really thinking about four different

10:05.680 --> 10:09.360
types of blocks that they use really interact with.

10:09.360 --> 10:12.760
And we're going to have to implement one of each of these to make the extension really

10:12.760 --> 10:13.760
work.

10:13.760 --> 10:18.800
So the one on the top left there is an event handler, app inventor's in a very vent driven

10:18.800 --> 10:19.800
system.

10:19.800 --> 10:22.720
There's all sorts of stuff happening on your phone, and you need to be able to spawn,

10:22.720 --> 10:25.840
or at least to be able to spawn to those events firing.

10:25.840 --> 10:30.080
So we can say we have a message received there from our microbit.

10:30.080 --> 10:32.360
Likewise, we may need to send a message.

10:32.360 --> 10:36.120
So we'll want to define a function block, like the one on the top right.

10:36.120 --> 10:40.000
And then we need to be able to manage our references to our Bluetooth connection, which

10:40.000 --> 10:46.120
is how we actually communicate with the microbit device.

10:46.120 --> 10:49.640
So when we're defining an event, it's very straightforward.

10:49.640 --> 10:52.880
Events are really the simplest blocks in app inventor.

10:52.880 --> 10:58.120
All you need to do in your function is say that it's a simple event.

10:58.120 --> 11:00.800
This case I'm defining the message received event.

11:00.800 --> 11:03.520
And we know that it's going to receive a message from the device.

11:03.520 --> 11:08.080
And an event dispatcher is this very special object, which is responsible for understanding

11:08.080 --> 11:13.720
all of the internals of how app inventor works and how to send an event to the blocks

11:13.720 --> 11:16.320
that are executing the result of that event.

11:16.320 --> 11:23.520
So inside of this block here, you would put the behavior you want to do when the messages

11:23.520 --> 11:24.520
received.

11:24.520 --> 11:29.960
And so app inventor, the event dispatcher, knows how to find that and run it.

11:29.960 --> 11:34.280
This is where you get some integrated interns of dealing with all the Bluetooth stuff.

11:34.280 --> 11:37.920
So here we have an on-receive handler from the Bluetooth system.

11:37.920 --> 11:41.240
And so we're just saying when we receive a message, we're going to dispatch that through

11:41.240 --> 11:47.280
that message received event that we saw earlier.

11:47.280 --> 11:50.960
But of course, we need to have a way of establishing that relationship.

11:50.960 --> 11:55.080
So when the Bluetooth connection is established, when we get this on-connected event,

11:55.080 --> 11:58.840
we need to register for strings from the microbit.

11:58.840 --> 12:02.200
And then likewise, because we want to be good citizens, when we disconnect, we want to make

12:02.200 --> 12:03.200
sure we unregister.

12:03.200 --> 12:10.240
So we're not leaving around, you know, handles that would be otherwise garbage.

12:10.240 --> 12:17.080
So the next block or the property blocks, here we've defined that we have an editor type

12:17.080 --> 12:19.720
for this particular block that's a Bluetooth low energy.

12:19.720 --> 12:22.600
So it only accepts Bluetooth low energy components.

12:22.600 --> 12:26.240
We don't want to hand it a button, for example, because how do you have a microbit

12:26.240 --> 12:27.240
talk to a button?

12:27.240 --> 12:31.160
It makes no sense, because the button exists on the Android phone, and the microbit exists

12:31.160 --> 12:34.160
on a microbit, it's a separate thing.

12:34.160 --> 12:38.000
And so we handle our connection listeners there.

12:38.000 --> 12:42.560
And so this will tell the system that we want Bluetooth.

12:42.560 --> 12:48.160
And then likewise, you have a getter block, and the properties can be categorized.

12:48.160 --> 12:52.240
So I've said here that a Bluetooth device is a behavioral thing, right?

12:52.240 --> 12:53.240
The other options.

12:53.240 --> 12:58.040
Appearance, clearly, there's no appearance here, because it's an external device.

12:58.040 --> 13:00.400
That's managed separately.

13:00.400 --> 13:03.040
And then our last block, as I said, is going to be our function block.

13:03.040 --> 13:07.480
We want to be able to send messages to the microbit.

13:07.480 --> 13:14.280
So when we get our connection, if it's not null, we can call this right string with response,

13:14.280 --> 13:18.920
give it our UUIDs, and then we'll have a right handler, which comes back.

13:18.920 --> 13:21.920
I'm going to skip that one because it's not really necessary.

13:21.920 --> 13:25.920
And then lastly, this message sent block is going to be dealing with the right handler.

13:25.920 --> 13:30.920
So after we write our message, we'll get a message back, and we can dispatch that through

13:30.920 --> 13:31.920
the events.

13:31.920 --> 13:37.040
So this is our final package extension.

13:37.040 --> 13:43.720
And if I go back here, I pop over to Emacs real quick.

13:43.720 --> 13:51.160
You'll see on the right hand side here, I've added all that code from all those slides.

13:51.160 --> 13:53.480
And so this is the final working extension.

13:53.480 --> 13:55.560
And then I had just previously run Ant here.

13:55.560 --> 13:59.680
It takes about seven seconds, because of course it's compiling every app and mentor component

13:59.680 --> 14:03.960
in this version that extension template I mentioned earlier, it cuts all that out, so it's much faster

14:03.960 --> 14:07.960
it takes less than a second.

14:07.960 --> 14:12.480
But that is what the actual compilation process looks like.

14:12.480 --> 14:21.120
So now if I go back, and let me resume my connection here, we'll show you actually working

14:21.120 --> 14:36.640
in progress, maybe, once again, just one end out, restart, okay, so, so now, like you would

14:36.640 --> 14:39.720
have had to do something with this previously, and you don't necessarily want a student

14:39.720 --> 14:40.720
to have to do this, right?

14:40.720 --> 14:42.840
They have to know what you, you IDs to use.

14:42.840 --> 14:47.800
They have to know that the strings they're sending are not UTS-16, or that the device doesn't

14:47.800 --> 14:51.480
want them in UTS-16, and all this other stuff, right?

14:51.480 --> 14:56.160
Like that is a little bit too much for someone who's just starting off with something like

14:56.160 --> 14:57.160
the micro bit.

14:57.160 --> 15:01.320
So we're just going to go and delete that.

15:01.320 --> 15:06.360
And then I've loaded my pre-compile version of the extension in here, we see those blocks

15:06.360 --> 15:09.640
that we just created in the slides.

15:09.640 --> 15:15.680
Instead, I can just drop in a send message block, and I should have saved my string from

15:15.680 --> 15:17.080
earlier, but that's all right.

15:17.080 --> 15:28.120
And we're just going to have to say hello, pause them, and then I can add my message

15:28.120 --> 15:31.440
received block that I defined.

15:31.440 --> 15:36.760
And as we said, it's going to receive this message as a parameter, and to keep things

15:36.760 --> 15:43.760
simple all I did is I created the label in my app earlier to display that message.

15:43.760 --> 15:50.760
Okay, I'm going to just make sure my connections live, too.

15:50.760 --> 15:54.760
I'm just going to change one of the colors of these buttons to make sure it updates.

15:54.760 --> 16:05.440
Okay, so I'm going to go ahead, and I'm going to, now the micro bit here, you'll see

16:05.440 --> 16:09.280
it's got this little frowning face, because nothing's connected to it.

16:09.280 --> 16:13.120
So I'm going to connect, and it should change us to a smiley face, because now it knows

16:13.120 --> 16:15.240
that it's connected.

16:15.240 --> 16:21.720
And then I'm going to send my hello fuzz to message, and it should start scrolling.

16:21.720 --> 16:25.960
The micro bit doesn't have terribly fast output, but that's okay for the purposes

16:25.960 --> 16:26.960
of video recording.

16:26.960 --> 16:28.960
So that's fine.

16:28.960 --> 16:29.960
And so now it's saying hello fuzz.

16:29.960 --> 16:33.480
And of course, we could program this app to say some different string or you could program

16:33.480 --> 16:35.640
it to ask the user for a string.

16:35.640 --> 16:39.240
We're just kind of trying to keep it simple for the demonstration.

16:39.240 --> 16:45.280
And if I program button A to say button A when I press it.

16:45.280 --> 16:50.080
So if I press this, we should see my screen update.

16:50.080 --> 16:55.720
And if I zoom in here, oops, why did that happen?

16:55.720 --> 16:56.720
There we go.

16:56.720 --> 16:58.560
You can see now my message says button A.

16:58.600 --> 17:04.320
So we've managed to reproduce the entire loop of going to and from the micro bit, but

17:04.320 --> 17:10.080
rather than having to worry about the complexity of managing these UUIDs, right?

17:10.080 --> 17:17.720
Instead of having to do this, the student can just, well, that's stuck.

17:17.720 --> 17:20.320
Okay, the student could erase all those blocks, right?

17:20.320 --> 17:21.800
We don't need them anymore.

17:21.800 --> 17:23.600
They're not useful to us.

17:23.600 --> 17:27.040
And so all of that complex logic we might have to write.

17:27.040 --> 17:32.160
All those extra blocks that the user would have to deal with go away.

17:32.160 --> 17:34.720
And so now we can just think about sending messages.

17:34.720 --> 17:38.840
We don't have to worry about managing all that connection stuff, right?

17:38.840 --> 17:41.760
And so that's extremely powerful.

17:41.760 --> 17:47.840
And so just to kind of wrap it up here, how we loaded this.

17:47.840 --> 17:51.840
So and I showed you that extensions panel earlier in the talk.

17:51.840 --> 17:54.440
What you do is you click on import extension.

17:54.440 --> 18:00.160
It will open up this little dialog where you pick your extension file from your file system.

18:00.160 --> 18:06.640
And then you'll say import and then it will load it up into Apple Mentor and show up in your palette.

18:06.640 --> 18:09.560
Here are those example blocks for reference.

18:09.560 --> 18:15.000
Again, just so that if you go back and repeat this, you have access to everything.

18:15.000 --> 18:19.000
And then just to wrap up with some resources, if you want to learn more, including seeing

18:19.000 --> 18:23.400
all of our actual teacher materials around using micro bit in your classroom with Apple Mentor,

18:23.400 --> 18:30.960
you can go to Apple Mentor.mit.edu and there's a whole IOT section in a data science section that's available for you.

18:30.960 --> 18:36.520
Building your apps, you can go to ai2.appymetro.mit.edu and that gives you the code editor.

18:36.520 --> 18:38.480
We were just looking at.

18:38.480 --> 18:42.200
We're open source under the Apache license so you can feel free to contribute.

18:42.200 --> 18:45.000
You can fork us on GitHub.

18:45.000 --> 18:48.840
The community I already mentioned, a great resource for building your own extensions.

18:48.840 --> 18:53.760
There are a lot of people there, publishing extensions are willing to help out new contributors.

18:53.760 --> 18:58.600
And lastly, if you have any other things that you might need for me, you can feel free to reach out to me.

18:58.600 --> 19:01.840
That's my email there at MIT.

19:01.840 --> 19:04.840
And so with that, I'll take in the questions you may.

19:05.840 --> 19:07.840
Thank you.

19:18.840 --> 19:20.840
No questions?

19:20.840 --> 19:33.840
Okay, so I can show you some more stuff.

19:33.840 --> 19:34.840
That's fine.

19:34.840 --> 19:38.840
I'm always good at showing stuff.

19:38.840 --> 19:41.840
So that's the fuzzdom stuff.

19:41.840 --> 19:42.840
I was giving this demo.

19:42.840 --> 19:49.840
This is not an IOT related demo, but it's one of our data science classroom materials.

19:49.840 --> 19:57.840
So if you're teacher and you're interested in teaching things like data science, this is a great little tutorial that we made.

19:57.840 --> 20:04.840
To help you teach students about things like lines of best fit and cleaning up data and doing data analysis.

20:04.840 --> 20:07.840
And of course, you could connect it with something like the micro bits.

20:07.840 --> 20:16.840
We do all sorts of workshops where, for example, we'll take a football and American football, but you could do it with one around one as well.

20:16.840 --> 20:20.840
And you attach the micro bit to it and throw it or kick it.

20:20.840 --> 20:25.840
And then you get the accelerometer data and the students can visualize the accelerometer data in the app.

20:25.840 --> 20:28.840
But I can come in here and I can make predictions.

20:28.840 --> 20:31.840
That's going to load up this prediction screen.

20:31.840 --> 20:40.840
I'm going to say show data and this is going to read some data that comes from a Google spreadsheet, which is the spirit lake spreadsheet.

20:40.840 --> 20:49.840
So somebody's been going out every year since the 1950s and counting how many days that particular lake has had ice on it.

20:49.840 --> 20:56.840
And so you get this kind of very rough idea of how that lake has ice coverage over the course of the year.

20:56.840 --> 21:05.840
But you'll note that there are these two points towards the bottom of the graph, which are zeros and those seem a bit odd.

21:05.840 --> 21:11.840
And so we have this anomaly detection algorithm that does a Z score based filtering.

21:11.840 --> 21:18.840
So if I click on that, I can see that these data points are really out of range.

21:18.840 --> 21:22.840
They're outside of the standard deviation by more than two standard deviations.

21:22.840 --> 21:26.840
And I can actually say, okay, well that's very interesting.

21:26.840 --> 21:30.840
But what if I figure out the line at best fit for this?

21:30.840 --> 21:37.840
If we figure that out and it does the calculation for us using the standard RSME, we have doing that.

21:37.840 --> 21:48.840
We'll find that eventually if this trend were to continue in the long term, we might expect that this lake will have no ice around the year 2175.

21:48.840 --> 21:51.840
But the students can say, well, wait a second, what about those zeros?

21:51.840 --> 21:52.840
Those are not good, right?

21:52.840 --> 21:55.840
Was there really no ice on the lake that year?

21:55.840 --> 22:00.840
Well, it turns out, in fact, the person wasn't able to go out that particular year.

22:00.840 --> 22:03.840
So they still recorded a zero, which was not great.

22:03.840 --> 22:05.840
But I can click on these and I can delete them.

22:05.840 --> 22:11.840
And now my trend line extends out to 2280, right?

22:11.840 --> 22:19.840
And so now it's like, okay, well, if we actually remove the bad data, we can see that we get this extension of when we think that the lake might not have any ice anymore.

22:19.840 --> 22:27.840
And another cool thing is, in app inventor, we have a lot of blocks when we talk about simplifying various things.

22:27.840 --> 22:30.840
Let me go find it here.

22:30.840 --> 22:34.840
So this is AI analysis button, which I'm going to click.

22:34.840 --> 22:46.840
And what this is doing is this is giving a prompt, they can construct a prompt and send the data from this spreadsheet off to a large language model.

22:46.840 --> 22:53.840
In this case, we're using OpenAI, but we have an assortment of different models including some like Lama that you could self host.

22:53.840 --> 23:04.840
But eventually it comes back with this explanation here of what it thinks is happening with the state of and the potential implications for what that is.

23:04.840 --> 23:15.840
And so students can start to tie together all these different aspects of statistics and data science and artificial intelligence and build it all into applications that they can impact edge and share with people.

23:15.840 --> 23:22.840
And so those are just some of the other ways in which we've been taking these really complicated things and making them very simple, right?

23:22.840 --> 23:29.840
Like just calling the interface for this large language model is one block, right?

23:29.840 --> 23:34.840
It's not constructing a JSON object or a whole series of JSON objects for the conversation.

23:34.840 --> 23:36.840
We manage all of that under the hood.

23:36.840 --> 23:41.840
And so you get this very high level interface for doing these very complicated tasks.

23:41.840 --> 23:46.840
And so that's one of the real powers of app and then turn what we're doing with these block languages.

23:46.840 --> 23:48.840
Thank you.

