Coursewrap-upandVersioncontrol - - PowerPoint PPT Presentation

course wrap up and version control
SMART_READER_LITE
LIVE PREVIEW

Coursewrap-upandVersioncontrol - - PowerPoint PPT Presentation

Coursewrap-upandVersioncontrol NENS230:AnalysisTechniquesinNeuroscience Outline 1. WhentouseMatlab 2. Morepractice 3. VersionControlwithGit/Github 4. Courserecap Outline 1.


slide-1
SLIDE 1

Coursewrap-upandVersioncontrol

NENS230:AnalysisTechniquesinNeuroscience

slide-2
SLIDE 2

Outline

  • 1. WhentouseMatlab
  • 2. Morepractice
  • 3. VersionControlwithGit/Github
  • 4. Courserecap
slide-3
SLIDE 3

Outline

  • 1. When'to'use'Matlab'
  • 2. Morepractice
  • 3. VersionControlwithGit/Github
  • 4. Courserecap
slide-4
SLIDE 4

WhentouseMatlab

Matlabstrengths:

­— Fasttodevelopcode ­— Manybuilt-infunctions ­— Relativelyeasysyntax ­— Fastformatrix(array)operations ­— powerfulvisualization

Matlabweaknesses:

­— Slow(comparedtoC,C++,othercompiledlanguages) ­— Licensesare$$$andannoying.Anyonerunningyourcode musthaveMatlabinstalled ­— Can’tdevelopstandaloneapplications ­— Notageneralpurposelanguage

slide-5
SLIDE 5

ReasonstoChooseMatlab

  • 1. Yourcommunity/labusesitbydefault


(andyouwantyourcodetobeusefultoothers)

  • biosciences(notbioinformatics)
  • mechanical,electrical,aerospaceengineering
  • psychology
  • manyothers
  • 2. Youwanttoprototypesomethingquickly
  • 3. Exploratorydataanalysis(w/numericaldata)
slide-6
SLIDE 6

Alternatives

Scientific'Python''

­— iPython,scipy,numpy,matplotlib ­— verypopular,free

R'

­— Optimizedforstatistics ­— Free ­— Widelyusedbybioinformatics/statisticians

Octave'

­— BuilttobeafreeMatlabalternative ­— CanrunbasicMatlabcode(m-files)withoutanyhassle

Julia'

­— NewprojectfromMIT,freeandopensourcealternative. Fewercompromises(fast,simple,free,generalpurpose),but stillverynew.

slide-7
SLIDE 7

Outline

  • 1. WhentouseMatlab
  • 2. More'practice'
  • 3. VersionControlwithGit/Github
  • 4. Courserecap
slide-8
SLIDE 8

Chooseyourownadventure

http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-094-introduction-to- matlab-january-iap-2010/assignments/

slide-9
SLIDE 9

Chooseyourownadventure

http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-094-introduction-to- matlab-january-iap-2010/assignments/

slide-10
SLIDE 10

Chooseyourownadventure

http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-094-introduction-to- matlab-january-iap-2010/assignments/

slide-11
SLIDE 11

Outline

  • 1. WhentouseMatlab
  • 2. Morepractice
  • 3. Version'Control'with'Git/Github'
  • 4. Courserecap
slide-12
SLIDE 12

VersionControl

“PiledHigherandDeeper”byJorgeCham

Soundfamiliar? Therehastobea betterway!

slide-13
SLIDE 13

VersionControlwith

­— Whatisversioncontrol?

­— Methodofkeepingtrackofdifferentversionsoftextfiles. Usefulfor: ­— iterativedevelopment,experimentalcode ­— sharingcode

­— Whatproblemsdoesitsolve?Haveyouever:

  • Made a change to code, realized it was a mistake and wanted to revert back?
  • Wanted to share your code, or let other people work on your code?
  • Lost code or had a backup that was too old?
  • Had to maintain multiple versions of some code?
  • Wanted to experiment with a new feature without interfering with working code?
  • Wanted to see the difference between two (or more) versions of your code?
  • Wanted to prove that a particular change broke or fixed a piece of code?
  • Wanted to review the history of some code?
  • Wanted to submit a change to someone else's code?

http://stackoverflow.com/questions/1408450/why-should-i-use-version-control

slide-14
SLIDE 14

VersionControlSoftware

Severaloptionsavailable

­— Git,SVN,Mercurial

Gitisde-factostandardandubiquitous

OftenusedwithGithub(onlineservicetohostGitrepositories

slide-15
SLIDE 15

Farmoretocoverthanwehavetimefor.Thisis worthteachingyourself! Severalusefulresources:

­— Verysimpleintro:http://try.github.io ­— Moredetailed:http://git-scm.com/book

slide-16
SLIDE 16

gitterminology

– Code is stored in a repository (‘repo’) – Working Tree - the directory containing your current code – Commit - When you want to save a snapshot of your project or are finished with some analysis/new feature. – HEAD - The name of the currently checked-out commit

slide-17
SLIDE 17

startinggit

­— CanusethecommandlineoraGUItool(eg:github app) ­— Startagitrepository: >>> cd /project/folder >>> git init >>> git add ./*.m (or specific files) >>> git commit

slide-18
SLIDE 18

Gitbasics

http://software-carpentry.org/v5/novice/git/01-backup.html

slide-19
SLIDE 19

Gitbasics

http://software-carpentry.org/v5/novice/git/01-backup.html

slide-20
SLIDE 20

Gitbasics

http://software-carpentry.org/v5/novice/git/01-backup.html

slide-21
SLIDE 21

Demo: ¡git

slide-22
SLIDE 22

Collaboratingwithgit

­— Howcanyoushareyourlocalrepositorywithothers? ­— Twonewgitcommands:pushandpull

slide-23
SLIDE 23

http://www.slideshare.net/jomikr/quick-introduction-to-git

slide-24
SLIDE 24

http://www.slideshare.net/jomikr/quick-introduction-to-git

slide-25
SLIDE 25

http://www.slideshare.net/jomikr/quick-introduction-to-git

slide-26
SLIDE 26

http://www.slideshare.net/jomikr/quick-introduction-to-git

slide-27
SLIDE 27

http://www.slideshare.net/jomikr/quick-introduction-to-git

slide-28
SLIDE 28

http://www.slideshare.net/jomikr/quick-introduction-to-git

slide-29
SLIDE 29

http://www.slideshare.net/jomikr/quick-introduction-to-git

slide-30
SLIDE 30

http://www.slideshare.net/jomikr/quick-introduction-to-git

slide-31
SLIDE 31

http://www.slideshare.net/jomikr/quick-introduction-to-git

slide-32
SLIDE 32

gitworkingmodel

http://www.slideshare.net/jomikr/quick-introduction-to-git

slide-33
SLIDE 33

Pushingchanges

­— aftercommit,pushchangestoremoterepository >>> git push

slide-34
SLIDE 34

Demo: ¡Github

slide-35
SLIDE 35

Outline

  • 1. WhentouseMatlab
  • 2. Morepractice
  • 3. VersionControlwithGit/Github
  • 4. Course'recap
slide-36
SLIDE 36

Whatwe’velearned

  • 1. Programmingbasics
  • 2. Loading,manipulating,slicingdata
  • 3. Datavisualization
  • 4. Controlflow:forloops,ifstatements
  • 5. Writinggoodcode:comments,spacing,style
  • 6. Statistics,signalprocessing,imageprocessing
  • 7. Versioncontrol