regex and readme yo

This commit is contained in:
Armen Vartan 2014-12-03 16:16:39 -05:00
parent a6bba44773
commit 5c9fb7c3a5
2 changed files with 68 additions and 29 deletions

View File

@ -1,49 +1,59 @@
Prework
=======
Welcome to Byte Academy
=======================
We've put together this program to get you all on the same footing before entering. You will be learning some basic git, Unix, JavaScript, and Python.
Our goal is for you hit the ground running when you come to campus.
The resources will build upon each other to whatever extent they can.
A lot of it is horizontal to other skills. So, if you are stuck on something, feel free to move on and come back to it later.
## Step 1
Make a [GitHub](https://github.com/) account.
#### Git and Unix
Pick a text editor to use. We recommend [Sublime](http://www.sublimetext.com/) or [Atom](https://atom.io/).
[Command Line Crash Course](http://cli.learncodethehardway.org/book/)
Make sure [Python 3.4.2](https://wiki.python.org/moin/BeginnersGuide/Download) and [Node](http://nodejs.org/download/) are installed on your computer
[Try git](try.github.io)
## Step 2
[Git Immersion](http://gitimmersion.com/)
Do these tutorials:
* [Command Line Crash Course](http://cli.learncodethehardway.org/book/)
* [Try git](try.github.io)
* [Git Immersion](http://gitimmersion.com/)
* [Code Academy HTML/CSS](http://www.codecademy.com/en/tracks/web).
## Step 3
Work through the practice problems provided. We recommend starting with front end, moving to JS, and finishing with Python.
Here are some resources to help you on assignments, as well has good reads.
#### Front End
Do Code Academy's [HTML/CSS course](http://www.codecademy.com/en/tracks/web).
[Guide to wireframing](http://webdesign.tutsplus.com/articles/a-beginners-guide-to-wireframing--webdesign-7399)
[Guide to wireframing](http://webdesign.tutsplus.com/articles/a-beginners-guide-to-wireframing--webdesign-7399)
[A compilation of wireframing articles](http://www.gracesmith.co.uk/get-wireframing-the-all-in-one-guide/)
#### JavaScript
[Javascript Loops](http://www.w3schools.com/js/js_loop_for.asp)
[Javascript Object Literals](http://www.w3schools.com/js/js_objects.asp)
[Javascript Functions](http://www.w3schools.com/js/js_functions.asp)
[Javascript Constructors and the new keyword](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new)
[Read through the design patterns in this book](http://addyosmani.com/resources/essentialjsdesignpatterns/book/#designpatternsjavascript)
[Javascript Constructor and Prototype](http://pivotallabs.com/javascript-constructors-prototypes-and-the-new-keyword/)
[JQuery API Docs](http://api.jquery.com/)
[jQuery Best Practices](http://gregfranko.com/jquery-best-practices/#/)
* [Javascript Loops](http://www.w3schools.com/js/js_loop_for.asp)
* [Javascript Object Literals](http://www.w3schools.com/js/js_objects.asp)
* [Javascript Functions](http://www.w3schools.com/js/js_functions.asp)
* [Javascript Constructors and the new keyword](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new)
* [Read through the design patterns in this book](http://addyosmani.com/resources/essentialjsdesignpatterns/book/#designpatternsjavascript)
* [Javascript Constructor and Prototype](http://pivotallabs.com/javascript-constructors-prototypes-and-the-new-keyword/)
* [JQuery API Docs](http://api.jquery.com/)
* [jQuery Best Practices](http://gregfranko.com/jquery-best-practices/#/)
#### Python
[Python Cheatsheet](http://perso.limsi.fr/pointal/_media/python:cours:mementopython3-english.pdf)
* [Python Cheatsheet](http://perso.limsi.fr/pointal/_media/python:cours:mementopython3-english.pdf)
#### Miscellaneous
[Rubular (for regex)](http://www.rubular.com)
* [Rubular (for regex)](http://www.rubular.com)
* [Wikipedia on pair programming](http://en.wikipedia.org/wiki/Pair_programming)
[Wikipedia on pair programming](http://en.wikipedia.org/wiki/Pair_programming)
#### Good Videos
[Simplicity Matters](https://www.youtube.com/watch?v=rI8tNMsozo0)

View File

@ -0,0 +1,29 @@
Regular Expressions
===================
Regular Expressions (regex for short) are a way to represent patterns in strings. They aren't as bad as people make them out to be. When used on the right problem, they are a great solution.
Go to [Rubular](http://rubular.com/). We're going to sandbox inside it a bit to get acquainted with regex syntax. At the bottom of the page is a regex cheat sheet.
Note: Depending on the language, you may have to escape certain characters. For example, instead of `a{3}`, you may have to type `a\{3\}`.
Also, be careful with periods (`.`). A period means any character in regex, so you have to escape it if you want to pattern match a period.
Here are some examples of regex and matching string patterns:
* `a{3}` => `aaa`
* `a{3,}` => `aaaaaaaa`
* `[a-z]` => any lowercase letter
* `[A-Z]{4,6}` => between 4 and 6 uppercase letters, ex. `FASDV`
* `.` => any character
* `\w\.` => `_.`
* `hello\d?` => `hello` or `hello5`
* `[a-nO-Z]*` => abcOZZ
Make a regex to match each of these strings:
* match 'byte academy' 3 different ways
* an 8 character password, do not allow non word characters
* an 8 character password that has at least 1 number and 1 capital letter
* byteacademy@example.com
* byte.academy@example.com
* byteacademy22@example.co.uk
See if you can get all three with 1 regex, but not invalid emails (not having an @, etc...)