My first experience of writing code

When I first started coding, I had zero idea what I was doing.

I stepped into my first class on a three week bootcamp. There were around 14 of us there. Some in the class had a bit of web development experience (building websites in HTML and CSS), but the majority were about to write our first lines of code.

That was one of the main concerns that I had. That I knew nothing about coding. I didn’t even know how to start writing code; seriously, what did people use to write code?

So what did what did that first day look like?

The first step involved opening a program called Visual Studio Code. Once that was launched, which was simple enough download, we created a new file.

Fig 1 : What you will see when you open Visual Studio for the first time.

The new file opens up as a text file.

For this first lesson we were going to start with JavaScript. To convert this text file to JavaScript we had to do one thing – save the file with the .js extension:

dayOne.js

By doing this, Visual Studio Code knows we are about to start writing in JavaScript. This is when we start seeing the nicely coloured code when we type!

The next step, before we wrote any code, was to download Node.js. Node is a something called a JavaScript runtime program. I’ll go into more detail about that in another post.

Once that was all set up, we got down to the fun stuff. Code. This was it.

One line.

console.log("Hello World")

Then we were told to go to run and select Run Without Debugging :

There we go. That light blue text. Do you see it? That was the output from my first line of code. The infamous “Hello World”.

[Note: If you find that this isn’t running, and you have downloaded Node.js there are a couple of fixes. First, restart Visual Studio Code to finish the Node.js set up. If that doesn’t work, try putting the dayOne.js file into it’s own folder. When you launch Visual Studio again, open the folder then launch the dayOne.js file from there.]

And if that isn’t the output when you first run some code, are you really a developer?

So if you’re a developer, can you remember what your first time coding was like? Please feel free to share in the comments!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: