Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed The Treehouse Show!
You have completed The Treehouse Show!
Preview
In this show we talk with Treehouse Teacher, Andrew Chalkley, about how he works on 'blank slate problems'.
Example Starter Projects
- boilrplate is a curated list of Boiler Plate Projects
- IBM Watson Starter Kits
- Alexa Skills Sample Projects on GitHub pairs well with Build an Alexa Skill
- .NET MVC Starter Projects
- Django Girls Starter Project
- Spring Boot Samples
- React Starter Code
- Express.js Examples
- Android Samples
- iOS Sample Code
- Rails - Getting Started Guide
- Laravel Starter Project
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
Hi, I'm Craig.
0:00
Welcome to The Treehouse Show.
0:01
The Treehouse Show is our weekly
conversation with the Treehouse community.
0:02
Have you ever had that feeling where
you're ready to start using a language or
0:09
some new technology that
you've just learned about, but
0:13
then you realize I don't
know where to start.
0:15
Now this is a common enough problem that
I thought I'd reach out to our resident
0:18
expert teacher Chalkers
to get some advice.
0:22
Thanks for being on the show Chalkers.
0:24
>> It's good to be here.
0:26
>> I was thinking, that we could talk
about a common problem that students have,
0:27
and that is the blank slate problem.
0:31
And by that I mean when you
get to some technology.
0:34
You've gone through it a little bit.
0:38
You've gotten your hands
a little bit wet with it.
0:39
You've done some exploring, but you go
to start your own project and there is.
0:41
Now what do I do?
0:47
Now how do I start?
0:48
What do I even think about?
0:49
How do I use these tools
that are in front of me?
0:51
What's your take on
the blank slate problem?
0:54
>> My take on the problem is that
you've just gotta start somewhere.
0:55
>> Okay.
0:59
>> And getting something working,
1:00
in a fashion,
is probably the best solution.
1:04
So can you install this
stuff on your machine, and
1:10
get it just running with a demo project?
1:12
>> Okay.
1:14
What do you mean by demo project?
1:17
>> So say for example a lot of
these services out there, or
1:19
even frameworks normally have
a hello world example project.
1:22
>> Okay.
>> That you can just clone.
1:27
Some boiler plate code that you
can just run on your own computer.
1:29
And it's like, that works.
1:34
I'm getting somewhere.
1:35
Because I think it's useful
to have a working model in
1:37
your mind of what the system's doing.
1:41
>> Okay.
1:44
>> And then you can maybe translate
that to the documentation a bit better
1:45
later on.
1:48
But just start tweaking
example code first.
1:49
>> Okay, so kind of just grab,
and most projects have that.
1:52
>> Yeah yeah, yeah, yeah.
1:56
I think it's almost needed if you're going
to interact with developers in any way,
1:58
is to have some example projects, and
2:03
sometimes there're these things
called kitchen sink projects.
2:06
So I've worked in a lot of different
mobile environments where they say, hey,
2:09
here's a kitchen sink application where
it shows you all the different menus,
2:13
the different styles of animations,
things like that.
2:16
So you can see the thing in action, and
then you can maybe find that in the code,
2:19
and then import that into your project.
2:24
>> And then kinda take it and
make it your own.
2:26
>> Yeah.
>> Okay.
2:28
>> Exactly.
>> Neat, so
2:28
you pointed earlier this is
IBM Watson,this is what you're
2:29
working on here?
2:32
>> Yes, so Watson is a set of
cognitive services from IBM.
2:32
It basically allows you to take
input from say human speech or text.
2:37
>> Okay.
2:43
>> And then get the intent and then assign
programming functionality to that intent.
2:44
So say for example, in this example
I've got the treehouse assistant.
2:52
And it says what would you like
to know about, so I could say.
2:56
What is the definition of HTML?
3:00
And Watson responds with
the definition of HTML.
3:08
Now I didn't program necessarily the
specific wording of what is the definition
3:12
of HTML, but Watson can extract
the intent to get a definition.
3:16
And then the coding that I provide can
3:23
decorate the conversation
with these meanings.
3:28
>> So it's breaking down
the English of that sentence,
3:29
and finding out what it
was you actually meant.
3:32
>> Yes.
3:34
>> You could ask that something else-
>> Exactly, so-
3:35
>> In a different way.
3:36
>> So you can see here that the intent
that Watson found was getDefinition.
3:37
>> Okay.
>> And with 94% confidence.
3:44
>> Okay, and
getDefinition is something you wrote?
3:48
That's code that you wrote okay?
3:50
>> Exactly.
3:51
>> Can I see that code?
3:52
>> Sure, so.
3:54
The way that Watson works is that you
can give it definitions yourself or
3:56
you can let your code
give the definitions.
4:02
Or you can give it an HTML document or
4:05
a PDF or
a JSON file with other content in, and
4:09
that's called a discovery service.
4:13
So what I first did was getDefinition.
4:17
I wrote all this code
myself called handleIntent.
4:25
So I don't know if you're familiar
with middleware in web frameworks.
4:28
>> Okay.
>> I basically wrote my middleware for
4:33
the conversation.
4:35
So if it can find the definition with me,
then that's what you'll respond here.
4:36
If it can't find the definition
with the definitions that I have,
4:42
it'll go after the discovery service and
discover the meaning.
4:47
So let's look at what my
code looks like first.
4:50
I've created this definition resolver and
all this does is it
4:53
looks in this definitions file,
and then it just extracts itself.
4:58
Let me show you what the JSON looks like.
5:03
It just looks like this.
5:06
So it basically finds HTML,
find CSS or JavaScript and
5:07
then gets the definition and
spits that out into the check.
5:10
>> Okay.
5:14
>> So that's basically what
that definition resolver did.
5:15
And that's a lot occurred.
5:19
>> So
this was based on an example project?
5:21
>> Yeah.
5:25
>> Okay, so
how did you do that with Watson?
5:25
What's the example project
that you looked at?
5:28
>> So the example project was Watson
5:29
simple chats, conversation.
5:34
So here it is.
5:39
>> Okay, cool.
5:42
It's a GitHub.
>> It's a GitHub thing, and
5:44
you pull it down and
you can check the demo here.
5:46
So this example was to augment a car.
5:49
So turn on the windscreen wipers or
something like that.
5:53
Turn on wipers,
let's see if this will do it.
5:57
I'll turn on the wipers for you.
6:00
So, this is the initial
project that I fought.
6:01
I fought this in and
6:05
then I started augmenting this
with the treehouse assistant.
6:06
>> Cool.
>> So previously I've worked on an Alexis
6:10
scale that did something very similar.
6:13
>> Right,
I thought I was getting deja vu there.
6:15
Okay so the Alexa Skill does
something similar to that.
6:17
>> Very similar,
it translates the English into an intent,
6:19
which is getDefinition, and
then we can grab the definition out.
6:23
>> And these are actually kind of similar,
aren't they?
6:27
I think they actually
are both called intents.
6:28
>> Yes, exactly, so once you've
worked with Alexa, it's easy to
6:31
translate some of those skills over into
Watson and these other services as well.
6:36
All of these cognitive services,
because if you think about when you speak,
6:42
when you say a sentence,
there's always an intent behind it.
6:47
Or when you ask a question
there's an intent derived, so
6:51
these cognitive services
help derive intent.
6:55
So it can,
6:59
Also get the sentiment behind things and-
>> Like
7:01
if you're angry or-
>> Yeah.
7:07
>> Wow.
>> Yes, say for
7:08
example-
>> That's really neat.
7:09
>> You could, [LAUGH], pass all
the information through from a chat from
7:11
a custom service representative and
a customer, and see their relationship,
7:15
and see if anything can be improved-
>> Right, wow.
7:23
>> There and things like that.
7:26
>> This conversation may be recorded and
sent through Watson.
7:28
[LAUGH]
>> Exactly,
7:32
so this is the project
that I branched up off.
7:34
>> And so,
let me show you what it looks like.
7:37
So if you look here
there's an app.js file.
7:43
And in here there is just this
conversation message with a payload.
7:46
And it updates the message and it just
sends the response back to the client.
7:54
So that's all that does.
8:00
It just sends a response back to
the client, which just happens to be JSON.
8:01
So what I thought was instead of
8:06
making my code all spaghettified inside
this message, is to pass the payload
8:12
forward, or the response port forward,
and then augment that with my data.
8:18
>> Okay.
8:23
>> So that, that was the HTML,
JavaScript, and CSS.
8:23
>> And did you get there because
you started following this, and
8:26
were like, this is gonna be.
8:29
This is not good.
8:31
This doesn't feel good to [CROSSTALK]
>> Yeah, yes.
8:33
Some of the example code is very like,
hey, where should my code live?
8:36
There's no best practices for this stuff.
8:42
It's just, here's an example for you.
8:44
And it works.
8:47
>> Right, it's kinda to spark idea, right?
8:49
>> Yeah.
8:50
>> So now,
you've worked on two voice-based apps.
8:51
Do you have any ideas that came from that?
8:54
>> Yeah, definitely.
8:58
Yeah, I want to augment
the house with Watson, so that.
8:59
And whether if it's through voice, through
Alexa, you can tie that into Watson or
9:02
whether if it's a chat bot that I can just
send text messages to or things like that.
9:08
I can basically switch off my
the lights around my house because all
9:14
the intents are switch off my lights or
turn them on.
9:18
>> Right.
>> You can derive the intent from that
9:22
speech.
9:24
>> Like a butler of sorts.
9:25
>> Yeah, exactly.
9:26
>> Okay, cool.
9:27
>> Yeah.
9:28
>> So that butler idea, that came
about because you played with this.
9:29
You didn't know how these things worked
before, and what you could do with it.
9:34
>> No, and
I think that's the whole point is that,
9:38
as soon as you get a model in
your mind then you can apply that
9:41
to the world around you, or problems
that you're having, or you can see.
9:46
I'm very into JavaScript and
the Internet of things, so
9:52
that was a very natural place for
me to go with this.
9:55
But I can see that many people who start
playing around with this sort of stuff
9:59
if they're working QA, or
if they're working support,
10:03
or all these different areas, they can
say, well I can augment the experience,
10:06
whether if it's a full
pledged AI that can help.
10:11
Like hey, can you tell me my latest order?
10:14
And what's your order number?
10:18
And then it can grab the order number and
set from an API and
10:19
send that back in a chat.
10:22
Rather than clicking through
the menus of a webpage,
10:24
you can more have
a conversation about the thing.
10:27
>> So you kind of follow this
methodology all the time.
10:31
You always just dive into the tech, and I
am always amazed, what are you doing now?
10:33
You must have started this a long time
ago, this practice of just diving in.
10:37
If you could tell yourself, give yourself
advice right when you were first
10:43
learning how to code, what would that be?
10:47
>> Persevere, the pain that you
go through, it always pays off,
10:50
because eventually something will click
in your mind, that that's how it works.
10:54
And literally, you can do anything
as long as you persist with it,
11:01
and stay at it.
11:07
But when I say stay at it I'm not
saying you should have a break because
11:10
generally a lot of the ha moments is when
you go walk away from the computer and
11:13
you go, it's that.
11:17
>> Yeah.
11:18
>> But yeah, definitely that feeling of
being uncomfortable that this is hard,
11:19
this is difficult,
you'll never understand this.
11:24
Those type of feelings are normal and
it does pay off eventually.
11:27
>> All right.
11:31
Thanks, excellent advice.
11:33
>> Awesome.
11:34
>> Thanks for
being on the show again, Chalkers.
11:35
>> No worries.
11:36
Thank you.
[SOUND]
11:37
>> Check the notes attached to this video
11:42
for links to some great
example starter projects.
11:43
Blank slate be gone.
11:46
Thanks for watching the Treehouse Show.
11:47
To get in touch with the show,
reach out to me on Twitter, or
11:49
hit us up in the Treehouse community.
11:51
See you next time.
11:52
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up