From e49c9ca87e5a0241fb5aa277169e57ab2025d5d0 Mon Sep 17 00:00:00 2001
From: Quincy Larson
Date: Fri, 24 Apr 2015 21:30:22 -0700
Subject: [PATCH] make some improvements to the field guide articles and move
the bonfire styleguide into field guides
---
seed_data/bonfireMDNlinks.js | 4 +-
seed_data/field-guides.json | 57 +++++---
views/resources/chat.jade | 22 ---
views/resources/jquery-exercises.jade | 185 --------------------------
views/resources/learn-to-code.jade | 65 ---------
views/resources/styleguide.jade | 26 ----
6 files changed, 39 insertions(+), 320 deletions(-)
delete mode 100644 views/resources/chat.jade
delete mode 100644 views/resources/jquery-exercises.jade
delete mode 100644 views/resources/learn-to-code.jade
delete mode 100644 views/resources/styleguide.jade
diff --git a/seed_data/bonfireMDNlinks.js b/seed_data/bonfireMDNlinks.js
index 7038fb414d..65ca1e0d02 100644
--- a/seed_data/bonfireMDNlinks.js
+++ b/seed_data/bonfireMDNlinks.js
@@ -1,6 +1,6 @@
// MDN Links
-/* These links are for Bonfires. Each key/value pair is used to render a Bonfire with approrpiate links.
+/* These links are for Bonfires. Each key/value pair is used to render a Bonfire with appropriate links.
The text of the key is what the link text will be, e.g. Global Array Object
@@ -67,7 +67,7 @@ var links =
"Array.sort()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort",
"Array.splice()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice",
"Array.toString()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toString",
-
+
// ======== MATH METHODS
"Math.max()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max",
"Math.min()" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min",
diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json
index 74b9db9668..5b40a05a0c 100644
--- a/seed_data/field-guides.json
+++ b/seed_data/field-guides.json
@@ -330,8 +330,8 @@
" ",
"
",
"
It's notoriously difficult to estimate how long building software projects will take, so feel free to ask camp counselors for help.
",
- "
You'll continue to meet with your stakeholder at least twice a month in your project's Gitter channel.
",
- "
You should also ask questions in your project's Gitter channel as they come up throughout the week, and your stakeholder can answer them asynchronously.
",
+ "
You'll continue to meet with your stakeholder at least twice a month in your project's Slack channel.
",
+ "
You should also ask questions in your project's Slack channel as they come up throughout the week, and your stakeholder can answer them asynchronously.
",
"
Getting \"blocked\" on a task can take away your sense of forward momentum, so be sure to proactively seek answers to any ambiguities you encounter.
",
"
Ultimately, the project will be considered complete once both the stakeholder's needs have been met, and you and your pair are happy with the project. Then you can add it to your portfolio!
",
"
Working with your Pair
",
@@ -344,30 +344,12 @@
"
• Write clear and readable code, commit messages, branch names, and pull request messages.
",
" ",
"",
- "
Setting up your Development Environment
",
- "
We've created a custom virtual machine image with Ubuntu Linux, Git, Team Viewer, the MEAN Stack and all its dependencies. You can run this virtual image on any computer with at least 2 gigabytes of RAM and 16 gigabytes of hard drive space.
",
- "
The benefits of using this virtual machine are as follows:
",
- "
",
- "
• Everyone else on Free Code Camp is using this image, so we can all help you troubleshoot various problems that may arise.
",
- "
• When you pair program, you and your pair will have the exact same environment, which means you will both feel comfortable on each other's machines.
",
- "
• You can install the image on any computer without worrying about messing up the computer's original data or configuration.
",
- "
• Even if you end up using Windows or Mac OSX for development later, your server will almost certainly run Linux, so it's worth getting used to Linux.
",
- "
• Even experienced developers encounter hangups when setting up a development environment. This virtual machine image will remove this tedious process.
Please note that even though Bit Torrent is often used to download content illegally, all the content on our image is open source and perfectly legal to redistribute.
",
- "
Once you've downloaded the file, download VirtualBox and follow this tutorial to open the image in VirtualBox. You'll want to assign the virtual machine at least two gigabytes of ram.
",
- "
Now you have your own Linux development environment. You can shut it down when you're not using it and it will save its state. Please continue to seed the file in bit torrent so that other campers can download it as well. Enjoy!
",
"
Hosting Apps
",
"
Unless your stakeholder has an existing modern host (AWS, Digital Ocean), you'll need to transition them over to a new platform. We believe Heroku is the best choice for a vast majority of web projects. It's free, easy to use, and has both browser and command line interfaces. It's owned by Salesforce and used by a ton of companies, so it's accountable and unlikely to go away.
",
"
If you need help convincing your stakeholder that Heroku is the ideal platform, we'll be happy to talk with them.
",
"
Maintaining Apps
",
"
Once you complete a nonprofit project, your obligation to its stakeholder is finished. You goal is to leave behind a well documented solution that can be easily maintained by a contract JavaScript developer (or even a less-technical \"super user\").
",
"
While you will no longer need to help with feature development, we encourage you to consider helping your stakeholder with occasional patches down the road. After all, this project will be an important piece of your portfolio, and you'll want it to remain in good shape for curious future employers.
",
- "
Office Hours
",
- "
Quincy Larson and/or Michael Johnson will be in the Gitter Nonprofit Project Channel every Monday and Thursday from 9 - 10 p.m. EST.
",
- "
Our goal is to make the discussion as public as possible so all our campers can benefit from each camper’s questions.
",
- "
If necessary, we can also hop on Screen Hero with you to help you with issues more specific to your project.
",
"
Pledging to finish the project
",
"
Your nonprofit stakeholder, your pair, and the volunteer camp counselor team are all counting on you to finish your nonprofit project. If you walk away from an unfinished nonprofit project, you'll become ineligible to ever be assigned another one.
",
"
To confirm that you understand the seriousness of this commitment, we require that all campers sign this pledge before starting on their nonprofit projects.
Writing Bonfire challenges is a great way to exercise your own problem solving and testing abilities. Follow this process closely to maximize the chances of us accepting your bonfire.
",
+ "
",
+ " ",
+ "
Fork the Free Code Camp repository and open seed_data/bonfires.json to become familiar with the format of our bonfires.
",
+ "
Regardless of your bonfire's difficulty, put it as the last bonfire in the JSON file. Change one of the numbers in the ID to ensure that your bonfire has a unique ID.
",
+ "
In the terminal, run node seed_data/seed.js. Run gulp. You should be able to navigate to your new bonfire in the challenge map. Whenever you make a change to bonfire.json, you'll need to reseed in order to see these changes in the browser.
",
+ "
Solved your own Bonfire. Confirmed that your tests work as expected and that your instructions are sufficiently clear.
",
+ "
Submit a pull request to Free Code Camp's Staging branch and in the pull request body, link to a gist that has your algorithmic solution.
",
+ " ",
+ "
",
+ "
Here is a description of each of the Bonfires' fields.
",
+ "
Name
",
+ "
The name of your challenge. It's OK for this to be humorous but it must be brief and relevant to the task.
",
+ "
Difficulty
",
+ "
Attempt to rate difficulty compared against existing bonfire challenges. A good proxy for the difficulty of a bonfire is how long it takes you to solve it. For every 15 minutes it takes, increase the difficulty. For example, a one-hour bonfire should probably be a 4.
",
+ "
Description
",
+ "
Separate paragraphs with a line break. Only the first paragraph is visible prior to a user before they click the the 'More information' button.
",
+ "
All necessary information must be included in the first paragraph. Write this first paragraph as succinctly as possible. Subsequent paragraphs should offer hints or details if needed.
",
+ "
If your subject matter warrants deeper understanding, you may link to Wikipedia.
",
+ "
Challenge Seed
",
+ "
This is where you set up what will be in the editor when the camper starts the bonfire.
",
+ "
Tests
",
+ "
These tests are what bring your challenge to life. Without them, we cannot confirm the accuracy of a user's submitted answer. Choose your tests wisely.
",
+ "
Bonfire tests are written using the Chai.js assertion library. Please use the should and expect syntax for end user readability. As an example of what not do to, many of the original Bonfire challenges are written with assert syntax and many of the test cases are difficult to read.
",
+ "
If your bonfire question has a lot of edge cases, you will need to write many tests for full coverage. If you find yourself writing more tests than you desire, you may consider simplifying the requirements of your bonfire challenge. For difficulty level 1 through 3, you will generally only need 2 to 4 tests.
",
+ "
MDNlinks
",
+ "
Take a look at seed_data/bonfireMDNlinks.js. If any of these concepts are relevant to your bonfire, be sure to include them. If you know of an MDN article that isn't linked here, you can add it to the bonfireMDNlinks.js file before adding it to your bonfire.
",
+ "
"
+ ]
+ },
{
"_id": "bd7158d9c451eddfaeb5bdef",
"name": "The Free Code Camp Privacy Policy",
diff --git a/views/resources/chat.jade b/views/resources/chat.jade
deleted file mode 100644
index 6850041dc3..0000000000
--- a/views/resources/chat.jade
+++ /dev/null
@@ -1,22 +0,0 @@
-extends ../layout-wide
-block content
- h3
- ol.col-md-offset-2
- li Create a GitHub Account
- a(href="http://github.com/join", target='_blank') here
- | .
- li Click "Login with GitHub" in the chat window below or download the chat room app for
- a(href="https://update.gitter.im/win/latest") Windows
- | ,
- a(href="https://update.gitter.im/osx/latest") Mac
- | ,
- a(href="http://appstore.com/gitter") iPhone
- | , or
- a(href="https://play.google.com/store/apps/details?id=im.gitter.gitter&hl=en_GB") Android
- | , or go
- a(href="http://chat.freecodecamp.com") here
- | .
- li Keep the chat room open while you code so that you can meet friends and ask for help.
- .col-xs-12
- .embed-responsive.embed-responsive-16by9.gitter-imbed
- iframe(src='https://www.gitter.im/freecodecamp/freecodecamp', frameborder='0', scrolling='no')
\ No newline at end of file
diff --git a/views/resources/jquery-exercises.jade b/views/resources/jquery-exercises.jade
deleted file mode 100644
index 60e470d3bc..0000000000
--- a/views/resources/jquery-exercises.jade
+++ /dev/null
@@ -1,185 +0,0 @@
-extends ../layout
-block content
- script.
- $(document).ready(function() {
- var directions = {
- 0: "To get started, open your Chrome DevTools. The #next-exercise button is disabled below. Try using jQuery's .attr() method to turn the disabled attribute to false.",
- 1: "Move the .target element from #location1 to #location2.",
- 2: "Change the background color of .target to red.",
- 3: "Change the background color of the even-numbered targets to red.",
- 4: "Change the background color of target4 to red.",
- 5: "Clone target2 in #location1 so that it also exists in #location2.",
- 6: "Remove the target3 element from #location1.",
- 7: "Check the following checkboxes using jQuery.",
- 8: "Make the text input field read-only.",
- 9: "Select target2 option in the select box.",
- 10: "Add the following css classes to .target: 'animated' and 'hinge'.",
- 11: "Use jQuery to read the data of .target.",
- 12: "Use 'length' to count the number of child elements in #location1, then display that value in #location2.",
- 13: "There's an element hidden in #location1. Show it using jQuery, and then click on it."
- };
- var hint = {
- 0: "$('#next-exercise').attr('disabled', false);",
- 1: "$('.target').appendTo('#location2');",
- 2: "$('.target').css('background', 'red');",
- 3: "$('.target:even').css({'background': 'red'});",
- 4: "$('.target:nth-child(4)').css({'background': 'red'});",
- 5: "$('.target:nth-child(2)').clone().appendTo($('#location2'));",
- 6: "$('.target:nth-child(3)').remove();",
- 7: "$('#location1 input').attr('checked', 'true')",
- 8: "$('#location1 input').attr('readonly', 'true')",
- 9: "$('#location1 select').val('target2');",
- 10: "$('.target').addClass('animated hinge');",
- 11: "$('.target').data();",
- 12: "$('#location2').text($('#location1').children().length)",
- 13: "$('#finished-button').show().click();"
- };
- var elements = {
- 0: "",
- 1: "
"
- };
- function refreshEverything() {
- $('#directions').text("Exercise " + currentExercise + ": " + directions[currentExercise]);
- $('#location1').html(elements[currentExercise]);
- $('#hint').text(hint[currentExercise]);
- handleExerciseTransition();
- }
- $('#exercise-directory').on('click', 'li', function (event) {
- currentExercise = $(this).index();
- event.preventDefault();
- refreshEverything(event);
- });
- $('#next-exercise').on('click', function (event) {
- ++currentExercise;
- event.preventDefault();
- refreshEverything(event);
- });
- $('#solution-button').on('click', function () {
- $('#hint-modal').modal({backdrop: "static"});
- });
- $('#location1').on('click', '#finished-button', function () {
- $('#finished-modal').modal({backdrop: "static"});
- });
- function handleExerciseTransition() {
- if (currentExercise === 0) {
- $('#next-exercise').attr('disabled', true);
- } else {
- $('#next-exercise').attr('disabled', false);
- }
- if (currentExercise === 2 || currentExercise === 6) {
- $('#location2 .target').remove();
- }
- if (currentExercise === 13) {
- $('#location2').text('');
- $('#finished-button').hide();
- $('#next-exercise').attr('disabled', true);
- }
- }
- var currentExercise = 0;
- refreshEverything(currentExercise);
- });
- .container
- .row
- .col-xs-12.col-sm-8
- .jumbotron
- .row
- .col-xs-12.text-center
- img.img-responsive(src='https://s3.amazonaws.com/freecodecamp/logo4.0LG.png', alt='learn to code free at freecodecamp.com')
- h1 jQuery Exercises
- br
- #directions.text-primary
- br
- .row
- .col-xs-6 #location1
- .col-xs-6 #location2
- .row
- #location1.col-xs-6.well.jquery-exercises-well
- #location2.col-xs-6.well.jquery-exercises-well
- #next-exercise.btn.btn-primary.btn-lg.btn-block
- | #next-exercise
- br
- button#solution-button.btn.btn-block.btn-lg.btn-info
- | #solution-button
- br
- .text-center
- | Created for
- a(href='http://www.FreeCodeCamp.com') Free Code Camp
- br
- | by
- a(href='https://twitter.com/ossia') Quincy Larson
- | ,
- a(href='https://www.twitter.com/terakilobyte') Nathan Leniz
- | ,
- a(href='https://twitter.com/iheartkode') Mark Howard
- | and
- a(href='https://twitter.com/ryanmalm') Ryan Malm
- | . Please
- a(href='http://codepen.io/ossia/pen/raVEgN') fork this.
- #exercise-directory.col-xs-12.col-sm-4
- .panel.panel-primary
- .panel.panel-heading List of Exercises
- .panel-body
- ol(start='0')
- li
- a(href='#') Re-enable an element
- li
- a(href='#') Change an element's parent
- li
- a(href='#') Change an element's CSS
- li
- a(href='#') Use jQuery filters to modify even elements
- li
- a(href='#') Change nth child
- li
- a(href='#') Clone an element
- li
- a(href='#') Remove an element
- li
- a(href='#') Check checkboxes
- li
- a(href='#') Make text read-only
- li
- a(href='#') Select an option in a select box
- li
- a(href='#') Add a CSS class to an element
- li
- a(href='#') Lookup an element's data attribute
- li
- a(href='#') Count child elements
- li
- a(href='#') Show an element and click on it
- #hint-modal.modal.fade(tabindex='-1', role='dialog', aria-hidden='true')
- .modal-dialog
- .modal-content
- .modal-header
- button.close(type='button', data-dismiss='modal')
- span(aria-hidden='true') ×
- span.sr-only Close
- h4#myModalLabel.modal-title Your hint
- .modal-body
- #hint
- #finished-modal.modal.fade(tabindex='-1', role='dialog', aria-hidden='true')
- .modal-dialog
- .modal-content
- .modal-header
- button.close(type='button', data-dismiss='modal')
- span(aria-hidden='true') ×
- span.sr-only Close
- h4#myModalLabel.modal-title
- | Congratulations! You've finished our jQuery exercises!
- a(href='http://www.freecodecamp.com/') Go back to Free Code Camp
- | and mark this challenge complete.
- .modal-body
- #hint
\ No newline at end of file
diff --git a/views/resources/learn-to-code.jade b/views/resources/learn-to-code.jade
deleted file mode 100644
index 59b9586ecc..0000000000
--- a/views/resources/learn-to-code.jade
+++ /dev/null
@@ -1,65 +0,0 @@
-extends ../layout
-block content
- .col-xs-12.col-sm-12.col-md-12
- .panel.panel-info
- .panel-heading.text-center
- h1 About Free Code Camp
- .panel-body
- .row.text-center
- .col-xs-12
- if (Math.random() > 0.99)
- img.img-responsive.img-center(src='https://s3.amazonaws.com/freecodecamp/wide-social-banner-dino.png')
- else
- img.img-responsive.img-center(src='https://s3.amazonaws.com/freecodecamp/wide-social-banner.png')
- .col-xs-12.col-md-8.col-md-offset-2
- h2.text-center
- span.text-primary #{c3}
- | campers have joined our community since we launched
- span.text-primary #{daysRunning}
- | days ago.
- .row.text-center
- .col-xs-12.col-md-8.col-md-offset-2
- if (user)
- if (!user.sentSlackInvite)
- a.btn.btn-cta.signup-btn.next-challenge-button.btn-block(href="/challenges") Take me to my next challenge
- .spacer
- a.btn.btn-primary.btn-cta.next-challenge-button.btn-block(href="/api/slack") Join our Slack Chat Room
- else
- a.btn.btn-cta.signup-btn.next-challenge-button.btn-block(href="/signin") Start learning to code (it's free)
- br
- script.
- var challengeName = 'Learn to code'
- .row
- .col-xs-12.col-md-8.col-md-offset-2
- for announcement in announcements
- h2
- if (announcement.length > 1)
- a(href=announcement[1])= announcement[0]
- else
- = announcement[0]
- a.twitter-timeline(data-dnt='true', href='https://twitter.com/FreeCodeCamp', data-widget-id='560847186548621312') Tweets by @FreeCodeCamp
- script.
- !function (d, s, id) {
- var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https';
- if (!d.getElementById(id)) {
- js = d.createElement(s);
- js.id = id;
- js.src = p + "://platform.twitter.com/widgets.js";
- fjs.parentNode.insertBefore(js, fjs);
- }
- }(document, "script", "twitter-wjs");
- h3
- .col-xs-12 Follow us on Twitter here:
- .col-xs-12.github-and-twitter-button-text
- html.
-
- Follow @FreeCodeCamp
-
-
- .col-xs-12.github-and-twitter-button-text Star us on GitHub here:
- .col-xs-12.github-and-twitter-button-text
- html.
-
diff --git a/views/resources/styleguide.jade b/views/resources/styleguide.jade
deleted file mode 100644
index 71303aa4b1..0000000000
--- a/views/resources/styleguide.jade
+++ /dev/null
@@ -1,26 +0,0 @@
-extends ../layout
-block content
- .jumbotron.text-left
- h1.hug-top.text-center Bonfire Style Guide
- h3 Writing Bonfire challenges is a great way to exercise your own problem solving and testing abilities. It is a simple three step process.
- h4
- ol
- li Fill out the generator form and test your challenge:
- a(href="http://www.freecodecamp.com/bonfire-challenge-generator") http://www.freecodecamp.com/bonfire-challenge-generator
- li Once you have confirmed a working bonfire challenge in the generator, copy and paste the the fields into the JSON generator: http://www.freecodecamp.com/bonfire-json-generator
- li Copy the JSON, fork the freecodecamp repository, and submit a pull request with your addition to the bonfires.json:
- a(href="https://github.com/FreeCodeCamp/freecodecamp/blob/master/seed_data/bonfires.json") https://github.com/FreeCodeCamp/freecodecamp/blob/master/seed_data/bonfires.json
- h3 Name
- p Name your challenge
- h3 Difficulty
- p Attempt to rate difficulty compared against existing bonfire challenges.
- h3 Description
- p Separate paragraphs with a line break. Only the first paragraph is visible prior to a user clicking the "More information" button.
- p All necessary information must be included in the first paragraph. Write this first paragraph as succinct as possible. Subsequent paragraphs should offer hints or details if needed.
- p If your subject matter warrants deeper understanding, you may link to Wikipedia.
- h3 Challenge Seed
- p This is where you set up what will be in the editor when the camper starts the bonfire.
- h3 Tests
- p These tests are what bring your challenge to life. Without them, we cannot confirm the accuracy of a user's submitted answer. Choose your tests wisely.
- p Bonfire tests are written using the Chai.js assertion library. Please use the should and expect syntax for end user readability. As an example of what not do to, many of the original Bonfire challenges are written with assert syntax and many of the test cases are difficult to read.
- p If your bonfire question has a lot of edge cases, you will need to write many tests for full coverage. If you find yourself writing more tests than you desire, you may consider simplifying the requirements of your bonfire challenge. For difficulty level 1 through 3, you will generally only need 2 to 4 tests.
\ No newline at end of file