# How Do We Code?

Coding (or *programming*, as I like to call it) is changing. What used to be done directly on a computer, with specific hardware, is becoming easier and more ubiquitous. These days you can develop your program completely [in the cloud](https://codenvy.com/) and even deploy to a production server without having the files directly on your own computer. We've almost gone back to having [dumb terminals](https://www.techopedia.com/definition/3032/dumb-terminal).

[Here is a slideshow](https://docs.google.com/presentation/d/e/2PACX-1vTuH1Ybfl5YbUBKBWxaRxdCh2DEvG2DVhR9mJDJ1jOOeLEmalmcG-uystNo0QuZeFs1b7QMlyrPCMGx/pub?start=false\&loop=false) I created on the topic, however it would be [better with an explanation](https://scrimba.com/scrim/cK27zzUd?pl=pWrg4uW).

## Dev Environment <a href="#dev-environment" id="dev-environment"></a>

Typically, you would set up a [development environment](https://en.wikipedia.org/wiki/Deployment_environment#Development) on your computer(s) to produce your code in the language(s) of your choosing. This might include an [Integrated Development Environment](https://en.wikipedia.org/wiki/Integrated_development_environment), or IDE. One of the most widely known IDE's is [Eclipse](https://www.eclipse.org/ide/). Another is [MS Visual Studio](https://visualstudio.microsoft.com/) (one of my favourites). The IDE has a workspace for editing code files, highlighting syntax, compiling and debugging code, and even deployment or connecting to a version control system.

{% tabs %}
{% tab title="Cloud Environments" %}
These days your dev environment, including very capable IDE's, are available online. Amazon is putting a lot of money into their [AWS system](https://aws.amazon.com/), for example.

**We will be using** a teaching/learning IDE from [**Repl.it**](https://repl.it/). Below are some examples of other web-based development environments:

* [Codenvy](https://codenvy.com/)
* [Codeanywhere](https://codeanywhere.com/)
* [Koding](https://www.koding.com/)
* [ShiftEdit](https://shiftedit.net/about)
* [Amazon C9](https://aws.amazon.com/cloud9/?origin=c9io) (formerly Cloud9 IDE)
* [Paiza Cloud](https://paiza.cloud/en/)

The list could go on for quite some time. In fact, there is even [Eclipse Che](https://www.eclipse.org/che/).
{% endtab %}

{% tab title="Eclipse IDE" %}
The [Eclipse IDE](https://www.eclipse.org/ide/) was designed to give developers full control of their environment. From colour and syntax-highlighting schemes to language [plugins](https://marketplace.eclipse.org/) to [linting](https://en.wikipedia.org/wiki/Lint_\(software\)), autocomplete, and [debugging](https://cs.brash.ca/~/drafts/-LSWne9HWNpnvKZ9hbk2/revisions/-LSWsK7sDZckXCqNAeKP/unit-3/debugging), Eclipse is a workhorse. For that reason, it is also extremely complicated and a bit bloated. It also has a steep learning curve.

Don't let that sound like a bunch of negatives towards Eclipse. It is *extremely powerful* and used across the globe for code development.

![The Eclipse IDE allows you to program in several languages using plug-ins](https://1200419583-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LKbpNQDFNJap9OTDSt6%2F-LNhEAEG02ycSvWQK7OQ%2F-LNhHBp21GIwLbXm4gkB%2FEclipseIDE.jpg?alt=media\&token=89fe62c4-5cc8-41fc-9476-e3d6f5aba6b3)
{% endtab %}

{% tab title="Visual Studio" %}
Microsoft gets a bad wrap for no good reason. People who dislike Microsoft products do not know what they're missing when it comes to development environments and [MS Visual Studio](https://visualstudio.microsoft.com/). Even back in 1999-2000 with version 5, the environment was solid, mature, and full of incredible features designed to make programming faster and more professional.

I am a tad biased, since I've been using various versions of MS Visual Studio since I was about 17 years old, but it is seriously worth a look - even (or especially) the express versions.

![Visual Studio has been around since the 90's and is a very mature product](https://1200419583-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LKbpNQDFNJap9OTDSt6%2F-LNhEAEG02ycSvWQK7OQ%2F-LNhHINRF4hA1mpU7ydC%2FVisualStudio.png?alt=media\&token=ed22e979-687f-4d7b-b449-39c2ffbcc8e3)
{% endtab %}

{% tab title="Visual Studio Code" %}
By far, one of the best code editors out there is Visual Studio Code. It is not a complete dev environment, but plug-ins can get it pretty close. From their [own site](https://code.visualstudio.com/docs/editor/whyvscode):

> Visual Studio Code combines the simplicity of a source code editor with powerful developer tooling, like IntelliSense code completion and debugging.
>
> First and foremost, it is an editor that gets out of your way. The delightfully frictionless edit-build-debug cycle means less time fiddling with your environment, and more time executing on your ideas.

![](https://1200419583-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LKbpNQDFNJap9OTDSt6%2F-LNhIbrs9RQoY0Ii9lDp%2F-LNhJKaoh9JLWi2llF7K%2FVisualStudioCode.gif?alt=media\&token=2f3357bf-3586-4fc3-ae95-5d944cd1a685)
{% endtab %}
{% endtabs %}

## Compiling vs Interpreting <a href="#compiling-vs-interpreting" id="compiling-vs-interpreting"></a>

#### Compiling <a href="#compiling" id="compiling"></a>

The procedure known as *compiling* is the act of running a program (the compiler) to read through your code and convert it to something a computer can understand. It might get compiled down to assembly or some other machine-level language that is meant for the processor to understand, not our human eyes - essentially to binary instructions.

**Interpreting**

Interpreted code, like JavaScript and Python, has a "middle-man" translating the code to machine language instruction-by-instruction. Instead of compiling *all* the code into machine language, it does this as necessary. This can be costly in terms of performance but also has many benefits like fixing code on-the-fly and using the same code for any kind of hardware.

There are many great videos on YouTube explaining the differences between compiled and interpreted code - I suggest you watch a couple and find the one which helps you the most.
