From e04c11c2e72d666850bceabc8644700a0971e696 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Sat, 11 Jul 2015 18:31:12 -0700 Subject: [PATCH] mid-task commit for Berkeley to take over --- seed/challenges/hikes.json | 32 +++ seed/field-guides.json | 406 ++++++++++++++++++++++--------------- server/boot/challenge.js | 4 +- server/boot/fieldGuide.js | 10 +- 4 files changed, 291 insertions(+), 161 deletions(-) create mode 100644 seed/challenges/hikes.json diff --git a/seed/challenges/hikes.json b/seed/challenges/hikes.json new file mode 100644 index 00000000000..06f50a8dd95 --- /dev/null +++ b/seed/challenges/hikes.json @@ -0,0 +1,32 @@ +{ + "name": "Functional Programming", + "order": 0.050, + "challenges": [ + { + "id": "bd7129d8c441eddfbeb5bddf", + "name": "Hike: Computer Security", + "dashedName": "waypoint-computer-security", + "difficulty": 0.01, + "challengeSeed": ["133186284"], + "description": [ + "The basics of computer security, and how to make sure you protect your information. Let's cover computer security. The first thing we're going to talk about is something called a dictionary attack which has to do with your passwords. When creating your passwords, some sites require extremely specific and complicated passwords, which is actually a bit unnecessary. The type of attacks they're trying to gaurd you from are dictionary attacks. Dictionary attacks are programmed to try every word in the dictionary, or in its own database of common words and passwords, as the password for a large mass of usernames. If your password is Kangaroo, they're probably going to break into your account. Most passwords aren't this simple, but that doesn't matter. They attack such a massive amount of accounts that they only need a few passwords that are relatively simple. When creating a password, you want to use different cases, numbers, and symbols, but one of the most effective ways to create a good password is to throw some random letters in there (ex: kangarooSyCA67). Also, stay away from sequential numbers. Phishing, another thing to watch out for, is emails or webpages that mimic other valid sites to try and trick people into entering their personal information, though the site truly isn't connected to the site it's trying to mimic. In general, two ways to safeguard from these attacks are checking the address in the browser and to open a new browser and go to the website that is claiming to contact you. Let's also discuss encryption and HTTPS. If you are at Starbucks trying to access your bank account, you have reason to be suspicious that someone could see and take your information. You will want to look for a green HTTPS instead of HTTP at the beginning of the web address. That means that the site you're sending your information to is encrypting your passwords and other information, scrambling up data according to a code that only they know. In general, whenever you're showing private or sensitive information, check for HTTPS. A few other general tips: don't share passwords between important accounts. If a site you use gets hacked into, your password may be compromised regardless of its strength. Also, don't download strange files. If you don't recognise the file type like .pdf, .txt, .jpg, be wary. Some of these files you download can be very powerful and even run your computer from the inside. Lastly, keep your software updated, particularly software that interacts with the internet. One way that information can be compromised is when 'bad guys' find holes and gaps in security of older versions of softwares. Those bugs have been patched in newer versions, so if you keep everything updated, you'll avoid lots of problems. These are all very basic things you should know about how to keep your information safe on your computer." + ], + "challengeType": 6, + "tests": [ + "Q1: Passwords should be shared with all of your accounts (F, don't reuse important passwords)", + "Q2: If you don't trust a site or an email, open a new browser and re-enter the intended location. (T)", + "Q3: Keeping software updated will help protect your computer and your information. (T)" + ], + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + } + ] +} diff --git a/seed/field-guides.json b/seed/field-guides.json index 0d9c0f2adaa..47a8f602543 100644 --- a/seed/field-guides.json +++ b/seed/field-guides.json @@ -285,164 +285,6 @@ "" ] }, - { - "id": "bd7159d9c436eddfaeb5bdef", - "name": "Can I Calculate the True Cost of a Bootcamp with a Coding Bootcamp Cost Calculator?", - "dashedName": "can-i-calculate-the-true-cost-of-a-bootcamp-with-a-coding-bootcamp-cost-calculator", - "description": [ - "", - "
", - "
", - "

Coding Bootcamp Cost Calculator

", - "

Coming from _______, and making $_______, your true costs will be:

", - "
", - "
", - "

Where do you live?

", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - "
", - "
", - "
", - "

How much money did you make last year (in USD)?

", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - " ", - "
", - "
", - "
", - "
", - "
", - " ", - "
", - "
", - "
", - "
", - "
", - " ", - "
View Data Source JSON  •  Recalculate", - "
", - "

Notes:

", - "
    ", - "
  1. For cash-up-front bootcamps, we assumed an APR of 6% and a term of 3 years.
  2. ", - "
  3. For wage-garnishing bootcamps, we assume 18% of first year wages at their advertised starting annual salary of around $100,000.
  4. ", - "
  5. We assume a cost of living of $500 for cities like San Francisco and New York City, and $400 per week for everywhere else.
  6. ", - "
  7. The most substantial cost for most people is lost wages. A 40-hour-per-week job at the US Federal minimum wage would pay at least $15,000 per year. You can read more about economic cost here.
  8. ", - "
  9. Free Code Camp. We don't charge tuition or garnish wages. We're fully online so you don't have to move. We're self-paced so you don't have to quit your job. Thus, your true cost of attending Free Code Camp will be $0.
  10. ", - "
", - "
", - "
", - "
", - "
", - "

Built by Suzanne Atkinson

", - "

Suzanne is an emergency medicine physician, triathlon coach and web developer from Pittsburgh. You should  follow her on Twitter.

", - "
", - "
", - "
", - "
", - "
", - "
", - "
" - ] - }, { "id": "bd7158d9c435eddfaeb5bdef", "name": "Does Free Code Camp have an application process?", @@ -1162,5 +1004,253 @@ "

All campers who have already completed these challenges are retroactively eligible for the certificate!

", "" ] + }, + { + "id": "bd7156d9c436eddfadb5bd3b", + "name": "How can I watch Live Coding on the Free Code Camp Twitch.tv Channel?", + "dashedName": "how-can-i-watch-live-coding-on-the-free-code-camp-twitch-tv-channel", + "description": [ + "
", + "
", + "
Watch us code on our Twitch.tv channel
", + "
", + "
", + "
", + "

Watch the live stream below or on our  Twitch.tv channel.

", + "
", + "
", + "
", + "
", + " ", + "
", + "
", + "
", + "
", + "
", + " ", + "
", + "
", + "
", + "
", + " ", + "
", + "
", + "
", + "
", + "
", + "
", + "

Check out our scheduled shows. You can add them to your calendar.

", + "
", + " ", + "
", + "
", + "

", + "
", + "
", + "

Here are some of our previous shows (you can full-screen them):

", + "
", + "
", + "
", + " ", + "
", + "

link:  http://www.youtube.com/watch/Z_43xApGB9Y

", + "
", + "
", + "
", + " ", + "
", + "

link:  http://www.youtube.com/watch/PvWHzcebjjQ

", + "
", + "
", + "
", + " ", + "
", + "

link:  http://www.youtube.com/watch/yHL6mEr-LGY

", + "
", + "
", + "
", + " ", + "
", + "

link:  http://www.youtube.com/watch/dolG-yRMcPs

", + "
", + "
", + "
", + " ", + "
", + "

link:  http://www.youtube.com/watch/YMz_vrK_KlQ

", + "
", + "
", + "
", + " ", + "
", + "

link:  http://www.youtube.com/watch/bbFVxaza8Ik

", + "
", + "
", + "
", + "
", + "
", + "
", + "
", + "
", + "
" + ] + }, + { + "id": "bd7159d9c436eddfaeb5bdef", + "name": "Can I Calculate the True Cost of a Bootcamp with a Coding Bootcamp Cost Calculator?", + "dashedName": "can-i-calculate-the-true-cost-of-a-bootcamp-with-a-coding-bootcamp-cost-calculator", + "description": [ + "", + "
", + "
", + "

Coding Bootcamp Cost Calculator

", + "

Coming from _______, and making $_______, your true costs will be:

", + "
", + "
", + "

Where do you live?

", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + "
", + "
", + "
", + "

How much money did you make last year (in USD)?

", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + " ", + "
", + "
", + "
", + "
", + "
", + " ", + "
", + "
", + "
", + "
", + "
", + " ", + "
View Data Source JSON  •  Recalculate", + "
", + "

Notes:

", + "
    ", + "
  1. For cash-up-front bootcamps, we assumed an APR of 6% and a term of 3 years.
  2. ", + "
  3. For wage-garnishing bootcamps, we assume 18% of first year wages at their advertised starting annual salary of around $100,000.
  4. ", + "
  5. We assume a cost of living of $500 for cities like San Francisco and New York City, and $400 per week for everywhere else.
  6. ", + "
  7. The most substantial cost for most people is lost wages. A 40-hour-per-week job at the US Federal minimum wage would pay at least $15,000 per year. You can read more about economic cost here.
  8. ", + "
  9. Free Code Camp. We don't charge tuition or garnish wages. We're fully online so you don't have to move. We're self-paced so you don't have to quit your job. Thus, your true cost of attending Free Code Camp will be $0.
  10. ", + "
", + "
", + "
", + "
", + "
", + "

Built by Suzanne Atkinson

", + "

Suzanne is an emergency medicine physician, triathlon coach and web developer from Pittsburgh. You should  follow her on Twitter.

", + "
", + "
", + "
", + "
", + "
", + "
", + "
" + ] } ] diff --git a/server/boot/challenge.js b/server/boot/challenge.js index c0ec9008044..b75c810ed90 100644 --- a/server/boot/challenge.js +++ b/server/boot/challenge.js @@ -264,13 +264,15 @@ module.exports = function(app) { environment: utils.whichEnvironment() }; + //TODO Berkeley var challengeView = { 0: 'coursewares/showHTML', 1: 'coursewares/showJS', 2: 'coursewares/showVideo', 3: 'coursewares/showZiplineOrBasejump', 4: 'coursewares/showZiplineOrBasejump', - 5: 'coursewares/showBonfire' + 5: 'coursewares/showBonfire', + 6: 'coursewares/showHike' }; saveUser(req.user) diff --git a/server/boot/fieldGuide.js b/server/boot/fieldGuide.js index 87fcdd0e69e..c0caf5e9a69 100644 --- a/server/boot/fieldGuide.js +++ b/server/boot/fieldGuide.js @@ -23,6 +23,7 @@ module.exports = function(app) { var dashedName = req.params.fieldGuideName; var userSave = Rx.Observable.just(req.user) .filter(function(user) { + debug('filtering user', !!user); return !!user; }) .map(function(user) { @@ -38,6 +39,7 @@ module.exports = function(app) { return user; }) .flatMap(function(user) { + debug('saving user'); return saveUser(user); }); @@ -46,13 +48,14 @@ module.exports = function(app) { debug('find fieldGuide', query); Rx.Observable.combineLatest( // find that field guide - findOneFieldGuide(query), + findOneFieldGuide(query).tap(function() { console.log('foo'); }), userSave, Rx.helpers.identity ) .subscribe( // don't care about return from userSave function(fieldGuide) { + debug('onNext', fieldGuide); if (!fieldGuide) { req.flash('errors', { msg: '404: We couldn\'t find a field guide entry with ' + @@ -70,7 +73,10 @@ module.exports = function(app) { description: fieldGuide.description.join('') }); }, - next + next, + function() { + debug('onCompleted called'); + } ); }