Setup Mac

Your Computer

What is Your Computer?

Your computer is the thing you are reading and typing on :) You should know a few things about it before we go much further.

Why do I need my Computer?

Starting development work requires at least a passing familiarity with what is happening inside your machine, what software is installed, and where to look next for help!

Get information about your computer!

  1. Figure out your OS and version
  2. An Admin type account is pretty helpful (“Allow user to administer this computer”)
  3. Check to see that you have at least 1 Gb of disk space left.
Apple menu (upper left) > About This Mac
images/about_mac.png

Verify It Works!

Know your OS and version number? Good!

Command Line Interface

What is a Command Line Interface (CLI)?

A command line interface (CLI) is way of interacting with a computer by typing commands.

Why do I need a Command Line Interface (CLI)?

Many development tools don’t have graphic user interfaces–they only have command line interfaces.

Get a Command Line Interface (CLI)!

Macs come with a command line interface included!

Verify It Works!

  1. Start up a Terminal. You can find the Terminal application through Spotlight, or navigate to Applications/Utilities/Terminal. In your terminal, type:

    bash --version
    

Output should look similar to:

$ bash --version
GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)
Copyright (C) 2007 Free Software Foundation, Inc.

Terminal

While Terminal is a full-featured utility, its default configuration is a bit poor for programming usage. Let’s configure Terminal to be a bit more friendly.

  1. In your Terminal, copy and paste this command into your terminal and then hit enter. All this yarnbarf is to enable a colored terminal prompt.
echo "export PS1='\[\e[0;33m\]\u\[\e[0;37m\]\[\e[0;36m\](\W)\[\e[0;0m\]\$ '" >> .bash_profile
  1. Click Terminal in the upper-left hand corner, and go to Preferences.
  2. Click on the Settings Section (right of Startup and left of Window Groups)
  1. Highlight the Pro choice in the list on the left, and then click the Default button underneath
  1. Click the Window tab (left of Text and right of Shell)
  1. Click the black block left of “Color” and drag the Opacity slider to the right (100%)
  2. Set the number of Rows to 40, under the Window Size section. Feel free to adjust taller or shorter to taste.
  1. Close your Preferences window and terminal, and then go to Shell > New Window

Done properly, your new terminal should look like this:

images/configured-terminal.app.png

gedit

What is gedit?

gedit is a cross-platform, syntax-highlighting text editor.

Why do I need gedit?

To write your code in! Word is a fine program, but it is not a text editor.

Get gedit!

python

What is python?

Python is a general purpose, dynamically-typed, strongly-typed, interpreted computer programming language.

Why do I need python?

Well, this is a Python programming workshop!

Get python!

OS X comes with Python installed!

Verify It Works!

  1. Start up a Terminal. You can find the Terminal application through Spotlight, or navigate to /Applications/Utilities/Terminal

  2. Test your Python install at the command prompt. Type python and hit enter. You should see something like:

    Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29)
    [GCC 4.2.1 (Apple Inc. build 5646)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>>
    

Type exit() to return to your terminal/shell. Don’t worry if your version is different than the one shown here. Any 2.x series python 2.5 or higher (i.e., 2.5, 2.6, 2.7) should be fine!