SourcingDenis / dev-setup

:airplane: A quick-start guide for new developers on how to set up their environments

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A Guide to setting up your developer environment

contributions welcome

This repo should be constantly evolving. Please open issues and pull requests to include anything you think is relevant.

Note: The intention is not to include every fancy script, tip and trick under the sun, this is about basic setup and getting going when you're new and already have a steep learning curve!

Who is this for?

People who are new to coding.
Particularly people who have learnt online using inbuilt browser-based editors and tools (often the case in online courses) and have not set up their own environment on their own computers before.

Why?

When we were teaching ourselves how to code it took us some time, talking to more experienced developers and trying things out to pick up on all the small things that make our lives easier as developers.
We wanted there to be a single place where new developers could go to find these quickly so they can get past the setup and down to the business of coding.

Note: @dwyl we use full stack Javascript. This includes some recommendations of things we personally favour of course!

Checklist

Next steps? If you want to contribute to dwyl projects, get comfortable with our stack and open issues whenever you have questions!

Text Editor

It's entirely up to you which text editor you use, but you will inevitably need one.
At the time of writing, at dwyl we use Atom editor (open source, NodeJS based editor) though we work with a lot of people who use Sublime Text (and have used this ourselves in the past).

Basic text editor setup

  • ** Set up soft tabs** (indentation)
    • You can usually set this up in the Preferences or Settings of your favourite text editor so you never have to think about it again (example below on Atom editor)

atom-soft-tab-preferences-menu

  • Set up a guide (or line) to show on your page at the 80 character mark so you know when you go past 80 characters (or columns) on a single line

    • Useful for readability, particularly in code snippets where you would otherwise end up with a scroll bar
    • You should also be able to set this up in your favourite text editor's Preferences (example below again on Atom editor - note, I also like to set up my editor to soft wrap at this line length so I can read other people's code more easily)
    80-character-line-guide-setup
  • Install at least a basic linter to your editor

Our most used text editor keyboard shortcuts

Each person's most used shortcuts will vary of course, but here are some of the things we suggest learn the keyboard shortcuts for:

  • Select the current word (usually cmd + D)
  • Delete current line (usually ctrl + shift + K)
  • Indenting a line or a whole block of code at once
  • Column editing
  • Moving a line or block of code up and down the page
  • Changing the syntax highlighting when required
  • Toggle between the different views (e.g. hide/show the file tree view to gain more screen real estate)

Git and GitHub

We use Git and Github exclusively for our version control and to share our work with the world.
Understanding the difference between the two is also helpful 😊

Basic Git setup

  • Sign up for a Github account

  • Set up Git on your computer

    • We recommend you authenticate with SSH as this is more secure and means you won't have to type in your password every time you push to GitHub
    • Note: This also means that when you clone a repo, you'll need to use the SSH clone URL (thanks @tsop14 for the screenshot!)

    change-to-ssh

Learn how to use Git + GitHub

+ Although [Git has a desktop client](https://desktop.github.com/) we **recommend that you learn to use it on the command line** - this is _much_ faster in the long run and will serve you well as a developer
  • There are many themes which you may have heard of (like Oh My Zsh) that aim to add some functionality and shortcuts to your terminal - we don't recommend you use any terminal themes when you're starting out. Until you know what you're doing in the terminal, relying on these keeps you from becoming proficient in the basics.
  • Similarly, a good number of us currently use iTerm as our terminal emulator but you really don't need to have one straight away - iTerm just provides some nice features like split panes 👍 iterm-screenshot

About

:airplane: A quick-start guide for new developers on how to set up their environments