Assignment 1 – Getting Started
Learning Objective
1. Get introduced to using Javascript as a programming language
2. Learn how to use JSFiddle to submit programs
Corresponding Lectures
On the All Course Lectures page, It is recommended that you watch all Part 1 video starting this week.
Learning – JSFiddle, JavaScript, Browser Debugger
This first week you will need to get started with a lot of new things to learn; you should get started right away.
- JSFiddle – You will first need to create a JSFiddle Account – http://jsfiddle.net/ – JSFiddle is an online programming tool for programming in Javascript. If you need help using JSFiddle – there is a nice little tutorial here https://www.youtube.com/watch?v=Iw4f-yRf7RU
- Tools – There are also plenty of development environments to assist with Javascript programming, and I encourage you to find one you like and use it. Most submissions will be in JSFiddle for one simple and easy-to-understand reason – they are easy for me to grade. Here are some tools that can help you; Meteor – https://www.meteor.com/ – An installed API and web tool for writing Mobile Apps and Web Apps in JavaScriptJSLint – http://jslint.com/ – You will want this tool; it scans your Javascript code looking for problems.
- Javascript – Some more help with Javascript. The Javascript tutorial at W3 Schools http://www.w3schools.com/ covers pretty much what you need to be successful in this class using the Javascript language. You will also want to use a Javascript IDE to help write Javascript code better. You have free access to Visual Studio 2015 through Dreamspark ( https://www.dreamspark.com/ ) – and even though it is overkill, it does work quite well. Another tool that a lot of developers love is WebStorm from JetBrains ( http://www.jetbrains.com/ ). If you are a programming commando – you can simply go with Notepad or Notepad++, or just write directly in JSFiddle. It is worth discussing these topics on the discussion board as you are required to post at least once the first week of class anyway.
- Debugging – You will also need to learn how to use the debugger in your chosen browser – this will be critical as you attempt to debug your applications in JSFiddle. You could spend countless hours trying to solve a simple syntax error in JavaScript – that you could find in seconds with a little knowledge of how to use the debugger.
– Chrome Debugger – https://developer.chrome.com/devtools– Firefox Debugger – https://developer.mozilla.org/en-US/docs/Tools/Debugger
– Internet Explorer debugger – https://msdn.microsoft.com/en-us/library/dd565625(v=vs.85).aspx
- Help – Some of you will be ready to start, and some will need some assistance. This little video on implementing the “Hello World” in Javascript and JSFiddle will answer some of your questions. Don’t be tempted to use this and complete the assignment simply – this is an easy assignment; use the time to start learning JavaScript – https://youtu.be/WMPnkJadIck
Assignment
This is meant to be a relatively easy assignment to get you used to using JSFiddle and using JavaScript. This is the assignment you must complete and turn in. If you are already familiar with the topics above – you will be able to get started and complete this assignment quickly.
You will create a new JSFiddle called Array Example. For this example, you will create in JavaScript an Array of strings – you will populate it with the first names of each of the members of this class. Yes, you will need to use the discussion board to collect these first names and while you are at it – say hi on the discussion board. Please note that you must use an Array for this assignment (not another data structure). Note: since the class is pretty large, feel free to use a random sample of any ten members of the class.
You will create a button with the Text – “Pick One” when the user clicks the button, it will call a function that will randomly pick one member of the Array – and print that person to the screen (not in an alert box – but on the main screen). If it works – you get full credit. This assignment is only getting you set up using Javascript and JSFiddle. You will use JSFiddle for the rest of the semester in this class.
Time Estimate
For students familiar with all Learning above, you will be able to complete this in less than an hour. For those who need to learn these, you should allot 3-5 hours for completing the W3 schools tutorial and the videos in the first section of the Lectures.
Assignment 1 Grading Criteria
You should have a complete application with a button “Pick One” that returns the first name on the screen for credit. This assignment is all or nothing – it must work, there is no partial credit.