SlideShare a Scribd company logo
1 of 37
Download to read offline
Build Your Own Instagram-like Filters
with JavaScript
Please download Sublime Text & Firefox:
bit.ly/instagram-la
WIFI: CrossCamp.us Events
January 2018
Note
Sublime Text is the text editor we'll be using. We'll
be opening our HTML files in Firefox. Please make
sure you have both downloaded and installed.
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
Instructor
LJ Yockey
Thinkful Graduate
Front End Web Developer @
Genius Sports
TA's
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
Justin Ezor
LA Community Manager
@ Thinkful
Cyrus Kia
Thinkful Student
Web Developer
About you
Your name
What brought you to the workshop tonight?
What is your programming experience?
If you had a million dollars, What would you
do?
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
About us
Thinkful prepares students for web development and
data science jobs with 1-on-1 mentorship programs
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
Goals
Set up static website using JavaScript
HTML + JavaScript basics
Access third-party library in JavaScript
Build v1 of Instagram app
Advanced challenges
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
The starter code
Download and unzip the starter files into a folder
on your Desktop (four files total). Open index.html
and index.js in Sublime Text.
http://bit.ly/tf-instagram-starter
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
Demo
Open index.html in Firefox
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
Demo
Click "Apply Filter" to see the image change
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
Demo
Click "Revert Filter" to see the image change back
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
HTML Overview
HTML is the content and structure of a webpage
It's the skeleton of your website.
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
HTML tags
Every tag starts with a "less than" sign and ends
with a "greater than" sign
<html> #an HTML opening tag
<body> #a body opening tag
<h1>Hello, World!</h1>
#a set of h1 tags with content
</body> #a body closing tag
</html> #an HTML closing tag
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
More about HTML tags
There are opening tags and closing tags - closing
tags have a backslash before the tag name
(</html>)
Tags instruct a browser about the structure of
our website
There are hundreds of built-in tags but you'll
use the same few a lot
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
HTML attributes
HTML attributes set properties on an element -
they are set in the opening tag
href is an attribute that sets the destination of a link
<a href="https://somewhere.com">This is
a link</a>
id is another attribute that identifies elements
(for CSS & JavaScript)
<h1 id="headline">This is a headline</h1>
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
Basic functions
A function lets you separate your code into bite-
sized pieces which you can use over and over again.
When you write a function to use later, you are
"declaring" it. When you use (or run) that function
you are "calling" it.
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
Example
Declaring a function
Calling a function
function doSomething(){
alert("Done!");
}
doSomething();
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
More about basic functions
Functions can save us time because we use them
over and over in code. They are building blocks.
Make your code more organized and easier to read
JavaScript has many built-in functions
You'll write many, many functions in your
programs
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
Let's work through the rest of the HTML
<body>
<img id="my-image" src="test-image.png">
<br>
<button onClick="revertFilter()">Revert Filter</button>
<button onClick="applyFilter()">Apply Filter</button>
</body>
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
JavaScript overview
<script type="text/javascript" src="index.js"></script>
If HTML is the skeleton of a website, JavaScript is the
brains. JavaScript controls the behavior of our app.
We'll write our JavaScript in the index.js file.
We'll then import the file using similar syntax.
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
Adding our functions to index.js
function revertFilter(){
//add code here
}
function applyFilter(){
//add code here
}
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
What is a third-party library?
In Javascript, we use third-party libraries to do cool
things. A third-party library is a JavaScript file that
contains a bunch of functions that someone else wrote
for us. There are a ton of these in every language.
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
The CamanJS library
We'll be using the CamanJS library. ( )camanjs.com
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
Importing the CamanJS library
The CamanJS library is included in your starter code.
Import it at the top of your index.html file using the
syntax above.
<script type="text/javascript" src="caman.full.min.js"></script>
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
Documentation
How do we know what functions we can use? We could
look at the library source file, if it's short, or better, we
could look at the documentation.
All common libraries will have documentation with a list
of available functions and/or real-world examples.
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
Note
A core part of being a developer is constantly learning
new languages, tools, libraries, and frameworks. They
will all be documented and you should get used to
finding answers through these resources.
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
Here's an example
http://camanjs.com/guides/#BasicUsage
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
Our functions
The correct function is "called" when a button is clicked
function revertFilter(){
Caman('#my-image', function() {
this.revert();
});
}
function applyFilter(){
Caman('#my-image', function() {
this.brightness(10);
this.contrast(30);
this.sepia(60);
this.saturation(-30);
this.render();
});
}
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
Challenge #1
Change out the example image with your own
image
Adjust the filter values in the example code to
update the filter
Make your own filter with at least one new
property (hint: look at built-in functionality)
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
Challenge #2
Instead of making your own, use a built-in filter.
Here's a full list:
vintage, lomo, clarity, sinCity, sunrise,
crossProcess, orangePeel, love, grungy,
barques, pinhole, oldBoot, glowingSun,
hazyDays, herMajest, nostalgia,
hemingway, concentrate
function applyFilter() {
Caman('#my-image', function() {
this['vintage']();
this.render();
});
}
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
Challenge #3 (Advanced)
Add more buttons, each one should add only one filter
Try cropping your pictures to different sized frames
Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
Ways to keep learning
For aspiring developers, bootcamps fill the gap
Source: Bureau of Labor Statistics
92%job-placement rate + job guarantee
Link for the third party audit jobs report:
https://www.thinkful.com/bootcamp-jobs-stats
Thinkful's track record of getting students jobs
Our results
80%as full-time developers
Kaeside Iwuagwu
Link for the third party audit jobs report:
https://www.thinkful.com/bootcamp-jobs-
stats
Frontend Developer
Sierra Gregg
Software Engineer
JP Earnest
Web Developer
92%placed in tech careers
Our students receive unprecedented support
1-on-1 Learning Mentor
1-on-1 Career MentorProgram Manager
Local Community
You
1-on-1 mentorship enables flexible learning
Learn anywhere,
anytime, and at your
own schedule
You don't have to quit
your job to start career
transition
Thinkful's free resource
Talk to one of us and email aaron.lamphere@thinkful.com to learn more
Web Development Fundamentals
Covers HTML, CSS and JavaScript
Unlimited mentor-led Q&A sessions
Personal Program Manager to help
you set goals and navigate resources
Student Slack Channel
bit.ly/web-dev-free-la

More Related Content

What's hot

Getting Started with Angular - Stormpath Webinar, January 2017
Getting Started with Angular - Stormpath Webinar, January 2017Getting Started with Angular - Stormpath Webinar, January 2017
Getting Started with Angular - Stormpath Webinar, January 2017Matt Raible
 
Firebase for the Web
Firebase for the WebFirebase for the Web
Firebase for the WebJana Moudrá
 
Google Wave 20/20: Product, Protocol, Platform
Google Wave 20/20: Product, Protocol, PlatformGoogle Wave 20/20: Product, Protocol, Platform
Google Wave 20/20: Product, Protocol, PlatformPamela Fox
 
Article builder free trial
Article builder free trialArticle builder free trial
Article builder free trialduwei522
 
Mashups & APIs
Mashups & APIsMashups & APIs
Mashups & APIsPamela Fox
 
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14Salesforce Developers
 
So, you want to be a plugin developer?
So, you want to be a plugin developer?So, you want to be a plugin developer?
So, you want to be a plugin developer?ylefebvre
 
The Tale of 2 CLIs - Ember-cli and Angular-cli
The Tale of 2 CLIs - Ember-cli and Angular-cliThe Tale of 2 CLIs - Ember-cli and Angular-cli
The Tale of 2 CLIs - Ember-cli and Angular-cliTracy Lee
 
Quick Way to work with Models and Alloy in Appcelerator Titanium
Quick Way to work with Models and Alloy in Appcelerator TitaniumQuick Way to work with Models and Alloy in Appcelerator Titanium
Quick Way to work with Models and Alloy in Appcelerator TitaniumAaron Saunders
 
Activity streams lightning talk, DjangoCon 2011 Day 3
Activity streams lightning talk, DjangoCon 2011 Day 3Activity streams lightning talk, DjangoCon 2011 Day 3
Activity streams lightning talk, DjangoCon 2011 Day 3Steve Ivy
 
React Native - Getting Started
React Native - Getting StartedReact Native - Getting Started
React Native - Getting StartedTracy Lee
 
Instagram filters
Instagram filters Instagram filters
Instagram filters Thinkful
 
JavaScript Power Tools
JavaScript Power ToolsJavaScript Power Tools
JavaScript Power ToolsCodemotion
 
merb.intro
merb.intromerb.intro
merb.intropjb3
 
Aloha talk about Performances
Aloha talk about PerformancesAloha talk about Performances
Aloha talk about Performancesbistory
 

What's hot (19)

Paragraphs at drupal 8.
Paragraphs at drupal 8.Paragraphs at drupal 8.
Paragraphs at drupal 8.
 
Cain & Obenland — Episode 4
Cain & Obenland — Episode 4Cain & Obenland — Episode 4
Cain & Obenland — Episode 4
 
Getting Started with Angular - Stormpath Webinar, January 2017
Getting Started with Angular - Stormpath Webinar, January 2017Getting Started with Angular - Stormpath Webinar, January 2017
Getting Started with Angular - Stormpath Webinar, January 2017
 
Firebase for the Web
Firebase for the WebFirebase for the Web
Firebase for the Web
 
React Native Workshop
React Native WorkshopReact Native Workshop
React Native Workshop
 
Google Wave 20/20: Product, Protocol, Platform
Google Wave 20/20: Product, Protocol, PlatformGoogle Wave 20/20: Product, Protocol, Platform
Google Wave 20/20: Product, Protocol, Platform
 
Article builder free trial
Article builder free trialArticle builder free trial
Article builder free trial
 
Mashups & APIs
Mashups & APIsMashups & APIs
Mashups & APIs
 
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
 
So, you want to be a plugin developer?
So, you want to be a plugin developer?So, you want to be a plugin developer?
So, you want to be a plugin developer?
 
The Tale of 2 CLIs - Ember-cli and Angular-cli
The Tale of 2 CLIs - Ember-cli and Angular-cliThe Tale of 2 CLIs - Ember-cli and Angular-cli
The Tale of 2 CLIs - Ember-cli and Angular-cli
 
Quick Way to work with Models and Alloy in Appcelerator Titanium
Quick Way to work with Models and Alloy in Appcelerator TitaniumQuick Way to work with Models and Alloy in Appcelerator Titanium
Quick Way to work with Models and Alloy in Appcelerator Titanium
 
Activity streams lightning talk, DjangoCon 2011 Day 3
Activity streams lightning talk, DjangoCon 2011 Day 3Activity streams lightning talk, DjangoCon 2011 Day 3
Activity streams lightning talk, DjangoCon 2011 Day 3
 
React Native - Getting Started
React Native - Getting StartedReact Native - Getting Started
React Native - Getting Started
 
Instagram filters
Instagram filters Instagram filters
Instagram filters
 
JavaScript Power Tools
JavaScript Power ToolsJavaScript Power Tools
JavaScript Power Tools
 
merb.intro
merb.intromerb.intro
merb.intro
 
Aloha talk about Performances
Aloha talk about PerformancesAloha talk about Performances
Aloha talk about Performances
 
Alexa Skills Kit
Alexa Skills KitAlexa Skills Kit
Alexa Skills Kit
 

Similar to Build your-own-instagram-filters-with-javascript-202-335 (1)

Build Your Own Instagram Filters
Build Your Own Instagram FiltersBuild Your Own Instagram Filters
Build Your Own Instagram FiltersTJ Stalcup
 
Instagram filters (10-5)
Instagram filters (10-5)Instagram filters (10-5)
Instagram filters (10-5)Ivy Rueb
 
Intro to js august 31
Intro to js august 31Intro to js august 31
Intro to js august 31Thinkful
 
Intro to JavaScript - LA - July
Intro to JavaScript - LA - JulyIntro to JavaScript - LA - July
Intro to JavaScript - LA - JulyThinkful
 
Intro to js september 19
Intro to js september 19Intro to js september 19
Intro to js september 19Thinkful
 
Instagram filters (8 24)
Instagram filters (8 24)Instagram filters (8 24)
Instagram filters (8 24)Ivy Rueb
 
Instagram filters (8 24)
Instagram filters (8 24)Instagram filters (8 24)
Instagram filters (8 24)Ivy Rueb
 
Introjs10.5.17SD
Introjs10.5.17SDIntrojs10.5.17SD
Introjs10.5.17SDThinkful
 
James Jara Portfolio 2014 Part 1
James Jara Portfolio 2014 Part 1James Jara Portfolio 2014 Part 1
James Jara Portfolio 2014 Part 1James Jara
 
How to create your own WordPress plugin
How to create your own WordPress pluginHow to create your own WordPress plugin
How to create your own WordPress pluginJohn Tighe
 
Build a Game with JavaScript - Pasadena July
Build a Game with JavaScript - Pasadena JulyBuild a Game with JavaScript - Pasadena July
Build a Game with JavaScript - Pasadena JulyThinkful
 
OpenSocial Intro
OpenSocial IntroOpenSocial Intro
OpenSocial IntroPamela Fox
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...Fabio Franzini
 
Adobe analytics implementation secret hacks
Adobe analytics implementation secret hacksAdobe analytics implementation secret hacks
Adobe analytics implementation secret hacksAlban Gérôme
 
Progressive Web Application by Citytech
Progressive Web Application by CitytechProgressive Web Application by Citytech
Progressive Web Application by CitytechRitwik Das
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016Matt Raible
 

Similar to Build your-own-instagram-filters-with-javascript-202-335 (1) (20)

Build Your Own Instagram Filters
Build Your Own Instagram FiltersBuild Your Own Instagram Filters
Build Your Own Instagram Filters
 
Instagram filters (10-5)
Instagram filters (10-5)Instagram filters (10-5)
Instagram filters (10-5)
 
Intro to js august 31
Intro to js august 31Intro to js august 31
Intro to js august 31
 
Intro to JavaScript - LA - July
Intro to JavaScript - LA - JulyIntro to JavaScript - LA - July
Intro to JavaScript - LA - July
 
Intro to js september 19
Intro to js september 19Intro to js september 19
Intro to js september 19
 
Instagram filters (8 24)
Instagram filters (8 24)Instagram filters (8 24)
Instagram filters (8 24)
 
Instagram filters (8 24)
Instagram filters (8 24)Instagram filters (8 24)
Instagram filters (8 24)
 
Introjs10.5.17SD
Introjs10.5.17SDIntrojs10.5.17SD
Introjs10.5.17SD
 
James Jara Portfolio 2014 Part 1
James Jara Portfolio 2014 Part 1James Jara Portfolio 2014 Part 1
James Jara Portfolio 2014 Part 1
 
How to create your own WordPress plugin
How to create your own WordPress pluginHow to create your own WordPress plugin
How to create your own WordPress plugin
 
Portafolio
PortafolioPortafolio
Portafolio
 
Build a Game with JavaScript - Pasadena July
Build a Game with JavaScript - Pasadena JulyBuild a Game with JavaScript - Pasadena July
Build a Game with JavaScript - Pasadena July
 
OpenSocial Intro
OpenSocial IntroOpenSocial Intro
OpenSocial Intro
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
Fewd week4 slides
Fewd week4 slidesFewd week4 slides
Fewd week4 slides
 
Lecture 10.pdf
Lecture 10.pdfLecture 10.pdf
Lecture 10.pdf
 
Adobe analytics implementation secret hacks
Adobe analytics implementation secret hacksAdobe analytics implementation secret hacks
Adobe analytics implementation secret hacks
 
Progressive Web Application by Citytech
Progressive Web Application by CitytechProgressive Web Application by Citytech
Progressive Web Application by Citytech
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
 
Presentation Tier optimizations
Presentation Tier optimizationsPresentation Tier optimizations
Presentation Tier optimizations
 

More from Thinkful

893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-25-46-115-141-308-324-370
893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-25-46-115-141-308-324-370893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-25-46-115-141-308-324-370
893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-25-46-115-141-308-324-370Thinkful
 
LA 1/31/18 Intro to JavaScript: Fundamentals
LA 1/31/18 Intro to JavaScript: FundamentalsLA 1/31/18 Intro to JavaScript: Fundamentals
LA 1/31/18 Intro to JavaScript: FundamentalsThinkful
 
LA 1/31/18 Intro to JavaScript: Fundamentals
LA 1/31/18 Intro to JavaScript: FundamentalsLA 1/31/18 Intro to JavaScript: Fundamentals
LA 1/31/18 Intro to JavaScript: FundamentalsThinkful
 
Twit botsd1.30.18
Twit botsd1.30.18Twit botsd1.30.18
Twit botsd1.30.18Thinkful
 
Baggwjs124
Baggwjs124Baggwjs124
Baggwjs124Thinkful
 
Become a Data Scientist: A Thinkful Info Session
Become a Data Scientist: A Thinkful Info SessionBecome a Data Scientist: A Thinkful Info Session
Become a Data Scientist: A Thinkful Info SessionThinkful
 
Vpet sd-1.25.18
Vpet sd-1.25.18Vpet sd-1.25.18
Vpet sd-1.25.18Thinkful
 
LA 1/18/18 Become A Web Developer: A Thinkful Info Session
LA 1/18/18 Become A Web Developer: A Thinkful Info SessionLA 1/18/18 Become A Web Developer: A Thinkful Info Session
LA 1/18/18 Become A Web Developer: A Thinkful Info SessionThinkful
 
How to Choose a Programming Language
How to Choose a Programming LanguageHow to Choose a Programming Language
How to Choose a Programming LanguageThinkful
 
Batbwjs117
Batbwjs117Batbwjs117
Batbwjs117Thinkful
 
1/16/18 Intro to JS Workshop
1/16/18 Intro to JS Workshop1/16/18 Intro to JS Workshop
1/16/18 Intro to JS WorkshopThinkful
 
LA 1/16/18 Intro to Javascript: Fundamentals
LA 1/16/18 Intro to Javascript: FundamentalsLA 1/16/18 Intro to Javascript: Fundamentals
LA 1/16/18 Intro to Javascript: FundamentalsThinkful
 
(LA 1/16/18) Intro to JavaScript: Fundamentals
(LA 1/16/18) Intro to JavaScript: Fundamentals(LA 1/16/18) Intro to JavaScript: Fundamentals
(LA 1/16/18) Intro to JavaScript: FundamentalsThinkful
 
Websitesd1.15.17.
Websitesd1.15.17.Websitesd1.15.17.
Websitesd1.15.17.Thinkful
 
Bavpwjs110
Bavpwjs110Bavpwjs110
Bavpwjs110Thinkful
 
Byowwhc110
Byowwhc110Byowwhc110
Byowwhc110Thinkful
 
Getting started-jan-9-2018
Getting started-jan-9-2018Getting started-jan-9-2018
Getting started-jan-9-2018Thinkful
 
Introjs1.9.18tf
Introjs1.9.18tfIntrojs1.9.18tf
Introjs1.9.18tfThinkful
 
Proglangauage1.10.18
Proglangauage1.10.18Proglangauage1.10.18
Proglangauage1.10.18Thinkful
 

More from Thinkful (20)

893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-25-46-115-141-308-324-370
893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-25-46-115-141-308-324-370893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-25-46-115-141-308-324-370
893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-25-46-115-141-308-324-370
 
LA 1/31/18 Intro to JavaScript: Fundamentals
LA 1/31/18 Intro to JavaScript: FundamentalsLA 1/31/18 Intro to JavaScript: Fundamentals
LA 1/31/18 Intro to JavaScript: Fundamentals
 
LA 1/31/18 Intro to JavaScript: Fundamentals
LA 1/31/18 Intro to JavaScript: FundamentalsLA 1/31/18 Intro to JavaScript: Fundamentals
LA 1/31/18 Intro to JavaScript: Fundamentals
 
Itjsf129
Itjsf129Itjsf129
Itjsf129
 
Twit botsd1.30.18
Twit botsd1.30.18Twit botsd1.30.18
Twit botsd1.30.18
 
Baggwjs124
Baggwjs124Baggwjs124
Baggwjs124
 
Become a Data Scientist: A Thinkful Info Session
Become a Data Scientist: A Thinkful Info SessionBecome a Data Scientist: A Thinkful Info Session
Become a Data Scientist: A Thinkful Info Session
 
Vpet sd-1.25.18
Vpet sd-1.25.18Vpet sd-1.25.18
Vpet sd-1.25.18
 
LA 1/18/18 Become A Web Developer: A Thinkful Info Session
LA 1/18/18 Become A Web Developer: A Thinkful Info SessionLA 1/18/18 Become A Web Developer: A Thinkful Info Session
LA 1/18/18 Become A Web Developer: A Thinkful Info Session
 
How to Choose a Programming Language
How to Choose a Programming LanguageHow to Choose a Programming Language
How to Choose a Programming Language
 
Batbwjs117
Batbwjs117Batbwjs117
Batbwjs117
 
1/16/18 Intro to JS Workshop
1/16/18 Intro to JS Workshop1/16/18 Intro to JS Workshop
1/16/18 Intro to JS Workshop
 
LA 1/16/18 Intro to Javascript: Fundamentals
LA 1/16/18 Intro to Javascript: FundamentalsLA 1/16/18 Intro to Javascript: Fundamentals
LA 1/16/18 Intro to Javascript: Fundamentals
 
(LA 1/16/18) Intro to JavaScript: Fundamentals
(LA 1/16/18) Intro to JavaScript: Fundamentals(LA 1/16/18) Intro to JavaScript: Fundamentals
(LA 1/16/18) Intro to JavaScript: Fundamentals
 
Websitesd1.15.17.
Websitesd1.15.17.Websitesd1.15.17.
Websitesd1.15.17.
 
Bavpwjs110
Bavpwjs110Bavpwjs110
Bavpwjs110
 
Byowwhc110
Byowwhc110Byowwhc110
Byowwhc110
 
Getting started-jan-9-2018
Getting started-jan-9-2018Getting started-jan-9-2018
Getting started-jan-9-2018
 
Introjs1.9.18tf
Introjs1.9.18tfIntrojs1.9.18tf
Introjs1.9.18tf
 
Proglangauage1.10.18
Proglangauage1.10.18Proglangauage1.10.18
Proglangauage1.10.18
 

Recently uploaded

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 

Recently uploaded (20)

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 

Build your-own-instagram-filters-with-javascript-202-335 (1)

  • 1. Build Your Own Instagram-like Filters with JavaScript Please download Sublime Text & Firefox: bit.ly/instagram-la WIFI: CrossCamp.us Events January 2018
  • 2. Note Sublime Text is the text editor we'll be using. We'll be opening our HTML files in Firefox. Please make sure you have both downloaded and installed. Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 3. Instructor LJ Yockey Thinkful Graduate Front End Web Developer @ Genius Sports TA's Wi-Fi: Cross Camp.us Events bit.ly/instagram-la Justin Ezor LA Community Manager @ Thinkful Cyrus Kia Thinkful Student Web Developer
  • 4. About you Your name What brought you to the workshop tonight? What is your programming experience? If you had a million dollars, What would you do? Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 5. About us Thinkful prepares students for web development and data science jobs with 1-on-1 mentorship programs Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 6. Goals Set up static website using JavaScript HTML + JavaScript basics Access third-party library in JavaScript Build v1 of Instagram app Advanced challenges Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 7. The starter code Download and unzip the starter files into a folder on your Desktop (four files total). Open index.html and index.js in Sublime Text. http://bit.ly/tf-instagram-starter Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 8. Demo Open index.html in Firefox Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 9. Demo Click "Apply Filter" to see the image change Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 10. Demo Click "Revert Filter" to see the image change back Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 11. HTML Overview HTML is the content and structure of a webpage It's the skeleton of your website. Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 12. HTML tags Every tag starts with a "less than" sign and ends with a "greater than" sign <html> #an HTML opening tag <body> #a body opening tag <h1>Hello, World!</h1> #a set of h1 tags with content </body> #a body closing tag </html> #an HTML closing tag Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 13. More about HTML tags There are opening tags and closing tags - closing tags have a backslash before the tag name (</html>) Tags instruct a browser about the structure of our website There are hundreds of built-in tags but you'll use the same few a lot Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 14. HTML attributes HTML attributes set properties on an element - they are set in the opening tag href is an attribute that sets the destination of a link <a href="https://somewhere.com">This is a link</a> id is another attribute that identifies elements (for CSS & JavaScript) <h1 id="headline">This is a headline</h1> Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 15. Basic functions A function lets you separate your code into bite- sized pieces which you can use over and over again. When you write a function to use later, you are "declaring" it. When you use (or run) that function you are "calling" it. Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 16. Example Declaring a function Calling a function function doSomething(){ alert("Done!"); } doSomething(); Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 17. More about basic functions Functions can save us time because we use them over and over in code. They are building blocks. Make your code more organized and easier to read JavaScript has many built-in functions You'll write many, many functions in your programs Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 18. Let's work through the rest of the HTML <body> <img id="my-image" src="test-image.png"> <br> <button onClick="revertFilter()">Revert Filter</button> <button onClick="applyFilter()">Apply Filter</button> </body> Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 19. JavaScript overview <script type="text/javascript" src="index.js"></script> If HTML is the skeleton of a website, JavaScript is the brains. JavaScript controls the behavior of our app. We'll write our JavaScript in the index.js file. We'll then import the file using similar syntax. Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 20. Adding our functions to index.js function revertFilter(){ //add code here } function applyFilter(){ //add code here } Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 21. What is a third-party library? In Javascript, we use third-party libraries to do cool things. A third-party library is a JavaScript file that contains a bunch of functions that someone else wrote for us. There are a ton of these in every language. Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 22. The CamanJS library We'll be using the CamanJS library. ( )camanjs.com Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 23. Importing the CamanJS library The CamanJS library is included in your starter code. Import it at the top of your index.html file using the syntax above. <script type="text/javascript" src="caman.full.min.js"></script> Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 24. Documentation How do we know what functions we can use? We could look at the library source file, if it's short, or better, we could look at the documentation. All common libraries will have documentation with a list of available functions and/or real-world examples. Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 25. Note A core part of being a developer is constantly learning new languages, tools, libraries, and frameworks. They will all be documented and you should get used to finding answers through these resources. Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 26. Here's an example http://camanjs.com/guides/#BasicUsage Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 27. Our functions The correct function is "called" when a button is clicked function revertFilter(){ Caman('#my-image', function() { this.revert(); }); } function applyFilter(){ Caman('#my-image', function() { this.brightness(10); this.contrast(30); this.sepia(60); this.saturation(-30); this.render(); }); } Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 28. Challenge #1 Change out the example image with your own image Adjust the filter values in the example code to update the filter Make your own filter with at least one new property (hint: look at built-in functionality) Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 29. Challenge #2 Instead of making your own, use a built-in filter. Here's a full list: vintage, lomo, clarity, sinCity, sunrise, crossProcess, orangePeel, love, grungy, barques, pinhole, oldBoot, glowingSun, hazyDays, herMajest, nostalgia, hemingway, concentrate function applyFilter() { Caman('#my-image', function() { this['vintage'](); this.render(); }); } Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 30. Challenge #3 (Advanced) Add more buttons, each one should add only one filter Try cropping your pictures to different sized frames Wi-Fi: Cross Camp.us Events bit.ly/instagram-la
  • 31. Ways to keep learning
  • 32. For aspiring developers, bootcamps fill the gap Source: Bureau of Labor Statistics
  • 33. 92%job-placement rate + job guarantee Link for the third party audit jobs report: https://www.thinkful.com/bootcamp-jobs-stats Thinkful's track record of getting students jobs
  • 34. Our results 80%as full-time developers Kaeside Iwuagwu Link for the third party audit jobs report: https://www.thinkful.com/bootcamp-jobs- stats Frontend Developer Sierra Gregg Software Engineer JP Earnest Web Developer 92%placed in tech careers
  • 35. Our students receive unprecedented support 1-on-1 Learning Mentor 1-on-1 Career MentorProgram Manager Local Community You
  • 36. 1-on-1 mentorship enables flexible learning Learn anywhere, anytime, and at your own schedule You don't have to quit your job to start career transition
  • 37. Thinkful's free resource Talk to one of us and email aaron.lamphere@thinkful.com to learn more Web Development Fundamentals Covers HTML, CSS and JavaScript Unlimited mentor-led Q&A sessions Personal Program Manager to help you set goals and navigate resources Student Slack Channel bit.ly/web-dev-free-la