Project Update 1

by Elliott Hauser

19 Apr 2016

Q & A

  • Open source contributions and meetup reflections both due by the 29th
  • From now on: snapshots of your work
  • Pycharmers: snapshot into trinket or use git (instructions will vary slightly from below)

Project Update 1

  • Pair up
  • Merge up
  • Stand up (not literally)

During standup:

  • What did you say you’d do?
  • What did you actually do?
  • Show and tell your program
  • What will you do for next class?
  • Any problems?

After everyone’s done their update, revise your milestones (in your existing post) and get your partner to merge your revisions.

Basics for Cloud 9ers (and anyone else interested) - Last ~15 mins of class

Write and run a Python program:

  • make a .py python program
  • in a terminal, type python3 [filename]
  • OR add the magical #!/usr/bin/python3 to the top. You can then use C9’s Run button.

Initial git setup:

  • cd into your project directory (put your stuff into a directory if needed)
  • git init if you haven’t already
  • git add .
  • git commit -m "your commit message here"
  • Make a repo on github.com. Don’t initialize it with a Readme!
  • git remote add [name] [url]
  • git push -u [name] [master]

Each time thereafter:

  • save your work
  • Add, commit, and push. The other steps are only needed once. When you git add you can specify specific filenames instead of all files.
  • Verify that your new commits show up on github.com. This is where intelligible commit messages will help.

Notes:

  • git status, ls and pwd give you info!
  • I’m allowing you to commit to and push to the master branch for simplicity. You’d only do this for a personal project and even then branching is always a good idea. Know on a real project you’d be doing pull requests!
  • Try to commit locally each time you hit a milestone. That’ll make your commit history mirror your progress. If you wait till the end your commit history won’t be very useful.
  • Remember to push your changes before every project update!

Customization:

$HISTSIZE and other Bash environment variables. c9 ~/.bashrc is where you’d edit this. Here’s what I added, at the bottom:

export HISTSIZE=100000 # big big history
export HISTFILESIZE=100000 # big big history

Anything you put into ~/.bashrc will be run every time you open a terminal. It’s a handy place to customize your environment. Note the ~. In C9 you start in /workspace or etc and .bashrc is in the root of your user’s home directory, aka ~.

Elliott Hauser is a PhD Student in information science at UNC Chapel Hill. He's hacking education as one of the cofounders of Trinket.io. Find Elliott Hauser on Twitter, Github, and on the web.