Pre-work for Code 301
Latest commit 40430d0 Feb 22, 2017 @brookr brookr committed on GitHub Update README.md
Permalink
Failed to load latest commit information.
README.md Update README.md Feb 22, 2017

README.md

Code 301 Pre-work: Intermediate Software Development

Computer Setup

Install Atom

If you haven't already, install Atom. If you have used an advanced text editor like Sublime Text, then Atom will feel familiar to you. Atom is free, open-source, cross-platform, and has a wide array of useful plug-ins available. Please use Atom during Code 301. (If you are proficient with another text editor that you love, you may use that instead, but please note that your instructional team may not be able to assist with debugging any issues with your editor)

Atom's documentation is top-notch. Review it now to familiarize yourself with the basics. Make sure you're looking at the docs for the latest version. If you find that you are unable to call atom in the terminal, you may need to enable shell commands through Atom by first opening it through your graphical desktop interface, and selecting Install Shell Commands in the drop-down menu.


Install Node

Note If you get an error while installing these packages such as "try again as root/administrator", you may need to use the sudo command to get administrator access. For example sudo apt-get install nodejs.

Linux instructions

To install Node, open your Terminal, and copy and paste the following line, then hit Enter:

sudo apt-get install nodejs

If this did not work, try the following:

curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -

It will churn away for a while, and then once it's done you can run the following command:

sudo apt-get install nodejs

If, once again, you did not achieve success, try these instructions to build from source.

Finally, sudo apt-get install npm

Mac instructions

If you took Code 201, you should already have Homebrew installed. If you have not, follow the guide on this page.

To install Node, open your Terminal, and enter:

brew install node

Windows instructions

To install Node, go here, and then download and run the Windows Installer. Make sure you do not deselect any of the Node components such as NPM during the installation.

Verify the Node installation

Now let's verify that it is installed. Enter the following into your terminal:

node -e 'console.log("works")'

You should get a response that says "works". If not, try reinstalling Node again


Install eslint and live-server Node packages

Now that you have Node installed, you can install Node packages using its package manager, NPM. Open your Terminal (Git Bash on Windows) and enter:

npm -g i eslint live-server git-open

You should see a lot of feedback as it installs.

Verify the Node packages installation

Now let's verify that it is installed. Enter the following into your terminal:

npm list -g --depth=0

You should get a list back that includes live-server and eslint.


What is this linter thing?

Linting is the process of running a program that will analyze code for potential errors. It is an important part of the quality assurance process.

lint was the name originally given to a particular program that flagged some suspicious and non-portable constructs (likely to be bugs) in C language source code. The term is now applied generically to tools that flag suspicious usage in software written in any computer language.

That means the linter is your friend! It will help you write syntactically correct code, so you can catch errors in your text editor, rather than having to hop over the browser, refresh your page, and search for errors. Faster feedback makes for happier developers (that's you!).

Install linter and linter-eslint Atom packages

For this next part, you will have Atom's package manager apm install some packages. Go here to verify it's enabled. Once you have verified that apm commands will work, enter this on your Terminal:

apm install linter linter-eslint

You should get two success messages while it installs the linter and linter-eslint packages.

Verify the Atom packages installation

Enter the following into your Terminal:

apm ls
You should get back a long list, and at the end you should receive a list of packages you installed for Atom.
Linter and linter-eslint should be on that list, like in this screen shot:

screen shot 2016-05-28 at 11 33 31 pm


Install PostgreSQL Database Software

Please note that if you have a previously installed version of PostgreSQL on any operating system, you should be aware of any username and password that you've set for that installation. If you're unsure please uninstall and reinstall a fresh copy, which will also install the latest stable version.

For both Windows and Linux users, please follow the default installation instructions taking care not to change values such as the default port numbers (You may be prompted to change them, but should also be given default values).

Windows

Follow the download and installation instructions on this page: Installing Postgresql

  • Your Default database super user is: postgres
  • You will be asked to enter and confirm a database password.
  • Be sure you document your default user and password, as you will need them later in the course. We are working securely on your computer, so a simple password like 1234 will suffice, and there's no need to change the default user.

Linux

Follow the download and installation instructions on this page for your Linux distribution: Installing Postgresql

  • If asked to provide or set a username and password, be sure to document the username and password, as you will need them later in the course.

MacOS

You should have already verified during the Node installation that you have Homebrew installed. Please see that section above for more details if not.

To install PostgreSQL, open your Terminal, and enter: brew install postgresql

This will create a user for you, that matches your logged in user account. Run the whoami command in the terminal if you aren't sure what that is. This user has a blank password set as the default.

Create some databases

Now that Postgres is installed, you should be able to create some databases to use in the class. From a command prompt, run these commands, utilizing the username and password form your set up. :

createdb -U USERNAME kilovolt
createdb -U USERNAME portfolio

These commands should run without an error.

Congrats! You're all done. Well, except for your class-specific directory instructions 😉