JavaScript for text-based data, Shiffman, ITP, Fall 2016 on github
Programming with Text - shiffman video playlist on youtube
- http-server via npm
npm install http-server -g
- node.js install for macos
- Atom
- run
http-server
in root along with LiveReload app and Chrome extension OR - use Atoms atom-live-server
- usage:
ctrl-alt-l: launch live server on port 3000
ctrl-alt-q: stop live server
ctrl-alt-3: launch live server on port 3000
ctrl-alt-4: launch live server on port 4000
ctrl-alt-5: launch live server on port 5000
ctrl-alt-8: launch live server on port 8000
ctrl-alt-9: launch live server on port 9000
- create gh-pages branch
- delete master
- make gh-pages the primary remote
- push to gh-pages branch
git checkout gh-pages
- [] generate index page via js.
- current workaround is to add each exercise to the index page
- A2Z tutorials - video playlist
- shiffman's A2Z blog
- A2Z homework - ITP - F16
- shiffman's A2Z-F16 repo
- A2Z References
- a2z.wiki --> main page
- wk_1-strings
- wk_2-regex
This course focuses on programming strategies and techniques behind procedural analysis and generation of text-based data. We'll explore topics ranging from evaluating text according to its statistical properties to the automated production of text with probabilistic methods to text visualization. Students will learn server-side and client-side JavaScript programming and develop projects that can be shared and interacted with online. There will be weekly homework assignments as well as a final project.
- Daniel Shiffman, Tuesdays, 9:00am-11:30am
- All class dates
- Office Hours
- In addition to the ITP physical class, I am running an online version of the class for Patreon subscribers. ITP students will receive a slack invite should they want to participate. YouTube live stream sessions TBA.
- Join ITP A2Z Google Group. This is for the ITP physical class only.
- Contact me for an invite to the online slack channel.
- Notes and Examples
- Git, Github, Github pages
- DOM manipulation in p5.js
- Strings in JS
- Text input (from user, from file)
- Client-side vs. Server-side programming
- Homework Assignment
- Also
- multiple DOMs + multiple event
- rita.js -- similar and rhyming, etc.
- Regular Expressions
- meta-characters
- position
- single character
- quantifiers
- character classes
- alternation
- capturing groups and back reference
- Regex in atom editor
- Regex in JS:
- Regex:
test()
,exec()
- String:
match()
- Regex:
- Splitting with regex:
split()
- Replace with regex:
replace()
- randexp.js
- meta-characters
- Homework Assignment -- TBA
- APIs
- Working with google sheets
- Parse (doesn't exist anymore, something else?)
- Server side programming with Node
- Node data persistence
- html scraping
- How to make a Twitter bot
- Start working on Twitter Bot project
- In class, we'll build a simple concordance together as well as demonstrate and discuss TF/IDF and Bayesian analysis.
- Simple Concordance
- TF/IDF
- Bayesian Analysis
- Node text analysis packages
- Using google sheets for text input
- ngrams and markov chains
- Tracery by Kate Compton
- Context free grammars
- Moved to references wiki
- JavaScript: The Definitive Guide
- Eloquent JavaScript, Marijn Haverbeke
- Beginning JavaScript, Paul Wilton and Jeremy McPeak
- CodeAcademy: JavaScript
- How to learn JavaScript properly
- JavaScript the right way
- Code School
- JavaScript garden
- A re-introduction to JS by Mozilla
- JavaScript 101 from JQuery
- Checking code: JSLint / JSHint
- Browser debugging: Chrome Developer Tools (tutorial) / Firebug (tutorial)
- Mobile debugging jsconsole.com
- Sharing code snippets (useful for asking questions): gist.github.com
- You are required to attend all class meetings and submit all weekly assignments and a final project.
- Grading (pass/fail) will be based on a combination of factors:
- Attendance, participation in class discussion, and engagement in other students' projects (25%)
- Quality of assignments (50%)
- Final Project (25%)