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