A starter repo for LaDebug July Slam JavaScript contest. Use this repo to quickly setup the directory structure and files. It is highly advised to go through the document thoroughly.
- Use the GitHub Classroom link to create a private repo - https://classroom.github.com/a/bqTxlaR3
- Clone the repo from your profile using
git clone https://github.com/<your-username>/julyslam-js-todo-<your-username>
ToDo lists are a nice place to start implementing your web development concepts. Given the functionality of a sophisticated ToDo list: creating new ToDos, deleting older ones, modifying the existing ones. To implement these functions, we need JavaScript.
There is a lot to experiment. You can add animations, AJAX, make use of storages and APIs, and a lot more.
Your code should let the user do the following:
- add new ToDos
- modify existing ToDos
- delete existing ToDos
You are free to build up on it, and add some additional functionality like having a weather widget β.
Directory Structure
π index.html -- HTML code goes here
π README.md -- Read Me file, no changes required
π .gitignore -- Use this file to ignore files and directories
π scripts -- JS files will be stored here
β π core.js -- JS code goes here
π styles -- CSS files will be stored here
β π style.css -- CSS goes here
π res -- All static resources (images, docs, etc.) will be stored here
β π favicon_128x128.png -- Default 128x128 favicon
π vendor -- If you are using any libraries and not using a CDN
π misc -- Anything that does not fit into other directories
- Good coding practices and conforming to coding standards is a plus π.
- Use of jQuery should be avoided. Vanilla JS is cool π!
- Using Google (and Stack Overflow) is allowed β ; however, significant plagiarism will lead to disqualification β.
- Use of libraries is allowed, but should be avoided. Try to use in-built JS methods πΉ.
- Write good commit messages. We'll review your commit history β³.
- This is not a CSS contest, and we do not expect you to write a lot of CSS. You can skip CSS altogether, but a little CSS is always nice π.
Javascriptβ JavaScript βGithubβ GitHubβ- You can use any code editor/IDE that you like. As long as your code works, editor/IDE does not matter π».
- MDN Web Docs - JavaScript
- JS Coding Best Practices & Standards
- JS Glossary
- HTML5 Coding Standards
- CSS Coding Standards
This section is subjective. Although, I use this environment setup, and I recommend it - it is a matter of personal preference. You can be an amazing coder and still use Vi or Notepad
- Editor π₯:
- Plugins π:
- Theme & Icon Pack π¨:
- Material Theme Darker
- Material Product Icons
Bad Code π:
var flag = 1;
var iter = 0;
while(flag){
doSomething(flag);
++iter;
}
console.log(iter);
Good Code π:
var flag = 1; // Set flag to 1
var iter = 0; // Set iter to 0
while(flag){
doSomething(flag); // Check if flag status has changed
++iter; // Increment iter if status not changed
}
console.log(iter); // Print the iter value
Bad Code π:
var foo_bar = "Bad example";
var fooBar = "You should avoid it";
Good Code π:
var fooBarA = "Consistent case";
var fooBarB = "is more readable";
Bad Code π:
var x = {
"javascript": "is amazing",
"best practice": "user-friendly names"
};
console.log(x["javascript"]);
Good Code π:
var json = {
"javascript": "is amazing",
"best practice": "user-friendly names"
};
console.log(json["javascript"]);
Bad Code π:
function thisIsAnExample( args ){
var iter=0;
var iterSecondary = 1;
var iterTertiary= 2;
return iter+ iterSecondary + iterTertiary;
}
Good Code π:
function thisIsAnExample(args){
var iter = 0,
iterSecondary = 1,
iterTertiary = 2;
return iter + iterSecondary + iterTertiary;
}