1 / 17

Today

Today. Rest of the demos (no escape!) Now that you tried group work without version control, making your life easier WITH it. You all got groups for #2? Do "can n on powershot " cameras sell for more or less? Or is Google auto-correct fixing things?

Download Presentation

Today

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Today • Rest of the demos (no escape!) • Now that you tried group work without version control, making your life easier WITH it. • You all got groups for #2? • Do "cannon powershot" cameras sell for more or less? Or is Google auto-correct fixing things? • Are people as dumb/stupid/lazy as we fear? • Are URL shorteners and sessions on the URL killing the web? • How much is easy to help vs. where does it get harder to make big leaps in functionality?

  2. Demos! Demo Tips (Giving) • don't worry if something breaks, just explain how it "usually" works • don't be nervous, no reason to be even if it all blows up • do explain why it's cool/different/what you learned Demo Tips (Viewing): Give CONSTRUCTIVE criticism • Things you like (why?) • Things that users would be confused by • Ways they could have made their life easier when building it

  3. General JS Advice Good • $('#myElement').text('Hello'); • $('#myElement').css('color', 'red'); • $('#myElement').fadeIn(); Better • $('#myElement').text('Hello').css('color', 'red').fadeIn(); Beauuutiful • $('#myElement').text('Hello') .css('color', 'red') .fadeIn();

  4. General JS Advice Objects are ok. Literals are better. var s = new String(); var s = ''; var a = new Array(); var a = []; var o = new Object(); var o = {}; var re = new RegExp(); var re = /…/;

  5. For…In will bite you Avoid for ... in to loop over arrays // Use a plain for loop or the jQuery .each method for (var i=0; i < myArray.length; i++) {
 myArray[i];
};

$(myArray).each(function() {
 this;
});

  6. Better Comments • Give your high-level thinking • If we deleted everything but the comments, could we get your top-level functional goals (that of course you sketched out first) • (Overall, pretty good this year.)

  7. How would you sync a remote team? … if you were asked to design a way right now. • Need visibility into history. • Who changed what? • Everyone wants to code at once – do they get to? • File "read-only" locking? • Having a passed "I own the master copy"?

  8. Version Control Company_report_2011.08.01.xls Company_report_2011.08.02b_chuck.xls Company_report_2011.08.05_feedback.xls Company_report_2011.08.11.xls "Hey did you see my latest changes in my email?" … evil. Impossible to stop. Totally counts. Bonus points for seeing live updates from other people.

  9. Centralized vs. Distributed http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/

  10. Centralized vs. Distributed Perfect for lab-lab.

  11. … but let's do Centralized • The server is the "truth" • You save your changes to the file on your computer. Then you "check in" your changes to the server. • Only gets complicated if two people working on the same stuff at the same time, so minimize that by having smaller files (like your JavaScript in a .js file, CSS in a .css file etc) • Could even have a few files!

  12. SVN – poke at it as you listen • All: Command Line, RapidSVN • OSX: Versions, svnX • Windows: TortoiseSVN • IDEs (All): Eclipse, Netbeans, TextMate • Pick one, download it, start poking at it. • New? RapidSVN. • Experienced on Mac? "sudo port install subversion" and go command-line.

  13. Don't Break Everything Actually, that's the point of version control – if you do, we can roll back, AND we know who broke it! • https://svn.ischool.berkeley.edu/iolab11

  14. Vocabulary Basic Setup • Repository (repo): The database storing the files. • Server: The computer storing the repo. • Client: The computer connecting to the repo. • Working Set/Working Copy: Your local directory of files, where you make changes. • Trunk/Main: The primary location for code in the repo. Think of code as a family tree — the trunk is the main line. Basic Actions • Add: Put a file into the repo for the first time, i.e. begin tracking it with Version Control. • Revision: What version a file is on (v1, v2, v3, etc.). • Head: The latest revision in the repo. • Check out: Download a file from the repo. • Check in: Upload a file to the repository (if it has changed). The file gets a new revision number, and people can “check out” the latest one. • Checkin Message: A short message describing what was changed. • Changelog/History: A list of changes made to a file since it was created. • Update/Sync: Synchronize your files with the latest from the repository. This lets you grab the latest revisions of all files. • Revert: Throw away your local changes and reload the latest version from the repository. http://betterexplained.com/articles/a-visual-guide-to-version-control/

  15. More Vocabulary • Branch • Tag • Peg • More. • (But you don't really care right now)

  16. Save yourself the headache • Always update before you commit. • Write something meaningful for your commit message. • You must use the add command to add files in your working copy to the repository. • Don't overlay "more" revision control – files like "image_v01.png image_c02.png etc"

  17. For Next Time • Project 2 Demos! • Mobile!

More Related